Strange ZFS problem, filesystem claims to be full when clearly not full

Andriy Gapon avg at icyb.net.ua
Thu Sep 30 15:48:02 UTC 2010


on 30/09/2010 17:48 Jeremy Chadwick said the following:
> On Thu, Sep 30, 2010 at 04:38:46PM +0200, Oliver Fromme wrote:
>> Danny Carroll <fbsd at dannysplace.net> wrote:
>>  > [...]
>>  > It certainly smells like a process still writing to a file that is unlinked.
>>  > I wonder if it would show up with lsof.
>>
>> If it's a file that was unlinked that is still held open by
>> a process, then lsof will definitely list it.  The command
>>
>> # lsof +L1
>>
>> lists all open files with a link count of zero.  You can
>> restrict it to a certain file system like this:
>>
>> # lsof +aL1 /var
>>
>> Of course, lsof won't list the file name because the file
>> doesn't have a name anymore.  But it lists the process by
>> name, PID and user, the file system and the file size.
> 
> Can someone explain how use of lsof in this regard is different than use
> of fstat(1) like I originally mentioned?  Does lsof do something more
> thorough or differently that what fstat does?

I believe that there is no reason to prefer lsof except for those who spent more
time with Linux than with FreeBSD.

-- 
Andriy Gapon


More information about the freebsd-fs mailing list