how do I remove the 5% admin reserve space for my hdd?

Soldato
Joined
7 Jan 2007
Posts
10,607
Location
Sussex, UK
I have a 1tb drive, /dev/sda

how do i firstly check its size? I understand linux keeps back 5% of the HDD incase it gets full, so admin can do stuff.

How do i remove this 5%, its just a simple storage drive.

Running debian lenny.
 
I assume your disk is formatted as ext3?

I think the percentage can only be set when you format the disk and not afterwards, would have to check though
 
it is ext3, i'm sure i ran a command when i was on arhc or maybe ubuntu that removed it.

Whats the command to check hdd partition size? The 5% may not be applied in debian lenny.
 
If you do df -h from terminal you will see the used+free doesnt quite tie up to the full size of the partition, so can work out the percentage from there.

As far as I'm aware the reserved space for root is a standard thing on ext3
 
yeh it is, but you can remove it with a command, I just forgot the command lol.

tune2fs is what you want to modify the ext3 file system.

tune2fs -l /dev/sdaX will tell you reserved block count & block size for the partition.

the -m switch for tune2fs will change the % of reserved blocks on a partition,

-m reserved-blocks-percentage
Set the percentage of the filesystem which may only be allocated
by privileged processes. Reserving some number of filesystem
blocks for use by privileged processes is done to avoid filesys-
tem fragmentation, and to allow system daemons, such as sys-
logd(8), to continue to function correctly after non-privileged
processes are prevented from writing to the filesystem. Nor-
mally, the default percentage of reserved blocks is 5%.

So to get 0% do:

tune2fs -m 0 /dev/sdaX

Hope that helps
 
what are the benefits? I just see it as 5% lost on my data drive.

Why would you think a developer(s) would design a filesystem that wastes 5% of your HDD space just for the hell of it?

It can serve several purposes, some of which are explained here.

Depending on what you use the drive for, the 5% reserved space is important and most definitely serves a use. However, there is an argument with the advent of truly big drives that 5% is too high, in which case you can tune it using the method tntcoder describes.

If you haven't filled your drive, what's the problem?
 
Back
Top Bottom