clonesetup: add support to clone devices via /etc/clonetab

Adds dm-clone device setup at boot via a new /etc/clonetab config file,
following the crypttab/veritytab pattern.

- Add systemd-clonesetup-generator to parse /etc/clonetab and generate units.
- Add systemd-clonesetup binary to create/remove dm-clone devices via ioctl.
- Add clonesetup.target for ordering dm-clone activation at boot.
- Add region_size= option in clonetab to configure dm-clone hydration granularity.
- Add clonetab(5) and systemd-clonesetup-generator(8) man pages.

Fixes: https://github.com/systemd/systemd/issues/39500
This commit is contained in:
Simran Singh
2026-07-10 14:01:24 +02:00
committed by Lennart Poettering
parent c0c5ba9662
commit 104970a8bd
18 changed files with 1400 additions and 0 deletions
+4
View File
@@ -76,6 +76,10 @@ All tools:
`/etc/veritytab`. Only useful for debugging. Currently only supported by
`systemd-veritysetup-generator`.
* `$SYSTEMD_CLONETAB` — if set, use this path instead of
`/etc/clonetab`. Only useful for debugging. Currently only supported by
`systemd-clonesetup-generator`.
* `$SYSTEMD_DEFAULT_HOSTNAME` — override the compiled-in fallback hostname
(relevant in particular for the system manager and `systemd-hostnamed`).
Must be a valid hostname (either a single label or a FQDN).