tech-userlevel archive

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

Re: shutdown sequence and UPS poweroff



David Holland <dholland-tech%netbsd.org@localhost> writes:

> On Fri, Jan 06, 2023 at 10:13:36AM -0500, Greg Troxel wrote:
>  > Does it seem reasonably safe that mountall through root will be fast, < 10s?
>
> We've been seeing scattered reports of unmounting taking fast amounts
> of time, particularly on nvme devices, and I don't think we know why
> yet.

So usually < 10s, but could be 10 minutes in the bad case?

> It's a bug, but since not cutting the power to SSDs midflight is one
> of the primary reasons to have a UPS these days... seems like a
> dangerous on in this context. So it seems like a good idea to be
> cautions.

It seems then we should add some instrumentation to print scary warnings
(or even panic?) if unmount is slow, to be run by all users.

> Not sure what to recommend. The last time there was an issue like this
> (which turned out to be a bad bug with cached data not being written
> back until unmount time) it was possible to trigger the writing by
> attempting an unmount you know will fail with EBUSY, but I don't think
> we've ascertained if that works this go.

The other side of the coin is that shutdown starts when there is limited
runtime and most people want to use most of their runtime.

I'm going to live-test my system soonish.


Another thing is that mountall doesn't do anything on shutdown.  It
seems like it should unmount what it mounted, or unmount everything
which is not critical_filesystems_foo.  That would unmount big
filesystems before getting to power shudown command, at least for those
without whole-disk root.

I think nut's norm is 20s so may head to that.   Only affects those who
set up nut.  Without that, though, you'll lose power when the UPS shuts
down, with no warning, which isn't great either.


Home | Main Index | Thread Index | Old Index