[lug] Disk usage discrepancy?

Zan Lynx zlynx at acm.org
Wed Feb 26 16:20:27 MST 2003


On Wed, 2003-02-26 at 15:59, Joseph McDonald wrote:
> On Wed, Feb 26, 2003 at 12:10:27PM -0500, Michael D. Hirsch wrote:
> > Another possibility is that you are running some kind of log watching 
> > program and log files are kept open even after they have been removed.  
> > You might try rebooting and see if that discrepancy is still there.
> 
> Yeah, I've learned the hardway that if you remove a file that's still
> being written to by a process the inode sticks around until the file system
> is fsck'ed. You probably don't want to unmount /var on a running system..
> So, a reboot may be in order.

The file should be removed as soon as the process using it closes its
last file handle.  If the unlinked file is still hanging around,
something else is wrong.

One way to find deleted files that are being used is the /proc
filesystem.  As root, do this:

cd /proc
ls -al */fd | grep deleted
grep deleted */maps
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030226/5f3590fe/attachment.pgp>


More information about the LUG mailing list