File system bafflement
Robert Heller
heller at deepsoft.com
Tue Sep 2 18:09:59 UTC 2014
At Tue, 2 Sep 2014 18:42:27 +0100 "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> On Tue, 2 Sep 2014 13:22:00 -0400
> Robert Heller wrote:
>
> > All it takes is an open file that has been unlinked (ala rm). So long as
> > the file is open, the space is in use (and df will include that space as
> > used), but if there is no directory entry (eg the file *name* has been
> > removed [unlinked]), du won't see the space as used. This often happens
> > when syslogd's log file(s) are deleted *without* sending syslogd a HUP
> > signal.
>
> So is rebooting a solution to this sort of problem?
Yes. Less drasticly, sending SIGHUP to syslogd will also work (assuming it is
specificly syslogd that is hanging onto the open file). Basically, doing the
needful thing to whatever process is hanging onto the unlinked file, whether
that means sending it a signal to close its open files and re-open new ones
(which is what SIGHUP tells syslogd to do), or simply killing off whatever
wedged process that is doing this. syslogd is just a common deamon that
causes this, esp. when a novice sys admin sees his disk space vanishing and
decides to something like 'bzip2 /var/log/syslog' and then wonders why his
disk space usage just got *worse* and du ceases to be helpful or accurate
(when compared to df).
>
> - Richard.
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list