FS#10484 - [initscripts] netfs fails to shutdown when NFS shares are automounted

Attached to Project: Arch Linux
Opened by Christoper Daley (luciferin) - Saturday, 24 May 2008, 07:55 GMT
Last edited by Tom Gundersen (tomegun) - Monday, 06 June 2011, 00:05 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Tom Gundersen (tomegun)
Architecture i686
Severity High
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
On shutdown the following will occur due to network shares being mounted in fstab and not unmounted before shutdown. The same error occurs if you pass "/etc/rc.d/netfs stop" without unmounting first.

":: Unmounting Network Filesystems [FAIL]"

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Tom Gundersen (tomegun)
Monday, 06 June 2011, 00:05 GMT
Reason for closing:  Duplicate
Additional comments about closing:  See  FS#20903 .
Comment by Aaron Griffin (phrakture) - Saturday, 24 May 2008, 22:18 GMT
Um, I'm not entirely sure what you're talking about. netfs stop should do all the mounting and unmounting. netfs stop does the following:

stat_busy "Unmounting Network Filesystems"
umount -a -t nfs,smbfs,codafs,ncpfs,cifs,shfs,fuse,fuseblk

If unmounting your filesystems fails, you need to figure out WHY they fail.
Comment by Christoper Daley (luciferin) - Sunday, 25 May 2008, 03:30 GMT
I figured out why. It fails to unmount if I have more than one NFS share listed in fstab because it doesn't have enough time to finish unmounting. Fixed by adding 'sleep 5' before it checks for success. Sorry I didn't give you more information to begin with.

Patch is attached.
Comment by Christoper Daley (luciferin) - Monday, 01 September 2008, 20:02 GMT
This still happens in initscripts 2008.08-1 with more than one NFS share automatically mounting. Adding 'sleep 5' is still a fix.
Comment by Glenn Matthys (RedShift) - Friday, 12 September 2008, 12:09 GMT
Adding a sleep is not a fix, it's a workaround. The problem lies somewhere deeper
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 15 June 2009, 23:34 GMT
When you add a sleep, what you do is a overwrite of the error status variable $? writed by the process umount. So with sleep is always '0'.
Comment by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 13:48 GMT
@Christoper: is there a possibility to fix this by tuning some NFS options so that umount does not return while work is not finished?
Comment by Jaap Crezee (jaapcrezee) - Saturday, 26 December 2009, 11:42 GMT
I think this is because rpcbind service is stopped before netfs unmounts (nfs) network filesystems. When I put an umount -f <nfs-mount-points> to the rc.local.shutdown file, everything works just fine.
I seems to me that the unmount in netfs is hanging a long time in netfs->unmount. Eventually it will continue here, but it takes nearly 5 minutes.
Comment by Michel Lafon-Puyo (tolumak) - Monday, 08 February 2010, 21:13 GMT
I have the same issue on two Arch boxes. My nfs mount is /home.

I added 'lsof | grep /home' in the netfs script (in the error handling part) and every time the problem happens, there is some kde daemon involved: akonadi, kded, etc.

I could investigate about this but I don't really known what should be the behaviour during the shutdown. Of course I suspect that every "user" process should be terminated before trying to unmount the NFS filesystems but I don't understand how the Arch shutdown scripts could guarantee that.



Comment by Kio M. Smallwood (Sekenre) - Friday, 26 March 2010, 20:50 GMT
Just like to confirm that this is an annoyance. My workaround is similar to Jaap's

in /etc/rc.local.shutdown
umount -a -t nfs

Comment by (N/A) (wantilles) - Monday, 11 April 2011, 19:09 GMT
This started happening here today, with today's update.

Which consisted, apart from the new xorg, by syslog-ng and mdadm.
Comment by (N/A) (wantilles) - Monday, 11 April 2011, 19:10 GMT
Is this bug, the same with this one?

https://bugs.archlinux.org/task/20903
Comment by Tom Gundersen (tomegun) - Monday, 06 June 2011, 00:04 GMT
@wantilles: yes, this is indeed a duplicate.

Workaround: place rpcbind before nfs-common in your MODULES array. If this does not fix the problem, please reopen.

Loading...