snapshotmanager / boom-boot

Boom Boot Manager
GNU General Public License v2.0
30 stars 4 forks source link

dedicated /var filesystem #24

Closed bskou57 closed 5 months ago

bskou57 commented 7 months ago

Hi

Perfect tool for snapshot manager before redhat update

Except I have a dedicated lvm filesystem for /var, how can I configure it with boom ?

thanks for your support

bmr-cymru commented 7 months ago

Support for defining auxiliary file systems was added in boom-1.6.0. This depends on the systemd.mount-extra parameter for systemd's fstab generator that was added in systemd-v254. This adds two new options, --no-fstab and --mount=WHAT:WHERE:FSTYPE:OPTIONS to boom that allows snapshots of additional file systems like /var to be mounted during snapshot boot.

If a system has a separate /var and snapshots of root and /var have been taken on logical volumes rhel/root-snap and rhel/var-snap, and the /boot file system is located on device /dev/vda2, the command to create a snapshot boot entry would look something like this:

# boom create --title Snapshot --root-lv rhel/root-snap --no-fstab --mount /dev/vda2:/boot:xfs:defaults --mount /dev/rhel/var-snap:/var:xfs:defaults
Created entry with boot_id fae6426:
  title Snapshot
  machine-id a76538d60c5a4566912a3649744f2529
  version 5.14.0-423.el9.x86_64
  linux /vmlinuz-5.14.0-423.el9.x86_64
  initrd /initramfs-5.14.0-423.el9.x86_64.img
  options root=/dev/rhel/root-snap ro rd.lvm.lv=rhel/root-snap crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap rhgb quiet fstab=no systemd.mount-extra=/dev/vda2:/boot:xfs:defaults systemd.mount-extra=/dev/rhel/var-snap:/var:xfs:defaults
  grub_users $grub_users
  grub_arg --unrestricted
  grub_class kernel

When booted the content of the mounted file systems for / and /var will reflect the state of the snapshot logical volumes.

Support for the systemd.mount-extra syntax was added in RHEL-9.3 in systemd-252-18.el9. Boom 1.6.0 is currently available in the RHEL-9.4 beta.

bskou57 commented 7 months ago

Hi

Many thanks for your feedback

Do you have something for rhel8 ?

Thanks

bmr-cymru commented 7 months ago

Unfortunately the version of systemd in RHEL8 is too old to safely backport the changes required to support this and the request to add this functionality was declined by the maintainers in RHEL issue 5989.

Although there's no supported mechanism to boot into a snapshot for systems with separate /var or other file systems it's still possible to use LVM snapshots to provide a rollback mechanism when carrying out upgrades.

bskou57 commented 7 months ago

Hi

You can close the issue

thanks for your feedback