1752634 Members
5984 Online
108788 Solutions
New Discussion юеВ

unmounting /tmp

 
SOLVED
Go to solution
himacs
Super Advisor

unmounting /tmp

Hi Admins,

I was trying to unmount /tmp online.But ended up with below error.

umount /tmp
umount: cannot unmount /tmp : Device busy
umount: return error 1.
test:/>fuser -cu /tmp
/tmp:


But fuser shows no process using /tmp.

Can i unmount /home online..

Please suggest.

Note : this is just testing purpose..

Regards
himacs
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: unmounting /tmp

Quite often someone has the target filesystem as their PWD - they've cd'ed into it. It won't show up with fuser, but it still causes the device to be busy. You might be able to unmount /home, especially if you can force all the users off the system first. Chances are that you will still find it busy, though. That is why the usual approach is to reboot into single user mode, where only / is mounted. You can then proceed to mount /usr and any other filesystems that you need to do what ever it is you need.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: unmounting /tmp

Shalom,

logon ssh, console is better

cd /
fuser -cuk /tmp

DO NOT do this on a live, running system. All services need to be down to try this trick.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ismail Azad
Esteemed Contributor

Re: unmounting /tmp

Hi himacs,

Strangely if you have configured "file system swap" on the /tmp filesystem , then you would not be able to unmount /tmp or any filsystem until you "unconfigure" that space whether it's with swapoff or a deletion from fstab and a reboot.

However, as pete mentioned fuser is unable to find a user that returns $PWD as /tmp and logically speaking if you tried to unmount a filesystem a user was currently accessing {which is not_possible} , at which point of the file system hierarchy would the user be in now?. I hope you get the point.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Dennis Handly
Acclaimed Contributor

Re: unmounting /tmp

>fuser shows no process using /tmp.

Have you tried lsof?