Skip to content

Commit 17c25e8

Browse files
committed
install: Skip nested mounts during var migration
Preserve mountpoint directories without copying mounted contents so --preserve-var handles nested filesystems such as rpc_pipefs. Copy into the shared stateroot var per entry to avoid leaving partial entries on failure. Keep the package-mode test's TMT run directory under preserved /var across the migration reboot so TMT can resume the test and collect results. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
1 parent 62e1c7a commit 17c25e8

5 files changed

Lines changed: 1809 additions & 148 deletions

File tree

‎crates/lib/src/install.rs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,18 @@ pub(crate) struct InstallToExistingRootOpts {
629629
/// Passing this flag performs the following additional steps **after** the
630630
/// core install completes:
631631
///
632-
/// 1. `/var` content is copied into the new deployment:
633-
/// - **Reflink copy** (btrfs / XFS): `cp --reflink=always` performs an
634-
/// instantaneous copy-on-write clone — no extra disk space consumed.
632+
/// 1. Non-excluded `/var` content is copied into the new deployment:
633+
/// - **Reflink copy** (btrfs / XFS): reflinks avoid immediate data
634+
/// duplication, but are created per file and are not a snapshot.
635635
/// - **Full copy** (filesystems without reflinks): data is copied into
636636
/// the deployment's writable `/var` directory.
637637
/// 2. Paths listed with `--preserve-var-skip` (or in install configuration)
638-
/// are excluded. Rollback preservation is intentionally independent.
638+
/// are excluded, including any matching nested mountpoint; exclusions
639+
/// take precedence over creating mountpoint placeholders. Other nested
640+
/// mountpoints get empty placeholders, not copied contents. `/etc`
641+
/// configuration merged with `--merge-etc` can restore configured
642+
/// mounts at boot; runtime-only mounts need separate configuration.
643+
/// Rollback preservation is intentionally independent.
639644
///
640645
/// The running system's `root_path` must be mounted (e.g. `-v /:/target`).
641646
#[clap(long)]

0 commit comments

Comments
 (0)