Page 19 of 21 FirstFirst ... 91718192021 LastLast
Results 181 to 190 of 207

Thread: how to: automatically umount cifs partitions

  1. #181
    Join Date
    Jul 2006
    Beans
    16

    Re: how to: automatically umount cifs partitions

    Sorry to bring this thread up again but I'm still having problems here after trying various of the methods suggested.

    I'm running 9.10 on a laptop and I'm connecting via wireless to a NAS box. I'm mounting a couple of shares off the NAS box using fstab as below:

    Code:
    //myxerver/colin /home/colin-backup smbfs iocharset=utf8,credentials=xxx,uid=1000,gid=1000 0 0
    //myxerver/work /home/work smbfs iocharset=utf8,credentials=xxx,uid=1000,gid=1000 0 0
    This works great and I can remove these easily using:
    sudo /etc/init.d/umountnfs.sh

    So I know I have a script that will successfully remove the shares and if I manually run this, I can shutdown the computer in seconds.

    So I went to /etc/rc0 and rc6 and renamed the umount script as follows:
    lrwxrwxrwx 1 root root 22 2009-11-02 18:00 K01umountnfs.sh -> ../init.d/umountnfs.sh

    But it still locks up when trying to shutdown.

    I've tried putting the above line in the /etc/gdm/PostSession/Default file but this causes the window manager to lock when shutting down and it never goes to the black screen. Manually running the script works fine though...

    Can anybody help?

    Cheers,

    MdB

  2. #182
    Join Date
    Nov 2007
    Location
    The World
    Beans
    28

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by Maddog Battie View Post
    Sorry to bring this thread up again but I'm still having problems here after trying various of the methods suggested.

    I'm running 9.10 on a laptop and I'm connecting via wireless to a NAS box. I'm mounting a couple of shares off the NAS box using fstab as below:

    Code:
    //myxerver/colin /home/colin-backup smbfs iocharset=utf8,credentials=xxx,uid=1000,gid=1000 0 0
    //myxerver/work /home/work smbfs iocharset=utf8,credentials=xxx,uid=1000,gid=1000 0 0
    This works great and I can remove these easily using:
    sudo /etc/init.d/umountnfs.sh

    So I know I have a script that will successfully remove the shares and if I manually run this, I can shutdown the computer in seconds.

    So I went to /etc/rc0 and rc6 and renamed the umount script as follows:
    lrwxrwxrwx 1 root root 22 2009-11-02 18:00 K01umountnfs.sh -> ../init.d/umountnfs.sh

    But it still locks up when trying to shutdown.

    I've tried putting the above line in the /etc/gdm/PostSession/Default file but this causes the window manager to lock when shutting down and it never goes to the black screen. Manually running the script works fine though...

    Can anybody help?

    Cheers,

    MdB
    Same here.. this issue is keeping me for upgrade my main desktop. CIFS share became a pain in the as.. on ubuntu.

    I try almost everything but it will hang on shutdown, no matter what.

    rc0 and rc6 has changed a little bit on 9.10 & dont understand why such a change inside a version. As i dont understand why the ubuntu team JUST doest come with a proper fix for this whole CIFS shutdown thing, we are making all kind of fixs but nothing properly done. This has been an ages discussion on the Debian list..

    is time to fix this without all kind of manual tricks.

    On every other distro cifs get umounted without any manual trick.
    Cheers,
    Zer0

  3. #183
    Join Date
    Jul 2006
    Beans
    16

    Re: how to: automatically umount cifs partitions

    As a temp solution I've added a link to sudo /etc/init.d/umountnfs.sh next to the shutdown button so I can click on that before hitting shutdown. Very much a cludge but it seems to work.

    If someone can come up with a better solution for 9.10 then please, please let me/us know.

  4. #184
    Join Date
    Oct 2009
    Beans
    29

    Re: how to: automatically umount cifs partitions

    Hi!

    I put that script

    #!/bin/bash
    umount.cifs /path/to/share

    in /etc/rc0.d

    made it executable and named it K01umount.

    Now I did not got the error so far.

    Hope that helps somebody.

  5. #185
    Join Date
    Feb 2007
    Beans
    33

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by dmizer View Post
    Okay, and if you edit your /etc/gdm/PostSession/Default file so it looks like the following one, you still have the problem?

    Code:
    #!/bin/sh
    /etc/init.d/umountnfs.sh
    
    PATH="/usr/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
    Sorry, I don't want to seem condescending, I'm just making sure all my bases are covered so I can be prepared for 9.10 when it's released.
    I've just done a clean install of Karmic on a Dell Inspiron 6400 laptop, and I mount one CIFS partition that's on a Maxtor network drive (as well as five NFS partitions on a ReadyNAS). None of the code you give above appears in the Karmic version of /etc/gdm/PostSession/Default. Here's what's in the Karmic version:

    Code:
    #!/bin/sh
    
    exit 0
    Inserting /etc/init.d/umountnfs.sh there did not remove the CIFS error problem for me. For now, I'm using the same cludge as Maddog Battie: "As a temp solution I've added a link to sudo /etc/init.d/umountnfs.sh next to the shutdown button so I can click on that before hitting shutdown."

    This appears to deal with the CIFS error. (There's still some other glitch in the shutdown, but this looks like it may be to do with the encrypted /home partition. Anyway, it's another issue, I think.)

    (The long-running blame swapping between the Debian developers and the NM developers about this mess shows up the worst side of free software: damn the users, what matters is which developers are to blame and should therefore back down. Adolescents! I just wish the Ubuntu devs would sidestep the silliness, and hack this for us.)

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

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by diana.artemis View Post
    Inserting /etc/init.d/umountnfs.sh there did not remove the CIFS error problem for me.
    Well, that's no good.

    Did you try the fix posted by Alabamaschalk in post 184?

  7. #187
    Join Date
    Feb 2007
    Beans
    33

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by dmizer View Post
    ...Did you try the fix posted by Alabamaschalk in post 184?
    I've just tried it. I don't get a CIFS error; but the shutdown throws me out to tty1, hangs for a while with a flashing cursor, and then runs through the text-based shutdown to the system halt.

    What with the interminable 'hang', it takes about as long as waiting for the CIFS error to time out. So not a success, I fear.

    I can't see anything in the logs (though I admit I don't know much about this, and might not notice even if the problem were logged!). I must say, however, that Karmic does not seem to shut down gracefully. Even without a CIFS share mounted, the shutdown sometimes pops out to a text screen, with obscure messages such as

    init: statd main process ended, respawning.

    (There are a couple of recent bug reports about this.)

    Anyway, as I don't really make that much use of the CIFS share any more, I'm tempted to cut my losses, and not mount it on this laptop (until this whole issue gets fixed in Lucid??? Don't hold your breath.)

    Thanks for troubling to reply, and so fast, too. You've really been a great help to everyone in this thread, and I benefited greatly from your work on Jaunty and earlier releases. Many thanks!

    [edit1: Just realised that statd is to do with NFS, and I guess the issue may be another symptom of NM closing the network before the shares are unmounted. Rats!]

    [edit2: Since abandoning CIFS, and just using NFS for shares on Raid5 4Tb NAS I've had no further shut-down problems. Simples!]
    Last edited by diana.artemis; November 17th, 2009 at 05:45 PM.

  8. #188
    Join Date
    Jul 2006
    Beans
    16

    Re: how to: automatically umount cifs partitions

    Ok, I've managed to come up with a better work around.

    Instead of mounting the directory using fstab, I've mounted it using gvfs-mount at the start of the script that does my back-up. When I shut down the laptop, gvfs mounts are unmounted before the wireless is switched off and everything exits cleanly.

    Stage 1: Manually setup a network share. (File browser: File->Connect to server)

    Stage 2: Run gvfs-mount -l to see what name is used.

    Stage 3: From then on run gvfs-mount share_name to mount and gvfs-mount -u share_name to unmount.

    I hope that is useful to somebody.

  9. #189
    Join Date
    Oct 2009
    Beans
    29

    Re: how to: automatically umount cifs partitions

    Dear all,
    I have to admit that the fix I posted earlier does not work every time like other users already experienced.
    I found out that the shutdown works perfectly with the fix when I do not run Firefox in the session.
    Wheb I run Firefox the shutdown hangs again.
    May be some of you folks can use this information.

    regards

  10. #190
    Join Date
    Apr 2009
    Location
    Lemgo, Gerrnany
    Beans
    5

    Re: how to: automatically umount cifs partitions

    Oh no! I upgraded yesterday to karmic and this problem again! Will the Ubuntu team never fix this?!

    Has anybody logged a bug already?

Page 19 of 21 FirstFirst ... 91718192021 LastLast

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
  •