PSA: Obtaining your HBA/device SAS address from within Linux

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

anomaly

Active Member
Jan 8, 2018
235
48
28
I have seen people asking and some of the information online isn't really helpful, as it references tools like lsscsi which might be obsolete in some cases or not installed.

Good news is you have all this information in sysfs, no need for extra tools:

Code:
# cat /sys/class/sas_host/host10/device/scsi_host/host10/board_name

LSI3008-IT

# cat /sys/class/sas_host/host10/device/scsi_host/host10/host_sas_address

0x500304801cXXXXXX

# cat /sys/class/sas_host/host10/device/scsi_host/host10/version_*

00.00.00.00

16.00.10.00

205.32

0e013028h

0e013028h

LSISAS3008
I have sanitized my address but this will be exactly the same process to follow, onyl the device node numbers might change. ex. host2 instead of host10.

The actual sysfs nodes are under the pci devices tree.

Hopefully this helps someone out there who needs to know his SAS address before flashing IT firmware, without opening up the chassis.
 
  • Like
Reactions: UhClem and Marsh

UhClem

just another Bozo on the bus
Jun 26, 2012
438
252
63
NH, USA
Thanks.
dmesg | grep host_add [ | grep sas_addr ] will also get it, but further effort is needed to disambiguate multiple HBAs.
 
  • Like
Reactions: anomaly