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-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F129%2Fhead;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 9c4e03e0..4ae1aeb1 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 ) )