Page 4 of 21 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 207

Thread: how to: automatically umount cifs partitions

  1. #31
    Join Date
    Sep 2006
    Beans
    417
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: how to: automatically umount cifs partitions

    I am trying to fix this issue right now. What are the correct commands to run?

  2. #32
    Join Date
    Oct 2007
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Question Re: how to: automatically umount cifs partitions

    How comes Ubuntu isn't able to unmount network drives all by itself when it shuts down entirely?

    IMO nobody should need to Google for a script to have Ubuntu behave a little bit like a modern OS.

    When I click "Shut down" or "Restart" why isn't it obvious for Ubuntu that my machine will eventually power off completely and that network drives are not needed anymore?
    I'd like to understand.

  3. #33
    Join Date
    Mar 2005
    Beans
    108

    Re: how to: automatically umount cifs partitions

    It's not the OS that is at fault. It's the cifs driver.

    The cifs driver does not run inside the kernel like all the other drivers but runs inside a separate daemon. Don't ask me why. Ubuntu tries to do the right thing: first shut down all applications, then unmount all network disks, then unmount all local disks. Because this daemon is a separate program, it leads to a catch-22 situation. When Ubuntu shuts down all other programs prior to unmounting, it also shuts down the cifs driver.

    That means your network shares have vanished without being unmounted. When in the next step Ubuntu tries to unmount the network shares, you get an error because you don't have connection with the shares anymore.

    What my script above does is quite simple. Before the step "stop all applications" it will "stop all applications that use the network shares" and "unmount cifs shares". So, you end up with:

    * stop all applications using the cifs share
    * unmount the cifs share
    * stop all applications (also kills the cifs daemon)
    * unmount other network shares
    * unmount local disks

    Which is the correct order.

  4. #34
    Join Date
    Oct 2007
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: how to: automatically umount cifs partitions

    Thanks for the explanation (and thanks for the script!), I can see now why things are happening this way.

    Still, I find this default behaviour a serious shortcomming.

    To the end user it doesn't matter who of the kernel or the driver is responsible for this issue. What they see is: windows connects flawlessly to my NAS (no matter what protocol it uses), Linux does not (unless very complicated and cryptic commands are typed in). Guess what they'll prefer... Arguing that windows is unsafe and part of a world domination plan, and such, doesn't make a point to them. They (and I) want it to "Just Work".

    I really want to use Ubuntu, but it is clear that it doesn't allow me to do everything I did (easely) with Windows, unless I become a Linux guru... and sadly I don't have the time and energy to become one... (I prefer to spend my time with my family than to spend it on learning linux cmd lines)

    I just hope some day the Ubuntu developers will put the user instead of the system in the center of their concern. I strongly believe it is the only factor which will allow people to massively migrate from windows to linux.
    Ubuntu, almost "Just Works".
    Humanity <> geeks
    Better <> Cmd line

  5. #35
    Join Date
    Sep 2006
    Location
    UK
    Beans
    11
    Distro
    Hardy Heron (Ubuntu Development)

    Re: how to: automatically umount cifs partitions

    I agree with svdb, this could use some dev attention. It is still not fixed in Gutsy, which makes me wonder what method is everybody else using for this shared drives? The "Connect to server" method, which creates smb mappings is the most obvious and is handled correctly on shutdown, but is not suitable for applications that don't support the smb: protocol.

  6. #36
    Join Date
    Jul 2007
    Beans
    16

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by max.durden View Post
    Hi everybody,
    I'm posting a modification of a simple script originally coded by 'jferrando'
    Cheers - fixed my annoying shutdown problem on my Dell 1720 running Gutsy!.

  7. #37

    Re: how to: automatically umount cifs partitions

    This problem is still occuring in Gutsy.

    Reported as bug:
    https://bugs.launchpad.net/ubuntu/+bug/153444

  8. #38
    Join Date
    Oct 2007
    Beans
    3

    Re: how to: automatically umount cifs partitions

    I'm using the umountcifs script and I'm still seeing the messages; however now after it drops to the terminal it goes back to the progress bar and then shuts down...is it actually working I wonder?

  9. #39
    Join Date
    Mar 2005
    Beans
    108

    Re: how to: automatically umount cifs partitions

    Well, the biggest annoyance that the script fixes isn't the the messages but the time it waits for a timeout. Does it shut down fast in you case? Or does it wait?

    If the script doesn't work, then the most likely thing that goes wrong is that it's run too late. If you linked it as e.g. K19umountcifs in your rc.X directory, try lowering the number to e.g. K10umountcifs or even K05umountcifs. If you don't run any programs on the cifs and don't have any important directories mounted from cifs (e.g. /home) then you can probably even run it as K01umountcifs.

    Experiment a bit. You'll want the script to run as late as possible without failing to work.

  10. #40
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: how to: automatically umount cifs partitions

    Thanks for this script, it's worked perfectly for me!

Page 4 of 21 FirstFirst ... 2345614 ... 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
  •