From: David Galloway Date: Wed, 25 Nov 2020 14:56:58 +0000 (-0500) Subject: common: Support smart.sh report failed drive X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=185ee52690231dddeb748939387f18e255ce1e8f;p=ceph-cm-ansible.git common: Support smart.sh report failed drive 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 --- diff --git a/roles/common/files/libexec/smart.sh b/roles/common/files/libexec/smart.sh index 19d8aff..332f364 100755 --- a/roles/common/files/libexec/smart.sh +++ b/roles/common/files/libexec/smart.sh @@ -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