Re: du and df conflict; disk space missing
Heikki Vatiainen wrote:
>
> Paul Reavis <preavis@partnersoft.com>
> > I'm very confused. I have a samba server running print services, and the
> > only real problem I have with it is that my users keep getting "out of
> > disk space" errors when printing. My /var partition is totally full:
> >
> > Filesystem 1024-blocks Used Available Capacity Mounted on
> > /dev/sda6 253807 240711 0 100% /var
> >
> > But I can't see why with `du`:
> >
> > padmount:/# du -s /var
> > 32567 /var
> >
> > What could cause this?
>
> There are probably processes that have open files in /var. Even if
> you remove a file, the disk space will not be freed before the last
> process keeping the file open exits. One possible process that has
> open files in /var is syslogd. Others might include daemons taking
> care of print services.
>
> The tool which can help you to find these mysterious prcesses is
> lsof (list open files). Below is an example where I use tail to
> keep a file open to demonstrate how du and df see things
> differently. I also use lsof to show how the xemacs binary is still
> using the disk space even if it has been removed earlier. Notice
> that disk space will not be really freed until I kill tail with
> Control-C.
>
> If you find something like syslogd keeping a file open, something
> like /etc/init.d/sysklogd restart should release the file.
What an incredibly helpful response. I'll start banging on it. Thanks!
--
Paul Reavis preavis@partnersoft.com
Design Lead
Partner Software, Inc. http://www.partnersoft.com
Reply to: