[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lsof anyone ?
Hello,
I am new to this group, and this is my first question here. Please be
patient with a newbie, and answer him patiently.
If any1 here is using lsof on Linux, please tell me how (well) it works.
I have located lsof sources on CSI and they are HUGE. I want to know
before I get it. Is there an alternative ?
In particular, what can be done to directories and files that were
orphaned by a network failure while NFS-mounted ? They wind up with a link
count of 2 or more and 'umount -f' says it can't do forced umounts yet (I
had thought that a decent hacker O/S would have things like 'umount -f'
*first*, and then a kernel ;) ?).
Note that this happens particularly to child-mounted drives. Example:
machine A exports /usr/pub/ and /dev/fd0 is mounted under /usr/pub/fd0 as
/usr/mnt/floppy.
The mount occurs before the NFS export. Now, the exported d. is mounted
by B: over NFS, and then the link fails (cable, power etc). Now, the NFS
connection can be re-established, BUT /usr/pub/fd0 can't be umounted, no
matter what I do (including stopping NFS, portmap, and damn near
everything). The link count on /usr/pub is kosher, but the link count on
/usr/pub/fd0 is 2 (1 for ls and the other one for the zombie I am
hunting). Even shutdown and reboot does nothing, the directory needs to be
deleted with rm -f, and re-created. I will NOT monkey with an
inode/directory editor on a live fs, even umounted.
The problem affects 1.2.13, 2.0.27, 2.0.30 and I think 2.0.33 (but I
didn't see it there myself). It seems to be irrelevant which one has the
exported files and to which.
Please try this out if you can, as it may be a bug in NFS and make your
life difficult if you export a CDROM or such over NFS and want to change
volumes (or even eject them).
regards,
Peter