]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Output drive letter along with drive number for convenience
authorDan Mick <dan.mick@redhat.com>
Tue, 8 Sep 2015 18:32:39 +0000 (11:32 -0700)
committerDan Mick <dan.mick@redhat.com>
Tue, 8 Sep 2015 18:39:38 +0000 (11:39 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
roles/testnode/files/libexec/smart.pl

index 0da3d01b678473ffba6fcfe124cef4b131869a95..addd56b6843be5747a7fe2d899db0d90c5cf0fa9 100644 (file)
@@ -90,7 +90,8 @@ sub smartctl
                        foreach ( $sector[9] )
                        {
                                my $count = $_;
-                               $message = "Drive $drive has $count $type sectors";
+                               my $l = chr(ord('a') + $drive);
+                               $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  ) )
                                {