id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 1213,Access smart data from devices behind Megaraid software stack (ESRT2),AndyLinux,,"For a long time Intel platforms have supported ESRT2 which basically runs the LSI megaraid stack as a kernel module talking thru the chipset which has to be placed into ESRT2 mode. This has the advantages that the platform operates as though it had a real RAID card and anything talking to that (e.g. the LSI/Avago/Broadcom tools MegaCLI, storcli, CmdTool264 etc.) just work unchanged. Unfortunately smartctl does not appear to work. I'm using an Intel S2600WF system with the latest ESRT2 drivers on Linux, using a 4.9 kernel in a custom distribution. I've tried with the RHEL6 smartmontools package (6.6.2) and don't notice any obvious changes between this version and smartmontools 7 Megaraid support in the change history. The first problem is that the the megasr kernel module creates its device node at /dev/megaraid_swr_ioctl_node not the normal /dev/megaraid_sas_ioctl_node - this is worked around using a symlink or a secondary device node with the same major/minor numbers. Once this is done, the smartctl fails in a fairly blunt fashion: {{{ # smartctl -a -d sat+megaraid,0 -T permissive /dev/bus/0 smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.9.125-2.11.0.12.x86_64] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org Read Device Identity failed: megasas_cmd result: 0.0 = 25/255 === START OF INFORMATION SECTION === Device Model: [No Information Found] Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: [No Information Found] Local Time is: Thu Jul 11 15:21:01 2019 UTC SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled. A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. }}} Adding the -r ioctl,3 options simple shows a dump of a frame full of 0's. The smartctl scan options show this info: {{{ # smartctl --scan -r ioctl,3 glob(3) found no matches for pattern /dev/hd[a-t] sda -> /sys/class/scsi_host/host0/proc_name: ""megasr"" glob(3) found no matches for pattern /dev/sd[a-c][a-z] glob(3) found no matches for pattern /dev/nvme[0-9] glob(3) found no matches for pattern /dev/nvme[1-9][0-9] /dev/sda -d scsi # /dev/sda, SCSI device # smartctl --scan-open -r ioctl,3 glob(3) found no matches for pattern /dev/hd[a-t] sda -> /sys/class/scsi_host/host0/proc_name: ""megasr"" glob(3) found no matches for pattern /dev/sd[a-c][a-z] glob(3) found no matches for pattern /dev/nvme[0-9] glob(3) found no matches for pattern /dev/nvme[1-9][0-9] >>>> do_scsi_cmnd_io: sg_io_ver=3 [inquiry: 12 00 00 00 24 00 ] scsi_status=0x0, sg_transport_status=0x0, sg_driver_status=0x0 sg_info=0x0 sg_duration=0 milliseconds resid=0 Incoming data, len=36: 00 00 00 05 02 fa 00 00 32 49 6e 74 65 6c 20 20 20 10 4d 65 67 61 53 52 20 20 00 00 00 00 00 00 00 00 20 31 2e 30 20 /dev/sda -d scsi # /dev/sda, SCSI device }}} I suspect that the problem relates to the fact that unlike normal Megaraid controllers, the drives do not show as being in an enclosure, with the software raid the enclosure is N/A: {{{ # CmdTool264 pdlist a0 | grep -i -e slot -e id Enclosure Device ID: N/A Slot Number: 0 Device Id: 0 Media Type: Solid State Device Enclosure Device ID: N/A Slot Number: 1 Device Id: 1 Media Type: Solid State Device }}} If I boot the system using a Live CD and don't load the megasr module, the AHCI module will find the devices and report the SMART data quite happily. I won't be able to provide debug access but it's not a production system so can run whatever debug commands are required to provide more info as needed. ",enhancement,new,minor,undecided,all,6.6,,megaraid linux,