Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2003 15:07:09 -0800 (PST)
From:      Philip Hallstrom <philip@adhesivemedia.com>
To:        Bill Moran <wmoran@potentialtech.com>
Cc:        David.Bear@asu.edu, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Deleted files not releasing their space (was Re: syslog message wrt inodes)
Message-ID:  <20030128150623.S82717-100000@cypress.adhesivemedia.com>
In-Reply-To: <3E36E3AF.8030201@potentialtech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(skip down)

On Tue, 28 Jan 2003, Bill Moran wrote:

> David Bear wrote:
> > I'm getting messages like below that I'm out of inodes on /var.
> >
> > asu.edu kernel log messages:
> >
> >>id 25 on /var: out of inodes
> >>  syslogd: /var/log/auth.log: No such file or directory
> >>  syslogd: /var/log/maillog: No such file or directory
> >>  syslogd: /var/log/cron: No such file or directory
> >>  syslogd: /var/log/auth.log: No such file or directory
> >>  syslogd: /var/log/maillog: No such file or directory
> >>  syslogd: /var/log/cron: No such file or directory
> >>  syslogd: /var/log/auth.log: No such file or directory
> >>  syslogd: /var/log/maillog: No such file or directory
> >>  syslogd: /var/log/cron: No such file or directory
> >>  syslogd: /var/log/auth.log: No such file or directory
> >>  syslogd: /var/log/maillog: No such file or directory
> >>  syslogd: /var/log/cron: No such file or directory
> >
> >
> > Filesystem  1K-blocks   Used   Avail Capacity iused  ifree %iused  Mounted on
> > /dev/ad0s1a    128990  37232   81440    31%    1316  14938    8%   /
> > /dev/ad0s1f    257998      4  237356     0%       2  32508    0%   /tmp
> > /dev/ad0s1g   2341102 508366 1645448    24%   37711 256175   13%   /usr
> > /dev/ad0s1e    257998  25572  211788    11%    8298  24212   26%   /var
> > procfs              4      4       0   100%      25    507    5%   /proc
> >
> > Last week my var volume did run out of inodes.  I erase some
> > snort logs to free up the inodes.  But it appears the kernel or
> > syslogd doesn't know about it.
> >
> > any pointers on letting the kernel know I have enough inodes?
>
> Let's see if I remember the details on this.
> I believe this happens when a file is deleted, but another program still holds
> a filehandle? to it.  Thus, if you delete Apache's log file (for example) but
> don't restart Apache, the space the logfile is using isn't truely freed.
> (This is why newsyslog.conf has a column for the PID of a process to restart).
>
> So ... if you know which process had the files open, restart it (probably by
> sending it a -HUP).
>
> If you don't know, you can probably cheat and just reboot the machine, but that
> shouldn't be necessary.

lsof can tell you what files are open... and includes the process/pids
that have it open.

-philip


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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