3

If I run smartctl -i /dev/sdb I get correct disk information including serial number and drive model number. But this is for a disk marked as JBOD.

For n drives that are RAID'ed (using an LSI RAID card in my case), that presents the assembled volume to Linux under just dev/sda for example, and I make one partition that would be sda1 and is of the expected size... fairly simple.

Without having to power off my server and remove each drive to look at the sticker for model and serial information, is there a way to see each individual disk behind a RAID card that has been combined into a virtual drive, and get the basic information of any one of those RAID'ed disks?

1
  • 1
    Some RAID cards support what Adaptec calls 'Expose RAW' mode. In this mode, not only does the RAID card expose a device for the RAID, it also exposes devices for each individual drive in the RAID. Jul 19 '18 at 14:42
4

Since you mention an LSI RAID card, I’ll assume it’s a MegaRAID device; in this case, you can get the information about each underlying drive by running

smartctl -i -d megaraid,0 /dev/sda

replacing /dev/sda as appropriate (it should correspond to the device node of your RAID drive as visible in the system), and 0 (increment it to see each drive).

The smartctl manpage lists the different types of controllers which are supported, and the syntax used to address them.

4
  • lssci shows disk, LSI, SMC3108, 4.27, /dev/sda however the use of smartctl as you mention results in "Smartctl open device: /dev/sda [megaraid_disk_00] failed: INQUIRY failed"
    – ron
    Jul 19 '18 at 15:27
  • and this is on SLES 11.4, "smartmontools-6.3 2015-02-08 r4039"
    – ron
    Jul 19 '18 at 15:29
  • downloading smartmontools-6.6.tar.gz now...
    – ron
    Jul 19 '18 at 15:33
  • In the line smartctl -i -d megaraid,0 /dev/sda, when you use a SATA drive then the command would be: smartctl -i -d sat+megaraid,0 /dev/sda
    – DivC
    Sep 19 '18 at 18:06
1

I would like to add what worked for my specific controller.

SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01) Machine is a Dell Precision 690 workstation and the controller is on the motherboard. This is on Ubuntu 18.04 64-bit

Firstly, I would like to mention few things that may work if my method doesn't work for you.

  • There is a utility from LSI called lsiutil;
  • you can try storcli - there are some guides on how to use it;
  • you can try perccli from Dell, however it comes as an rpm package and you will have to use the alien command (install it from apt install alien) and allow scripts;
  • you can try megaraid, there are some guides for that, but my particular controller is not a megaraid controller. I think it is a perc5i (not sure);
  • you can try racadm from Dell or OpenManage tools but I never used them myself.

My root bash history: I am not sure how much of this is needed (# are my comments)

apt install mpt-status
man mpt-status #it has notes about a kernel module needed mptctl see also mptsas
mpt-status #you should see the array and individual drives, if not continue
modprobe mpt3sas #loads this module into the kernel
modprobe sg #loads sg driver
cat /proc/scsi/sg/device_strs #where X is equal to the row number of the table starting with 0
smartctl -a /dev/sgX #smartctl commands work now and /dev/sg0 for example takes the place of /dev/sda for the purposes of smartctl

lsmod showed me after trying various solutions that I had these extra modules loaded: megaraid, mptctl, mpt3sas, mptsas, mptbase

Edit: this webpage suggests mptsas is the necessary module: https://wiki.debian.org/LinuxRaidForAdmins#mpt2sas

Once you get it work, make sure you set the modules to load on boot.

0

Check the output of storcli /call/vall show all, for example to get some info on /dev/sdb type this:

storcli /call/vall show all|sed -n '/^\/c/h;/^-/,/^$/H;/Drive Name = \/dev\/sdb/{g;p}'

And then use DIDs (Device IDs) in commands smartctl -i -d megaraid,<DID> /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.