api: disks: create: set correct partition type
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
a2c34371e6
commit
05d9171278
@ -216,7 +216,10 @@ __PACKAGE__->register_method ({
|
||||
|
||||
my $part = $dev;
|
||||
|
||||
if (!PVE::Diskmanage::is_partition($dev)) {
|
||||
if (PVE::Diskmanage::is_partition($dev)) {
|
||||
eval { PVE::Diskmanage::change_parttype($dev, '8300'); };
|
||||
warn $@ if $@;
|
||||
} else {
|
||||
# create partition
|
||||
my $cmd = [$SGDISK, '-n1', '-t1:8300', $dev];
|
||||
print "# ", join(' ', @$cmd), "\n";
|
||||
|
||||
Reference in New Issue
Block a user