Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40

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

  1. #21
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

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

    Lots of unusual options, but I don't see anything that is glaringly wrong. Any of the options without an entry (level1 file extensions, wins server, etc) should probably be removed (make a backup first), but that probably won't affect your particular issue.

    Try this. Edit /etc/gdm/PostSession/Default again and include an explicit unmount for the mp3s like this:
    Code:
    #!/bin/sh
    umount /mnt/mp3s
    /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

  2. #22
    Join Date
    May 2007
    Beans
    880
    Distro
    Ubuntu Development Release

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

    Adding an explicit unmount command does in fact work. So that's certainly good news for me (no more rough power-downs), but it still doesn't explain what's going on. The only obvious difference in this mount from the others is that it has a number in it; could the script somehow be broken when passed a mount point name with a number?

  3. #23
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

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

    Quote Originally Posted by michaelzap View Post
    Adding an explicit unmount command does in fact work. So that's certainly good news for me (no more rough power-downs), but it still doesn't explain what's going on. The only obvious difference in this mount from the others is that it has a number in it; could the script somehow be broken when passed a mount point name with a number?
    Nope, a number won't make a bit of difference. The only other thing I can think of would be that perhaps the data volume in that or one of the other shares is causing the unmount to be too slow, so the rest of the logout script completes before the mp3 share is completely unmounted.

    Complete guess though. I really have no idea why you would encounter that problem on that share only.

  4. #24
    Join Date
    May 2007
    Beans
    880
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by dmizer View Post
    Nope, a number won't make a bit of difference.
    It certainly shouldn't...

    Quote Originally Posted by dmizer View Post
    The only other thing I can think of would be that perhaps the data volume in that or one of the other shares is causing the unmount to be too slow, so the rest of the logout script completes before the mp3 share is completely unmounted.
    I thought of that also, and I've tried reordering the shares in fstab to see if that matters (it doesn't). All but one of these shares is on the same drive, and this share's contents were in the media share before (combined with videos), so I can't figure it out.

    Quote Originally Posted by dmizer View Post
    I really have no idea why you would encounter that problem on that share only.
    Me either!

  5. #25
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

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

    Is there something making use of the mp3s folder when you log off? If you have something like Amarok or Listen open or any kind of local database using the files, it will not unmount correctly.

    That's the only other idea I have.

  6. #26
    Join Date
    May 2007
    Beans
    880
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by dmizer View Post
    Is there something making use of the mp3s folder when you log off? If you have something like Amarok or Listen open or any kind of local database using the files, it will not unmount correctly.

    That's the only other idea I have.
    Nope. I use Exaile to play mp3s, but this happens if I just boot up and then shut down, and it didn't happen when these same mp3s were in the media share with my videos. And of course mp3s does unmount if the command is manual or explicit, just not automatically...

  7. #27
    Join Date
    Aug 2007
    Beans
    371
    Distro
    Ubuntu 10.10 Maverick Meerkat

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

    Quote Originally Posted by rhcm123 View Post
    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!
    I am really new at this so forgive me.

    I did find out that the shutdown process drops the network and then tried to unmount the mounted network shares which causes it to hang for a couple of minutes.

    I manage (stumbling a little) to write a script that umounts (in reverse order of the fstab mount lines) then went to terminal to excute it.

    Code:
    sudo /home/username/scripts/dismount.sh
    This worked fine. Now shutting down was fast and no errors.

    Please (detailed step by step) what files and how do I need to put this working script in so it will go automatically.

    Thanks in advance

  8. #28
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

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

    Quote Originally Posted by measekite View Post
    Please (detailed step by step) what files and how do I need to put this working script in so it will go automatically.
    See post 7: http://ubuntuforums.org/showpost.php...97&postcount=7

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

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

    Also, i noticed that if you switch interfaces that the server is interfacing on, this fix fails, unless you have used the share,

    For instance, if i mount the share over ethernet on my lappy (eth1) then unplug and go downstairs (eth0), this fix fails. However, if i go downstairs, then open a file on the server, this fix works. Hope this helps some of you.
    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)

  10. #30
    Join Date
    Jul 2009
    Beans
    571
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Help, there's no K15umountnfs.sh in my /etc/rc0 and /etc/rc6
    It's OK, everything we know will become obsolete at some time.

Page 3 of 4 FirstFirst 1234 LastLast

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
  •