[pve-devel] [PATCH v2 manager 1/6] api: ceph: create osd: set correct parttype for DB/WAL
Fabian Ebner
f.ebner at proxmox.com
Wed Oct 6 11:18:48 CEST 2021
The get_ceph_journals function in pve-storage uses this information.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
No changes from v1.
Dependency bump for pve-storage needed.
PVE/API2/Ceph/OSD.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index fbbc2139..028b37d0 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -427,8 +427,18 @@ __PACKAGE__->register_method ({
} elsif ($dev->{used} eq 'partitions' && $dev->{gpt}) {
# create new partition at the end
+ my $parttypes = {
+ 'osd-db' => '30CD0809-C2B2-499C-8879-2D6B78529876',
+ 'osd-wal' => '5CE17FCE-4087-4169-B7FF-056CC58473F9',
+ };
my $part = PVE::Diskmanage::append_partition($dev->{devpath}, $size * 1024);
+
+ if (my $parttype = $parttypes->{$type}) {
+ eval { PVE::Diskmanage::change_parttype($part, $parttype); };
+ warn $@ if $@;
+ }
+
push @udev_trigger_devs, $part;
return $part;
}
--
2.30.2
More information about the pve-devel
mailing list