Strange behaviour of the filesystem on FreeBSD-5.5

Erik Trulsson ertr1013 at
Tue Dec 9 02:45:28 PST 2008

On Tue, Dec 09, 2008 at 12:51:18PM +0300, ???? wrote:
> Hello.
> --
> I have a trouble with /var filesystem on FreeBSD 5.5-RELEASE-p20 (upgraded from 5.2 to 5.3, and then to 5.5 some days ago):
> 'df -h' shows:
> Filesystem     Size    Used   Avail Capacity  Mounted on
> /dev/ad0s1d    248M    138M     90M    61%    /var
> 'du -s /var' shows:
>  28M    /var

> I'm sure, that there can not be 62Mb of technical info on such small
> partition. So, probably there is a bug in soft-updates, or some another
> thing, that i can't understand. Free space on /var reduces with time, and
> after three days there are no free inodes. But after i reboot my machine
> (and background fsck makes it's job), things are good again, du and df are
> in agreement about sizes of filesystems.
> Also i tried to verify, that there are no files, which are deleted, but
> still occupy place in filesystem (i.e., when some process still use it's
> filehandle). The output of 'lsof +D /var' shows *only* existent files on
> /var filesystem.

Are you sure that lsof can determine the correct directory for deleted files
that still exist?  They do not reside in any directory any longer after all.

I strongly suspect that your problem is indeed files that have been deleted but
are still in use by some process (all the symptoms fit), but that your
method of finding such files is insufficient.

Reading the lsof(8) manpage makes me think that 'lsof +aL1 /var' will list
the deleted-but-still-existing files you are interested in. (Given as an
example in the description of the +L option.)

> Can anybody, please, give me some advice about how to fix this VERY
> annoying problem, since this FreeBSD box is our enterprise's router, and i
> sometimes must go to office and reboot it even on holidays. Maybe,
> reinstalling everything from scratch would be the simplest thing to do,
> but i still hope, that somebody can tell me how to fix everything 'in
> place'.

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at

More information about the freebsd-questions mailing list