Is there some magic I'm missing to convince an 8.2 system to umount -f? I had an NFS server crash, so I'm trying to get the mounts updated. All of the 7.x systems happily did 'umount -f', but the 8.x systems (mostly 8.2-pN) are just hanging forever. Is this a bug, or is it something I'm missing? Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
On 02/13/2012 13:02, Doug Barton wrote:> Is there some magic I'm missing to convince an 8.2 system to umount -f? > I had an NFS server crash, so I'm trying to get the mounts updated. All > of the 7.x systems happily did 'umount -f', but the 8.x systems (mostly > 8.2-pN) are just hanging forever.... and it gets worse. I just 'shutdown -r now'ed one of my less-critical 8.2 systems, and it hung for several minutes after "All buffers synced." After a power cycle it came back, but the buffers weren't actually synced because it's still fsck'ing some pretty large file systems. What the heck? -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
> -------- Original Message -------- > Subject: Re: Why won't 8.2 umount -f? > Date: Mon, 13 Feb 2012 13:20:55 -0800 > From: Doug Barton <dougb@FreeBSD.org> > Organization: http://SupersetSolutions.com/ > To: <freebsd-stable@FreeBSD.org> > CC: <freebsd-fs@FreeBSD.org> >Cross posting? (gasp!)> On 02/13/2012 13:02, Doug Barton wrote: > > Is there some magic I'm missing to convince an 8.2 system to umount -f? > > I had an NFS server crash, so I'm trying to get the mounts updated. All > > of the 7.x systems happily did 'umount -f', but the 8.x systems (mostly > > 8.2-pN) are just hanging forever. > > ... and it gets worse. I just 'shutdown -r now'ed one of my > less-critical 8.2 systems, and it hung for several minutes after "All > buffers synced." After a power cycle it came back, but the buffers > weren't actually synced because it's still fsck'ing some pretty large > file systems. > > What the heck?We've noticed this behavior too (on 8.1-RELEASE-p6). The work-around (to avoid long fsck) is to: 1. Drop to the kernel debugger (Ctrl+Alt+ESC -- requires DDB to be enabled in kernel) 2. Type: call boot(0) This causes the system to attempt a second sync of the buffers. This second attempt ends up timing out but succeeds in resetting the CPU (after 3x 60s timeouts). The price (waiting 180s before cpu_reset() is called) can be well worth it (avoiding multi-hour fsck) because the disks will be marked clean. For us, this is a serious issue and like Doug, we too exclaim "what the heck?" Shouldn't have to drop to kernel debugger and [redundantly] invoke boot(0) after syncer's hang just prior to cpu_reset(). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
Doug Barton wrote:> Is there some magic I'm missing to convince an 8.2 system to umount > -f? > I had an NFS server crash, so I'm trying to get the mounts updated. > All > of the 7.x systems happily did 'umount -f', but the 8.x systems > (mostly > 8.2-pN) are just hanging forever. > > Is this a bug, or is it something I'm missing? >Well, I didn't realize that a 7.n system would "umount -f" an NFS mount when the server was down and there were dirty blocks that needed to be written back, but I don't know. (I seem to recall that someone encouraged me to MFC one of my changes related to this back to stable/7, but I'm not sure if it mattered?) I have pretty well fixed the new client w.r.t. this except for the case where you do a "umount <path>" and that gets hung. Once a non "-f" umount gets hung, there is nothing you can do, because the mount point is locked up, so a subsequent "umount -f" can't get as far as nfs_umount(). My guess is that the old (default for 8.n) client isn't fixed for this. If you "grep MNTK_UNMOUNTF" in the sources, you'll see it used some in the old/regular client, but not as much as the new one. You also need a fairly recent (can't remember if that is in 8.2) version of umount.c, since the code had a "sync();" at the beginning of it that would hang before even getting to the umount(2) syscall. Bottom line, I think the newnfs client (the default for 9.0) can do this, but I'm doubtful the old/reguler one can. (I also wouldn't be surprised if there is still a bug other than the above mentioned one w.r.t. doing a "umount /mnt" and getting that hung before trying "umount -f /mnt". rick> > Doug > > -- > > It's always a long day; 86400 doesn't fit into a short. > > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to > "freebsd-stable-unsubscribe@freebsd.org"