[pve-devel] [PATCH RFC storage 2/4] fix #1120: SCSI SMART health parsing

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Sep 30 10:52:21 CEST 2016


SCSI disks report their health as "SMART Health Status: OK"
---
 PVE/Diskmanage.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 54ede16..1c9ebd0 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -96,7 +96,7 @@ sub get_smart_data {
 		$entry->{raw} = $8 if defined $8;
 		$entry->{id} = $1 if defined $1;
 		push @{$smartdata->{attributes}}, $entry;
-	    } elsif ($line =~ m/self\-assessment test result: (.*)$/) {
+	    } elsif ($line =~ m/(?:Health Status|self\-assessment test result): (.*)$/ ) {
 		$smartdata->{health} = $1;
 	    } elsif ($line =~ m/Vendor Specific SMART Attributes with Thresholds:/) {
 		$datastarted = 1;
-- 
2.1.4





More information about the pve-devel mailing list