1834130 Members
2998 Online
110064 Solutions
New Discussion

umounting a filesystem

 
ashish nanjiani
Frequent Advisor

umounting a filesystem

I am trying to umount a filesystem but it always complains about filesystem busy. I have checked for processes running against the filesystem using fuser but it does not report any process against the filesystem.Only way i can umount the filesystem is by rebooting the system. Are there any other ways to check what's going on the filesystem?

ps: i cannot use -f option at this point.

15 REPLIES 15
hpuxrox
Respected Contributor

Re: umounting a filesystem

fuser the volumegroup

fuser /dev/vg00/lvol1

and to kill all process using that VG

fuser -k /dev/vg00/lvol1

-Yates
MANOJ SRIVASTAVA
Honored Contributor

Re: umounting a filesystem

Hi Ashish

Check like like

1. You should not be in that filesystem.
2. do a fuser -ck /dev/vgxx/lvolxx and get then try to unmount the system.


Manoj Srivastava
ashish nanjiani
Frequent Advisor

Re: umounting a filesystem

i have already used fuser and it does not reports any processes running against the system.
S.K. Chan
Honored Contributor
hpuxrox
Respected Contributor

Re: umounting a filesystem

Are you using the filesystem or volumegroup with fuser. From what you are stating you are only using the filesystem.

Look,

# fuser /tmp
/tmp: 1306o 1314o 1322o 2421c 2426c 2423c 2425c 2427c 2428c 2429c

# fuser /dev/vg00/lvol6
/dev/vg00/lvol6: 1295o 1306o 1314o 1322o 2321mo 2421c 2426c 2423c 2425c 2427c 2428c 2429c

You can see fuser on the VG gives you all processes accessing the LVOL.
Jon Mattatall
Esteemed Contributor

Re: umounting a filesystem

I'll ask....

What is the filesystem you're trying to unmount?

If I understand correctly, "fuser -cu /fs" shows no processes, and you're not standing on the fs (i.e. - pwd is not under /fs).

Is this a pfs/nfsmount?

Jon
A little knowledge is dangerous - none is absolutely terrifying!!!
Bill Hassell
Honored Contributor

Re: umounting a filesystem

As mentioned in the link, get a copy of lsof. fuser fails to report a busy filesystem correctly. For instance, cd'ing into a directory keeps the mountpoint busy but ordinary files are not open. You need lsof to truly locate all the processes that keep the mountpoint busy.

Download a copy from:

http://hpux.connect.org.uk/


Bill Hassell, sysadmin
MANOJ SRIVASTAVA
Honored Contributor

Re: umounting a filesystem

Hi Ashish


fuser -ck /mount point will definately do the job. What is the mounpoint name , may be it is in PATH of some user . But in any case do like like

fuser -ck /mountpoint ; umount /mountpoint in one single line.


Manoj Srivastava
Sachin Patel
Honored Contributor

Re: umounting a filesystem

Hi Ashish,
It will not work for certain file system in runlevel 3.

Sachin
Is photography a hobby or another way to spend $
Darrell Allen
Honored Contributor

Re: umounting a filesystem

Hi,

Granted, lsof is much more robust that fuser but just to see if a filesystem is being used: "fuser -c /mount_point" or "fuser -cu /mount_point"

Be cautious with fuser -k. I'd like to know what process is using the filesystem before I arbitrarily kill it.

It's not that I don't like lsof. It's just that my former employer's security group didn't approve of it's use. In my book, all admins should have lsof in their toolkit.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
ashish nanjiani
Frequent Advisor

Re: umounting a filesystem

thanks for all your replies.
The filesystem I use is an nfs shared by the clients. Basically the server acts as a file server and their are some hundred clients accessing that filesystem.
To brief up more the system is clustered using service guard. I have tried lsof , fuser , but still no work around. Also this filesystem used to get umount earlier, but something changed (i really dont know what!) and it now fails to umount.
I am planning on trying few things, i hope this will work or at least point to a problem.

1) Reboot the system, making sure no users are logged in and try to umount the filesystem.

2) Make another temp filesystem and move this filesystem to the temporary one and try to umount it.

The filesystem i am talking about is really an lvm volume with a filesystem on top of that.
Joseph C. Denman
Honored Contributor

Re: umounting a filesystem

Just curious...what if you stoped nfs client and server?????

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop

umount /filesys

??????

...jcd...
If I had only read the instructions first??
hpuxrox
Respected Contributor

Re: umounting a filesystem

aahh nfs! I have seem this before with pfs filesystem which use nfs. I once tryed to umount a pfs filesytem while a user was still accessing it. After that I couldn't umount or even kill the pfs daemons. I was forced to reboot.
ashish nanjiani
Frequent Advisor

Re: umounting a filesystem

Joseph! i haven't tried that but i would that's try i would definatly make.
MANOJ SRIVASTAVA
Honored Contributor

Re: umounting a filesystem

Ashish


Again the answer lies in fuser only even if it is NFS still there ahs to be some process associated with it , does just fuser < mount point > give you any process id ?.


Manoj Srivastava