I noticed wrong behaviour during shutdown of an NFS client with mounted filesystem when network is managed by wicd. It looks that during shutdown network is disconnected before NFS unmounts and the shutdown is stuck.
When I turned off the wicd daemon and network is managed only by rc.inet1 everything is OK.
By the way: why both rc.wicd and rc.inet1 are executables on freshly installed system? Wouldn`t only one of them be enough?
[SOLVED] wicd and NFS - shutdown problem
[SOLVED] wicd and NFS - shutdown problem
Last edited by witek on 22. Nov 2010, 18:22, edited 1 time in total.
Re: wicd and NFS - shutdown problem
I`ve just looked into rc.0 and I guess the solution is to move this part:
EDIT: Bad idea
so that it could run before this part:
EDIT: Bad idea
Code: Select all
# Unmount any NFS, SMB, or CIFS filesystems:
echo -e "${BOLDCYAN}Unmounting remote filesystems.${COLOR_RESET}"
/bin/umount -v -a -r -t nfs,smbfs,cifs
Code: Select all
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
Last edited by witek on 22. Nov 2010, 14:48, edited 1 time in total.
Re: wicd and NFS - shutdown problem
That was a bad idea - there is another problem: NFS is unable to unmount when somebody is using the shared directory during halt. This got nothing to do with wicd and shutdown sequence, I`m afraid 

Re: wicd and NFS - shutdown problem
The solution is changing umounting options in rc.0 from -r (remount read-only):
to -f (force) and -l (lazy):
Code: Select all
# Unmount any NFS, SMB, or CIFS filesystems:
echo -e "${BOLDCYAN}Unmounting remote filesystems.${COLOR_RESET}"
/bin/umount -v -a -r -t nfs,smbfs,cifs
Code: Select all
# Unmount any NFS, SMB, or CIFS filesystems:
echo -e "${BOLDCYAN}Unmounting remote filesystems.${COLOR_RESET}"
/bin/umount -v -a -f -l -t nfs,smbfs,cifs
Re: wicd and NFS - shutdown problem
I don't think that's a good idea. It might lead to data loss. Better make sure that nobody is using the share before unmounting.
Re: wicd and NFS - shutdown problem
Well, it might lead to data loss anyway as I`m shutting down the computer (I`m shutting down client machines from cron every evening to save electricity). I just want them to halt despite somebody forgot to logout (as all emploees went homes already). If only option -r is specified then computer is stuck and I have to disconect power to shut it down.
Re: wicd and NFS - shutdown problem
I`m satisfied that Slackware team borrowed my idea discussed here
as I have read today in their changlog:
" In rc.6 and rc.6, use -f when unmounting remote filesystems to avoid getting stuck in the case of a dead server. "

as I have read today in their changlog:
" In rc.6 and rc.6, use -f when unmounting remote filesystems to avoid getting stuck in the case of a dead server. "