I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes
Try umount -f /mnt/share. Works OK with NFS, never tried with cifs.
Also, take a look at autofs, it will mount the share only when accessed, and will unmount it afterworlds.
There is a good tutorial at www.howtoforge.net
I had a very similar problem with davfs. In the man page of umount.davfs
, I found that the -f -l -n -r -v
options are ignored by umount.davfs
. To force-unmount my davfs mount, I had to use umount -i -f -l /media/davmount
.
On RHEL 6 this worked:
umount -f -a -t cifs -l
A lazy unmount will do the job for you.
umount -l <mount path>
There's a -f option to umount that you can try:
umount -f /mnt/fileshare
Are you specifying the '-t cifs' option to mount? Also make sure you're not specifying the 'hard' option to mount.
You may also want to consider fusesmb, since the filesystem will be running in userspace you can kill it just like any other process.
On RHEL 6 this worked for me also:
umount -f -a -t cifs -l FOLDER_NAME