Do not create pristine snapshot for cloned datasets

This commit is contained in:
themylogin
2024-02-01 13:43:04 +01:00
parent 3f015a19aa
commit 44ec1afe88

View File

@@ -757,7 +757,10 @@ def main():
run_command(["zfs", "set", f"readonly={ro}", this_ds])
if entry.get("snap", False):
run_command(["zfs", "snapshot", f"{this_ds}@pristine"])
# Do not create `pristine` snapshot for cloned datasets as this will cause snapshot name conflicts
# when promoting the clone.
if entry["name"] not in cloned_datasets:
run_command(["zfs", "snapshot", f"{this_ds}@pristine"])
run_command(["zfs", "set", f"mountpoint={mp}", this_ds])
run_command(["zfs", "set", 'org.zectl:bootloader=""', this_ds])