linux slow shutdown samba shares

I was having a 120 second delay in shutdown of my Linux Mint 17 Mate.

I discovered what it was by editing /etc/grub

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
to
GRUB_CMDLINE_LINUX_DEFAULT=”quiet”

then run command

sudo update-grub

Don’t forget to run it back when done looking at what happens when you shut down.

Turns out it was shares not getting umounted. I got something like “server 10.22.0.9 has not responded in 120 seconds”. Of course, I had to wait 120 seconds to see that and it flashed by in what felt like less than a second. But at least I found what was causing my machine to delay shutdown.

UPDATE: solution stopped working . This post helped solve the problem
https://whereofwecannotspeak.wordpress.com/2007/12/25/unmount-samba-filesystems-before-shutdown-or-reboot/

In /etc/default/grub

sudo ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh

After that, shutdown/restart happened in a flash (2 seconds maybe).