fix: avoid external probing effects from other devices

This commit is contained in:
David Arnold authored and mergify[bot] committed 2023-09-15 20:04:52 +00:00
1 parent 8aa6ec5ff2
commit 0faae8adf6
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ in
--typecode=${toString partition._index}:${partition.type} \
${config.device}
# ensure /dev/disk/by-path/..-partN exists before continuing
partprobe
partprobe ${config.device}
udevadm trigger --subsystem-match=block
udevadm settle
${lib.optionalString (partition.content != null) partition.content._create}
+1 -1
View File
@@ -42,7 +42,7 @@
--force \
--homehost=any \
"''${disk_devices[@]}"
partprobe
partprobe /dev/md/${config.name}
udevadm trigger --subsystem-match=block
udevadm settle
# for some reason mdadm devices spawn with an existing partition table, so we need to wipe it
+2 -2
View File
@@ -91,7 +91,7 @@
parted -s ${config.device} -- mkpart ${partition.part-type} ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end}
''}
# ensure /dev/disk/by-path/..-partN exists before continuing
partprobe
partprobe ${config.device}
udevadm trigger --subsystem-match=block
udevadm settle
${lib.optionalString partition.bootable ''
@@ -101,7 +101,7 @@
parted -s ${config.device} -- set ${toString partition._index} ${flag} on
'') partition.flags}
# ensure further operations can detect new partitions
partprobe
partprobe ${config.device}
udevadm trigger --subsystem-match=block
udevadm settle
${lib.optionalString (partition.content != null) partition.content._create}
+1 -1
View File
@@ -50,7 +50,7 @@
zfs create ${config._parent.name}/${config.name} \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
-V ${config.size}
partprobe
partprobe /dev/zvol/${config._parent.name}/${config.name}
udevadm trigger --subsystem-match=block
udevadm settle
${lib.optionalString (config.content != null) config.content._create}