Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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.

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

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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