How do you force a CIFS connection to unmount

前端 未结 11 1925
借酒劲吻你
借酒劲吻你 2021-01-29 17:32

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

相关标签:
11条回答
  • 2021-01-29 18:10

    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

    0 讨论(0)
  • 2021-01-29 18:10

    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.

    0 讨论(0)
  • 2021-01-29 18:15

    On RHEL 6 this worked:

    umount -f -a -t cifs -l 
    
    0 讨论(0)
  • 2021-01-29 18:16

    A lazy unmount will do the job for you.

    umount -l <mount path>
    
    0 讨论(0)
  • 2021-01-29 18:17

    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.

    0 讨论(0)
  • 2021-01-29 18:18

    On RHEL 6 this worked for me also:

    umount -f -a -t cifs -l FOLDER_NAME

    0 讨论(0)
提交回复
热议问题