On Mon, Dec 1, 2008 at 3:20 PM, Robert Thurlow <robert.thurlow at sun.com> wrote: > Mike Gerdts wrote: > >> I can not think of a case where "umountall -Z ... " is an advisable >> command > > I don't know of a reason an admin would use it manually, > but I think it's important to be able to use this in the > system shutdown path, for reasons previously stated. > > Rob T
The way that umountall is in the system shutdown path is what led this to being something worth fixing. Here's more of the story. Historically ypstop(1M) and ypstart(1M) have been acceptable mechanisms used to force a complete restart of NIS-related processes. To the best of my knowledge, there is no other documented mechanism prior to Solaris 10. Solaris 10 and later still document these and carry no scary warnings about side effects. As such, if a system administrator at a large organization were to decide to restart NIS processes across various releases of Solaris, "ypstop ; ypstart" would seem to be a reasonable thing to do. Else, complicated logic is involved to call svcadm on some releases and the traditional commands on others. Beginning with Solaris 10, ypstart and ypstop include: /usr/sbin/svcadm restart milestone/name-services Which seems safe enough... except: $ svcprop nfs/client | grep restart_on network/restart_on astring error nlockmgr/restart_on astring error cbd/restart_on astring error mapid/restart_on astring error rpcbind/restart_on astring restart keyserv/restart_on astring none gss/restart_on astring none name-services/restart_on astring refresh This causes nfs/client to restart when ypstop or ypstart is run. When nfs/client stops: $ svcprop nfs/client | grep stop/exec stop/exec astring /lib/svc/method/nfs-client\ %m $ grep umountall /lib/svc/method/nfs-client /sbin/umountall -F cachefs /sbin/umountall -F nfs When "/sbin/umountall -F nfs" runs in the global zone, it unmounts NFS file systems in all non-global zones. The global zone is fixed up when "/sbin/mountall -F nfs" is run immediately after. Unfortunately, "mountall -F nfs" does not similarly reach into non-global zones and as such all non-global zones remain broken. The same scenario exists for autofs. Now, getting back to the system shutdown doing the right thing with trying to clean up from bugs in the zone shutdown process.... Clearly the current implementation has serious implications for a properly behaving system that just had its NIS client reconfigured. If umountall needs to be run such that it takes action on all zones, it must not be triggered by a restart of name services. On the same token, disabling the nfs/client service in the global zone should not have an effect on the running state of non-global zones. -- Mike Gerdts http://mgerdts.blogspot.com/