Running SMART tests against MegaRAID controllers

smartctl can gather SMART data and run tests for individual drives on a MegaRAID controller. To do this the device type and bus id must be passed to smartctl. To determine the bus ids the proprietary tool, storcli, from Broadcom must be used. As this tool is unavailable in the archives or a Snap MAAS cannot ship with a script which automatically installs the tool. As of MAAS 2.5 the smartctl tests have been modified to detect if being run against a MegaRAID controller and the storcli tool is available. The script below will download and install storcli before starting the smartctl test so MegaRAID controllers can be used.

#!/bin/bash -ex
#
# MegaRAID tools installer
#
# --- Start MAAS 1.0 script metadata ---
# name: megaraid-tools-installer
# title: MegaRAID tool installer
# tags: commissioning
# script_type: test
# hardware_type: storage
# packages:
#  url: https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/1.23.02_StorCLI.zip
#  apt: unzip
# timeout: 00:02:00
# --- End MAAS 1.0 script metadata ---

cd $DOWNLOAD_PATH
unzip storcli_All_OS.zip
sudo -n dpkg -i storcli_All_OS/Ubuntu/*.deb
1 Like

Hi,

For some reason it doesn’t work for me. I’ve got a server with MegaCLI RAID controller, however smart tests (and receiving storage data) fails for me:

Unable to run 'smartctl-short': 'MAAS did not detect any storage devices during commissioning!'
Given parameters:
{'storage': {'argument_format': '{path}', 'type': 'storage', 'value': 'all'}}
Discovered storage devices:
[{'NAME': 'sda', 'MODEL': 'ServeRAID M1015', 'SERIAL': '600605b00271c45024376caf6c57f6df'}]

MAAS associates each storage test script with a specific storage device or RAID controller. When a machine is first commissioned MAAS associates a place holder, ‘all’, with each storage test script until the storage devices are discovered. After the commissioning script 00-maas-07-block-devices runs MAAS associates each test script with the discovered devices on the system. The error message you have indicates that no storage devices were discovered during the commissioning process.

Could you open a bug with the following

  • MAAS logs from /var/log/maas
  • Your commissioning results, you can get this using the command maas $PROFILE node-script-result download $SYSTEM_ID current-commissioning filetype=tar.xz > commissioning.tar.xz