mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
* Add some more "udevadm settle" calls. Hopefully this fixes random
failures like this: machine: running command: parted /dev/vda -- mkpart primary 1M 2048M machine: exit status 0 machine: running command: parted /dev/vda -- set 1 lvm on machine: exit status 1 machine: output: Warning: WARNING: the kernel failed to re-read the partition table on /dev/vda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. command `parted /dev/vda -- set 1 lvm on' did not succeed (exit code 1) at Machine.pm line 212, <GEN2> line 24. svn path=/nixos/trunk/; revision=19328
This commit is contained in:
parent
1a0bb65901
commit
6cfe5e2746
@ -261,11 +261,11 @@ in {
|
|||||||
$machine->mustSucceed(
|
$machine->mustSucceed(
|
||||||
"parted /dev/vda mklabel msdos",
|
"parted /dev/vda mklabel msdos",
|
||||||
"parted /dev/vda -- mkpart primary 1M 2048M", # first PV
|
"parted /dev/vda -- mkpart primary 1M 2048M", # first PV
|
||||||
|
"udevadm settle",
|
||||||
"parted /dev/vda -- set 1 lvm on",
|
"parted /dev/vda -- set 1 lvm on",
|
||||||
"parted /dev/vda -- mkpart primary 2048M -1s", # second PV
|
"parted /dev/vda -- mkpart primary 2048M -1s", # second PV
|
||||||
"parted /dev/vda -- set 2 lvm on",
|
|
||||||
"fdisk -l /dev/vda >&2",
|
|
||||||
"udevadm settle",
|
"udevadm settle",
|
||||||
|
"parted /dev/vda -- set 2 lvm on",
|
||||||
"pvcreate /dev/vda1 /dev/vda2",
|
"pvcreate /dev/vda1 /dev/vda2",
|
||||||
"vgcreate MyVolGroup /dev/vda1 /dev/vda2",
|
"vgcreate MyVolGroup /dev/vda1 /dev/vda2",
|
||||||
"lvcreate --size 1G --name swap MyVolGroup",
|
"lvcreate --size 1G --name swap MyVolGroup",
|
||||||
|
Loading…
Reference in New Issue
Block a user