Discussion:
[pve-devel] [PATCH storage] (partially) fix #2020: do not drop the namespace part for nvme smart readings
Dominik Csapak
2018-12-07 14:56:03 UTC
Permalink
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;
--
2.11.0
Dominik Csapak
2018-12-07 15:26:18 UTC
Permalink
Post by Dominik Csapak
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
---
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'];
please disregard this patch, according to
https://forum.proxmox.com/threads/5-3-mismatch-of-smart-info-on-dual-nvme-system.49535/#post-231285

it does not seem to work with every nvme

Loading...