Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unmount filesystem

460 views
Skip to first unread message

Krishan Purahoo

unread,
Apr 23, 1998, 3:00:00 AM4/23/98
to

I am trying to unmount a filesystem but am getting the error

unmount: 0506-349 Cannot unmount /dev/lv01: The requested resource is busy.

I have used 'lsof' to see whether there are any open files associated with
the filesystem - lsof returns nothing and so does 'fuser'


My question is - what is the easiest way of unmounting the filesystem,
without having to reboot the system?

I am using AIX 4.1.4

TIA

krishan

krishan...@jet.uk

Scott Butler

unread,
Apr 23, 1998, 3:00:00 AM4/23/98
to Krishan Purahoo

Re: Umount problem
Try putting the system into single user mode using init 1, this should
allow you to unmount the lv ok.

Let me know how you get on

Elisabeth L. Wonders

unread,
Apr 23, 1998, 3:00:00 AM4/23/98
to

The most common reason I've found for that particular message is that
someone is actually in the directory. And many times it was me! Sometimes
it was that I cd'ed to the directory (in this case, your mount point) as
one user, then became superuser. At some point after the su, I moved out
of the directory, but since my originating shell (before the su) was still
cd'ed into the directory, the system considered it busy.

I'd suggest you be very sure that you yourself, in am earlier shell, are
not the reason for the busy message. Good luck!

Krishan Purahoo <kp...@jet.uk> wrote in article
<6hngoo$63b$1...@flex.news.pipex.net>...

a...@purdue.edu

unread,
Apr 24, 1998, 3:00:00 AM4/24/98
to kp...@jet.uk

In article <6hngoo$63b$1...@flex.news.pipex.net>,

kp...@jet.uk (Krishan Purahoo) wrote:
>
> I am trying to unmount a filesystem but am getting the error
>
> unmount: 0506-349 Cannot unmount /dev/lv01: The requested resource is busy.
>
> I have used 'lsof' to see whether there are any open files associated with
> the filesystem - lsof returns nothing and so does 'fuser'

Did you use lsof's -X option? If you did not, you may not have
given lsof a chance to report on open shared library accesses.

Vic Abell <a...@purdue.edu>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

Simon Robertson

unread,
Apr 24, 1998, 3:00:00 AM4/24/98
to a...@purdue.edu


a...@purdue.edu wrote:

> In article <6hngoo$63b$1...@flex.news.pipex.net>,
> kp...@jet.uk (Krishan Purahoo) wrote:
> >
> > I am trying to unmount a filesystem but am getting the error
> >
> > unmount: 0506-349 Cannot unmount /dev/lv01: The requested resource is busy.
> >
> > I have used 'lsof' to see whether there are any open files associated with
> > the filesystem - lsof returns nothing and so does 'fuser'
>
> Did you use lsof's -X option? If you did not, you may not have
> given lsof a chance to report on open shared library accesses.
>

An easier way is just to type:

fuser -u /dev/lv01

which should which processes are still attached to the lv. You can kill them by
process
number or type:

fuser -k /dev/lv01

Cheers,

Simon.


Vic Abell

unread,
Apr 24, 1998, 3:00:00 AM4/24/98
to

Simon Robertson <s...@mcmail.com> writes:

>a...@purdue.edu wrote:

>fuser -u /dev/lv01

>fuser -k /dev/lv01

>Cheers,

>Simon.

Fuser is "easier" only if you don't want to know the open loader
library references a process has made. Fuser won't show them, but
lsof's -X option will. Try this:

runner: 3 = lsof -Xp18182
COMMAND PID USER FD TYPE DEVICE SIZE/OFF INODE NAME
ksh 18182 abe cwd VDIR NFS,49954 1536 65537 /a/fleet/u5 (fleet:/home/fleet/u5)
ksh 18182 abe txt VREG 10,7 232380 102829 /usr (/dev/hd2)
ksh 18182 abe L00r VREG 10,7 308631 119415 /usr/lib/libs.a
ksh 18182 abe L01r VREG 10,7 1650250 77918 /usr/lib/libc.a
ksh 18182 abe 0u VCHR 27,0 0t608 2951 /dev/pts/0
ksh 18182 abe 1u VCHR 27,0 0t608 2951 /dev/pts/0
ksh 18182 abe 2u VCHR 27,0 0t608 2951 /dev/pts/0
ksh 18182 abe 63u VREG NFS,49954 1414 65578 /a/fleet/u5 (fleet:/home/fleet/u5)
runner: 4 = fuser /usr/lib/libs.a
/usr/lib/libs.a:

runner: 5 = oslevel
4.1.5.0

Vic Abell <a...@purdue.edu>

Ulrich Rohde

unread,
Apr 27, 1998, 3:00:00 AM4/27/98
to

Krishan Purahoo schrieb in Nachricht <6hngoo$63b$1...@flex.news.pipex.net>...


>I am trying to unmount a filesystem but am getting the error
>
>unmount: 0506-349 Cannot unmount /dev/lv01: The requested resource is busy.
>
>I have used 'lsof' to see whether there are any open files associated with
>the filesystem - lsof returns nothing and so does 'fuser'
>
>

>My question is - what is the easiest way of unmounting the filesystem,
>without having to reboot the system?
>
>I am using AIX 4.1.4
>
>TIA
>
>krishan
>
>krishan...@jet.uk

Hi,
Another way to umount the filesystem is the force umount:

umount -f /dev/yourfs

or

smit umount.
Sometimes it helps.

Ulrich

Bob Buehler

unread,
Apr 30, 1998, 3:00:00 AM4/30/98
to

Make sure you are not in the file system you are trying to unmount (pwd).
This includes any user login that you su"d from.

Kevin Gee

unread,
May 1, 1998, 3:00:00 AM5/1/98
to

Ulrich Rohde wrote:
>
> Krishan Purahoo schrieb in Nachricht <6hngoo$63b$1...@flex.news.pipex.net>...
> >I am trying to unmount a filesystem but am getting the error
> >
> >unmount: 0506-349 Cannot unmount /dev/lv01: The requested resource is busy.
> >
> >I have used 'lsof' to see whether there are any open files associated with
> >the filesystem - lsof returns nothing and so does 'fuser'
> >
> >
> >My question is - what is the easiest way of unmounting the filesystem,
> >without having to reboot the system?
> >
> >I am using AIX 4.1.4
> >
> >TIA
> >
> >krishan
> >
> >krishan...@jet.uk
>
> Hi,
> Another way to umount the filesystem is the force umount:
>
> umount -f /dev/yourfs
>
> or
>
> smit umount.
> Sometimes it helps.
>
> Ulrich


Uh, this could be dangerous. Here is the entry from the man page:

-f Forces an unmount in a remote environment. Use to free a client
when the server is down and server path names cannot be resolved.
The -f flag is not supported for journaled file systems.

Note: This forced unmount works only when there is no hold on the
directory, that is, when the directory is not some user's working
directory and there is no process started and still running there.


--
Kevin Gee
ge...@cse.uta.edu Graduate Student, Univ. of Texas at Arlington
kr...@us.ibm.com AIX Software Analyst/Team Lead, IBM Product Support
Services

John McQue

unread,
May 5, 1998, 3:00:00 AM5/5/98
to

You need to ensure that there are no processes holding open files in the
filesystem you want to unmount. The umount -f is really just for NFS.

Use fuser /filesystem
fuser /dev/lvname
fuser /dev/rlvname

to see if any PID's are attached to file in the filesystem, it's LV or
the Raw LV.

Also a utility called "lsof" is available from the Web which lists open
files.

If it won't umount after killing off the PID's or cd'ing out of the
filesystem it does get a bit scary. If there are no open files the best
thing is set the automount flag to false in /etc/filesystems and reboot.

John

0 new messages