From owner-freebsd-fs@FreeBSD.ORG Thu Sep 30 15:48:02 2010 Return-Path: Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1847C106564A for ; Thu, 30 Sep 2010 15:48:02 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 60BB18FC13 for ; Thu, 30 Sep 2010 15:48:01 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA24598; Thu, 30 Sep 2010 18:47:56 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4CA4B12B.7050307@icyb.net.ua> Date: Thu, 30 Sep 2010 18:47:55 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100920 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Jeremy Chadwick References: <4CA45444.6070002@dannysplace.net> <201009301438.o8UEckoY019473@lurza.secnetix.de> <20100930144845.GA19926@icarus.home.lan> In-Reply-To: <20100930144845.GA19926@icarus.home.lan> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.ORG Subject: Re: Strange ZFS problem, filesystem claims to be full when clearly not full X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2010 15:48:02 -0000 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 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