[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: df and dh reporting different disk space usage



On Mon, 2002-09-16 at 13:24, Karl E. Jorgensen wrote:
> On Mon, Sep 16, 2002 at 10:57:52AM +0100, Erik Erskine wrote:

> > I've got a problem with disk space being reported differently by du and df.

> Possible explanations:
> 
> -   Deleted files that are still open; as the files are marked as
>     deleted, they won't show up in directory listings (and hence: du
>     wouldn't find them), but they still occupy disk space. E.g. if you
>     'rm' a file that is still being written to. Partial solution:
>     truncate the file before deleting it.

Way to detect these things: lsof shows all open files, even already
deleted ones (dunno if there's an easy way to detect these in lsof
output, though). May or may not be easier than with debugfs.

> If you *do* find any big files hiding under the mountpoints, you
> probably have umount the mountpoint to remove the files via e.g. rm.  I
> wouldn't trust debugfs in read-write mode on a currently mounted
> filesystem....

... especially as you (Erik) mentioned it's a production machine.

cheers
-- vbi


-- 
secure email with gpg                           http://fortytwo.ch/gpg

NOTICE: subkey signature! request key 92082481 from keyserver.kjsl.com

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: