items/zfs_pool: use "parted -s" to avoid it prompting while changing stuff

This commit is contained in:
Franzi 2020-10-18 15:02:10 +02:00
parent a5088a5358
commit 4b51c1f82a
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -61,8 +61,8 @@ def prepare_blockdevice(node, device):
# We create a new partition on a raw disk. That partition will
# be used for ZFS. Yes, this is on purpose. No, creating a pool
# on raw disks does not work properly on Linux.
node.run("parted {} mklabel gpt".format(quote(device)))
node.run("parted {} mkpart -a optimal primary 0% 100%".format(quote(device)))
node.run("parted -s {} mklabel gpt".format(quote(device)))
node.run("parted -s {} mkpart -a optimal primary 0% 100%".format(quote(device)))
node.run("partprobe")
# Simply append a "1" to get to the first partition.