Ubuntu: Shutdown problem, CIFS related

If you install Samba on a Ubuntu Gutsy box and you are using the Networkmanager for your network settings you are very likely to encounter the following error message when you shutdown:
CIFS: VFS server not responding
CIFS: No response for cmd 114 mid 3

It’s a bug in Gutsy and it looks like it’s a bug in Hardy as well but there is a work around.

The reason for getting the error message is the fact that the network (NetworkManager) is being shutdown before dismounting of the Samba shares, and dismounting a network share without a network well that won’t work so well ๐Ÿ™‚

You can use the following work around:
cd /etc/rc6.d
ls -la

You should see :
S<nr>wpa-ifupdown the nr is probably 15
S<nr>umountnfs.sh that nr is probably 31

sudo mv S31umountnfs.sh S14umountnfs.sh

The point is to give the umountnfs.sh a lower as your wpa-ifupdown.sh

Follow the above steps also for /etc/rc0.d (Thanks to Deb Early for the suggestion)

This article is filed under the category Ubuntu and has the following tags associated with it: , , , , , , , , .
  • Deb Early

    This is BRILLIANT! Thank you SO much for this solution to a problem I know many, many people are tearing their hair out over! One thing I would add: folks should also check /etc/rc0.d. The change to rc6 worked beautifully for reboots, but shutdowns were still exhibiting the problem until I thought to look in /etc/rc0.d. Again — bless you!!

  • Fr33d0m

    I never get any error. I thought I had a hibernate problem until I noticed the shutdown didn’t work last night. My laptop screen simply goes blank and I noticed that if I leave it that way the fan spins-up and the temps climb fast. On reading your post I decided to go back to WICD and see if that solved it. I’ve only had one shutdown since then and it worked well.

    So to rant a bit, why on earth does Network Manager still exist? It seems to be one of the glaring thorns in the side of most new users and seems at best to be a half-baked solution for wireless networking.

  • Fr33d0m

    My comment above not withstanding, WICD did not solve the problem. Several attempts and a reinstall later and I am back to this fix. I guess I didn’t fully understand what I was seeing from ls -la. I’ll try to come back and post the results.

    I still agree with NM being a problem child, even though this is not NMs fault.

  • Fr33d0m

    Nope, not the answer for me.

  • Jeff

    Thanks! Nice simple solution. Worked for me.

  • Awesome – had this problem in Hardy Heron 8.04 and fixed everything like a charm.

  • Carl

    thank you, hey i also ad a bit of trouble with your explication on the ls -la ๐Ÿ˜›

    figured it out anyways , but for those are new to linux and do not understand try this instead of the plain ls -la write : ls -la | grep S31 and ls -la | grep S15 it will be more clear then ๐Ÿ˜›

  • Works as advertised. Thanks for the workaround!

  • tonyshangrila

    Thanks so much for the fix– this has been an annoyance for months. When I finally got around to researching it, it seems like this bug has been around since Dapper. Unbelievable that this workaround is still needed…

  • Does exactly what it says on the tin – thanks!

  • jeffeb3

    Thanks a bunch. Worked on hardy for me. I had the problem of having the nvidia drivers installed too, and instead of giving me the error, the screen was just random colors. When I found out what the problem was, it was nice to know there’s such an elegant solution.

  • Emily

    Yeah! I also had the nvidia driver and was always getting the vertical color line show. I never would have found this solution if I hadnt followed jeffeb3’s thread about vertical color lines. Kudos.

  • bulvinkl

    Thanks! Now my reboot boosted ^_^

  • MightySeb

    Yep ! This worked number one for me !

    Thanks !

  • Very nice.

  • Lino Barreca

    Hi Peter

    I’m writing you because I think this is not the correct fix.
    S20 sends the close signals to programs.
    Unmounting the network share before telling the programs to close can lead to data loss if there’re open files on the remote server.

    The correct order would be:
    Send kill signals
    Unmount share
    Stop network.

    The rename SHOULD be S15->S32 NOT S31->S14 ๐Ÿ˜‰

    • If you send the kill signals and you use the WPA daemon, your wireless network will also be terminated and you’ll have the same problem.
      I just did some more searching on the subject and it seems to be a bug that has been reported 2 years ago to Debian. It was fixed but they reversed the patch:
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367944 files the bug, and shows the patch they used. The person filing the bug actually did the same trick as I do.
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392861 reverted the patch.

      This is the log entry in the SVN of Debian:

      * Undo use of fuser to kill processes in umountnfs before unmounting
      partitions, as it will kill init and /etc/init.d/rc during
      shutdown if root is on NFS or tmpfs file systems are bind-mounted
      into chroots. Use sendsigs and move it before umountnfs, and thus
      reopen bugs #258420, #367944. (Closes: #392861)

    • Hannes

      This was it in my system.

      Thank you very much.

  • Moe

    Great… worked for me as well

  • John

    Perfect!!! Nice and simple. Now I have a fast shut-down on my EeePC running Ubuntu netbook remix.

  • Bob

    Switched to Ubuntu recently and was initially dissappointed about slow shutdown.
    Proves the system works — Linux has its share of bugs, but unlike M$, ours can be fixed!

  • Ted

    Thanks a million! I am new to Ubuntu, and finally figured the SMB shares out… but then i ran into the error above! Fixed it in minute, thanks to you!

  • Linux User

    Hmmm… had this same issue and the moving around of /etc/rc#.d file fixed it. And this is with ubuntu 9.04 even (brand new Jaunty Jackalope). Fairly long time for this stupid bug to exist, is it not?

    • Yup it is a long time. I’m not really sure why that is. But I’m happy to know the fix is working for you,

  • Jan

    Worked for me on 9.04, But I had to set it to K00umontnfs.sh

    Thank you!
    I have spent a lot of hour trying to fix this.

    • YES!! I’ve been searching for this for half a year.

      Peter and Jan thank you both so very much!

    • Mike

      That worked for me too! Thanks for the suggestion.

  • The Wizzard

    nice workaround. but it’s better to deal with the cause of this problem: networkmanager.

    if you use /etc/network/interfaces to connect to the network rather than networkmanager you won’t have a problem with unmounting network shares. make it look like this:

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp

  • Tepa

    Thank You very much for real and simle solution for that problem!!!
    Works on Unutu 9.04, Ubuntu 9.10 and probably many more…