[OpenIndiana-discuss] Standard flag for fast shutdown
James Carlson
carlsonj at workingcode.com
Tue Feb 18 12:50:01 UTC 2014
On 02/17/14 14:42, Jim Klimov wrote:
> Is there any standard means to signal that the OS desires
> a fast shutdown as opposed to a possibly more time-consuming
> "proper" shutdown? I guess the main use-case would be with
> UPS events triggering the shutdown, and we want to quiesce
> the system as correctly and as quickly as possible.
If you don't care about the state of the applications, then "uadmin 2 6"
is about as fast as it's going to get. That halts the system, syncs the
file systems, and shuts off power. You can see more options in
/usr/include/sys/uadmin.h.
Of course, if you care about the state of the applications, then you
really need to do the "proper" shutdown. That's what the "proper" part
-- running the application-supplied shutdown scripts -- is all about.
When I was at Sun, it was common practice to do "uadmin 2 0" to drop
back to an OBP prompt and reboot when testing. Mostly harmless, as long
as you don't have anything valuable running at that moment.
> And on a similar note, are there any tricks for an OI NFS
> server to report to its clients that it is going to shut down?
> Usecase might be similar - a rebooting/UPS-shutdowning NFS
> server hosting some VM images can nicely tell its clients
> (VM hosts) to savestate and wait for it to come back...
A properly designed NFS client is always able to handle an NFS server
going away without notice. If it's not properly designed, then no
extension or "trick" is likely to make it work.
The right thing to do, I believe, would be to set up multiple servers
with fail-over so that the clients can drive on.
--
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the OpenIndiana-discuss
mailing list