Ubuntu: Unmounting network file system on shutdown



Question:

I am having a problem with the system hanging on shutdown for a minute or two. I started tracking it down, and I assume the reason is the following: I have a davfs2 network mount in /etc/fstab, and this should be automatically unmounted at shutdown by /etc/init.d/umountnfs.sh. However, davfs2 is not listed as one of the known network file systems (like nfs, smbfs, etc.) in this script, and although the script checks for the mount option _netdev (which is given in /etc/fstab), it does so in /etc/mtab, which is a symlink to /proc/self/mounts and does not have the _netdev option listed. (See https://people.debian.org/~spaillard/Debian_Release_Notes/mtab.html for a short explanation.)

Obviously I can write my own little workaround with a custom shutdown script, but did anyone else come across this, or has some suggestion what to do, like file a bug against some package?


Solution:1

Either try adding davfs2 to /etc/init.d/unmountnfs.sh, and, once you get it working submit a patch against davfs2, or

Try the workaround in the resource you linked to, "For filesystems which do rely on _netdev for correct unmounting at shutdown, for example when using an NBD, a static mtab will be the only way to use _netdev in wheezy" May apply, with the consequences listed.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »