LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   df -h .. Lying? (https://www.linuxquestions.org/questions/linux-general-1/df-h-lying-25364/)

mikeshn 07-08-2002 08:35 PM

df -h .. Lying?
 
Hello

Below is given the partition of my hard drive. I have probably very stupid question. For example /dev/hda3 is 13 GIG ( 10 GIG [available] + 2.2 GIG[used] = 12.2 GIG) where is another 0.8 GIG of hard drive? Same story with /dev/hda2. What is wrong?


root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 13G 2.2G 10G 17% /
/dev/hda2 50M 14M 34M 28% /boot
none 125M 0 124M 0% /dev/shm
Thanks

pickledbeans 07-08-2002 08:42 PM

My geuss is its just rounding. I seen fs listed at 100% that still had space on the. try df -k and df -m?
Then again I'm not sure how ext2 journaling effects file space?

finegan 07-08-2002 08:52 PM

First, like pickledbeans said, there is quite a lot lost to inode space for the filesystem.

Second, hard drive manufacturers are cheap and give your bytes to you in linear space, so 13Gb is:

13,000,000,000 bytes.

Meanwhile every operating system on the planet treats 1k as

1024 bytes. (2 to the tenth) So 1 Meg:

1024x1024 = 1048576 bytes. (2 to the twenthieth) So 1 Gig:

1048576x1024 = 1073741824 bytes.

13000000000 / 1073741824 = 12.11Gb so really the drive probably has more linear bytes on it than it claims (hard to make the platters so bloody precise)

Cheers,

Finegan


All times are GMT -5. The time now is 09:04 AM.