Read every drive's health data and rehearse the copy-first order

short · 45 min · Objective 5.1

Task

Read the self-monitoring attributes on every drive you own, record the ones that matter, and rehearse the recovery order on a drive that is perfectly healthy -- because the order is what has to be automatic when it is not.

Steps

  1. Read the health data for every drive and record it in lab/smart/drives.csv with header drive,type,overall_verdict,power_on_hours,key_attribute,value.
  2. For mechanical drives record reallocated sectors, pending sectors and uncorrectable sectors; for solid-state drives record percentage used and total bytes written. Put these in lab/smart/attributes.csv with header drive,attribute,value,concern.
  3. Write lab/smart/verdict.md stating for each drive whether the overall verdict and the individual attributes agree, and what you would conclude if they did not.
  4. Rehearse the recovery order on a healthy drive: write lab/smart/order.csv with header step,action,why_it_is_this_early and then actually perform a priority-ordered copy of a directory, logging any files that failed.
  5. Write lab/smart/stop.md listing the conditions under which you would stop and escalate rather than continue, and what continuing would cost.

Verify

awk -F, 'NR>1 && NF>=6 {n++} END {print n" drive(s)"}' lab/smart/drives.csv
awk -F, 'NR>1 && NF>=4 {n++} END {print n" attribute(s)"}' lab/smart/attributes.csv
awk -F, 'NR>1 && tolower($4)!="none" {n++} END {print n+0" attribute(s) of concern"}' lab/smart/attributes.csv
grep -c . lab/smart/verdict.md
awk -F, 'NR>1 && NF>=3 {n++} END {print n" recovery step(s)"}' lab/smart/order.csv
head -2 lab/smart/order.csv | grep -Eic 'copy|stop using|power'
grep -Eic 'click|grind|spin|escalate' lab/smart/stop.md

Every drive read, the key attributes recorded, a verdict comparing summary against detail, a recovery order whose first step is to stop using or copy, and a stop note naming mechanical noise. If the first recovery step is a diagnostic, the order is wrong and the lesson says why.

Notes

A passing overall verdict with a rising reallocated sector count is a failing drive, and the summary is the part that will say otherwise. That disagreement is exactly what verdict.md exists to record.

This is an independent study companion for CompTIA A+ Core 1 220-1201 and is not produced by or endorsed by CompTIA.