Results 1 to 5 of 5

Thread: Hard drive does not show up in "df -h" but is mounted

  1. #1
    Join Date
    Sep 2006
    Location
    Daly City, CA
    Beans
    39
    Distro
    Ubuntu

    Question Hard drive does not show up in "df -h" but is mounted

    I am incredibly confused. Here goes:

    Back in December or so I added a hard drive to my web server. During the process, I formatted it and added it to /etc/fstab so it would automatically mount on boot.

    However, now I'm noticing that when I run df -h, it does not show up in the list. Furthermore, the mount point that it's supposed to be on has stuff in it, but now I'm wondering if it is actually on the hard drive I installed or on the main boot disk.

    Here is the results of df -h:
    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              37G  5.2G   30G  15% /
    varrun                471M  236K  471M   1% /var/run
    varlock               471M     0  471M   0% /var/lock
    udev                  471M   40K  471M   1% /dev
    devshm                471M     0  471M   0% /dev/shm
    And the results of fdisk -l (as sudo):

    Code:
    Disk /dev/sda: 41.1 GB, 41174138880 bytes
    255 heads, 63 sectors/track, 5005 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xca20ca20
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        4798    38539903+  83  Linux
    /dev/sda2            4799        5005     1662727+   5  Extended
    /dev/sda5            4799        5005     1662696   82  Linux swap / Solaris
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       60801   488384001   83  Linux
    and finally, my /etc/fstab:

    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/hda1 -- converted during upgrade to edgy
    UUID=9dbe8086-8d06-42b6-b43e-ca9fcfb03e38 / ext3 defaults,errors=remount-ro,usrq
    uota,grpquota 0 1
    # /dev/hda5 -- converted during upgrade to edgy
    UUID=12475df8-ba14-495e-ba3e-a87d7036215a none swap sw 0 0
    /dev/cdrom        /media/cdrom0   udf,iso9660 user,noauto     0       0
    Note, I don't see the drive anywhere in fstab, which probably means I did not set something up correctly. It's supposed to be mounted at /multimedia

    I run a small webserver and I do not have physical access to the machine (400 miles away).

    Did I just fail to add the drive to /etc/fstab?

    I should probably add that the drive is formatted as ext3 if that makes any difference.
    Last edited by ocdude; May 16th, 2008 at 02:28 AM. Reason: adding information about ext3
    Running some form of Ubuntu on really questionable hardware since 2006.

  2. #2
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Hard drive does not show up in "df -h" but is mounted

    No, the drive isn't mounted. The fact that it shows up in fdisk -l only means that it's attached.

    You'll need to add it to /etc/fstab manually.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  3. #3
    Join Date
    Sep 2006
    Location
    Daly City, CA
    Beans
    39
    Distro
    Ubuntu

    Re: Hard drive does not show up in "df -h" but is mounted

    Aha! I knew I was missing something somewhere. Thanks. I guess I just needed another set of eyes to catch what I was missing.
    Running some form of Ubuntu on really questionable hardware since 2006.

  4. #4
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Hard drive does not show up in "df -h" but is mounted

    Remember to remove/move the stuff out of the mount point (/multimedia) before mounting the drive otherwise you'll be wasting space and/or have an inconsistent set of files.

    You may prefer to temporarily mount your other drive elsewhere, copy the stuff from /multimedia to it, clear out /multimedia, then mount the drive on /multimedia (either manually or via fstab).

    Mathew
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  5. #5
    Join Date
    Sep 2006
    Location
    Daly City, CA
    Beans
    39
    Distro
    Ubuntu

    Re: Hard drive does not show up in "df -h" but is mounted

    Thanks dudes. When I actually mounted the drive I mounted it to /mnt/multimedia and copied everything over from /multimedia, deleting the originals freeing up space. Thanks again.
    Running some form of Ubuntu on really questionable hardware since 2006.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •