SUMMARY: umount partition device busy

From: David N. Edwards (davee@lightning.mitre.org)
Date: Fri Apr 09 1993 - 21:30:25 CDT


Greetings!

I would like to thank the list for many good answers - all correct (and most
arriving before my question showed up!). There are many kind and intelligent
folks in the world running Sun systems.

My question was: How do I tell who has a file open on a given partition so
that I get a "device busy" error when trying to umount that partition.

I obviously should have mentioned that I knew about the "fuser" command, and
had installed the RFS stuff, but that I never could get the command to work.
One person mentioned a syntax I hadn't thought of for the command. It looked
like this:

     fuser /partition/*

We had never thought to try this! We had always tried "fuser /partition" or
"fuser /dev/id000h". The new sytax yielded interesting results, in that on
our system (4.1.3) fuser would now find some files open or people with their
current working directory set appropriately. For instance, someone who had a
file open in /partition/user would indeed show up. However, if a person had
a file open in /partition/user/subdirectory, they would not appear. This of
course agrees with the syntax above, although I had assumed that fuser would
traverse subdirectories. I decided to look through SunSolve for fuser, and
sure enough, this appeared:

 Bug Id: 1041949
 Category: kernel
 Subcategory: rfs
 Release summary: 4.1
 Synopsis: fuser command doesn't report the usage in sub-directory

I didn't see a patch (pointers gratefully accepted) for this problem! And,
judging by a subsequent posting re. fuser, it seems to have been fixed in
Solaris 2.x

So, with no "-R" option available for fuser, I turned to the minds of
sun-managers!

The answers fell into two major categories: use "lsof" or use "ofiles".

Both are excellent public domain packages, and archie found them quickly at
several sites.

I have been unable to get ofiles working; it compiled fine but gives this
error message:

     ofiles: can't nlist symbol _Usrptmap

I was able to get lsof working, and it does just what I need. Many thanks
to all those who took the time to reply!

                                        Regards,

                                              Dave Edwards
                                              MITRE Corp.
                                              davee@mitre.org

Thanks to:
jba@ruc.dk (Jan Bruun Andersen)
era@ncar.ucar.edu (Ed Arnold)
Bob Bartlett <rdb@gsbux1.uchicago.edu>
louis@andataco.com (Louis M. Brune)
carmine@usb.ve (Carmine Di Biase Cardone)
danny@ews7.dseg.ti.com
eddy@is.morgan.com (Edward Eldridge )
mikef@ttsi.tandem.com (Mike Fox x6572)
ron@sarah.lerc.nasa.gov (Ron Gaug)
halvard@trd.sdata.no (Halvard Halvorsen)
Mark Herberger <mherberg@eve044.cpd.ford.com>
Bill Hunter <bill@access.com>
Perry_Hutchison.Portland@xerox.com
kohli@aslmr-serv.med.ge.com (Jim Kohli)
caxwgk@pki-nbg.philips.de (Wolfgang Kuehnel )
Jim Lick <jim@pi-chan.ucsb.edu>
Steve Lodin <swlodin@kocrsv01.delcoelect.com>
don@mars.dgrc.doc.ca (Donald McLachlan)
frankm@shadow.cna.tek.com (Frank 'Scruff' Miller)
linh@copper.rap.ucar.EDU (Linh Ngo)
P.NIKITSER@qut.edu.au (Peter Nikitser)
tim@canon.co.uk (Tim F O'Donoghue)
canuck@masc38.rice.edu (Mike Pearlman)
B.Rea@csc.canterbury.ac.nz (Bill Rea)
gary@aodc.gov.au (Gary Riseborough (ITO2))
M Robinson <mike@castle.edinburgh.ac.uk>
Peter Samuel <peters@mega.com.au>
ups!kalli!kevin@fourx.Aus.Sun.COM (Kevin Sheehan {Consulting Poster Child})
Peter Shipley <shipley@tfs.COM>
adam%bwnmr4@harvard.harvard.edu (Adam Shostack)
Siddall P <pauls@essex.ac.uk>
Larry Weissman <larryw@nsr.bioeng.washington.edu>
Renatus Wendel <wendel@ifm.ethz.ch>
rwolf@dretor.dciem.dnd.ca



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:42 CDT