Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Nfs force umount
1. NFS force umount
How to umount failing NFS filesystem in Linux
(CentOS,Fedora,Ubuntu/RHEL)
http://sysdigg.blogspot.com/2007/12/unmount-nfs-filesystem-in-linux.html
Have you even get into situation,where df hangs in unix/Linux and if you tried running umount on
mounted filesystem that fails.
one of my user complained that df is hanging on redhat enterprise Linux 4 (RHEL4) server. This is most
common problem, if you see df hanging on Linux server usually this means there is a nfs mounted
filesystem on that server and remote server exporting nfs filesystem /share is down or unavailable. I
find the nfs mounted filesystem but I am unable to unmount it, I tried running umount on the mounted
nfs filesystem but it failed:
[root@linuxdev~]# umount /mnt/nfs
umount.nfs: sun:/export: not found / mounted or server not reachable
umount.nfs: sun:/export: not found / mounted or server not reachable
then I tried running force umount –f on the filesystem :
[root@linuxdev ~]# umount -f /mnt/nfs
umount2: Device or resource busy
umount: /mnt/nfs: device is busy
umount2: Device or resource busy
umount: /mnt/nfs: device is busy
I tried fusek –k /mnt/nfs but that didn't worked either to unmount the hanging (failed) nfs mount point
:
Quick fix to this problem is editing /etc/mtab file and removing the nfs filesystem mount point . In
Linux /etc/mtab file contains all local and nfs mounted filesystems.By editing /etc/mtab i was able to
umount hanged nfs filesystem on my Linux machine without doing a reboot.
Finally to resolve failing nfs mount issue i commented the entry in /etc/mtab file :
2. #sun:/export /mnt/nfs nfs rw,addr=192.168.0.135 0 0.
and bingo ! hanging df works again on that redhat enterprise Linux server.This solution works in
RHEL4,RHEL5, Novell Linux , Fedora,CentOS and ubuntu
Tags:umount nfs, force umount,umount fails,mount busy