From: Dominik Csapak Date: Thu, 5 Jan 2017 10:11:52 +0000 (+0100) Subject: fix #1099 (again): map cciss/c0d0 to cciss!c0d0 X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=1590fc13bff27e17680074fc262165d74d039365 fix #1099 (again): map cciss/c0d0 to cciss!c0d0 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 --- diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index 5fd7c6a..6dd12f7 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -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;