I have a partition /dev/sda1.
Disk utility shows it has the capacity of 154 GB.
df -h shows
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 123G 104G 14G 89% /
devtmpfs 1006M 280K 1006M 1% /dev
none 1007M 276K 1006M 1% /dev/shm
none 1007M 216K 1006M 1% /var/run
none 1007M 0 1007M 0% /var/lock
none 1007M 0 1007M 0% /lib/init/rw
Why are the results different? Where are the missing 31 GB?
Best Answer
One reason the partition capacities can differ is that some space is reserved for root, in the event the partitions become full. If there is no space reserved for root, and the partitions become full, the system cannot function. However, this difference is usually of the order of 1%, so that does not explain the difference in your case. From the man page for df
So df is really showing the size of your filesystem, which is usually the size of the device, but this may not be true in your case. Does your filesystem extend over the whole of your partition?
Does
make any difference? This command tries to increase your filesystem to cover the entire partition. But make sure you have a backup if you try this.