Urgent: filesystem "full", though space is available

Christopher Sean Hilton chris at vindaloo.com
Mon Mar 17 17:20:06 UTC 2008


On Mar 17, 2008, at 11:34 AM, Dr. Jennifer Nussbaum wrote:

>
> Hi, Ive got a big problem now on a production server.
>
> When i do various things, i am getting "write failed, file system  
> full"
> messages all over the place. Ive gone through and deleted
> things i can, and i should have the space now, but its just
> not available:
>
> $ df -m
> Filesystem  1M-blocks Used Avail Capacity  Mounted on
> /dev/da0s1a      2015 1858    -3   100%    /
> /dev/da0s1e     14061 9002  3933    70%    /usr/local
> procfs              0    0     0   100%    /proc
>
> I dont know what kind of math lets you do 2015-1858 and gives
> you an answer of -3!
>
> I have softupdates, or whatever, but i dont know how to get
> it to release this space. I cant reboot the running server.
> I am planning on adding a disc to this system but right now
> i need to get this space released ASAP! Can anyone help?
>

The math used in df is a compromise. The system reserves about 8% of  
the blocks in the filesystem for root to write only. This is because  
back in the day if the filesystem truely completely filled up the  
situation would go from bad to worse pretty quickly. If I recall  
correctly The filesystem performance falls off of the cliff once the  
filesystem fills up.

In your particular case I can see that you have about 150Mb free on  
the system. You do have the option of getting at this space using the  
tunefs command:

       man tunefs

to change the percentage of free space reserved for root but as I  
inferred before expect performance to suffer.

A thread poster suggested that you remove the contents of /usr/ports/ 
distfiles to free up some space. If you built the system from scratch  
and have built a bunch of ports this is a good place to go but if that  
is the case you probably want to clean out any work directories first:

      # find /usr/ports -type d -name work -print

Will generate a list of the work directories for any ports you have  
built. In general you can completely recreate this data by building  
the port again so if you have a lot of space tied up here you can  
easily reclaim it with this command:

      # find /usr/ports -type d -name work -exec rm -rf {} \;

This will remove just the work directories from the ports tree. It  
costs you extract, patch, and compile time but it's quicker than:

      # cd /usr/ports
      # make clean

If you haven't built the system from ports then you have to identify  
what action filled up the filesystem and make the appropriate  
correction.

-- Chris



More information about the freebsd-questions mailing list