mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Add bootfs.snapshot and bootfs.rollback kernel parameters
Unlike other filesystems, snapshots and rollbacks of bootfs need to be done from a rescue environment. This patch makes it possible to snap- shot or rollback the bootfs simply by specifying bootfs.snapshot or bootfs.rollback on the kernel command line. The operation will be performed by dracut just before bootfs is mounted. Reviewed-by: Antonio Russo <antonio.e.russo@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com> Closes #10198
This commit is contained in:
committed by
GitHub
parent
3d93161b01
commit
9052e3d70b
@@ -109,5 +109,11 @@ install() {
|
||||
ln -s ../zfs-import.target "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import.target
|
||||
type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import.target
|
||||
fi
|
||||
for _service in zfs-snapshot-bootfs.service zfs-rollback-bootfs.service ; do
|
||||
inst "${moddir}"/$_service "${systemdsystemunitdir}"/$_service
|
||||
if ! [ -L "${initdir}/$systemdsystemunitdir/initrd.target.wants"/$_service ]; then
|
||||
ln -s ../$_service "${initdir}/$systemdsystemunitdir/initrd.target.wants"/$_service
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user