If I’m not mistaken these just behave as SAS enclosures, so I’d imagine the standard tools for prying information from enclosures should work:
- sesutil (BSD-only)
- sg3_utils
- sas2ircu (LSI controllers)
Not sure which one Wendell was using. Based on the output and given that I think their NAS runs/ran FreeNAS it’s probably sesutil, which, unfortunately, is BSD-only.
sas2ircu is probably the most user friendly of the Linux options, if you use a LSI controller. sg3_utils is the more “general” option, but by far the least user friendly.
Quick walkthrough for sg3_utils basics:
Find out which of your devices are enclosures (uses lsscsi)
root@avaritia:~# lsscsi -g
...
[0:0:16:0] enclosu LSI SAS2X36 0e0b - /dev/sg16
...
Query it for supported commands:
root@avaritia:~# sg_ses /dev/sg16
LSI SAS2X36 0e0b
Supported diagnostic pages:
Supported Diagnostic Pages [sdp] [0x0]
Configuration (SES) [cf] [0x1]
Enclosure Status/Control (SES) [ec,es] [0x2]
Element Descriptor (SES) [ed] [0x7]
Additional Element Status (SES-2) [aes] [0xa]
Download Microcode (SES-2) [dm] [0xe]
To get the enclosure state:
root@avaritia:~# sg_ses -R --page=es /dev/sg16
LSI SAS2X36 0e0b
Enclosure Status diagnostic page:
INVOP=0, INFO=1, NON-CRIT=0, CRIT=0, UNRECOV=0
generation code: 0x0
status descriptor list
Element type: Array device slot, subenclosure id: 0 [ti=0]
Overall descriptor:
Predicted failure=0, Disabled=0, Swap=0, status: Unsupported
OK=0, Reserved device=0, Hot spare=0, Cons check=0
In crit array=0, In failed array=0, Rebuild/remap=0, R/R abort=0
App client bypass A=0, Do not remove=0, Enc bypass A=0, Enc bypass B=0
Ready to insert=0, RMV=0, Ident=0, Report=0
App client bypass B=0, Fault sensed=0, Fault reqstd=0, Device off=0
Bypassed A=0, Bypassed B=0, Dev bypassed A=0, Dev bypassed B=0
...
<loads more output>