Huge Partition

Rodolfo J. Paiz rpaiz at simpaticus.com
Thu Apr 22 22:03:54 UTC 2004


At 14:44 4/22/2004, you wrote:
>>Root normally reserves space on a partition to prevent the disk filling 
>>up totally and crashing the system, but that's normally just 5%, so 
>>where's the other 5% (100GB) going? You can check how much space is 
>>"reserved" for root with:
>
>With this in mind, how do you figure such a large space consumption for 
>overhead?  I interpret that as minimal and normal overhead -- formating 
>factors, etc.
>
>In fact, on my 30G physical drive as a single partition it reports a 
>filesystem size of 27.94G (a loss of ~7% due to the differences in the way 
>it is stated + overhead)

You'll note that that 1000/1024 is just about 2% short. That should be all 
you lose to disk naming conventions, but you may lose other space to (as 
others mentioned) inodes, overhead, etc. So you get to 27.94GB *filesystem 
size*. But if you add the "used" and "available" numbers from "df -m", do 
they add to that? Mine don't... they add up to about 5% less than the 
filesystem size. That's the reserved blocks.

On one disk I could check very quickly, I have this (edited for brevity):

root at rita [~]# df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda2                55236     29532     22898  57% /
/dev/hda1                   99         7        86   8% /boot
none                       243         0       243   0% /dev/shm

root at rita [~]# tune2fs -l /dev/hda2
Filesystem OS type:       Linux
Inode count:              7192576
Block count:              14366126
Reserved block count:     718306

718306 reserved blocks is nearly exactly 5% of the total number of blocks. 
And note that 22898 + 29532 (used + available) is 5.08% less than 55236 
(the number of blocks in the filesystem). Now, let's make some changes!

         1. Here's the original setup:

root at rita [~]# df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda2                55236     29532     22898  57% /
/dev/hda1                   99         7        86   8% /boot
none                       243         0       243   0% /dev/shm

         2. Reduce the reserved blocks percentage to 3%:

root at rita [~]# tune2fs -m 3 /dev/hda2
tune2fs 1.27 (8-Mar-2002)
Setting reserved blocks percentage to 3 (430983 blocks)

         3. The results:

root at rita [~]# df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda2                55236     29532     24020  56% /
/dev/hda1                   99         7        86   8% /boot
none                       243         0       243   0% /dev/shm

You'll note that the filesystem size has not changed, and the used space 
has not changed. BUT, more space is available because we have fewer 
reserved blocks. Checking again, 24020 + 29532 = 53552, which is 3.05% less 
than the filesystem size.

         4. Put things back to normal:

root at rita [~]# tune2fs -m 5 /dev/hda2
tune2fs 1.27 (8-Mar-2002)
Setting reserved blocks percentage to 5 (718305 blocks)

root at rita [~]# df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda2                55236     29532     22898  57% /
/dev/hda1                   99         7        86   8% /boot
none                       243         0       243   0% /dev/shm

So, the loss of space to which you refer is independent of, and additional 
to, the one I mentioned. In reality,

         * Filesystem size = used + available + reserved

         * Disk space = filesystem size + overhead

We are both right. <grin>


-- 
Rodolfo J. Paiz
rpaiz at simpaticus.com
http://www.simpaticus.com





More information about the fedora-list mailing list