]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/API2/Disks.pm
allow disk with LVM for journal devices
[pve-storage.git] / PVE / API2 / Disks.pm
index 86d8fcf4c8bcd93ee3cefc279af71700c6df9fb7..ce4acee01be53cf2abb0df06307b67ccf65e485a 100644 (file)
@@ -9,6 +9,9 @@ use HTTP::Status qw(:constants);
 use PVE::JSONSchema qw(get_standard_option);
 
 use PVE::API2::Disks::LVM;
+use PVE::API2::Disks::LVMThin;
+use PVE::API2::Disks::Directory;
+use PVE::API2::Disks::ZFS;
 
 use PVE::RESTHandler;
 
@@ -19,6 +22,21 @@ __PACKAGE__->register_method ({
    path => 'lvm',
 });
 
+__PACKAGE__->register_method ({
+   subclass => "PVE::API2::Disks::LVMThin",
+   path => 'lvmthin',
+});
+
+__PACKAGE__->register_method ({
+   subclass => "PVE::API2::Disks::Directory",
+   path => 'directory',
+});
+
+__PACKAGE__->register_method ({
+   subclass => "PVE::API2::Disks::ZFS",
+   path => 'zfs',
+});
+
 __PACKAGE__->register_method ({
     name => 'index',
     path => '',
@@ -48,6 +66,9 @@ __PACKAGE__->register_method ({
            { name => 'initgpt' },
            { name => 'smart' },
            { name => 'lvm' },
+           { name => 'lvmthin' },
+           { name => 'directory' },
+           { name => 'zfs' },
            ];
 
        return $result;
@@ -116,7 +137,7 @@ __PACKAGE__->register_method ({
            my $entry = $disks->{$disk};
            if ($type eq 'journal_disks') {
                next if $entry->{osdid} >= 0;
-               next if !$entry->{gpt};
+               next if !$entry->{gpt} && $entry->{used} ne 'LVM';
            } elsif ($type eq 'unused') {
                next if $entry->{used};
            } elsif ($type ne '') {