parmenion wrote:I've had a similar problems having a some cifs filesystems mounted.
I've solved the problem by renaming the kill-scripts to change the order of execution:
Code: Select all
mv /etc/rc0.d/K04rsyslog /etc/rc0.d/K05rsyslog
mv /etc/rc0.d/K05umountnfs.sh /etc/rc0.d/K04umountnfs.sh
mv /etc/rc6.d/K04rsyslog /etc/rc6.d/K05rsyslog
mv /etc/rc6.d/K05umountnfs.sh /etc/rc6.d/K04umountnfs.sh
But i'm not sure if this the right way to fix the problem.
More of a "workaround" than a "fix" I think, but a similar workaround worked for me too.
I'm also on Wheezy (just updated from Squeeze).
My amateur analysis of what is occurring:
What has been done in the above is to stop rsyslog before unmounting the network drive. This means that rsyslog does not see that the network drive has not been unmounted (because rsyslog halts before the problem arises).
What I did was to ensure that the network drive was unmounted earlier.
(I'll give a detailed description as this may help others that have the same problem.
Anything in chevrons "<>" needs to be replaced with whatever is appropriate for your computer.)
umountnfs.sh was not unmounting the network drive fast enough. Even though the network shutdown is lower priority than unmounting the drive, the network shutdown completed before the drive was unmounted so umountnfs.sh was unable to complete, which was then detected by rsyslog, which would then wait forever for the drive to be unmounted (which never happens).
How I worked around the problem was to force the unmount earlier.
I wrote a short script and named it "umount_<device-name>/sh"
Code: Select all
#!/bin/bash
#script for automatic unmounting of nfs drive on reboot and shutdown
umount /<mount-point>/<device-name>
exit
That script goes into /etc/init.d
Code: Select all
sudo mv <dir>/<"umount_device-name> /etc/init.d
The command
umount /<mount-point>/<device-name> needs to be the appropriate command to unmount the network drive. You can test the command from a Terminal by running it as root (sudo on Debian/Ubuntu) and check that it actually does unmount the device.
A syslink then needs to be made in /etc/rc0.d
The name of the link needs a "K" number adding onto the start. The "K" number sets the priority and needs to definitely be before the network is shut down. I set it to be the first thing to shut down by calling it "K20umount_<device-name>" ("20" is a higher number than any of the existing link names).
Code: Select all
sudo ln -s /etc/init.d/umount_<device-name>.sh /etc/rc0.d/K20umount_<device-name>.sh
Reboot.
That should be all.