Re: how to: automatically umount cifs partitions
shanti--
Yes, I get this error message:
Quote:
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults|multiuser [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
doug@ubuntu:/etc/init.d$
Thanks, shanti, for whatever light you can shed on this.
Re: how to: automatically umount cifs partitions
From the update-rc.d man page:
Quote:
System administrators are not encouraged to use update-rc.d to manage runlevels. They should edit the links directly or use runlevel editors such as sysv-rc-conf and bum instead.
So, don't use update-rc.d.
Re: how to: automatically umount cifs partitions
Sander--
Ahh! Thank you very much!
So is that what that command was doing, was managing runlevels? Boy was that hard to figure from the error message I got!
Thanks!
Re: how to: automatically umount cifs partitions
Yeah. update-rc.d was made for the post-install scripts inside .deb packages to make it easy for applications to add/remove themselves from the /etc/rcX.d directories without tripping over themselves or having lots of duplicate post-install code in those .deb packages.
The easiest way for you is to simply symlink the things you want manually using the "ln -s" command.
Re: how to: automatically umount cifs partitions
Quote:
Originally Posted by
dgermann
shanti--
Yes, I get this error message:
Thanks, shanti, for whatever light you can shed on this.
Probably you forgot the point at the end, i.e.
Code:
sudo update-rc.d umountcifs stop 02 0 6 #wrong
sudo update-rc.d umountcifs stop 02 0 6 . #ok
But as for previous suggestions, you may want to use a different method to do the work.
Re: how to: automatically umount cifs partitions
I have also been wrestling with CIFS VFS errors when shutting down ubuntu while CIFS shares are mounted. I am currently running Ubuntu & Kubuntu both 7.04 Feisty Fawn 64bit. This script does seem to help however it does not work 100%. I have not thoroughly explored the reasons why sometimes I receive the errors and sometimes do not.
However, extensive googling on the topic revealed an interesting discussion on launchpad here. By combining the information on that thread with how this script works I have come up with two simple commands that appear to work well for me. The underlying causes of these errors may not be the same for you as they are for me however these two commands have resolved my CIFS unmounting problems on every machine I have tested them on:
Code:
sudo mv /etc/rc0.d/S31umountnfs.sh /etc/rc0.d/S17umountnfs.sh
sudo mv /etc/rc6.d/S31umountnfs.sh /etc/rc0.d/S17umountnfs.sh
Perhaps someone more experienced and knowledgable can explain the details but from what I have gathered, the underlying problem is that during ubuntu shutdown the network is stopped before the shares are unmounted. While this script will unmount the shares before the network is stopped, a more elegant solution is to move the existing unmounting process to happen before the network is stopped.. which is what happens by moving S31 to S17.
Re: how to: automatically umount cifs partitions
There is a very simple reason why you cannot simply move umountnfs to S17: What about people who load system directories or home directories from a network share? unmounting those at S17 is too soon. There may still me applications running that use them.
By the way, you said the script doesn't always work. Which one? The mountcifs script posted by the creator of this thread? Or the umountcifs I posted a couple of posts above? They both work in very different ways.
Re: how to: automatically umount cifs partitions
Sander--
Thank you!
Shanti--
Perhaps I did, but I thought I had tried to make sure it was there. In any event, tonight I get this error message:
Quote:
System startup links for /etc/init.d/umountcifs already exist
Thanks. I used the ln-s method and it seems to work.
Thanks everyone!
Re: how to: automatically umount cifs partitions
Re: how to: automatically umount cifs partitions
Hi All,
The gz file and the step by step from Shanti solved my problem in just under 1 minute. And I have been struggling with shutdown for a few weeks. Go figure:(