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.
This commit is contained in:
Wolfgang Bumiller 2016-02-25 11:43:00 +01:00 committed by Dietmar Maurer
parent 2fa6af2a5d
commit 6ada5d61c2

View File

@ -1241,13 +1241,6 @@ sub print_drivedevice_full {
} else { } else {
if ($drive->{file} =~ m|^/|) { if ($drive->{file} =~ m|^/|) {
$path = $drive->{file}; $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 (my $info = path_is_scsi($path)) {
if ($info->{type} == 0) { if ($info->{type} == 0) {
$devicetype = 'block'; $devicetype = 'block';
@ -1255,6 +1248,12 @@ sub print_drivedevice_full {
$devicetype = 'generic'; $devicetype = 'generic';
} }
} }
} else {
$path = PVE::Storage::path($storecfg, $drive->{file});
}
if($path =~ m/^iscsi\:\/\//){
$devicetype = 'generic';
} }
} }