Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old April 17th, 2009   #1
rhcm123
Quad Shot of Ubuntu
 
rhcm123's Avatar
 
Join Date: Oct 2008
Location: New Jersey
Beans: 508
Ubuntu 8.10 Intrepid Ibex
Arrow "CIFS VFS" Error stalling/breaking shutdown - simple fix!

There have been many threads on the forums/net about the CIFS shutdown bug, such as this and this.This bug can be easily found with several Google searches here and here.

This bug occours in permanently mounted samba/cifs shares, due to a bug in the packages, in all versions of Ubuntu. The way the bug works is a problem with old code. The way the shutdown pattern works is it brings down the networking before it unmounts all permanent drives. You see, linux and the /etc/fstab were made in the 1970's, where the idea of a non-local drive was not yet established. Therefore, the code (runlevel 0) assumes that it's OK to take down networking before it attempts to unmount all filesystems. That's the way it's been forever, and it's unlikley to change.

So, when cifs and samba roll along, and you permanently mount them in the fstab, you run into a snag, and that is this bug. Duh the cifs server is not responding to the disconnect command - networking is offline! (although some log output indicates otherwise!) This causes stalls and lock-ups on the shutdown, and can delay it by as much as 10 minutes! This is not good, obviously enough!

The old way of fixing this was use a script (see the above thread) that would be generally a pain to implement (lotta chmoding, copying, a reboot, etc.) It could be done in an hour or so, but I didn't want to waste an hour, so i let it be.

I was considering other options (such as a version of rc.local that would run at shutdown) while I looked through the Internet for ideas. I found one finally that suited my tastes for simplicity and workability. Heck, took two seconds to get working permanently. It's this command, that i found here:
Code:
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
Too simple, but brilliant. It links the unmount nfs init command to the shutdown and reboot runlevels, and the runlevel runs these commands when it starts!
ITS BLOODY GENIOUS CHAPS

Enjoy, and have lots of fun not having to manually unmount your server every shutdown!
__________________
OH NOES!!! I HAZ CRASHED SERVER!! WHY ON EARTH WOULD YOU DO THAT?!?! CAUSE ITS FUNNY!!!!
Running either 7.04, 8.04, 8.10, 9.04, it varies.
Quote:
You talkin' to me? - Taxi Driver (1976)

Last edited by rhcm123; May 3rd, 2009 at 03:46 PM.. Reason: cause it looks ugly
rhcm123 is offline   Reply With Quote
Old April 19th, 2009   #2
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

This fix is also here: http://ubuntuforums.org/showthread.php?t=293513 but it's a bit outdated. The current version is available in that thread, but it's buried.

I'm going to update my CIFS tutorial (2nd link in my sig), and link to this thread for the "CIFS VFS: Server not responding" fix.

Thanks.
dmizer is offline   Reply With Quote
Old April 20th, 2009   #3
rhcm123
Quad Shot of Ubuntu
 
rhcm123's Avatar
 
Join Date: Oct 2008
Location: New Jersey
Beans: 508
Ubuntu 8.10 Intrepid Ibex
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by dmizer View Post
This fix is also here: http://ubuntuforums.org/showthread.php?t=293513 but it's a bit outdated. The current version is available in that thread, but it's buried.
That's exactly why I made this thread. The first forum results on google are a bit outdated/buried in old threads, so i felt like making a new one so that when somebody googles their problem they don't get read only archive-results.
__________________
OH NOES!!! I HAZ CRASHED SERVER!! WHY ON EARTH WOULD YOU DO THAT?!?! CAUSE ITS FUNNY!!!!
Running either 7.04, 8.04, 8.10, 9.04, it varies.
Quote:
You talkin' to me? - Taxi Driver (1976)
rhcm123 is offline   Reply With Quote
Old June 15th, 2009   #4
gcastell
5 Cups of Ubuntu
 
Join Date: Nov 2007
Beans: 39
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by rhcm123 View Post
That's exactly why I made this thread. The first forum results on google are a bit outdated/buried in old threads, so i felt like making a new one so that when somebody googles their problem they don't get read only archive-results.
Well, even after this fix, I still get the error. Any other idea or at least how can I debug it? This is really annoying.
__________________
Visit my blog
gcastell is offline   Reply With Quote
Old June 15th, 2009   #5
gcastell
5 Cups of Ubuntu
 
Join Date: Nov 2007
Beans: 39
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by gcastell View Post
Well, even after this fix, I still get the error. Any other idea or at least how can I debug it? This is really annoying.
Well, I should know better, the reason why I still get this error is because I am using Jaunty. dmizer post the solution in his tutorial
__________________
Visit my blog
gcastell is offline   Reply With Quote
Old June 22nd, 2009   #6
michaelzap
Skinny Soy Caramel Ubuntu
 
Join Date: May 2007
Beans: 688
Ubuntu 9.10 Karmic Koala
Question Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

I still get this error on my laptop running 64-bit Jaunty. I've tried the fix linked above (both in addition to the pre-Jaunty fix and also without those symbolic links, since the post isn't clear whether you need to do both). I've also tried using "S14" links in both places instead of "K15" (which is what works for me on my Jaunty desktop; the only difference that I can think of between my desktop and laptop is that the laptop is connected via wifi).

Does anyone else have trouble with this still, and better yet has anyone figured out another solution?
michaelzap is offline   Reply With Quote
Old June 22nd, 2009   #7
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by michaelzap View Post
I still get this error on my laptop running 64-bit Jaunty. I've tried the fix linked above (both in addition to the pre-Jaunty fix and also without those symbolic links, since the post isn't clear whether you need to do both). I've also tried using "S14" links in both places instead of "K15" (which is what works for me on my Jaunty desktop; the only difference that I can think of between my desktop and laptop is that the laptop is connected via wifi).

Does anyone else have trouble with this still, and better yet has anyone figured out another solution?
Edit /etc/gdm/PostSession/Default and add /etc/init.d/umountnfs.sh to the top of the file like so:

Code:
#!/bin/sh
/etc/init.d/umountnfs.sh

PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH:/bin:/usr/bin"
OLD_IFS=$IFS

gdmwhich () {
  COMMAND="$1"
  OUTPUT=
  IFS=:
  for dir in $PATH
  do
    if test -x "$dir/$COMMAND" ; then
      if test "x$OUTPUT" = "x" ; then
        OUTPUT="$dir/$COMMAND"
      fi
    fi
  done
  IFS=$OLD_IFS
  echo "$OUTPUT"
}

exit 0
dmizer is offline   Reply With Quote
Old June 22nd, 2009   #8
michaelzap
Skinny Soy Caramel Ubuntu
 
Join Date: May 2007
Beans: 688
Ubuntu 9.10 Karmic Koala
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by dmizer View Post
Edit /etc/gdm/PostSession/Default and add /etc/init.d/umountnfs.sh to the top of the file...
Thanks, but that's the fix I've tried that isn't working.
michaelzap is offline   Reply With Quote
Old June 22nd, 2009   #9
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Are you using Kubuntu?
dmizer is offline   Reply With Quote
Old June 22nd, 2009   #10
michaelzap
Skinny Soy Caramel Ubuntu
 
Join Date: May 2007
Beans: 688
Ubuntu 9.10 Karmic Koala
Re: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Quote:
Originally Posted by dmizer View Post
Are you using Kubuntu?
Nope. Straight vanilla (64-bit) Gnome, freshly installed on a new laptop just a couple nights ago. I'm mounting my shared network drives using the same fstab commands that I use on my desktop system, and there they unmount without any problems.
michaelzap is offline   Reply With Quote

Bookmarks

Tags
cifs, nfs, reboot, samba, shudown

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:16 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry