SUMMARY: umount partition device busy

From: David N. Edwards (
Date: Sat Apr 10 1993 - 01:18:22 CDT


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

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!


                                              Dave Edwards
                                              MITRE Corp.

Thanks to: (Jan Bruun Andersen) (Ed Arnold)
Bob Bartlett <> (Louis M. Brune) (Carmine Di Biase Cardone) (Edward Eldridge ) (Mike Fox x6572) (Ron Gaug) (Halvard Halvorsen)
Mark Herberger <>
Bill Hunter <> (Jim Kohli) (Wolfgang Kuehnel )
Jim Lick <>
Steve Lodin <> (Donald McLachlan) (Frank 'Scruff' Miller)
linh@copper.rap.ucar.EDU (Linh Ngo) (Peter Nikitser) (Tim F O'Donoghue) (Mike Pearlman) (Bill Rea) (Gary Riseborough (ITO2))
M Robinson <>
Peter Samuel <>
ups!kalli!kevin@fourx.Aus.Sun.COM (Kevin Sheehan {Consulting Poster Child})
Peter Shipley <shipley@tfs.COM> (Adam Shostack)
Siddall P <>
Larry Weissman <>
Renatus Wendel <>

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