mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
f5f5a2db95
On my machines I observe random failures caused by rollback happening after zfs root is mounted. I've observed two types of failures: - zfs-rollback-bootfs.service fails saying that rollback must be done just before mounting the dataset - boot process fails and rescue console is entered. After making this modification and testing it for couple of days none of those problems have been observed anymore. I don't know if `dracut-mount.service` is still needed in the `After` directive. Maybe someone else is able to address this? Reviewed-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com> Signed-off-by: Wojciech Małota-Wójcik <59281144+outofforest@users.noreply.github.com> Closes #15025
14 lines
487 B
SYSTEMD
14 lines
487 B
SYSTEMD
[Unit]
|
|
Description=Rollback bootfs just before it is mounted
|
|
Requisite=zfs-import.target
|
|
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
|
Before=dracut-mount.service sysroot.mount
|
|
DefaultDependencies=no
|
|
ConditionKernelCommandLine=bootfs.rollback
|
|
ConditionEnvironment=BOOTFS
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/bin/sh -c '. /lib/dracut-lib.sh; SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "$BOOTFS@${SNAPNAME:-%v}"'
|
|
RemainAfterExit=yes
|