You are not logged in.

#1 2006-08-14 11:08:13

infestdead
Member
From: Bulgaria
Registered: 2006-05-10
Posts: 38

Ext3 - 250GB = 219GB?

Recently I bought a 250GB HDD and created only one partition (ext3).
Then `df -h` gives me 219GB free space. Shouldn't it be around 238GB?
If ext3 is responsible, what else could I do (use) to get the maximum storage capacity of my HDD.

Thank you in advance.


............. .......... .........................
......................
Where is Pacman when you need him....

Offline

#2 2006-08-14 11:31:03

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Ext3 - 250GB = 219GB?

ext3 reserves usually 5% of drive space

u could do reiserfs instead


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#3 2006-08-14 11:54:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Ext3 - 250GB = 219GB?

5% is the default. Have a look at man mke2fs for full details.

Offline

#4 2006-08-14 12:45:49

infestdead
Member
From: Bulgaria
Registered: 2006-05-10
Posts: 38

Re: Ext3 - 250GB = 219GB?

Hm.. I see. Now that I have that partition half full with data, can I change those 5% or this option is being set beforehand?

EDIT: Hmm[2] ..238GB - 5% = 226.1GB. Still 7GB away from those 219 that I got..


............. .......... .........................
......................
Where is Pacman when you need him....

Offline

#5 2006-08-14 13:08:58

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: Ext3 - 250GB = 219GB?

Those who make harddrives want space to seem as much as possible (either that or they are stupid), so they use 1000byte = 1 kb instead of the real 1024byte = 1kb and so on:

>>> (250*1000*1000*1000)/(1024*1024*1024.0)
232.83064365386963

Now remove 5% of 232.8, and you get 221.... Now that's closer...

Offline

#6 2006-08-14 13:15:08

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: Ext3 - 250GB = 219GB?

The five percent mentioned are reserved for the super user (aka root), you can change this by using the -m switch of mke2fs. Other then that there's also some space needed to keep the journal on. For example I can use 230 GB of my 250 GB (actually it's 238 (1000 vs 1024...)) harddrive, whereas I reserved 1% for root. Maybe inode size and stuff like that matters as well.

Offline

#7 2006-08-14 13:17:49

infestdead
Member
From: Bulgaria
Registered: 2006-05-10
Posts: 38

Re: Ext3 - 250GB = 219GB?

jaboua wrote:

Those who make harddrives want space to seem as much as possible (either that or they are stupid), so they use 1000byte = 1 kb instead of the real 1024byte = 1kb and so on:

>>> (250*1000*1000*1000)/(1024*1024*1024.0)
232.83064365386963

Now remove 5% of 232.8, and you get 221.... Now that's closer...

Why would they do that? Unless they ARE stupid! Are you sure that's how they do their math!?
If so -> that seems to solves the mystery. 2GB loss I can handle. smile

smoon wrote:

The five percent mentioned are reserved for the super user (aka root), you can change this by using the -m switch of mke2fs.

Could I change that afterwards? When the drive is ..say.. half full?


............. .......... .........................
......................
Where is Pacman when you need him....

Offline

#8 2006-08-14 13:47:11

Jarsto
Member
From: Groningen, The Netherlands
Registered: 2005-11-18
Posts: 35
Website

Re: Ext3 - 250GB = 219GB?

infestdead wrote:
smoon wrote:

The five percent mentioned are reserved for the super user (aka root), you can change this by using the -m switch of mke2fs.

Could I change that afterwards? When the drive is ..say.. half full?

I think you should be able to adjust it with "tune2fs -m". Check "man tune2fs" to be sure.


Jarsto

Offline

#9 2006-08-14 13:56:27

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Ext3 - 250GB = 219GB?

tune2fs is what you're looking for so.

Offline

#10 2006-08-14 14:46:18

detto
Member
Registered: 2006-01-23
Posts: 510

Re: Ext3 - 250GB = 219GB?

Nobody mentioned?! ..... FIRST UNMOUNT THE SPECIFIC PARTITION DUDE :!:

Well, things may get lost or even bader if u try fiddling with commands like tune2fs or others on a mounted hard drive, always UNMOUNT before, thx! lol wink

Offline

#11 2006-08-14 15:06:30

infestdead
Member
From: Bulgaria
Registered: 2006-05-10
Posts: 38

Re: Ext3 - 250GB = 219GB?

You BET I will umount. smile Thank you all for the help.
EDIT: My mistake. :oops:
The free space has to be 232GB (NOT! 238 as I stated above.
250 000 000 000/ 1024 / 1024 / 1024 = 232GB.
Minus the 5% reserved for the root account (11.6GB) equals 220.4GB.
Minus some for the ext3 journals (I suppose?) = 219GB. smile


............. .......... .........................
......................
Where is Pacman when you need him....

Offline

#12 2006-08-15 13:22:05

vipernicus
Member
From: IT Dept
Registered: 2005-05-10
Posts: 54
Website

Re: Ext3 - 250GB = 219GB?

I usually always run tune2fs -m 1 /dev/hdaX on my ext3 partitions.

Offline

#13 2006-08-15 13:43:04

djpharoah
Member
From: SoCal
Registered: 2006-06-18
Posts: 185

Re: Ext3 - 250GB = 219GB?

vipernicus wrote:

I usually always run tune2fs -m 1 /dev/hdaX on my ext3 partitions.

Yeah - that will reduce it from 5% to 1%. Which is a lot when yu have such a large hard drive.


IBM T41p - 2373-xXx - kernel26thinkpad

Offline

#14 2006-08-15 14:04:49

infestdead
Member
From: Bulgaria
Registered: 2006-05-10
Posts: 38

Re: Ext3 - 250GB = 219GB?

djpharaoh, you're right. That's why I did tune2fs -m 0. Since I use this drive only for storage of movies, music - the root doesn't need emergency space there. For the / partition however, I would never touch his 5%. smile


............. .......... .........................
......................
Where is Pacman when you need him....

Offline

Board footer

Powered by FluxBB