HD uses more space

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help

HD uses more space

Postby woflux on Tue Jan 29, 2013 10:16 am

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
woflux
Level 1
Level 1
 
Posts: 23
Joined: Sat Sep 15, 2012 6:44 am

Linux Mint is funded by ads and donations.
 

Re: HD uses more space

Postby xenopeek on Tue Jan 29, 2013 10:53 am

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15255
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HD uses more space

Postby woflux on Wed Jan 30, 2013 11:51 am

does it need 50 Gb to track 10000 files ?
woflux
Level 1
Level 1
 
Posts: 23
Joined: Sat Sep 15, 2012 6:44 am

Re: HD uses more space

Postby caf4926 on Wed Jan 30, 2013 11:54 am

lost+found
It's used to store data recovered by fsck too, should that become necessary
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1784
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: HD uses more space

Postby xenopeek on Wed Jan 30, 2013 1:43 pm

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15255
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HD uses more space

Postby eanfrid on Wed Jan 30, 2013 1:58 pm

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.
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: HD uses more space

Postby xenopeek on Wed Jan 30, 2013 2:21 pm

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15255
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HD uses more space

Postby caf4926 on Wed Jan 30, 2013 2:31 pm

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
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1784
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: HD uses more space

Postby eanfrid on Wed Jan 30, 2013 2:40 pm

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")
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: HD uses more space

Postby xenopeek on Wed Jan 30, 2013 3:15 pm

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:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15255
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HD uses more space

Postby woflux on Wed Jan 30, 2013 3:42 pm

I open the HD with caja then right-click to properties
woflux
Level 1
Level 1
 
Posts: 23
Joined: Sat Sep 15, 2012 6:44 am

Re: HD uses more space

Postby eanfrid on Wed Jan 30, 2013 3:48 pm

OK then you see (total) minus (reserved) minus (used-by-your-data) = (available) space
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: HD uses more space

Postby woflux on Thu Jan 31, 2013 9:24 am

Can I remove admin reserved space if I use the HD only for data storing ?
woflux
Level 1
Level 1
 
Posts: 23
Joined: Sat Sep 15, 2012 6:44 am

Re: HD uses more space

Postby xenopeek on Thu Jan 31, 2013 9:50 am

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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15255
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 18 guests