AlmaLinux 9: judging disk health when SMART is unavailable
Test scope
Section titled “Test scope”On a real AlmaLinux 9.8 host (kernel 5.14.0-687.54.1.el9_8, system disk on virtio /dev/vda): lsblk -d, smartctl --scan, smartctl -i /dev/vda, smartctl -i -d sat, smartctl -i -d nvme, systemctl is-active smartd, and the contents of smartd.conf. Log: plans/content-expansion/evidence/logs/alma-disk-health.log.
This machine’s disk exposes no SMART, so the page focuses on “what to do when you cannot read it”; output from SATA/NVMe hosts that can read SMART was not produced here.
Identify the disk type first
Section titled “Identify the disk type first”lsblk -d -o NAME,SIZE,ROTA,TYPENAME SIZE ROTA TYPEsr0 4M 1 romvda 40G 1 diskvda is a virtio virtual disk. ROTA=1 is only a default flag and says nothing about physical rotation; the name matters (sd* is usually SCSI/SATA, nvme* is NVMe, vd* is virtio).
Try to read SMART
Section titled “Try to read SMART”sudo smartctl --scansudo smartctl -i /dev/vda(no output)
/dev/vda: Unable to detect device typePlease specify device type with the -d option.--scan lists nothing and -i cannot detect a type, so smartmontools has no SMART channel to this disk. Try explicit types:
sudo smartctl -i -d sat /dev/vdasudo smartctl -i -d nvme /dev/vdaRead Device Identity failed: Inappropriate ioctl for deviceRead NVMe Identify Controller failed: NVME_IOCTL_ADMIN_CMD: Inappropriate ioctl for deviceBoth fail — this is not a configuration problem; the virtual disk does not pass SMART through. Cloud providers usually monitor disks on the host, invisible to the guest.
When SMART is unavailable, use these signals
Section titled “When SMART is unavailable, use these signals”dmesg -T | grep -iE "i/o error|medium error|reset|ata" | tail -5sudo dnf install -y mdadm && sudo mdadm --detail /dev/md0 2>/dev/null | tail -5- Kernel log:
I/O error,medium error,link resetare direct evidence of a disk or link problem; - Software RAID:
mdadm --detailshowsStateandFaulty Devices; - Hardware RAID: vendor tools (
storcli,perccli,ssacli) report array and physical disk state; - Cloud hosts: the provider console’s disk health/events is the only reliable source when the guest cannot read SMART.
Should smartd be configured?
Section titled “Should smartd be configured?”systemctl is-active smartdgrep -vE "^#|^$" /etc/smartmontools/smartd.conf | head -3inactiveDEVICESCAN -H -m root -M exec /usr/libexec/smartmontools/smartdnotify -n standby,10,qThe default is DEVICESCAN (scan every supported disk, mail root on a failed health check). With no SMART support there is nothing to monitor, so smartd will not report disk problems; monitoring belongs to the cloud platform or the hardware layer.
Common traps
Section titled “Common traps”- Assuming smartmontools guarantees visibility: virtual disks and RAID-behind disks need passthrough or vendor tools;
- Guessing
-d sat: a wrong type only yields ioctl errors, never data; - Believing a running smartd means monitoring: with no devices scanned it reports nothing.
Practice: decide whether this host can monitor its disk
Section titled “Practice: decide whether this host can monitor its disk”sudo dnf install -y smartmontoolssudo smartctl --scansudo smartctl -i /dev/<disk>dmesg -T | grep -icE "i/o error|medium error"Checks:
- Does
--scanlist the disk? - Does
-ireturn a model and a SMART support field? - If not, does
dmesgshow I/O errors? - You can state clearly whether this disk is monitorable on this host.
常见问题
Why does smartctl say Unable to detect device type?
Usually a virtio virtual disk or a disk behind a RAID controller without SMART passthrough. If -d sat / -d nvme also fail, rely on the cloud platform or array tools.
Without SMART, how do I catch a failing disk early?
Watch dmesg for I/O and medium errors, monitor software RAID state, watch for filesystem remount-ro events, and use cloud disk events — indirect but effective signals.
Is smartd worth installing?
On physical hosts that expose SMART, yes — install it and configure -m alerts. In virtual environments there is nothing to monitor, so the platform or host layer matters instead.
Next steps
Section titled “Next steps”- XFS repair: Repairing a damaged XFS
- LVM growth: LVM growth and XFS
- Network triage: Five layers of network troubleshooting