From 185ee52690231dddeb748939387f18e255ce1e8f Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 25 Nov 2020 09:56:58 -0500 Subject: [PATCH] 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 --- roles/common/files/libexec/smart.sh | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5