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

Re: df and dh reporting different disk space usage



On Mon, Sep 16, 2002 at 12:54:16PM +0100, Erik Erskine wrote:
> Thanks Karl,
> 
> > debugfs should be able to help with diagnostics here (read-only mode
> > by default).  It can list deleted entries in a directory.
> 
> I used debugfs and it shows files hidden under mount points.  To get 
> raid working I originally did a very minimal setup, all on /, to get 
> raid working.  I forgot to delete the original /usr!
> 
> > 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....
> 
> I can't umount /usr remotely anyway.  I guess as long as these files are 
> being written to they are not doing any harm and can just sit there 
> until I next take the machine down.

It's a bit odd if they're still being written to... As if things started
before the (child) filesystem was mounted...

As another poster mentioned: Yes: lsof might be better for this.

mount --bind might also be handy here. I did a test on my machine:

# df 
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda2              3802848   1962760   1646908  55% /
/dev/hdc6              2403420   1927976    353352  85% /var
...

# mount --bind / /mnt/tmp

and /var on the root file system is visible in /mnt/tmp/var  (!)

This might be a bug (but a nice feature nevertheless). Beware though: I
have not tried modifying any files. 

PS: I just noticed that this will create loops in the directory
    structure; something is bound to get confused by that...

-- 
Karl E. Jørgensen
karl@jorgensen.com
www.karl.jorgensen.com
... An rfc2324 advocate
http://www.rfc.net/rfc2324.html

Attachment: pgpm7zVoMNZ8k.pgp
Description: PGP signature


Reply to: