How to get SMART for disks in a dedicated server with a RAID controller

When a server uses a hardware RAID controller, disk devices are not directly exposed to the OS — you must pass the controller type to smartctl to retrieve SMART data.

Prerequisites

Install smartmontools if not already installed:

  • Debian/Ubuntu: sudo apt-get install smartmontools
  • Red Hat/CentOS: sudo yum install smartmontools
  • Fedora: sudo dnf install smartmontools

Step 1: List available disks

smartctl --scan

This lists all disks available for SMART querying.

Step 2: Retrieve SMART data

Use the smartctl command with the appropriate device type:

smartctl -d sat+<device_type> -a <device_path>

Replace:

  • <device_type> with the appropriate type (e.g., megaraid,0). If the disk type is SATA, prepend sat+ (e.g., sat+megaraid,0)
  • <device_path> with the actual path to the device (e.g., /dev/bus/9)

Note: There is a known bug in smartmontools — regardless of which device you specify in /dev/sdX, the utility only considers the disk slot number in megaraid 0. More details are available at the smartmontools bug tracker.

Using MegaCli

If you do not have access to iDRAC but have OS access, you can use the MegaCli utility. It is designed for working with LSI hardware RAID controllers from the OS and is not suitable for software RAID or individual disks.

Common MegaCli commands:

# List all physical disks
MegaCli -PDList -aALL

# Check disk state
MegaCli -PDInfo -PhysDrv [E:S] -aALL

# Check SMART data for a specific disk
MegaCli -PDGetMissing -aALL

Replace [E:S] with the enclosure ID and slot number from the PDList output.

For full SMART attribute interpretation, refer to the How to get SMART for disks in a dedicated server without a RAID controller guide.

On this page