topselect script
Selects enclosures and disks from an IBM Storage Scale RAID topology file.
Synopsis
topselect { -l | [ -d DiskEnclosure[,DiskEnclosure] ]
[ -a Adapter[,Adapter] ] [ -p EnclosurePort[,EnclosurePort] ]
[-n] } TopologyFile
Availability
Available on all IBM Storage Scale editions.
Description
The topselect script provides a simple interface for examining the contents of a topology file produced by the mmgetpdisktopology command. It produces two types of output. One output type lists the supported enclosures that are found in the topology file and the other output type lists selected subsets of the disk block devices in the topology.
Together with the topsummary script, this script can be used to read information out of a IBM Storage Scale RAID topology file. It is sometimes useful to know which disk devices are connected to what hardware: for example, when looking to see if a pattern of disk faults might be isolated to a certain adapter.
topselect -l server1.top
Enclosure GSS SV34607290 found
Adapter scsi5 (naa.500605B00687D3A0) connects to SV34607290 ESM(s) B
Adapter scsi7 (naa.500605B006940730) connects to SV34607290 ESM(s) A
Enclosure GSS SV34607449 found
Adapter scsi3 (naa.500605B006BB9AD0) connects to SV34607449 ESM(s) B
Adapter scsi5 (naa.500605B00687D3A0) connects to SV34607449 ESM(s) A
Two disk enclosures are represented in the topology file server1.top. It
shows that there are two connections to the enclosure with serial number
SV34607290
: one over adapter scsi5
to ESM B and the other over
adapter scsi7
to ESM A. In parentheses after each adapter is the unique WWID for
that adapter; this information can be useful for diagnostic purposes, together with the physical
location codes and firmware levels displayed by the topsummary script.
The default behavior of the topselect script is to list disk block devices within the topology file. When used with no options, all the disk block devices contained within all disk enclosures are listed. The available IBM Storage Scale RAID log tip NVRAM devices can be included with the -n option. The listing of disk block devices can be narrowed down by using a combination of the options -d for disk enclosures, -a for adapters, and -p for enclosure ports (ESMs).
Enclosure: Enclosure serial number
ESM port: A or B
Adapter: SCSI hostbus of the adapter
SES device: /dev name of the ESM expander controlling the disk
Device: /dev name of the disk block device
Type: SSD, HDD, or NVR
WWID: Unique WWID of the disk
Location: Disk location within the enclosure
SX33100383 B scsi4 sg249 sdic HDD 5000C5006C2C5837 21
Parameters
- -l
- Lists the enclosure connections present within the topology.
- -d DiskEnclosure[,DiskEnclosure]
- Lists the disk block devices in the specified disk enclosures.
- -a Adapter[,Adapter]
- Lists the disk block devices accessed over the specified adapters.
- -p EnclosurePort[,EnclosurePort]
- Lists the disk block devices accessed over the specified ESMs.
- -n
- Includes the available NVRAM block devices present in the topology.
- TopologyFile
- Specifies the name of the topology file from which to select.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the topselect script.
The node on which the script is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For additional details, see the following IBM Storage Scale RAID: Administration topic: Requirements for administering IBM Storage Scale RAID.
Examples
In the following examples, the underscores in the FC5887 disk location codes are used by the topselect script in place of literal space characters in the actual location code.
- To select the disk block devices on ESM B of enclosure
G46600Y
in the server1.top topology file, run:
The system displays output similar to this:topselect -d G46600Y -p B server1.top
> topselect -d G46600Y -p B server1.top G46600Y B scsi6 sg232 sdgp HDD 5000C50067BC9C63 _P1-D5______2SS6 G46600Y B scsi6 sg232 sdhd HDD 5000C50067BC9CA7 _P1-D19_____2SS6 G46600Y B scsi6 sg232 sdgo HDD 5000C50067E9D6CB _P1-D4______2SS6 G46600Y B scsi6 sg232 sdgq HDD 5000C50067E9D7A3 _P1-D6______2SS6 G46600Y B scsi6 sg232 sdgt HDD 5000C50067E9DA17 _P1-D9______2SS6 G46600Y B scsi6 sg232 sdhf HDD 5000C500686881FF _P1-D21_____2SS6 G46600Y B scsi6 sg232 sdgw HDD 5000C50068688213 _P1-D12_____2SS6 G46600Y B scsi6 sg232 sdgv HDD 5000C5006868827F _P1-D11_____2SS6 G46600Y B scsi6 sg232 sdgu HDD 5000C500686884A3 _P1-D10_____2SS6 G46600Y B scsi6 sg232 sdhb HDD 5000C50068688673 _P1-D17_____2SS6 G46600Y B scsi6 sg232 sdgm HDD 5000C50068688793 _P1-D2______2SS6 G46600Y B scsi6 sg232 sdgz HDD 5000C500686889E7 _P1-D15_____2SS6 G46600Y B scsi6 sg232 sdhi HDD 5000C5006868947F _P1-D24_____2SS6 G46600Y B scsi6 sg232 sdgx HDD 5000C5006868AA37 _P1-D13_____2SS6 G46600Y B scsi6 sg232 sdgl HDD 5000C500686B84F7 _P1-D1______2SS6 G46600Y B scsi6 sg232 sdgn HDD 5000C500686BAB57 _P1-D3______2SS6 G46600Y B scsi6 sg232 sdha HDD 5000C500686BB0F3 _P1-D16_____2SS6 G46600Y B scsi6 sg232 sdhc HDD 5000C500686BD21B _P1-D18_____2SS6 G46600Y B scsi6 sg232 sdgy HDD 5000C500686BD333 _P1-D14_____2SS6 G46600Y B scsi6 sg232 sdhg HDD 5000C500686BD387 _P1-D22_____2SS6 G46600Y B scsi6 sg232 sdhe HDD 5000C500686BF457 _P1-D20_____2SS6 G46600Y B scsi6 sg232 sdgs HDD 5000C500686BFF37 _P1-D8______2SS6 G46600Y B scsi6 sg232 sdhh HDD 5000C5006B9F0D97 _P1-D23_____2SS6 G46600Y B scsi6 sg232 sdgr HDD 5000C5006BA184EB _P1-D7______2SS6
- To list all the disk block devices in the server1.top topology file
and find only the disk with WWID
5000c500686bd333
, use topselect in a pipeline with grep, run:
The system displays output similar to this:topselect server1.top | grep -i 5000c500686bd333
This shows the two disk block device paths for the disk in slot 14 (> topselect server1.top | grep -i 5000c500686bd333 G46600Y B scsi6 sg232 sdgy HDD 5000C500686BD333 _P1-D14_____2SS6 G46600Y A scsi2 sg32 sdo HDD 5000C500686BD333 _P1-D14_____2SS6
D14
). - To list the disk device paths found over HBA
scsi9
and ESM A for the attached enclosure, run:
The system displays output similar to this:topselect -a scsi9 -p A server1.top
> topselect -a scsi9 -p A server1.top SV21313978 A scsi9 sg365 sdpb SSD 500051610005F8A8 5-12 SV21313978 A scsi9 sg365 sdmw SSD 500051610005F8EC 1-3 SV21313978 A scsi9 sg365 sdod HDD 5000C50034239FC7 3-12 SV21313978 A scsi9 sg365 sdnz HDD 5000CCA01B119598 3-8 . . . SV21313978 A scsi9 sg365 sdni HDD 5000CCA01C515230 2-3 SV21313978 A scsi9 sg365 sdne HDD 5000CCA01C515294 1-11 . . .