HD uses more space

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
woflux

HD uses more space

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: HD uses more space

Post 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.
Image
woflux

Re: HD uses more space

Post by woflux »

does it need 50 Gb to track 10000 files ?
caf4926
Level 7
Level 7
Posts: 1916
Joined: Mon Mar 22, 2010 3:21 pm
Location: Argyll and Bute

Re: HD uses more space

Post by caf4926 »

lost+found
It's used to store data recovered by fsck too, should that become necessary
Linux Mint 21.1 Cinnamon
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: HD uses more space

Post 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.
Image
eanfrid

Re: HD uses more space

Post 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
Last edited by eanfrid on Thu Jan 31, 2013 11:41 am, edited 1 time in total.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: HD uses more space

Post 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.
Image
caf4926
Level 7
Level 7
Posts: 1916
Joined: Mon Mar 22, 2010 3:21 pm
Location: Argyll and Bute

Re: HD uses more space

Post 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
Linux Mint 21.1 Cinnamon
eanfrid

Re: HD uses more space

Post 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")
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: HD uses more space

Post 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:
Image
woflux

Re: HD uses more space

Post by woflux »

I open the HD with caja then right-click to properties
eanfrid

Re: HD uses more space

Post by eanfrid »

OK then you see (total) minus (reserved) minus (used-by-your-data) = (available) space
woflux

Re: HD uses more space

Post by woflux »

Can I remove admin reserved space if I use the HD only for data storing ?
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: HD uses more space

Post 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
Image
Locked

Return to “Hardware Support”