Lost Hard Drive Space
Hi,
There is something strange going on. I have two hard drives attached to my system. One of them is Running Debian(sarge) on it. Whenever I try to format my second HDD(from the debian installed on First HDD) and mount it over /mnt/data folder, there is a 10% loss of total Hard drive space. For E.g., I have a HDD with capacity 512MB. I run the following commands over it to partition it and format it. Code:
echo '0, Code:
mke2fs -j -T news /dev/hdc1 Code:
fsck -f -a /dev/hdc1 Code:
mount /dev/hdc1 /mnt/data Code:
Filesystem Size Used Avail Use% Mounted on Does any one know why this is happening?I have tried this with another HDD(different model and make) also and I get the same result. Thanks |
That is a normal result of formatting due to overhead etc. It is the case with all OS'es and all hardware.
If you were to try a search before posting, you would have found a lot of examples like this cheers :) |
Ahh, that was really silly of me. I should have thought that before. Actually, I just assumed that Linux won;t take the space away unlike Windows...:D
I would further like to know that suppose I have a tar ball of size 490MB. Now when I give the command: df -h -B M, it calculates the space according to 1024*1024 and the output is: Code:
Filesystem Size Used Avail Use% Mounted on Code:
root@debian:~# df -h -B MB Also,The size 490MB of my tar ball which Debian shows is based on which calculation:1MB=1000KB or 1MB=1024KB??? Thanks for the help. |
1KB= 1024B ... you can't confuse the bits ;)
...notice that when you requested a print where 1K=1000, the used and available space increased as well ... meaning both df prints are equal, just using different multipliers. |
Thanks I understand what you are trying to say.
Based on your explanation, does that mean my 490MB tar ball won't fit into my partition which shows 482MB free space(based on 1K=1024B)??? Thanks |
that's right :mad: ...maybe you could compress it.
|
Every partition has a reserved area for the boot loader and storage of the index data of the filing system. The entire track 1 out of 64 is used for that purpose. So any data storage should never exceed
1000/1024*63/64 *100% = 96% of the orginal. 512Mb*96% = 492Mb. |
Also note that linux by default tends to reserve 5% of the drive space of a formatted partition for the root user. Per the mkfs.ext3 manpage:
Code:
-m reserved-blocks-percentage |
Quote:
But does this 5% reserves is included in the output of the command df -h or df -h -B M or df -h -B MB |
All times are GMT -5. The time now is 05:16 PM. |