The Azure tutorial Use the portal to attach a data disk to a Linux VM shows the following command to prepare a disk:
sudo parted /dev/sdc --script mklabel gpt mkpart xfspart xfs 0% 100%
Looked at the parted
man page to make sure what I'm doing, and it states that
mkpart [part-type name fs-type] start end
Create a new partition. part-type may be speci‐
fied only with msdos and dvh partition tables, it
should be one of "primary", "logical", or "ex‐
tended". name is required for GPT partition ta‐
bles and fs-type is optional. fs-type can be one
of "btrfs", "ext2", "ext3", "ext4", "fat16",
"fat32", "hfs", "hfs+", "linux-swap", "ntfs",
"reiserfs", "udf", or "xfs".
Unless I'm misinterpreting it, part-type
is required when using the mkpart
command with parted
, and its value should be one of the three listed.
So why does the command in the Azure tutorial work?
mkpart
works HERE – don_crissti Jan 19 '23 at 18:26mkpart "" 0% 100%
" - thanks for confirming this! – toraritte Jan 19 '23 at 18:29