Skip to content
Search AlmaLinux

    Browse this documentation

    AlmaLinux 9: judging disk health when SMART is unavailable

    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.

    Terminal window
    lsblk -d -o NAME,SIZE,ROTA,TYPE
    NAME SIZE ROTA TYPE
    sr0 4M 1 rom
    vda 40G 1 disk

    vda 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).

    Terminal window
    sudo smartctl --scan
    sudo smartctl -i /dev/vda
    (no output)
    /dev/vda: Unable to detect device type
    Please 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:

    Terminal window
    sudo smartctl -i -d sat /dev/vda
    sudo smartctl -i -d nvme /dev/vda
    Read Device Identity failed: Inappropriate ioctl for device
    Read NVMe Identify Controller failed: NVME_IOCTL_ADMIN_CMD: Inappropriate ioctl for device

    Both 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”
    Terminal window
    dmesg -T | grep -iE "i/o error|medium error|reset|ata" | tail -5
    sudo dnf install -y mdadm && sudo mdadm --detail /dev/md0 2>/dev/null | tail -5
    • Kernel log: I/O error, medium error, link reset are direct evidence of a disk or link problem;
    • Software RAID: mdadm --detail shows State and Faulty 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.
    Terminal window
    systemctl is-active smartd
    grep -vE "^#|^$" /etc/smartmontools/smartd.conf | head -3
    inactive
    DEVICESCAN -H -m root -M exec /usr/libexec/smartmontools/smartdnotify -n standby,10,q

    The 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.

    • 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”
    Terminal window
    sudo dnf install -y smartmontools
    sudo smartctl --scan
    sudo smartctl -i /dev/<disk>
    dmesg -T | grep -icE "i/o error|medium error"

    Checks:

    1. Does --scan list the disk?
    2. Does -i return a model and a SMART support field?
    3. If not, does dmesg show I/O errors?
    4. 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.