How to clear an improperly unreferenced file in multi-user mode?

Dan Nelson dnelson at allantgroup.com
Thu Nov 3 15:40:22 GMT 2005


In the last episode (Nov 03), Olaf Greve said:
> When doing some maintenance on my fall-back server I ran into
> something weird. When running df it turned out /var was for 90% full.
> I then manually deleted some files (as root over SSH), amongst which
> the 'maillog' logfiles in /var/log, I also killed sendmail (as it was
> generating the big log files, and at present I don't need to run it
> on that machine), and just to be sure I created a new 'maillog file
> of 0 length.

Sendmail may be generating the events, but syslogd is the process that
opens and writes to logfiles.  Send it a HUP signal and it will close
and reopen them, which should free up your missing space.  If that
doesn't do it, install lsof and run "lsof +L 1", which will tell you if
there are any other processes holding open filehandles to deleted
files.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list