Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Upon logging into our FreeNAS via shell, it says

/var: write failed, filesystem is full

So I did

> df -h
Filesystem             Size    Used   Avail Capacity  Mounted on
/dev/ufs/FreeNASs2a    927M    358M    494M    42%    /
devfs                  1.0K    1.0K      0B   100%    /dev
/dev/md0               4.6M    1.8M    2.4M    43%    /etc
/dev/md1               824K    2.5K    756K     0%    /mnt
/dev/md2               149M    149M    -12M   109%    /var
/dev/ufs/FreeNASs4      20M    1.7M     17M     9%    /data
raid-5x3               100G     58M    100G     0%    /mnt/raid-5x3
raid-5x3/alpha          11T     11T    100G    99%    /mnt/raid-5x3/alpha
raid2                   11T    9.8T    903G    92%    /mnt/raid2

The biggest folder in /var was log ... and the biggest file in there was messages (146669553 bytes) so I rm messages.

But df still shows the same exact thing, and I'm still getting the error.

share|improve this question
up vote 3 down vote accepted

This is most likely because the file that used to be known as /var/log/messages is still open despite having been unlinked.

Kill/restart the process that holds the file open (I would bet on syslogd) so that the space can be freed.

Alternatively there could be more links to the file, but that seems rather unlikely unless you have deliberately set that up.

share|improve this answer
Find out which process holds the file open with fstat. – Karl Richter Feb 3 '15 at 21:25

Whatever process writes to that file still has an open file handle for it. The space won't be reclaimed until that file handle is closed. Either restart the process (probably your syslog daemon) or restart the entire system if you don't care to track down the process.

share|improve this answer
Thanks, you're both right; but Hakan needs the points more and he answered first! :-) – Ze'ev Apr 5 '14 at 19:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.