Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Dec 2008 08:54:33 -0800
From:      Tankko <tankko@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   /tmp running out of inodes
Message-ID:  <7fec743f0812180854o2e66bee2m8369eba789290758@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
For the second time in 2 weeks my server has gone down due to running
out of inodes in /tmp.  The first time it did this /tmp was filled
with files, so that made sense.  I delete all the files from /tmp and
all was well for a few weeks.  Just this morning it did it again (keep
in mind that this sever is currently 700 miles away) and had to be
rebooted.

But when I looked at /tmp, it was empty except for a couple of files,
but running df shows the follow:

Filesystem     Size    Used   Avail Capacity iused    ifree %iused  Mounted on
/dev/ad4s1a    496M     59M    398M    13%    1535    64255    2%   /
devfs          1.0K    1.0K      0B   100%       0        0  100%   /dev
/dev/ad4s1e    496M     69M    387M    15%   65790        0  100%   /tmp
/dev/ad4s1f    221G    5.2G    198G     3%  337742 29596848    1%   /usr
/dev/ad4s1d    1.9G    757M    1.0G    42%    1632   280990    1%   /var
/dev/md0        19M     12K     18M     0%       9     2805    0%   /tmp
/dev/ad5s1c    289G     49G    217G    18%   27779 39115643    0%   /bigdrive

65790 used inodes and 0 free on /tmp

I ran fsck and it shows:

** /dev/ad4s1e (NO WRITE)
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
65790 files, 35374 used, 218441 free (9 frags, 27304 blocks, 0.0% fragmentation)

So where are these mysterious 65790 files?  Is there a way to clean
this up?  And more importantly is there a way to do this remotely
given that I am 700 miles from the server right now?

Every time the server goes down due to this problem, it won't come up
again without someone physically running fsck at boot.

On a side question...what the the best policy for deleting files from
/tmp?  Seems like a lot of apps are happy to leave files in /tmp.  Is
clean up commonly done as a cron job?  What about files like
mysql.sock= which are important.  I can't just blindly remove
everything in /tmp each night.

Thanks for any help.

Tankko



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