Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some SAS devices in a server, I would like to find out what their SAS addresses are. How can I do that in Linux? I'm using CentOS 6.

share|improve this question
up vote 5 down vote accepted

They should be available in /dev/disk/by-id, on your machine it should look something like this:

[root@ae1 ~]# ls -l /dev/disk/by-id/

total 0

lrwxrwxrwx 1 root root  9 Feb 11  2011 scsi-3600050e0d1806400285a0000c0590000 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 11  2011 scsi-3600050e0d1806400285a0000c0590000-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 11  2011 scsi-3600050e0d1806400285a0000c0590000-part2 -> ../../sda2
share|improve this answer

The Linux utility lsscsi written by Doug Gilbert will provide the information you are looking for. It is in the Base repository of CentOS 5, 6, and 7, but YMMV with other distros. The output of lsscsi on my CentOS 7 system with the argument required to display WWNs:

[root@sklad ~]# lsscsi --wwn
[0:0:0:0]    disk    0x5000c50041b932d7              /dev/sda 
[0:0:1:0]    disk    0x5000c50041b917cb              /dev/sdb 
[1:0:0:0]    disk    0x50025385501f66f1              /dev/sde 
[2:0:0:0]    disk    0x5002538550125c20              /dev/sdf 
[3:0:0:0]    cd/dvd                                  /dev/sr0 
[6:0:0:0]    disk    0x5000cca37ec38857              /dev/sdg 
[7:0:0:0]    disk    0x5000c50041b909df              /dev/sdc 
[7:0:1:0]    disk    0x5000c5004182c53b              /dev/sdd 

I realize this is an old question, but I came across it and thought I'd offer another solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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