forked from mirrors/nixpkgs
nixos/tests/installer: lvm: test lvm2-pvscan@ units
Also, add some sleep statements in between, which seems to at least feel like it causes > WARNING: Device /dev/vda* not initialized in udev database even after waiting 10000000 microseconds. To occur less frequently. This eventually still succeeds after some amount of waiting, I suspect some racyness in the way lvm's udev-triggered scripts trigger other units.
This commit is contained in:
parent
d056f6e86d
commit
53a34361af
|
@ -555,16 +555,26 @@ in {
|
|||
+ " mkpart primary 2048M -1s" # PV2
|
||||
+ " set 2 lvm on",
|
||||
"udevadm settle",
|
||||
"sleep 1",
|
||||
"pvcreate /dev/vda1 /dev/vda2",
|
||||
"sleep 1",
|
||||
"vgcreate MyVolGroup /dev/vda1 /dev/vda2",
|
||||
"sleep 1",
|
||||
"lvcreate --size 1G --name swap MyVolGroup",
|
||||
"sleep 1",
|
||||
"lvcreate --size 2G --name nixos MyVolGroup",
|
||||
"sleep 1",
|
||||
"mkswap -f /dev/MyVolGroup/swap -L swap",
|
||||
"swapon -L swap",
|
||||
"mkfs.xfs -L nixos /dev/MyVolGroup/nixos",
|
||||
"mount LABEL=nixos /mnt",
|
||||
)
|
||||
'';
|
||||
postBootCommands = ''
|
||||
assert "loaded active" in machine.succeed(
|
||||
"systemctl list-units 'lvm2-pvscan@*' -ql --no-legend | tee /dev/stderr"
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
# Boot off an encrypted root partition with the default LUKS header format
|
||||
|
|
Loading…
Reference in a new issue