Dell Emulex Family of Adapters User Manual
Page 834

Emulex Drivers Version 10.2 for Linux User Manual
P010081-01A Rev. A
3. Configuration
FC and FCoE Driver Configuration
834
Type: Medium Changer ANSI SCSI revision: 02
Attached scsi generic sg6 at scsi14, channel 0, id 0, lun 1,type 8
scsi scan: INQUIRY to host 14 channel 0 id 0 lun 2
Vendor: IBM Model: ULTRIUM-TD2 Rev: 38D0
Type: Sequential-Access ANSI SCSI revision: 03
Attached scsi tape st0 at scsi14, channel 0, id 0, lun 2
st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 4503599627370495
Attached scsi generic sg7 at scsi14, channel 0, id 0, lun 2, type 1
scsi scan: INQUIRY to host 14 channel 0 id 0 lun 3
Vendor: IBM Model: ULTRIUM-TD2 Rev: 38D0
Type: Sequential-Access ANSI SCSI revision: 03
Attached scsi tape st1 at scsi14, channel 0, id 0, lun 3
st1: try direct i/o: yes (alignment 512 B), max page reachable by HBA 4503599627370495
Attached scsi generic sg8 at scsi14, channel 0, id 0, lun 3, type 1
This log output shows a controller at LUN 0, the medium changer at LUN 1, and two
SCSI tape devices at LUNs 2 and 3.
The following example is the result of a scsi_id call:
scsi_id -g -s /sys/class/scsi_tape/nst0
1IBM ULTRIUM-TD2 1110133831
scsi_id -g -s /sys/class/scsi_tape/nst1
1IBM ULTRIUM-TD2 1110133994
Notice that the unique ID comprises three values with space delimiters. A udev rule
must have a unique ID for the device, so that all three parts of this returned string are
required. To do this, use the following command:
scsi_id -u -g -s /sys/class/scsi_tape/nst0
1IBM_____ULTRIUM-TD2_____1110133831
scsi_id -u -g -s /sys/class/scsi_tape/nst1
1IBM_____ULTRIUM-TD2_____1110133994
Creating the udev Persistent Name for SCSI Tape Device
After you know the SCSI ID call needed to extract a unique ID, use the same process to
create a udev persistent name for a SCSI tape device as on a SCSI disk device.
The rule for the FC tape device is
BUS="scsi", SYSFS{vendor}="HP", SYSFS{model}="ULTRIUM 3-SCSI",
PROGRAM="/sbin/scsi_id -p 0x83 -u -g -s
/sys/class/scsi_tape/nst%n",RESULT="350060b000029b592",
SYMLINK="fc_lun_st%n"
The rule for the FC-SCSI tape device is
BUS="scsi", SYSFS{vendor}="IBM", SYSFS{model}="ULTRIUM-TD2",
PROGRAM="/sbin/scsi_id -p 0x83 -u -g -s
/sys/class/scsi_tape/nst%n",RESULT="1IBM_____ULTRIUM-TD2_____111013
3831", SYMLINK="fc_lun_st%n"
BUS="scsi", RESULT="1IBM_____ULTRIUM-TD2_____1110133994",
SYMLINK="fc_lun_st%n"