Results 1 to 10 of 40

Thread: "CIFS VFS" Error stalling/breaking shutdown - simple fix!

Threaded View

  1. #1
    Join Date
    Oct 2008
    Location
    New Jersey
    Beans
    515
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    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!
    Last edited by rhcm123; May 3rd, 2009 at 08:46 PM. Reason: cause it looks ugly
    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.
    You talkin' to me? - Taxi Driver (1976)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •