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

Re: ext3 device reported to be 100% full, but we do not know where?- solved



On Wed, 2002-07-24 at 15:06, Bill Rugolsky Jr. wrote:
> On Tue, Jul 23, 2002 at 10:55:41PM +0200, Michael Hoennig wrote:
> > ok, then at least lsof should report such files.  Actually I forgot
> > something: Even after all processes holding this file handle, the storage
> > was never freed, only after umount/mount!
> 
> In my experience, lsof has at times been broken on Linux.  This is no
> wonder, as lsof supports lots of *nix systems, and some of the interfaces
> are fragile.  Also, be sure to run it as root; depending on how things
> are installed (e.g., which kernel, suid bits), you may not see process info
> that you can't access in /proc.
> 
> The simplest way to see what processes are standing on a filesystem is
> to use (as root)
> 
>   /sbin/fuser -m <mntpoint>
> 

Yep. That is a good way to get the list of processes that have something
open on a filesystem. A way to get the (old) names of the deleted but
still open files is to do (as root):

ls -l /proc/*/fd | fgrep '(deleted)'

This should not miss any, and AFAIK it's quite stable as an interface.
To get just the ones for a particular process do

ls -l /proc/pid/fd

where pid is the process ID.

Regards,

Diego
-- 
-------------------------------------------------------
Diego Santa Cruz
PhD. student
Publications available at http://ltswww.epfl.ch/~dsanta
Signal Processing Institute (LTS1 / ITS / STI)
Swiss Federal Institute of Technology (EPFL)
EPFL - STI - ITS, CH-1015 Lausanne, Switzerland
E-mail:     Diego SantaCruz epfl ch
Phone:      +41 - 21 - 693 26 57
Fax:        +41 - 21 - 693 76 00
-------------------------------------------------------





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