14-Apr-2008

Fix slow Ubuntu shutdown with CIFS (SMBFS)

My Ubuntu machine at home always takes a bazillion years to turn off. I've been seeing this "Server not responding" error forever, but I've just ignored it. An explanation from the article "Five things to do on a freshly installed Ubuntu":

CIFS: Unmount CIFS shares before shutting down the network

There is a very nasty bug in Ubuntu, which occurs, if you use NetworkManager and have any active CIFS share while shutting down your system. If you do that, you'll experience a timeout while shutting down, lengthening it by ~30 seconds per share. You'll also get the message CIFS VFS: Server not responding.

There is a bug entry on launchpad, but it is not yet fixed. Fortunately, there is an easy workaround.

Here are my simplified instructions:
cd /etc/init.d
sudo wget http://www.jejik.com/files/examples/umountcifs
sudo chmod ugo+x umountcifs
sudo update-rc.d umountcifs stop 02 0 6 .
That ought to take care of it.

2 comments:

Jussi said...

This solved it! Thanks, now my mythtv box shuts down without idling forever.

Goldy said...

Thanks for this. This seems to have solved the problem for my eee with Ubuntu on shutdown. I still get this when I do a suspend however. I suspect that the fix only runs on shutdown, but I don't know enough about Linux/Ubuntu to activate it for suspend, and I imagine that I could really screw things up. Any ideas? Thanks.