|
|
Log in / Subscribe / Register

Changing Fedora's shutdown timeouts

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 9:36 UTC (Thu) by tchernobog (subscriber, #73595)
Parent article: Changing Fedora's shutdown timeouts

> Kevin Fenzi wondered if it made more sense to selectively add shorter timeouts to services that are known to take too long, but that can be safely killed.

What I would like then is a way to selectively make certain services blocking the shutdown. My use case is the backup service I use (btrbk), which might be in the middle of a send/receive operation between disks.

I don't know if shutdown is still prevented if Btrfs is committing a snapshot deletion (basically an fsync operation). If the kernel will still prevent shutdown automatically in that case, overriding the init system wishes, I haven't really tested. If it does, at least for me it will affect shutdown time much more than the typical use case of the user session hanging for two minutes.

A message to make the user aware that shutdown/restart is taking longer than expected would be welcome either way.


to post comments

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 12:05 UTC (Thu) by smcv (subscriber, #53363) [Link] (1 responses)

> What I would like then is a way to selectively make certain services blocking the shutdown

This already exists and is mentioned in the article: it's the inhibitor lock mechanism, which follows the frequent systemd pattern of having a D-Bus API that services can call into, and a CLI that wraps it for use in scripts, in this case systemd-inhibit(1).

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 12:22 UTC (Thu) by mbiebl (subscriber, #41876) [Link]

The inhibitor mechanism is one way or units specifying an explicit timeout via TimeoutStopSec

https://www.freedesktop.org/software/systemd/man/systemd....


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds