[SOLVED] wicd and NFS - shutdown problem

You think you have found a bug? Let us know about it.
Post Reply
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

[SOLVED] wicd and NFS - shutdown problem

Post by witek »

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?
Last edited by witek on 22. Nov 2010, 18:22, edited 1 time in total.
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: wicd and NFS - shutdown problem

Post by witek »

I`ve just looked into rc.0 and I guess the solution is to move 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
so that it could run before this part:

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.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: wicd and NFS - shutdown problem

Post by gapan »

Did you try it? Does it work?
Image
Image
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: wicd and NFS - shutdown problem

Post by witek »

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 :(
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: wicd and NFS - shutdown problem

Post by witek »

The solution is changing umounting options in rc.0 from -r (remount read-only):

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
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 -f -l -t nfs,smbfs,cifs
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: wicd and NFS - shutdown problem

Post by gapan »

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.
Image
Image
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: wicd and NFS - shutdown problem

Post by witek »

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.
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: wicd and NFS - shutdown problem

Post by witek »

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. "
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: [SOLVED] wicd and NFS - shutdown problem

Post by gapan »

We're also going to have that in 13.37. ;)
Image
Image
Post Reply