Good morning Sun-managers:
I posted a question to the group on automount/fuser about 10 days ago.
Thanks to the following Sun-managers who unanimously pointed me to lsof, a
program that lists open files; especially the author of lsof, Vic Abell,
who spent days (and nights!) helping me troubleshoot my problem, and releasing
a new version of lsof (v3.77) to accommodate my requirement.
- Vic Abell
- Mark L Roberts
- Asim Zuberi
- Mark Belanger
- Craig Gruneberg
- cameron@daedalus.com.au
- Francis Liu
- Sanjay Gowda
Original Question:
=================
I have automounted a few file systems from a server. When I need to
take down the automounter, I want to use fuser to kill all the processes
accessing the automounted file systems, then umount the file systems before
shutting down the automounter. Somehow, fuser does not always report (see)
the process(es) so I can't umount the file systems.
# fuser /opt/vws
/opt/vws:
I'd tried the switches -c and -u but nothing works. Is there another
method I can use to umount these automounted file systems?
===============================================================================
Solution:
========
Use lsof v3.77, available from ftp://vic.cc.purdue.edu/pub/tools/unix/lsof.
This latest version of lsof fixes my specific automount problem--this fix
applies only to Solaris:
My problem: I've automounted a remote file system on /opt/vws_v2.1 which is a
soft link to /tmp_opt_var/opt/vws_v2.1 on my local system. The autofs entry
in /etc/mnttab reflected the name /opt/vws_v2.1 (with an "ignore" attribute),
but the nfs entry resolves to /tmp_opt_var/opt/vws_v2.1, so neither fuser nor
lsof looks for both entries. As a result, I could not "kill" the process
since there's no PID attached to it.
Vic Abell has kindly released a new version of lsof to take care of my
problem.
This new version supports the same platforms, which are:
AIX 3.2.5, 4.1[.[1234]], the IBM RISC/System 6000
and 4.2
BSDI BSD/OS 2.0, 2.0.1, Intel-based systems
and 2.1
EP/IX 2.1.1 the CDC 4680
FreeBSD 1.1.5.1, 2.0, Intel-based systems
2.0.5, 2.1, 2.1.5,
and 2.2
HP-UX 8.x, 9.x, 10.01, HP systems (some combinations)
10.10, and 10.20
IRIX 5.2, 5.3, 6.0, 6.0.1, SGI systems
6.1, and 6.2
Linux through 2.0 Intel-based systems
NetBSD 1.0, 1.1, and 1.2 Intel and SPARC-based systems
NEXTSTEP 2.1 and 3.[0123] all NEXTSTEP architectures
OpenBSD 1.2 Intel-based systems
OSF/1 2.0, 3.0, 3.2, and the DEC Alpha
4.0-BETA
RISC/os 4.52 MIPS R2000-based systems
SCO OpenDesktop or Intel-based systems
OpenServer 1.1, 3.0,
and 5.0
Sequent PTX 2.1.[156], Sequent systems
4.0.[23], 4.1.[02],
and 4.1.4
Solaris 2.[12345] and Sun 4 and i86pc systems
2.5.1
SunOS 4.1.[1234] Sun 3 and 4
Ultrix 4.2, 4.3, 4.4, DEC RISC and VAX
and 4.5
Thank you everybody.
Sincerely,
Vicky Lau
vlau@msmail2.hac.com
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:11 CDT