I got a client which is mounted on a NFS server. Now when the server restarts it gets a new ip addr. So in order to reconnect the client I first unmount (unmount -f/mnt/billing) the NFS and then I try to mount it again. But the client does not allow me to do so it says: device is busy.

I tried unmount -l, it works in the cosole, but not in the script.

Your advice would be helpful.

Thanks, Ivan

link|improve this question
feedback

2 Answers

Check with fuser or lsof which process is still accessing the NFS share, then kill it.

As a last resort, umount -f should also let you unmount the NFS share.

link|improve this answer
ty for the answer, i will try asap :) – Ivan Kitanovski Mar 21 '11 at 11:56
feedback

Are you still in same nfs mounted dir? This is most common mistake, change the dir and umount again. If that is not the case then try

fuser /mnt/share

kill the process id that you get and do umount

link|improve this answer
You may want to use the -c option on the directory to show all open files in said directory. – Grahamux Mar 21 '11 at 15:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.