I should have been more verbose in my answer...

2005/10/26, Henrique de Moraes Holschuh <[EMAIL PROTECTED]>:
On Wed, 26 Oct 2005, Arnaud Quette wrote:
> ...
> I've already made (upstream) the needed changes in NUT 2.0.3-pre1:
> >From the changelog:
> > 2.0.3-pre1
> >
> >Thu Aug 16 10:51:17 UTC 2005 / Arnaud Quette < [EMAIL PROTECTED]>
> >...
> > - drivers now don't chroot to statepath if called for power off
> > (using -k). This avoid unneeded failure to poweroff the UPS if
> > /var is umounted (thanks to Gaspar Bakos).

/etc/init.d/nut stop will have run then.  Do the drivers run without the
need for any other nut component running in memory?

I fixed this on my system by modifying /etc/init.d/nut to initiate the UPS
shutdown when needed.  The UPS gives the load 5 minutes to finish shutting
down before it powers it off.

Are there immediate-poweroff UPSes that don't support this delay?  Those are
not useable with Linux anyway, as the kernel will not have marked RAID
arrays clean and read-only at S99, nor will it have flushed drive caches.
That happens at final system powerdown.

the current scheme is to map on the least UPS (dry contact, not able to instruct delayed shutdown). I've a reflection underway to deal with that, and map by default on smart unit (which supports delayed shutdown), while being able to determine if the UPS(s) is (are) "dumb", and so if you have to call the driver shutdown method as we currently do.

While waiting for that, the mentionned change only not chroot to statepath
(/var/run/nut in our case) which is only needed to create the communication socket with upsd. In this stage, this is not needed as this last action is a "driver only" one (start, send the command to the UPS and exit)...

About your last question ("Are there immediate-poweroff UPSes that don't ..."), I don't know for the moment. The RAID problem is known and documented. For the drives, these should already be flushed as we're remounted RO...

Arnaud
--
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/

Reply via email to