Page 2 of 21 FirstFirst 123412 ... LastLast
Results 11 to 20 of 207

Thread: how to: automatically umount cifs partitions

  1. #11
    Join Date
    Mar 2006
    Beans
    3

    Re: how to: automatically umount cifs partitions

    thanks a lot!

  2. #12
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to: automatically umount cifs partitions

    max.durden, this thread has been linked to on my howto for cifs here: http://ubuntuforums.org/showthread.php?t=288534

    thanks so much for posting a fix for this, i had been unable to find a working solution.

  3. #13
    Join Date
    Jun 2007
    Beans
    1

    Re: how to: automatically umount cifs partitions

    max thanks so much for posting this fix!

    I am such a linux newbie - having never even logged into a linux machine until I decided to install Ubuntu over my old Win2kPro installation.

    the community support is unbelievable and in the past few weeks with the help of users like yourself I have been able to transform into a competent user.

    This successfully removed my "no response for cmd 114 mid 11" error on shutdown/reboot.

    Thanks again!

  4. #14
    Join Date
    Jun 2007
    Beans
    2
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: how to: automatically umount cifs partitions

    Many thanks - finally the problem is solved.

  5. #15
    Join Date
    Jul 2007
    Beans
    1

    Re: how to: automatically umount cifs partitions

    The script has a problem with smb/cifs-shares that contain spaces... For instance the shares on my windows-machine are called "my music" and "movies" respecively. This makes 'cut -d\ -F3' cut in different places on the two lines (mountpoint on the second, but only "on" on the first, since "music" is seen as the second field.)

    I have resolved this by renaming the share on my windows-computer, but the script should still be made aware of this.
    Last edited by Korgmatose; July 3rd, 2007 at 10:49 AM.

  6. #16
    Join Date
    Mar 2005
    Beans
    108

    Re: how to: automatically umount cifs partitions

    I have written a different init script based off /etc/init.d/sendsigs and /etc/init.d/umountnfs.sh that has two improvements over the script from the original poster:

    1) It does not use `cut` so shares with spaces in them are not a problem.
    2) Before unmounting the cifs shares, the script first asks all processes that are still using the shares to exit. If those processes don't exit then they will be forcefully terminated. This ensures that the unmount won't fail because there are still open files on it.

    Use it in the same way as the script from the original poster: unzip the attachment and save it's content as /etc/init.d/umountcifs. Then symlink it to /etc/rc0.d/KXXumountcifs where XX is any number lower than 20 (because at K20 udev and portmap and all get shut down and unmounting cifs shares doesn't work after that).
    Attached Files Attached Files

  7. #17
    Join Date
    Apr 2006
    Beans
    3

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by max.durden View Post
    -----------------------------------------------------
    Instructions are very simple:
    uncompress archive and set 'chmod +x' on the mountcifs file
    sudo cp mountcifs /etc/init.d/

    cd /etc/rc0.d
    sudo ln -s /etc/init.d/mountcifs K02mountcifs

    cd /etc/rc6.d
    sudo ln -s /etc/init.d/mountcifs K02mountcifs

    ------------------------------------------------------
    You may use update-rc.d to simplify the installation:

    Code:
    gunzip umountcifs.gz && chmod +x umountcifs
    
    sudo cp umountcifs /etc/init.d/ 
    
    sudo update-rc.d umountcifs stop 02 0 6 .
    Don't forget ending point in the last command!

    Thanks for your script!

  8. #18
    Join Date
    Oct 2005
    Beans
    711
    Distro
    Lubuntu 16.04 Xenial Xerus

    Smile Re: how to: automatically umount cifs partitions

    Hi--

    Many thanks. This was stalling my shutdown on 7.04 for about 2 minutes, and this seems to work.

    BTW, don't use these commands:
    cd /etc/rc0.d
    sudo ln -s /etc/init.d/mountcifs K02mountcifs

    cd /etc/rc6.d
    sudo ln -s /etc/init.d/mountcifs K02mountcifs
    Instead, use these for the second script to work:
    Code:
    cd /etc/rc0.d
    sudo ln -s /etc/init.d/umountcifs K02umountcifs
    
    cd /etc/rc6.d
    sudo ln -s /etc/init.d/umountcifs K02umountcifs
    I suspect that's why it did not work for me the first time....

    Oh, the update-rc.d did not work for me.
    Last edited by dgermann; July 13th, 2007 at 03:24 AM.
    :- Doug.

  9. #19
    Join Date
    Apr 2006
    Beans
    3

    Re: how to: automatically umount cifs partitions

    Quote Originally Posted by dgermann View Post
    Oh, the update-rc.d did not work for me.
    Did you get an error?

  10. #20
    Join Date
    Jul 2007
    Beans
    12

    Re: how to: automatically umount cifs partitions

    Does this script unmount cifs shares at logout, or only at shutdown/reboot?

    Phil

Page 2 of 21 FirstFirst 123412 ... 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
  •