* [pbs-devel] [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors
@ 2021-08-31 13:48 Dominik Csapak
2021-09-23 12:44 ` Dominik Csapak
2021-09-27 7:03 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-08-31 13:48 UTC (permalink / raw)
To: pbs-devel
only bit 0-2 are fatal errors, bit 3-7 are used to indicate
some drive conditions. for details see the manpage of smartctl(8)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
reported in the forum: https://forum.proxmox.com/threads/s-m-a-r-t-status-unknown.95417/
src/tools/disks/smart.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tools/disks/smart.rs b/src/tools/disks/smart.rs
index b615603e..01054519 100644
--- a/src/tools/disks/smart.rs
+++ b/src/tools/disks/smart.rs
@@ -91,7 +91,9 @@ pub fn get_smart_data(
};
command.arg(disk_path);
- let output = crate::tools::run_command(command, None)?;
+ let output = crate::tools::run_command(command, Some(|exitcode|
+ (exitcode & 0b0111) == 0 // only bits 0-2 are fatal errors
+ ))?;
let output: serde_json::Value = output.parse()?;
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors
2021-08-31 13:48 [pbs-devel] [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors Dominik Csapak
@ 2021-09-23 12:44 ` Dominik Csapak
2021-09-27 7:03 ` [pbs-devel] applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-09-23 12:44 UTC (permalink / raw)
To: pbs-devel
any comment ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors
2021-08-31 13:48 [pbs-devel] [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors Dominik Csapak
2021-09-23 12:44 ` Dominik Csapak
@ 2021-09-27 7:03 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2021-09-27 7:03 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
On 31.08.21 15:48, Dominik Csapak wrote:
> only bit 0-2 are fatal errors, bit 3-7 are used to indicate
> some drive conditions. for details see the manpage of smartctl(8)
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> reported in the forum: https://forum.proxmox.com/threads/s-m-a-r-t-status-unknown.95417/
>
> src/tools/disks/smart.rs | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
applied, thanks!
fyi: as run_command moved to a sub-crate I had to resolve a trivial merge conflict.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-27 7:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:48 [pbs-devel] [PATCH proxmox-backup] tools: smart: only throw error for smartctl fatal errors Dominik Csapak
2021-09-23 12:44 ` Dominik Csapak
2021-09-27 7:03 ` [pbs-devel] applied: " Thomas Lamprecht
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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal