Interview Prep/Linux/Disk, Capacity & Backups

How do you monitor disk health on bare metal?

IntermediateProductionDisk, Capacity & Backups
Answer
sudo smartctl -H /dev/sda          # overall health
sudo smartctl -a /dev/sda          # reallocated/pending sectors, CRC errors
sudo nvme smart-log /dev/nvme0     # percentage_used, media_errors
cat /proc/mdstat                   # RAID state

Run smartd for continuous monitoring with email/alerts, export metrics (smartctl_exporter), and watch dmesg for I/O errors. Rising reallocated or pending sectors mean replace the disk proactively.

All Linux questions Roadmap: Linux

More on Disk, Capacity & Backups