mirror of
https://github.com/nix-community/disko.git
synced 2024-11-04 05:44:29 +03:00
fix: avoid external probing effects from other devices
This commit is contained in:
parent
8aa6ec5ff2
commit
0faae8adf6
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user