[pve-devel] [PATCH storage] (partially) fix #2020: do not drop the namespace part for nvme smart readings

Dominik Csapak d.csapak at proxmox.com
Fri Dec 7 15:56:03 CET 2018


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 <d.csapak at 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





More information about the pve-devel mailing list