You can gather a great deal of information about your storage environment using a tool from IBM: devscan. Devscan is free, and it’s available from the AIX Support Center Tools web page.
The devscan tool can be run on any AIX host as well as on the Virtual I/O Server (VIOS). The tool gathers its data from the Storage Area Network (SAN) or the Device Driver. If you use devscan’s default settings, it’s unable to make changes on the SAN or on the host, which makes it safe to run—even on production, according to the devscan documentation.
Because devscan doesn’t change the Object Data Manager (ODM), it’s safer to run than cfgmgr, the AIX utility to configure devices into the Device Configuration database.
The default behavior for devscan is (as the name says) to scan devices. As the documentation explains:
In the default case, devscan finds every Fibre Channel, SAS, iSCSI, and VSCSI adapter in the system and traverses each one. It issues SCSI Report LUNs and Inquiry commands to every target and LUN it finds.
That means devscan can scan each kind of adapter and do a search through all of its child devices. You can narrow down the scan to a single adapter using the --dev flag.
For each Logical Unit Number (LUN), devscan can report information such as:
- ODM name and status
- Physical Volume Identifier (if there is one)
- Device type
- Disk capacity and block size
- Time to service an SCSI read
All Kinds of Disks
You can use devscan for all different types of disks. Figure 1 shows an extract of a devscan from a lab system that’s connected via Virtual SCSI (VSCSI):
Copyright (C) 2010-2012 IBM Corp., All Rights Reserved
cmd: ./devscan --dev=vscsi0
Current time: 2013-05-03 11:15:51.721153 GMT
Running on host: aix720b
Processing VSCSI device:
Protocol driver: vscsi0
Vendor ID: IBM Device ID: VDASD AI Rev: 0001 NACA: yes
PDQ: Connected PDT: Block (Disc)
Name: hdisk0 Path: 0
Device already SCIOLSTARTed
Vendor ID: IBM Device ID: VOPT OP Rev: 0001 NACA: no
PDQ: Connected PDT: CD/DVD
Name: No ODM match
You can use the -v flag to increase the verbosity level. Figure 2 shows an extract from a devscan on the same VSCSI adapter (vscsi0) as the command above, but with the verbosity level set to 9, which is the highest level (the default level is 3):
name = hdisk2
PdDvLn = disk/vscsi/vdisk
scsi_id = 0x0
lun_id = 0x8200000000000000
ww_name = 0x0
pvid = 0x00f71dbd78720b360000000000000000
is MPIO = 1
There you have it: a LUN ID, world wide name (not applicable here), and the Physical Volume ID (PVID). This is pretty useful if you have a number of disks to diagnose.
Scan a Fibre Channel Adapter
The information in Figure 3 shows that an FC adapter link is down:
Adapter driver: fcs0
Protocol driver: fscsi0
Connection type: fabric
Link State: down
Current link speed: 4 Gbps
Local SCSI ID: 0x180600
Device ID: 77102224
Microcode level: 0125040024
Devscan even throws in the adapter microcode level for good measure.
Devscan would be especially useful on the VIOS—the appliance that can own physical I/O devices and share them among client partitions. Although the devscan documentation doesn’t spell it out, to install and run devscan it appears that you have to exit padmin’s restricted shell. You can do that by logging in as padmin and running oem_setup_env.
Give devscan a Try
If you want to get a good view of your storage environment, give devscan a test drive. It’s a breeze to install and looks like it will be a big time saver, especially if you have to navigate through the storage configuration in large and complex environments.