Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2013 14:48:05 GMT
From:      Goran Lowkrantz <goran.lowkrantz@ismobile.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/178238: nullfs don't release i-nodes on unlink.
Message-ID:  <201304291448.r3TEm5g0079063@red.freebsd.org>
Resent-Message-ID: <201304291450.r3TEo0LY067083@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178238
>Category:       kern
>Synopsis:       nullfs don't release i-nodes on unlink.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 29 14:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Goran Lowkrantz
>Release:        9.1-STABLE
>Organization:
isMobile AB
>Environment:
FreeBSD bifrost.hidden-powers.com 9.1-STABLE FreeBSD 9.1-STABLE #0 r248950: Wed Apr  3 22:45:12 CEST 2013     root@volger:/usr/obj/nanobsd.soekris6501fw/usr/src/sys/SOEKRIS-ATOM-ROUTER  i386
>Description:
Using a nanobsd image setup so that /vad/db/entropy is a nullfs of a directory on the s4 slice, /data/entrpoy, we have found that when /usr/libexec/sava-entropy the i-node of the deleted saved-entropy.8 file is not released.

The following is from a system that has been running for a little bit more than 5 hours:

root@bifrost:/usr/home/admglz # ls -i /var/db/entropy/
805 saved-entropy.1	803 saved-entropy.3	801 saved-entropy.5	799 saved-entropy.7
804 saved-entropy.2	802 saved-entropy.4	800 saved-entropy.6	798 saved-entropy.8
root@bifrost:/usr/home/admglz # df -i
Filesystem            1K-blocks   Used   Avail Capacity iused  ifree %iused  Mounted on
/dev/da0s1a             1911407 353408 1405086    20%    6855 237943    3%   /
devfs                         1      1       0   100%       0      0  100%   /dev
/dev/md0                   4380   2940    1092    73%     449   1085   29%   /etc
/dev/md1                   4380   1056    2976    26%     162   1372   11%   /var
/dev/da0s4                 7840    168    7045     2%      67    955    7%   /data
/data/quagga               7840    168    7045     2%      67    955    7%   /etc/local/quagga
/conf/base/var/db/pkg   1911407 353408 1405086    20%    6855 237943    3%   /var/db/pkg
/data/entropy              7840    168    7045     2%      67    955    7%   /var/db/entropy
/data/crontabs             7840    168    7045     2%      67    955    7%   /var/cron/tabs
/data/home                 7840    168    7045     2%      67    955    7%   /usr/home
root@bifrost:/usr/home/admglz # umount /var/db/entropy
root@bifrost:/usr/home/admglz # mount /var/db/entropy
root@bifrost:/usr/home/admglz # df -i
Filesystem            1K-blocks   Used   Avail Capacity iused  ifree %iused  Mounted on
/dev/da0s1a             1911407 353408 1405086    20%    6855 237943    3%   /
devfs                         1      1       0   100%       0      0  100%   /dev
/dev/md0                   4380   2940    1092    73%     449   1085   29%   /etc
/dev/md1                   4380   1056    2976    26%     162   1372   11%   /var
/dev/da0s4                 7840    112    7101     2%      39    983    4%   /data
/data/quagga               7840    112    7101     2%      39    983    4%   /etc/local/quagga
/conf/base/var/db/pkg   1911407 353408 1405086    20%    6855 237943    3%   /var/db/pkg
/data/crontabs             7840    112    7101     2%      39    983    4%   /var/cron/tabs
/data/home                 7840    112    7101     2%      39    983    4%   /usr/home
/data/entropy              7840    112    7101     2%      39    983    4%   /var/db/entropy
root@bifrost:/usr/home/admglz # ls -i /var/db/entropy/
805 saved-entropy.1	803 saved-entropy.3	801 saved-entropy.5	799 saved-entropy.7
804 saved-entropy.2	802 saved-entropy.4	800 saved-entropy.6	798 saved-entropy.8

As can be seen, the unmount/mount operation releases 28 i-nodes, matching a rate of 5 unliks per hour for 5h36m.

This means that in this case the filesystem will run out of i-nodes in a little more than a week, which is the interval  we have been seeing.
>How-To-Repeat:
mount -t nullfs /data/entropy /var/db/entropy
df -i
wait for a while to allow the crontab save-entrpoy script to unlink a number of last saved files.
df -i 

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304291448.r3TEm5g0079063>