From: Oguz Bektas <o.bektas@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage] fix #3203: report smart status correctly
Date: Mon, 1 Mar 2021 14:56:49 +0100 [thread overview]
Message-ID: <20210301135649.564191-1-o.bektas@proxmox.com> (raw)
if the -a option isn't passed, -H might report a failing disk as
'PASSED' even when the disk might be in a corrupted state.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
PVE/Diskmanage.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 64bb813..d3c3365 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -95,8 +95,9 @@ sub get_smart_data {
or die "failed to get nvme controller device for $disk\n");
}
- my $cmd = [$SMARTCTL, '-H'];
- push @$cmd, '-A', '-f', 'brief' if !$healthonly;
+ my $cmd = [$SMARTCTL];
+ push @$cmd, '-H' if $healthonly;
+ push @$cmd, '-a', '-A', '-f', 'brief' if !$healthonly;
push @$cmd, $disk;
eval {
--
2.20.1
next reply other threads:[~2021-03-01 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 13:56 Oguz Bektas [this message]
2021-03-01 16:40 ` Dietmar Maurer
2021-03-02 8:34 ` Dominik Csapak
2021-03-02 12:33 ` Oguz Bektas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210301135649.564191-1-o.bektas@proxmox.com \
--to=o.bektas@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.