]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
smart.pl: drive numbers are 1-based 129/head
authorDan Mick <dan.mick@redhat.com>
Tue, 8 Sep 2015 23:41:18 +0000 (16:41 -0700)
committerDan Mick <dan.mick@redhat.com>
Tue, 8 Sep 2015 23:41:18 +0000 (16:41 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
roles/testnode/files/libexec/smart.pl

index 9c4e03e0881dd857bc2c4df2d4298272a7c30d0a..4ae1aeb135e2724a1a7f7c7978cdf5c534de450e 100644 (file)
@@ -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  ) )