Dominik Csapak
2018-12-07 14:56:03 UTC
current versions of smartctl can handle this, and sometimes
the mapping is reversed, e.g.
smartctl /dev/nvme0 shows the info of /dev/nvme1n1
and
smartctl /dev/nvme1 shows the info of /dev/nvme0n1
this patch does not fix the mismatch of nvme0 to nvme1n1, but
it shows the smart values for the correct drive
Signed-off-by: Dominik Csapak <***@proxmox.com>
---
PVE/Diskmanage.pm | 3 ---
1 file changed, 3 deletions(-)
diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index def0791..5c0b6a6 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -79,9 +79,6 @@ sub get_smart_data {
my $returncode = 0;
- $disk =~ s/n\d+$//
- if $disk =~ m!^/dev/nvme\d+n\d+$!;
-
my $cmd = [$SMARTCTL, '-H'];
push @$cmd, '-A', '-f', 'brief' if !$healthonly;
push @$cmd, $disk;
the mapping is reversed, e.g.
smartctl /dev/nvme0 shows the info of /dev/nvme1n1
and
smartctl /dev/nvme1 shows the info of /dev/nvme0n1
this patch does not fix the mismatch of nvme0 to nvme1n1, but
it shows the smart values for the correct drive
Signed-off-by: Dominik Csapak <***@proxmox.com>
---
PVE/Diskmanage.pm | 3 ---
1 file changed, 3 deletions(-)
diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index def0791..5c0b6a6 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -79,9 +79,6 @@ sub get_smart_data {
my $returncode = 0;
- $disk =~ s/n\d+$//
- if $disk =~ m!^/dev/nvme\d+n\d+$!;
-
my $cmd = [$SMARTCTL, '-H'];
push @$cmd, '-A', '-f', 'brief' if !$healthonly;
push @$cmd, $disk;
--
2.11.0
2.11.0