IBM Support

Linux commands to find device information for Tivoli Storage Manager

Question & Answer


Question

Which commands can be issued to determine device special file names, serial numbers, element numbers, and world-wide names (WWNs) on an Linux host?

Answer

A number of commands can be used to collect tape related information from an Linux host. The following list presents a small, but useful, subset of commands and a brief description of the information returned by each:

lsscsi -g
Displays all of the attached scsi devices present on the system, and their generic device special file. Note that this utility may not be installed by default, but can be found on the operating system installation media. Also note that the generic device names provided should not be used to define a path in Tivoli Storage Manager.

# lsscsi -g
[3:0:0:1]    mediumx IBM      03584L32         4.02  -         /dev/sg10
[3:0:0:2]    tape    IBM      ULTRIUM-TD3      252D  -         /dev/sg11
[4:0:0:1]    mediumx STK      SL500            3.15  /dev/sch1  /dev/sg13
[4:0:0:2]    tape    STK      T10000A          1.27  -          /dev/sg16

cat /proc/scsi/scsi
Displays all of the attached scsi devices present on the system.

# cat /proc/scsi/scsi
Attached devices:
Host: scsi3 Channel: 00 Id: 00 Lun: 01
  Vendor: IBM      Model: 03584L32         Rev: 4.02
  Type:   Medium Changer                   ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 01
  Vendor: STK      Model: SL500            Rev: 3.15
  Type:   Medium Changer                   ANSI  SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 02
  Vendor: IBM      Model: ULTRIUM-TD3      Rev: 252D
  Type:   Sequential-Access                ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 02
  Vendor: STK      Model: T10000A          Rev: 1.27
  Type:   Sequential-Access                ANSI  SCSI revision: 05

udevinfo -a -p 'udevinfo -q path -n <device special file>'
Displays device information including the device driver in use, WWPN, WWN, serial number, and other information about the device. Note that this utility might not exist on every Linux flavor.

# udevinfo -a -p 'udevinfo -q path -n /dev/IBMtape1'
...
  looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:09:00.0/host2/rport-2:0-2/target2:0:0/2:0:0:1':
    ID=="2:0:0:1"
    BUS=="scsi"
    DRIVER=="lin_tape"
    SYSFS{primary_path}=="NA"
    SYSFS{ww_port_name}==""
    SYSFS{ww_node_name}=="0x20020000C9D93932"
    SYSFS{serial_num}=="111411000"
...

udevadm info --attribute-walk --name <device special file>
Displays device information including the device driver in use, WWPN, WWN, serial number, and other information about the device. Note that this utility might not exist on every Linux flavor.

# udevadm info --attribute-walk --name /dev/IBMtape1
...
ATTR{serial_num}=="1114110004"
ATTR{ww_node_name}=="0x20020000C9D93932"
ATTR{ww_port_name}=="0x10000000C9D93932"
ATTR{primary_path}=="NA"
ATTR{sys_encryption_proxy}=="1"
ATTR{sys_encryption_write}=="2"
...

tsmdlst
Displays LUN information, vendor information, and the device serial numbers. This utility is provided with the Tivoli Storage Manager device driver, and only works devices that this driver supports. It is located in /opt/tivoli/tsm/devices/bin/.

# tsmdlst

Index Minor Host CHN ID  LUN Type Vendor_ID Device_Serial_Number       Product_ID       Rev.
000   016   004  000 000 002 001  STK       90000075             T10000A          1.27

Index Minor Host CHN ID  LUN Type Vendor_ID Device_Serial_Number       Product_ID       Rev.
000   013   004  000 000 001 008  STK       90000074             T10000A          1.27

itdt -f <changer device special file> devids
Collects each drive's element and serial number as reported by the library device. More information about obtaining ITDT can be found here. This utility is provided with the IBM tape device driver (lin_tape on Linux) and is not installed by default.

# itdt -f /dev/IBMchanger0 devids
Reading element device ids...

Drive Address 1
 Drive State ................... Normal
 ASC/ASCQ ...................... FFFF
 Media Present ................. No
 Robot Access Allowed .......... Yes
 Source Element Address Valid .. No
 Accessor Preferred Zone........ A (TS3500 only)
 Media Inverted ................ No
 Same Bus as Medium Changer .... Yes
 SCSI Bus Address Valid ........ No
 Logical Unit Number Valid ..... No
 Volume Tag .................... <not valid>
 Device ID ..................... IBM     ULTRIUM-TD3     70000051

# itdt -f /dev/tsmscsi/lb0 devids
Reading element device ids...

Drive Address 1
 Drive State ................... Normal
 ASC/ASCQ ...................... FFFF
 Media Present ................. No
 Robot Access Allowed .......... Yes
 Source Element Address Valid .. No
 Accessor Preferred Zone........ A (TS3500 only)
 Media Inverted ................ No
 Same Bus as Medium Changer .... Yes
 SCSI Bus Address Valid ........ No
 Logical Unit Number Valid ..... No
 Volume Tag .................... <not valid>
 Device ID ..................... STK     T10000A         90000071  

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

ITSM TSM ADSM

Document Information

Modified date:
17 June 2018

UID

swg21970310