Trash

Rick Stevens rstevens at vitalstream.com
Thu Dec 22 18:02:12 UTC 2005


On Thu, 2005-12-22 at 10:21 -0700, karlp at ourldsfamily.com wrote:
> On Wed, December 21, 2005 10:37 pm, brad.mugleston at comcast.net said:
> >>
> >> Remember that reclaimed space may not show up in a "du -h" command
> >> until ALL programs using that directory terminate or close their open
> >> file handles to that filesystem.  The surest way of doing that is to
> >> reboot or do use "lsof" or "fuser" to identify processes with open
> >> file descriptors on the filesystem in question and shutting down those
> >> processes.
> >>
> >> ----------------------------------------------------------------------
> >> - Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
> >> - VitalStream, Inc.                       http://www.vitalstream.com -
> >
> > Wow, that really helps - thanks.  I'll have to play with lsof and
> > fuser to see how it works.
> 
> What about just typing
> 
> sync
> 
> as root? Doesn't that force flushing, thus showing the disk usage? Am I
> wrong (again, still, some more)?

sync flushes "dirty" buffers to disk, thereby making the disk inodes
match the in-memory cache and setting the cache buffers to "clean", but
it won't necessarily update the disk stats if the directory that was
cleaned up is still held open by a process.  The process still has a
concept of what its filesystem looks like, and since the sync was done
outside its process space, it won't be aware of the change until the
file or directory is closed and reopened and its inode list is updated.

sync will work in some cases (e.g. programs that really understand what
multitasking is all about), but the vast majority of programs are
not written that way.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-         Okay, who put a "stop payment" on my reality check?        -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list