]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/RBDPlugin.pm
rbd: use consistent image name schemes
[pve-storage.git] / PVE / Storage / RBDPlugin.pm
index b44b9bad2e87e7b402a87c8a9d810413bb5908e5..387565660f1e6b108aeddb51e54680c7d6c94e47 100644 (file)
@@ -184,8 +184,9 @@ sub rbd_ls {
     my $parser = sub {
        my $line = shift;
 
-       if ($line =~  m/^((vm|base)-(\d+)-disk-\d+)\s+(\d+)(k|M|G|T)\s((\S+)\/((vm|base)-\d+-\S+@\S+))?/) {
+       if ($line =~  m/^((vm|base)-(\d+)-\S+)\s+(\d+)(k|M|G|T)\s((\S+)\/((vm|base)-\d+-\S+@\S+))?/) {
            my ($image, $owner, $size, $unit, $parent) = ($1, $3, $4, $5, $8);
+           next if $image =~ m/"@"/; #skip snapshots
 
            $list->{$pool}->{$image} = {
                name => $image,