Skip to main content

IBM Systems  >   z Systems  >   z/VM  >  

Description of QRYWWPNS

Download count: 14 this month, 937 altogether.

Downloads for QRYWWPNS:
VMARC archive: v-8K

From Kris Buelens, VM Xpert GCV Belgium

The SCSIDISC EXEC can help to find out if a selected WWPN can reach a selected LUN.

But I found it a bit cumbersome: I wanted to see which FCP subchannels could be used top address a given LUN.

An example: when we installed z/VM we were told we could use LUN 0001000000000000 etc. We had 4 FCP channels and wanted to implmement alternate paths for CP's EDEVs.&nbsb; The question then becomes: which WWPNs and which FCP subchannels can we use for LUN 0001000000000000 ? 

So I quickly wrote the QRYWWPNS EXEC that repeatedly calls SCSIDISC and assembles a summary.  As I also had to update SYSTEM CONFIG, the QRYWWPNS EXEC creates model statements for inclusion in SYSTEM CONFIG. You still need to change them, it is only a help with these difficult to write WWPN and LUN numbers.

I attached a subchannel address of our 4 FCP channels to MAINT and issued QRYWWPNS 000100000000000 what results in:

Summary: Which WWPN(s) can be reached by a CHPID vdev <-ChPid> <-----------WWPN(s)----------------- 605F CHPID 60 50050768021595B1 50050768023595B1 50050768023595B2 50050768021595B2 705F CHPID 70 50050768022595B1 50050768024595B1 50050768022595B2 50050768024595B2 805F CHPID 80 50050768021595B1 50050768023595B1 50050768023595B2 50050768021595B2 905F CHPID 90 50050768022595B1 50050768024595B1 50050768022595B2 50050768024595B2 By WWPN (what WWPN can be reached by which CHPID(s) <-----WWPN-----> <--------CHPID(s)----------------- 50050768021595B1 605F CHPID 60 805F CHPID 80 50050768021595B2 605F CHPID 60 805F CHPID 80 50050768022595B1 705F CHPID 70 905F CHPID 90 50050768022595B2 705F CHPID 70 905F CHPID 90 50050768023595B1 605F CHPID 60 805F CHPID 80 50050768023595B2 605F CHPID 60 805F CHPID 80 50050768024595B1 705F CHPID 70 905F CHPID 90 50050768024595B2 705F CHPID 70 905F CHPID 90 Starting to query 4 FCP devices for LUN 0001000000000000 (results will be stored in QRY2 00010000 A )
QRY2 00010000 A1 V 118 Trunc=118 Size=37 Line=2 Col=1 Alt=0 ====> * * * Top of File * * * 00000 <--vdev> <-----WWPN-----> <-----LUN------> <-----info----- 00001 *000605F 50050768021595B1 0001000000000000 No Lun-- ---- ---- -------- -- 00002 0000605F 50050768023595B1 0001000000000000 IBM 2145 2076CCCC 00 00003 0000605F 50050768023595B2 0001000000000000 IBM 2145 2076CCCC 00 00004 0000605F 50050768021595B2 0001000000000000 IBM 2145 2076CCCC 00 00005 00006 0000705F 50050768022595B1 0001000000000000 IBM 2145 2076CCCC 00 00007 0000705F 50050768024595B1 0001000000000000 IBM 2145 2076CCCC 00 00008 0000705F 50050768022595B2 0001000000000000 IBM 2145 2076CCCC 00 00009 *000705F 50050768024595B2 0001000000000000 No Lun-- ---- ---- -------- -- 00010 00011 0000805F 50050768021595B1 0001000000000000 IBM 2145 2076CCCC 00 00012 0000805F 50050768023595B1 0001000000000000 IBM 2145 2076CCCC 00 00013 *000805F 50050768023595B2 0001000000000000 No Lun-- ---- ---- -------- -- 00014 0000805F 50050768021595B2 0001000000000000 IBM 2145 2076CCCC 00 00015 00016 *000905F 50050768022595B1 0001000000000000 No Lun-- ---- ---- -------- -- 00017 0000905F 50050768024595B1 0001000000000000 IBM 2145 2076CCCC 00 00018 0000905F 50050768022595B2 0001000000000000 IBM 2145 2076CCCC 00 00019 0000905F 50050768024595B2 0001000000000000 IBM 2145 2076CCCC 00 00020 00021 /* For SYSTEM CONFIG: define LUN 0001000000000000 */ 00022 /* - Change "eeee" by an emulated address */ 00023 /* - Use for each EDEV a unique FCP_DEV (max 8 paths)*/ 00024 EDEVICE eeee TYPE FBA ATTR SCSI 00025 FCP_DEV 605F WWPN 50050768023595B1 LUN 0001000000000000, 00026 FCP_DEV 605F WWPN 50050768023595B2 LUN 0001000000000000, 00027 FCP_DEV 605F WWPN 50050768021595B2 LUN 0001000000000000, 00028 1=scr 2=X 3=qt 4=spjn 5=ctxt 6=? 7=b 8=f 9=vh 10=<-> 11=save 12=file

It was a quick & dirty tool, and creates a lot of workfiles with the details of the SCSIDISC responses from which I extract the results.  In case you find "silly" things in the final result, you can consult these workfiles to see what SCSIDISC exactly reported.