Date: Thu, 30 Sep 2010 19:08:50 +0200 From: Torbjorn Kristoffersen <torbjoern@gmail.com> To: freebsd-fs@freebsd.org Subject: Fwd: Strange ZFS problem, filesystem claims to be full when clearly not full Message-ID: <AANLkTimsSpP4nCE18H%2BQJCS1iKqw-wmoUdCc1OdU1tM2@mail.gmail.com> In-Reply-To: <AANLkTinHoxX4MfVCEB2rrdcS1ubwQp%2Bc37uP2BcP2Crm@mail.gmail.com> References: <4CA45444.6070002@dannysplace.net> <201009301438.o8UEckoY019473@lurza.secnetix.de> <20100930144845.GA19926@icarus.home.lan> <4CA4B12B.7050307@icyb.net.ua> <AANLkTinHoxX4MfVCEB2rrdcS1ubwQp%2Bc37uP2BcP2Crm@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 30, 2010 at 5:47 PM, Andriy Gapon <avg@icyb.net.ua> wrote: > 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@dannysplace.net> wrote: >>> =A0> [...] >>> =A0> It certainly smells like a process still writing to a file that is= unlinked. >>> =A0> 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. =A0The command >>> >>> # lsof +L1 >>> >>> lists all open files with a link count of zero. =A0You 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. =A0But 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? =A0Does 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 spe= nt more > time with Linux than with FreeBSD. > I tried fstat earlier and now I tried lsof as suggested. =A0Doing lsof +L1 only gave me: COMMAND =A0PID =A0USER =A0 FD =A0 TYPE DEVICE SIZE/OFF NLINK =A0 NODE NAME mysqld =A01030 mysql =A0 =A04u =A0VREG =A0 0,99 =A0 =A0 =A0 =A00 =A0 =A0 0 = 800965 / (/dev/mirror/root) mysqld =A01030 mysql =A0 =A05u =A0VREG =A0 0,99 =A0 =A0 =A0 =A00 =A0 =A0 0 = 800969 / (/dev/mirror/root) mysqld =A01030 mysql =A0 =A06u =A0VREG =A0 0,99 =A0 =A0 =A0 =A00 =A0 =A0 0 = 800970 / (/dev/mirror/root) .... Basically, it only gives me mysqld which runs outside the jails. Nothing else was listed. I noticed that the filesystem has stopped growing now though, so that may also be the reason why lsof does not show anything anymore. The "du -sh /jails/rb.org" still gives a low usage value. Also, this is the output from df -h (I've since resized the ZFS quota to make the filesystem bigger for this jail): tpool/rb.org =A0 =A0 =A0200G =A0 =A0111G =A0 =A0 89G =A0 =A056% =A0 =A0/jai= ls/rb.org If the process causing this is gone, or is working correctly (seeing that the fs is no longer growing, I hope), can dead unlinked files still remain, is there a way to purge them?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimsSpP4nCE18H%2BQJCS1iKqw-wmoUdCc1OdU1tM2>