Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 5th, 2006   #1
max.durden
First Cup of Ubuntu
 
max.durden's Avatar
 
Join Date: Jun 2006
Location: Florence, Italy
Beans: 10
Ubuntu 9.04 Jaunty Jackalope
how to: automatically umount cifs partitions

Hi everybody,
I'm posting a modification of a simple script originally coded by 'jferrando'
http://www.ubuntuforums.org/showthre...highlight=cifs
devoted to automatically umount cifs partitions in the shutdown and reboot sequence of Ubuntu (Dapper+). The main problem with the original script was that mount locations of cifs partitions had to be explicitly hardcoded in the script: I have written a simple routine which detects all mounted cifs-partition and umount them before proceeding with the other phases of the shutdown/reboot sequences.

-----------------------------------------------------
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

...that's all!
------------------------------------------------------
I've experienced problem in the shutdown of my laptop just after sharing cifs filesystems with other PCs in a VPN network... this script fixed the problem.... hope it will be useful for someone out there!

Happy Coding
Max
Attached Files
File Type: zip mountcifs.zip (585 Bytes, 6408 views)
max.durden is offline   Reply With Quote
Old November 5th, 2006   #2
crazy___cow
5 Cups of Ubuntu
 
crazy___cow's Avatar
 
Join Date: Jun 2006
Location: Italy
Beans: 29
Re: how to: automatically umount cifs partitions

Works fine for me.
crazy___cow is offline   Reply With Quote
Old February 6th, 2007   #3
kupajava
5 Cups of Ubuntu
 
Join Date: Apr 2006
Location: Seattle
Beans: 36
Ubuntu 7.04 Feisty Fawn
Re: how to: automatically umount cifs partitions

The script worked well and ended my CIFS VFS: No Response for cmd 50 error that would lock my sys on shutdown.

Unfortunately, now i get one at the same place that says:
"CIFS VFS: No Response for Cmd 113"

However, this error does not lock the system, it just hangs for about 5 seconds and then continues to shutdown properly.

Any Ideas?
kupajava is offline   Reply With Quote
Old February 13th, 2007   #4
max.durden
First Cup of Ubuntu
 
max.durden's Avatar
 
Join Date: Jun 2006
Location: Florence, Italy
Beans: 10
Ubuntu 9.04 Jaunty Jackalope
Re: how to: automatically umount cifs partitions

I'm am experiencing the same problem, but at the moment I don'tknow how to fix that...
However, I'm working on it... if i find a solution I'll post on this thread

Happy coding

Max
max.durden is offline   Reply With Quote
Old March 7th, 2007   #5
zer01
First Cup of Ubuntu
 
Join Date: Mar 2007
My beans are hidden!
Re: how to: automatically umount cifs partitions

Hi, thanks, it's very useful to me.
zer01 is offline   Reply With Quote
Old April 22nd, 2007   #6
funchords
Gee! These Aren't Roasted!
 
funchords's Avatar
 
Join Date: Feb 2006
Location: Hillsboro, Oregon USA
Beans: 181
Ubuntu 7.04 Feisty Fawn
Re: how to: automatically umount cifs partitions

Thank you! This solved the problem I was having in Feisty Fawn 7.04 with long delays on the

"CIFS VFS: No Response for Cmd (various)"

Your solution worked immediately (no need to reboot after applying).

Thanks!!
__________________
Robb Topolski
Hillsboro, Oregon USA
funchords is offline   Reply With Quote
Old April 25th, 2007   #7
sanuward
First Cup of Ubuntu
 
Join Date: Apr 2007
Beans: 7
Re: how to: automatically umount cifs partitions

this is great, thanks a lot
sanuward is offline   Reply With Quote
Old April 29th, 2007   #8
SonicSteve
Quad Shot of Ubuntu
 
SonicSteve's Avatar
 
Join Date: Jul 2006
Location: Brampton ON Can
Beans: 478
Ubuntu 9.10 Karmic Koala
Re: how to: automatically umount cifs partitions

Super!!
I've been living with this problem since mid way through Edgy. Problem solved! thanks
SonicSteve is online now   Reply With Quote
Old April 29th, 2007   #9
mattme
Spilled the Beans
 
Join Date: Jul 2006
Beans: 14
Re: how to: automatically umount cifs partitions

What does happen if you try and shutdown with cifs still mounted? If it's something bad, then this is a bug, and bugs should be fixed.
mattme is offline   Reply With Quote
Old April 30th, 2007   #10
SonicSteve
Quad Shot of Ubuntu
 
SonicSteve's Avatar
 
Join Date: Jul 2006
Location: Brampton ON Can
Beans: 478
Ubuntu 9.10 Karmic Koala
Re: how to: automatically umount cifs partitions

Quote:
Originally Posted by mattme View Post
What does happen if you try and shutdown with cifs still mounted? If it's something bad, then this is a bug, and bugs should be fixed.
For me it just pauses with the "no response for cmd 50 mid" error. It then continues after about 5-10 seconds and shutsdown.

You are right though, it does seem to be a bug
SonicSteve is online now   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:43 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry