api: ceph: create osd: set correct partition type

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-10-06 11:18:50 +02:00 committed by Thomas Lamprecht
parent 5161a0c2f0
commit cffeb11592

View File

@ -395,6 +395,11 @@ __PACKAGE__->register_method ({
PVE::Storage::LVMPlugin::lvm_create_volume_group($dev->{devpath}, $vg);
PVE::Storage::LVMPlugin::lvcreate($vg, $lv, "${size}k");
if (PVE::Diskmanage::is_partition($dev->{devpath})) {
eval { PVE::Diskmanage::change_parttype($dev->{devpath}, '8E00'); };
warn $@ if $@;
}
push @udev_trigger_devs, $dev->{devpath};
return "$vg/$lv";
@ -493,6 +498,11 @@ __PACKAGE__->register_method ({
PVE::Diskmanage::wipe_blockdev($devpath);
if (PVE::Diskmanage::is_partition($devpath)) {
eval { PVE::Diskmanage::change_parttype($devpath, '8E00'); };
warn $@ if $@;
}
run_command($cmd);
# FIXME: Remove once we depend on systemd >= v249.