leaking lots of unreferenced inodes (pg_xlog files?), maybe after moving tables and indexes to tablespace on different volume

Jim Mercer jim at reptiles.org
Thu Nov 13 20:23:45 UTC 2014

On Fri, Mar 15, 2013 at 09:01:30PM -0700, Kirk McKusick wrote:
> I don't know how, but somehow something is holding references to
> the removed files causing them to fail to be reclaimed.
> Could you run your system for a while to build up a new set of
> these files, then run a script with the `df -ih' as before. Then
> run `vmstat -m', `sysctl debug', and fstat -f /usr' both before
> and after doing the umount/mount. Hopefully that will give us
> some more clues as to what is happening.

i am seeing a similar behaviour:
FreeBSD db02 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Mon Aug 12 18:40:42 PKT 2013     root at rms-db02.telenor.innexiv.com:/usr/obj/usr/src/sys/INXVMPG  amd64


however, i'm unsure its xlog files in my case.

i have postgres installed on /home

root at rms-db02 /var/log]# df -h
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/da0p3     11G    3.2G    7.5G    30%    /
devfs         1.0k    1.0k      0B   100%    /dev
/dev/da1p1    1.5T    671G    754G    47%    /home
procfs        4.0k    4.0k      0B   100%    /proc

[root at rms-db02 /var/log]# ls -ld /usr/local/pgsql
lrwxr-xr-x  1 root  wheel  11 Aug 12  2013 /usr/local/pgsql -> /home/pgsql

in my case, it over the course of 17 days (it seems to be happening faster now,
at one point it was 6 months or more, now sooner).

the "Used" space on root goes up to approx 95% at which point i halt the
applications and reboot.

i hunted around with lsof and such, and had another guy also poke about, and
neither of us could find the place where the space was being used.

i wanted to follow through on the diagnostic you provided, but since it was
the root filesystem, it wasn't straightforward.

best i could do was a 'df -i', which showed, immediately after reboot, into
single user, before fsck, that the space had been recovered.

comparing the inode count between singleuser and booted up multiuser, the
booted up multiuser had +9 inodes, so, no vast difference.

i am going to be upgrading to more recent freebsd and postgres soon, but,
in the meantime, was there any further investigation of this?


Jim Mercer     Reptilian Research      jim at reptiles.org    +1 416 410-5633
"He who dies with the most toys is nonetheless dead"

More information about the freebsd-fs mailing list