]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Support smart.sh report failed drive
authorDavid Galloway <dgallowa@redhat.com>
Wed, 25 Nov 2020 14:56:58 +0000 (09:56 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 25 Nov 2020 15:25:24 +0000 (10:25 -0500)
The SSDs in the bruuni, specifically, have mostly catastrophically failed.  There are no details about sectors in the SMART output.  Just obvious failure.  `smart.sh` wasn't capable of detecting that.

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/files/libexec/smart.sh

index 19d8aff1e5aa1b2ebe1b18c2a5c2ff86b3a56080..332f36478801266ea0821eb970d86ed341e77432 100755 (executable)
@@ -262,6 +262,11 @@ normal_smart ()
         failed=true
         rc=2
         fi
+      # The SSDs in the bruuni just straight up say failed with no additional detail
+      elif sudo smartctl -a /dev/$l | grep -q "FAILED!"; then
+        messages+=("Drive $l has completely failed")
+        failed=true
+        rc=2
       else
         messages+=("No SMART data found for drive $l")
         failed=true