From: Dan Mick Date: Tue, 8 Sep 2015 23:41:18 +0000 (-0700) Subject: smart.pl: drive numbers are 1-based X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c26de6c3bbe0dedcf7be69efdc9d453d5f83ac35;p=ceph-cm-ansible.git smart.pl: drive numbers are 1-based Signed-off-by: Dan Mick --- diff --git a/roles/testnode/files/libexec/smart.pl b/roles/testnode/files/libexec/smart.pl index 9c4e03e..4ae1aeb 100644 --- a/roles/testnode/files/libexec/smart.pl +++ b/roles/testnode/files/libexec/smart.pl @@ -95,7 +95,7 @@ sub smartctl foreach ( $sector[9] ) { my $count = $_; - my $l = chr(ord('a') + $drive); + my $l = chr(ord('a') + $drive - 1); $message = "Drive $drive (sd$l) has $count $type sectors"; if ( ( $type =~ /reallocated/i && $count > $realloc ) && ( $type =~ /pending/i && $count > $pend ) && ( $type =~ /pending/i && $count > $uncorrect ) )