For the additional pools one might have, I adapted the script so it snapshots everything else.
To trigger the script I added a new service zfs-import-scan.service, and I adapted the existing zfs-mount.service to include it. This way additional zpools will be snapshotted right after being imported, and before mounting takes place. The script doing the work is called zfs- systemd-snap. I keep both the initramfs and systemd solution in place on my systems because the rootfs has been pivoted when systemd runs and the whole goal of this is to snapshot zpools without them being written to. I did make sure not to snapshot a zpool twice. To test the additional systemd stuff: - add zfs-systemd-snap to /etc/systemd - add zfs-import-scan.service to /etc/systemd/system and run "systemctl enable zfs-import-scan.service" - add zfs-mount.service to /etc/systemd/system and run "systemctl enable zfs-mount.service" That's basically it, it should run based on the same GRUB parameter mentioned before behaving the same way. Disclaimer: when executing the steps above you are effectively overriding the default zfs-mount.service script provided by the Ubuntu- provided zfs packages. If the unit file gets updated in the future, this will no longer be reflected on your system. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1639500 Title: Snapshot the system zpool from within the initramfs To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1639500/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
