Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
24220f6
man/systemd.timer: Correct inaccuracy in man page
AdrianVovk Feb 18, 2025
2a53095
network/link: ENODATA from reading IFLA_MASTER when an interface has …
yuwata May 27, 2025
1f59fbf
network/link: update state file when master ifindex is changed
yuwata May 27, 2025
b2ba644
test-network: add test case for issue #37629
yuwata May 27, 2025
17c23fe
sysupdate: change status once operation has completed
bluca May 28, 2025
9c69520
sync-docs: fix syntax warning
bluca May 30, 2025
5926951
sync-docs: fix selection menu when opening 'latest' man
bluca May 30, 2025
7ce4fac
sync-docs: add '(latest stable)' next to the latest version in the menu
bluca May 30, 2025
0e94606
test: wait for coredump to appear before parsing
bluca May 30, 2025
1ce8fee
mount-util: avoid unnecessary mount_setattr() call in make_fsmount()
poettering May 31, 2025
dd961f0
bootctl: fix unclosed quote in debug log
MonterraByte May 31, 2025
384300e
network: fix a potential divide-by-zero (#37705)
mugitya03 Jun 2, 2025
41ad63a
compress: prevent divide-by-zero when no data is read (#37706)
mugitya03 Jun 3, 2025
3a42a11
repart: if partition already exists, required size may not be multipl…
yuwata Apr 18, 2025
7b49a42
resolved: honour SD_RESOLVED_NO_CNAME flag when processing cache
poettering Jun 4, 2025
beb47f1
doc: mention 'exitrd' term
poettering Jun 4, 2025
94af1fc
doc: clarify that root storage daemons need unit files
poettering Jun 4, 2025
bcf6b14
io-util: protect against INT_MAX overflow in flush_fd()
poettering Jun 4, 2025
7c9acba
meson: Don't fail install script if file doesn't exist
daandemeyer Jun 5, 2025
50719a1
socket: downgrade not-supported logging for SO_PASSSEC
bluca Jun 9, 2025
d84df82
resolve: exit from loop for transactions when transactions has been r…
yuwata May 14, 2025
84d36cd
fstab-generator: set mode=0755 with root=tmpfs
bluca Jun 16, 2025
deaac64
resolved: Tweak link-local addresses relevancy
gtsiam Jun 17, 2025
7fa7ea5
man: encourage the creation of empty machine-id instead of deleting it
lnykryn Jun 18, 2025
2e5b00c
homed: do not log new password when debug logs are enabled
bluca Jun 22, 2025
4c83c7e
console: when switching console modes and one doesn't work, always go…
poettering Jun 20, 2025
8e76a58
home: Make sure we resolve /etc/skel symlink
daandemeyer Jun 22, 2025
5ba5818
core/transaction: rename ret -> job
yuwata May 15, 2025
ca73513
core/transaction: fix comment
yuwata May 15, 2025
1b3a64f
core/transaction: drop redundant call of bus_unit_validate_load_state()
yuwata May 20, 2025
e1add21
core/transaction: do not override unit load state when unit_load() fa…
yuwata May 20, 2025
9eeda4c
core: introduce Unit.dependency_generation counter and restart loop w…
yuwata May 15, 2025
b4ef3e3
test: add test case for issue #36031
yuwata May 15, 2025
632c7b9
core: escape UTF-8 in mount unit Where field before sending to clients
poettering Jun 20, 2025
3b00c3e
test: escape '+' from uname -r before using in regex via '=~'
bluca Jun 24, 2025
df05e8c
hwdb: update to v257-stable@{2025-06-25}
bluca Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions docs/ROOT_STORAGE_DAEMONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ this needs to be set up by the initrd, i.e. on Fedora by Dracut. In newer
systemd versions tear-down of the root file system backing is also done by the
initrd: after terminating all remaining running processes and unmounting all
file systems it can (which means excluding the root file system) systemd will
jump back into the initrd code allowing it to unmount the final file systems
(and its storage backing) that could not be unmounted as long as the OS was
still running from the main root file system. The job of the initrd is to
detach/unmount the root file system, i.e. inverting the exact commands it used
to set them up in the first place. This is not only cleaner, but also allows
for the first time arbitrary complex stacks of storage technology.
jump back into the initrd code (this code shall hereby be called the *exitrd*)
allowing it to unmount the final file systems (and its storage backing) that
could not be unmounted as long as the OS was still running from the main root
file system. The job of the exitrd is to detach/unmount the root file system,
i.e. inverting the exact commands it used to set them up in the first
place. This is not only cleaner, but also allows for the first time arbitrary
complex stacks of storage technology.

Previous attempts to handle root file system setups with complex storage as
backing usually tried to maintain the root storage with program code stored on
Expand Down Expand Up @@ -140,6 +141,34 @@ Note that your code should only modify `argv[0][0]` and leave the comm name
Since systemd v255, alternatively the `SurviveFinalKillSignal=yes` unit option
can be set, and provides the equivalent functionality to modifying `argv[0][0]`.

## Units

Any process on modern Linux systems is part of a control group ("cgroup"), and
so will be your storage daemon's processes. On systemd systems it's systemd
that manages the top-level cgroup tree, and the basic hierarchy of it is a
reflection of the running units, in particular slice and service units. This
hence means that your root storage daemon should be placed in a cgroup and
hence in a unit, and this unit should be defined both in the initrd and during
the rest of the runtime, so that your processes always have a valid cgroup
mapping to a valid unit.

Hence, please make sure to wrap your storage daemon in a proper service unit,
and ensure to set:

```
[Unit]
DefaultDependencies=no
IgnoreOnIsolate=yes
RefuseManualStop=yes
SurviceFinalKillSignal=yes
```

These settings will ensure the unit will stay around "forever", and neither be
stopped automatically, nor manually. And again, make sure this unit is
available both in the initrd and on the host.

## To which technologies does this apply?

These recommendations apply to those storage daemons which need to stay around
Expand Down
Loading
Loading