Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 716

How to auto-unmount a cifs share if I shut down / reboot / suspend my computer?

$
0
0

I would like to auto-unmount a samba (cifs) share before suspend or shutdown my computer.

The problem is that when a reboot or shutdown or suspend is done, and if a cifs share is open, the network access is terminated before the CIFS filesystems are unmounted. This produces a huge delay as each share must wait for it's umount request to time out (1.5 minute). Moreover the computer actually can't close this connection, because if I check active smb connections with sudo smbstatus in my NAS, the computer shown as an active client.

A possible solution is executing a script before suspend / restart / shutdown, but I'm not sure that it would be the best way to solve this problem, because it's an inconvenient workaround.

Are there any easy solution (for example an fstab option, like _netdev) ?


Viewing all articles
Browse latest Browse all 716

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>