From 6ada5d61c2a2acacf33de505075a67edda4af098 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 25 Feb 2016 11:43:00 +0100 Subject: [PATCH] only perform scsi inquiry on device nodes We don't have any storage types other than LVM which react to scsi inquiry, and we don't want to treat LVM as a scsi device, so now we only query devices added as actual /dev path. This was originally intended to be a pass-through feature anyway, so this makes sense. --- PVE/QemuServer.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 504294c6..946e7889 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -1241,13 +1241,6 @@ sub print_drivedevice_full { } else { if ($drive->{file} =~ m|^/|) { $path = $drive->{file}; - } else { - $path = PVE::Storage::path($storecfg, $drive->{file}); - } - - if($path =~ m/^iscsi\:\/\//){ - $devicetype = 'generic'; - } else { if (my $info = path_is_scsi($path)) { if ($info->{type} == 0) { $devicetype = 'block'; @@ -1255,6 +1248,12 @@ sub print_drivedevice_full { $devicetype = 'generic'; } } + } else { + $path = PVE::Storage::path($storecfg, $drive->{file}); + } + + if($path =~ m/^iscsi\:\/\//){ + $devicetype = 'generic'; } }