]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #1099 (again): map cciss/c0d0 to cciss!c0d0
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 5 Jan 2017 10:11:52 +0000 (11:11 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 5 Jan 2017 14:54:11 +0000 (15:54 +0100)
there was still a point where we got the wrong string
on createosd we get the devpath (/dev/cciss/c0d0)

but need the info from get_disks, which looks in /sys/block
where it needs to be cciss!c0d0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/Diskmanage.pm

index 5fd7c6a76a21d86a7a743c43b988cf3480f7bbb5..6dd12f7321b82a4986165c1c24942ea1f5ee5376 100644 (file)
@@ -376,6 +376,11 @@ sub get_disks {
 
     my $lvmlist = get_lvm_devices();
 
+    # we get cciss/c0d0 but need cciss!c0d0
+    if (defined($disk) && $disk =~ m|^cciss/|) {
+       $disk =~ s|cciss/|cciss!|;
+    }
+
     dir_glob_foreach('/sys/block', '.*', sub {
        my ($dev) = @_;
        return if defined($disk) && $disk ne $dev;