I understand that iSCSI uses iqn / eui to identify target LUN. Once I have discovered the iSCSI target and logged in is there a way to determine the LUN's NAA id for the remote target from a linux (RHEL/Centos) machine ?
1 Answer
You could use scsi_id
to send the INQUIRY command to the device to get its identifiers.
The following example is based on the old scsi_id
syntax that is used in RHEL 5.
/sbin/scsi_id -g -p 0x83 -s /block/sdd
36006016018202a00520d0d1ea99de111
In the new syntax as in RHEL/CentOS 6 the long option format is used.
scsi_id --whitelisted --page=0x83 --device=/dev/sdd
Here the first digit indicates a NAA identifier (3
), the second digit indicates the IEEE Registered extended format (6
), next 00:60:16
is the 24-bit vendor ID. In this example we have a vendor ID that maps to EMC Corporation's CLARIION OUI. The next 9 digits are the vendor specific id: 018202a00
. The remaining 16 digits are the specific naa ID 520d 0d1e a99d e111
.
This would correspond to 128-bit NAA identifier naa.6006016018202a00520d0d1ea99de111
The -g
or --whitelisted
option is needed since by default scsi_id blacklists all devices.