[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Skipping fsck during boot with systemd?

On Wed, Dec 10, 2014 at 09:42:43AM -0500, The Wanderer wrote:
> On 12/10/2014 at 06:10 AM, Andrei POPESCU wrote:
> > On Mi, 10 dec 14, 07:32:07, Renaud OLGIATI wrote:
> > 
> >> In my case no, more likely during shut-down, since the only time I
> >> shut down my box is when there is a power cut, and I have to shut
> >> it down quickly, before the UPS gives up. So I certainly do not
> >> want an unwanted automatic fsck at that time.
> > 
> > That would be easy to implement, assuming you computer "knows" it's 
> > running on batteries.
> On batteries is easy enough, for a laptop-style system.
> But for a more ordinary desktop (or server), running on a UPS, how is it
> supposed to know that it is on battery-based power?
> It's plugged in through an ordinary power cable, with no other
> connection to the power source. What indication is it supposed to have
> that the power source at the other end of that cable is any different
> from a standard wall outlet?
> I imagine that this might be one of the things the "USB cable from the
> UPS" is intended to address, but I don't think my own UPS (for example)
> includes any USB port, despite being a fairly high-end unit. (And off
> the top of my head I don't know of any software to handle that in
> Debian.)

NUT and APCUPSd are the most obvious solution

> For that matter, what if the wall outlet is connected to a "room" UPS?
> There won't be a data connection to the UPS there.

NUT caters for this situation. One machine is connected directly to the
UPS (with a USB or serial cable, for example) and runs nut-server. The
other machines run nut-client and listen for the notification that the
server machine has switched to batteries.

> Or if the entire thing is backed by a building emergency generator?

A generator is refillable so should, in theory, provide ample time for
any clean shutdown. Fine, you *could* extend the problem to include the
exhaustion of fossil fuels, the supernova of the sun and the inevitable
heat-death of the universe, but at some point you reach enough
notification that some one can get a keyboard on the machine and type
"sudo poweroff".

> Both of those latter situations are similarly time-limited, and even if
> there are heuristic solutions for the others, the last at least will
> generally not be something the computer can detect and identify.
> -- 
>    The Wanderer
> The reasonable man adapts himself to the world; the unreasonable one
> persists in trying to adapt the world to himself. Therefore all
> progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: Digital signature

Reply to: