[pve-devel] [PATCH storage] fix #1099 (again): map cciss/c0d0 to cciss!c0d0

Dominik Csapak d.csapak at proxmox.com
Thu Jan 5 11:11:52 CET 2017


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 at proxmox.com>
---
i hope this is the final fix for this issue...
 PVE/Diskmanage.pm | 5 +++++
 1 file changed, 5 insertions(+)

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;
-- 
2.1.4





More information about the pve-devel mailing list