]> git.proxmox.com Git - pve-storage.git/commitdiff
lvm: Fix #3159: Show RAID LVs as storage content
authorDominic Jäger <d.jaeger@proxmox.com>
Wed, 13 Jan 2021 12:19:54 +0000 (13:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Jan 2021 18:19:02 +0000 (19:19 +0100)
LVM RAID logical volumes (including mirrors) can be valid disk images, so they
should show up in storage content listings (for example pvesm list).

Including LV types is safer than excluding, especially because of possible
additional types in the future.

Co-developed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
PVE/Storage/LVMPlugin.pm

index 73e8e487a397e24022d274fb5ef0870e16847ae1..df49b765fb1eaa8162b1a48c1814ae0c2d2fc246 100644 (file)
@@ -446,7 +446,8 @@ sub list_images {
 
            next if $scfg->{tagged_only} && !&$check_tags($info->{tags});
 
-           next if $info->{lv_type} ne '-';
+           # Allow mirrored and RAID LVs
+           next if $info->{lv_type} !~ m/^[-mMrR]$/;
 
            my $volid = "$storeid:$volname";