Missing Hard Drive Space
So I just installed a new 1tb hard drive. I used fdisk to give it one partition. And then I formatted it w/ ext3. There should be nothing on it but when I looked at the drive it says 877GB free of 924gb. What happened to the rest?
for the installed hard drive... df -h /dev/sdb1 925G 200M 878G 1% /mnt/storage fdisk -l Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00066782 Device Boot Start End Blocks Id System /dev/sdb1 1 121601 976760001 83 Linux Gparted shows 917GB free of 925GB And there is nothing on the drive What accounts for the discrepancies? |
Normal. Simply put, space is reserved for root and the way it's formatted takes up inodes and space to format the system with a filesystem. Now go google, this is asked all the time.
|
I think much of the difference is in the meanings of GB.
Most kinds of computer memory have traditionally been measured based on 2 to 10 power (1024), so K = 1024 M = K * K = 1048576 G = K * M = 1073741824 But hard drives have traditionally been measured based on 10 to the 3 power (1000), so K = 1000, M=K*K, G=K*M Some of the programs from which you showed output seem to be reporting based on G=1073741824. Partitioning also loses one cylinder (8225280 bytes) so your original 1000204886016 bytes is reduced to 1000202273280. If you divide that by the larger value of G, you get 931.51. I'm not sure what brings that down to 925 nor what brings the free portion down to 917. A file system must have some overhead, but I don't know if that is that much. |
The 917GB would be understandable. That's what Gparted is reporting. I was just wondering why
df -f /dev/sdb1 925G 200M 878G 1% /mnt/storage So that says I only have 878GB free. I'm not sure why it would drop down that low if I don't have anything installed. |
By default 5% of an ext3 fs is reserved for root. tunefs can change this, for example:
Code:
tune2fs -m 1 /dev/sda1 That is why there is space that is not "used", but is not "available". On a disk setup like you have it, there is no need for reserved root space; but it is to ensure that root can get in and fix the system if the disk were to actually reach 100%. |
chadl, thanks for that information. That was puzzling me at first. So since this is an secondary hard drive, would you think 1% would be ok to reserve for root?
|
I said 1%, but actually, as none of the system daemons are going to be using the disk, you might as well set it to 0 (-m 0) so that none of it gets reserved (as chances are, none of it will be used anyway)
|
Quote:
|
trickykid, you didn't mention how much was reserved by the root. I was just surprised why I missing so much space. I wasn't sure if inodes and/or root was taking up most of the space.
chadl did a great job explaining to me that 5% was used by root and how to fix it. |
Quote:
|
All times are GMT -5. The time now is 11:08 AM. |