[LUNI] Disk full, but not really

Seva Epsteyn seva at sevatech.com
Wed Aug 15 04:37:50 CDT 2007


On Tue, 14 Aug 2007, Ramin K wrote:

> Branko Kotur wrote:
> > I've noticed that when the hard drive starts filling up, about 10% is left
> > in reserve so that regular users can't use it.  In other words, take the
> > following df output for example:

> > /dev/hda6              61G   52G  6.2G  90% /home
> > /dev/hda5            1012M   38M  923M   4% /tmp
> > 
> > /home obviously isn't full, but since it's at 90%, the user is not able to
> > add new files.  Only root can.  Is there a way to disable this behavior?  I
> > realize this isn't smart if the drive isn't partitioned, but since the /home
> > is on a seperate partition, I don't see any danger at this point.  Quotas
> > are enabled, but I've never played with them very much, so I don't know if
> > they're what's causing this.
> > 
> > Does linux do this by default or did some software on the server implement
> > this?  
> 
> You can mess with the limit using e2fsprogs, I forget the details, but you
> start to lose performance in significant ways if the file system does not have
> extra space to work in. I would suggest getting more disk as a simpler and
> ultimately cheaper solution.
> 

df output already takes into account reserved space, so 90% should mean 
90% of user accessible space.  In fact if you add used 52G to free 6.2G 
you can see that it's 58.2G out of 61G of disk, so 3G has already been 
reserved for root and the real usage of disk is at 85%.

You can see how much is reserved (default to 5%) and change it with the 
tune2fs program, for example:

# tune2fs -l /dev/md0 | grep Reserved
Reserved block count:     104740
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)

So 104740 blocks are reserved for uid 0 (user root), you can change it 
with the -r (blocks) or -m (percentage) option such as "tune2fs -m 1 
/dev/md0).  I am no expert, but I assume you would be more than fine with 
1% reserved on a 60G disk, since that still leaves 600M of reserved space.

Based on the above, I think that uou must be experiencing different issue. 
What error do you see when a user tries to write to disk?

-Seva


More information about the luni mailing list