fix(zpool); Ignore shadow-mount error during recreate of zpool at existing non-empty path

This commit is contained in:
Bert Proesmans authored and Jörg Thalheim committed 2025-11-20 14:10:46 +00:00
1 parent d8a3e367bd
commit d9e12a2c7f
1 file changed
+12
+12
View File
@@ -365,6 +365,18 @@ in
if [ $continue -eq 1 ]; then
zpool create -f "${config.name}" \
-R ${rootMountPoint} \
${
if
(
# NOTE; It might be necessary to validate the value of config.options.mountpoint too
config.rootFsOptions.canmount or "" == "off"
)
then
# Mountpoint of root(pool)-dataset could be non-empty and ZFS by default prevents shadowing mounts.
"-m none"
else
""
} \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \
''${topology:+ $topology}