Page 1 of 1

HD uses more space

Posted: Tue Jan 29, 2013 10:16 am
by woflux
Hello, I formatted a 1 Tb HD with ext3 and it contains only a folder of 437 Gb but device properties shows 488 Gb are used, how are the other 50 Gb used ?

thank you

Re: HD uses more space

Posted: Tue Jan 29, 2013 10:53 am
by xenopeek
The file system also needs space for keeping track of where each file is, what it is called, who owns it, what its permissions are, and so on. That may explain the difference.

Re: HD uses more space

Posted: Wed Jan 30, 2013 11:51 am
by woflux
does it need 50 Gb to track 10000 files ?

Re: HD uses more space

Posted: Wed Jan 30, 2013 11:54 am
by caf4926
lost+found
It's used to store data recovered by fsck too, should that become necessary

Re: HD uses more space

Posted: Wed Jan 30, 2013 1:43 pm
by xenopeek
woflux wrote:device properties shows 488 Gb are used
Let's take a step back; in which application exactly are you seeing this?

And the space set aside for administrative purposes is fixed; meaning it needs the same amount of space even with zero files or with a million files. That is how the ext4 filesystem works, upon creation a portion of the disk is set aside for administrative purposes. That said, 5% does sound a bit much perhaps--on my 240 GB hard disk it is closer to 2%.

Some applications say they display GB and TB, when in fact they are showing GiB or TiB, which is a different unit and would mean a different amount of bytes. http://en.wikipedia.org/wiki/Byte#Unit_symbol

1 GiB = 1.07 GB
1 TiB = 1.1 TB

So for example when a hard disk manufacturer states he has a 1 TB hard disk, most applications will show that as 0.91 TiB. That is the same amount of bytes, but with a different notation. It's quite a difference, and may also here be clouding the figures you are looking at.

Re: HD uses more space

Posted: Wed Jan 30, 2013 1:58 pm
by eanfrid
By default any partition formatted with ext2/3/4 reserves 5% of the capacity to the root user for admin tasks... 5% of 1000GiB are 50GiB :)

You can use

Code: Select all

sudo tune2fs -m N /dev/sdX
(where N is the % reserved to the root user and sdX is the partition to adjust). If it is only a data HDD, you can set the reserved space to 0% => for example:

Code: Select all

sudo tune2fs -m 0 /dev/sdb2

Re: HD uses more space

Posted: Wed Jan 30, 2013 2:21 pm
by xenopeek
eanfrid wrote:By default any partition formatted with ext2/3/4 reserves 5% of the capacity to the root user for admin tasks... 5% of 1000GiB are 50GiB :)
It wouldn't show that space as used though, it will show it as free disk space. It will just not let a normal user use that last 5% of disk space, only the root user can use it.

Re: HD uses more space

Posted: Wed Jan 30, 2013 2:31 pm
by caf4926
xenopeek wrote:
eanfrid wrote:By default any partition formatted with ext2/3/4 reserves 5% of the capacity to the root user for admin tasks... 5% of 1000GiB are 50GiB :)
It wouldn't show that space as used though, it will show it as free disk space. It will just not let a normal user use that last 5% of disk space, only the root user can use it.
I think it might
When I use Gparted and format an ext4 partition is shows used space and I'm sure that relates to lost+found

Re: HD uses more space

Posted: Wed Jan 30, 2013 2:40 pm
by eanfrid
xenopeek: check "man tune2fs" regarding the "-m" option ;) This space is reported as used (unavailable), even if it is empty, with df in a term, with gparted or with gnome-system-monitor (in GSM: compute "free space" minus "available space" while "used space" percentage is computed on what remains "available")

Re: HD uses more space

Posted: Wed Jan 30, 2013 3:15 pm
by xenopeek
For my 80 GB hard disk, System Monitor is showing:
- 73.4 GiB total
- 63.9 GiB free
- 60.2 GiB available
- 9.5 GiB used
So total = free + used. df shows the available count matching this output, while GParted shows 63.9 GiB unused matching the free count here.

Three applications, two different ways to look at storage... So we are waiting for OP to tell us in which application this 488 Gb used is displayed :wink:

Re: HD uses more space

Posted: Wed Jan 30, 2013 3:42 pm
by woflux
I open the HD with caja then right-click to properties

Re: HD uses more space

Posted: Wed Jan 30, 2013 3:48 pm
by eanfrid
OK then you see (total) minus (reserved) minus (used-by-your-data) = (available) space

Re: HD uses more space

Posted: Thu Jan 31, 2013 9:24 am
by woflux
Can I remove admin reserved space if I use the HD only for data storing ?

Re: HD uses more space

Posted: Thu Jan 31, 2013 9:50 am
by xenopeek
Yup :D eanfrid already answered that above. For example the following command if your data partition is /dev/sdb1.

Code: Select all

sudo tune2fs -m 0 /dev/sdb1