]> git.proxmox.com Git - pve-manager.git/commitdiff
api: ceph: create osd: set correct parttype for DB/WAL
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 6 Oct 2021 09:18:48 +0000 (11:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 20:50:33 +0000 (21:50 +0100)
The get_ceph_journals function in pve-storage uses this information.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Ceph/OSD.pm

index a8f48304158bfcabd6dd179d6a6c6f1339d75efc..e617964d80363f4bb1cf7840728094ef2e279e52 100644 (file)
@@ -426,8 +426,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;
            }