From 44ec1afe8818d973f18c31ca3033be38860c42db Mon Sep 17 00:00:00 2001 From: themylogin Date: Thu, 1 Feb 2024 13:43:04 +0100 Subject: [PATCH] Do not create `pristine` snapshot for cloned datasets --- truenas_install/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/truenas_install/__main__.py b/truenas_install/__main__.py index cbee26c..77292e2 100644 --- a/truenas_install/__main__.py +++ b/truenas_install/__main__.py @@ -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])