WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: df -h doesn't reveal the whole HDD allocated  (Read 1725 times)

Offline Adam

  • Full Member
  • ***
  • Posts: 121
df -h doesn't reveal the whole HDD allocated
« on: February 04, 2017, 07:16:47 AM »
Hi all,

I just did another installation on VirtualBox.
HDD Space allocated is 30 GB. The information is displayed correctly in fdisk -l, but not in df -h

Code: [Select]
tc@box:~$ fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *           1          24      192748+ 83 Linux
/dev/sda2   *          25         146      979965  82 Linux swap
/dev/sda3             147        3917    30284535   5 Extended
/dev/sda5             147        3917    30284503+ 83 Linux
tc@box:~$

I can only see sda1, but not sda2,3 & 5 in df -h
Code: [Select]
tc@box:~$ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  907.5M     12.1M    895.3M   1% /
tmpfs                   504.1M         0    504.1M   0% /dev/shm
/dev/sda1               178.3M     15.9M    153.0M   9% /mnt/sda1
/dev/loop0              232.0K    232.0K         0 100% /tmp/tcloop/ncurses
/dev/loop1               28.0K     28.0K         0 100% /tmp/tcloop/cfdisk
/dev/loop2                1.5M      1.5M         0 100% /tmp/tcloop/openssl
/dev/loop3               92.0K     92.0K         0 100% /tmp/tcloop/libedit
/dev/loop4                2.0M      2.0M         0 100% /tmp/tcloop/openssh
tc@box:~$

Please let me know how to fix this issue. Thanks

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: df -h doesn't reveal the whole HDD allocated
« Reply #1 on: February 04, 2017, 08:01:34 AM »
Hi Adam
Look closer. The output of  df -h  is showing the size of  sda1. The output of  fdisk -l  shows a 32 GB drive (sda) with  sda5
sized at  30 GB. If  sda5  is not mounted, it won't show up in  df -h.