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

Fabian Gr├╝nbichler f.gruenbichler at proxmox.com
Mon Oct 3 13:53:34 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 5530233..4cae46b 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