[OpenIndiana-discuss] Standard flag for fast shutdown
Jim Klimov
jimklimov at cos.ru
Tue Feb 18 15:11:26 UTC 2014
On 2014-02-18 13:50, James Carlson wrote:
> 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.
> 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.
Well, as I wrote in the original post - there are several shades
of "proper" :)
If the system is not time-constrained about the shutdown, it might
(like some DBMS/LDAP servers do) stop accepting new requests, go
on timely finishing the old requests, and when none are left in
the backlog - finally turn off. Hopefully the requests are at this
time handled by other replicas of the service.
Another is a time-constrained powerfail shutdown, when the whole
small (SOHO) datacenter is going down and we don't really care
about unprocessed queries, but we do care about consistency of
the application data on-disk. So we get close to aborting any
queries on short notice and turning off the database software,
for example. "Short notice" means waiting a few seconds (but not
many minutes or indefinitely long), so that if all systems begin
shutdown at roughly the same time, the higher level software
(like application servers) can begin or even complete their
part of the urgent shutdown and their data in the databases
and logs would also be consistent.
Similarly for fileservers backing VMs in my other example.
One thing is a consistent disk image, and another is a VM
needing or not needing fsck or other data recovery inside
that image. And yet another - is the lengthiness of a full
VM shutdown vs. VM going to sleep and saving-state on disk.
>> 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.
This is good as long as some servers and the clients stay up
and cache the in-flight data to be saved onto storage later.
At the moment I have to think about the scenario when they
are all going down - how to ensure the least losses possible :)
Thanks,
//Jim
More information about the OpenIndiana-discuss
mailing list