LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Missing Hard Drive Space (https://www.linuxquestions.org/questions/linux-general-1/missing-hard-drive-space-647205/)

moneyshotz 06-05-2008 09:42 AM

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?

trickykid 06-05-2008 10:10 AM

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.

johnsfine 06-05-2008 10:19 AM

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.

moneyshotz 06-05-2008 10:22 AM

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.

chadl 06-05-2008 11:42 AM

By default 5% of an ext3 fs is reserved for root. tunefs can change this, for example:
Code:

tune2fs -m 1 /dev/sda1
will change it to 1% (make sure it is unmounted fist).

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%.

moneyshotz 06-05-2008 11:53 AM

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?

chadl 06-05-2008 11:57 AM

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)

trickykid 06-05-2008 12:43 PM

Quote:

Originally Posted by moneyshotz (Post 3175634)
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.

Like I mentioned in my first reply, it's reserved for root. Did you not read my reply? Did you even try to search? This is literally asked all the time.

moneyshotz 06-05-2008 02:19 PM

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.

trickykid 06-05-2008 02:22 PM

Quote:

Originally Posted by moneyshotz (Post 3175838)
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.

But that's why I also said a search could have found the information for you, the details. I'm trying to get more people to utilize searching by such means, honestly, most of the questions any member asks has already been answered, in most cases. ;)


All times are GMT -5. The time now is 11:08 AM.