On Tue, Mar 17, 2020 at 12:41 PM Felix Miata <mrmazda(a)earthlink.net> wrote:
Richard Ryniker composed on 2020-03-17 14:33 (UTC-0400):
> Is shutdown in three minutes instead of three seconds an aggravation
> for the user who wants to use a new kernal or another operating
> system? Yes.
When the UPS says the battery is exhausted, must shutdown now, it's more than just
an aggravation.
Yep, good point. I'm not familiar with systemd, upowerd, and UPS
integration and policies - but for sure there are use cases where
heavy write workloads can so thoroughly dirty a filesystem that it can
take many minutes to flush to stable media. But I expect that the
design of this system accounts for the peak usage time to stop all
processes cleanly. You don't really want to lose that data. But at a
certain point, you'd want to SIGKILL everything anyway, so that
there's time for sync() to return. The systemd reboot/shutdown does
umount or remount read-only; both fully flush all file system data and
metadata to stable media. But this might take longer than just sync()
so I think in such cases you really want sync() to succeed, and the
shutdown is nice to have.
--
Chris Murphy