Posts tagged ·

WWPN

·...

Logging NPIV WWPN into SAN switch before AIX installation

Comments Off

Question:

How can I log NPIV WWPN into SAN switch before AIX installation on the VIO LPAR that is using NPIV LUN boot?

 

Answer:

 

There are a few methods you can use:

 

Method 1:

Allocate the NIM lpp_source and SPOT resources to the new LPAR on NIM server.

Start up the new LPAR and boot it from network

When it reaches the installation menu, the WWPNs of virtual adapters will login into SAN switch.

 

Method 2:

 

Boot the LPAR, press 8 to get into firmware mode.

> ioinfo

Select 6 for FC Adapter
Then Select the HBA you want, then run the list devices, which will return you login & Devices if any

Note: You can only login one virtual adapter at one time.

Method 3:

chnportlogin and lsnportlogin – Login in Virtual Fibre Channel adapters for NPIV client LPARs

There are two new HMC (V7.7.3.0) commands that can force a client Virtual Fibre Channel adapter to log into a SAN. This should make the life of the AIX and SAN administrator easier, as they will no longer need to install AIX in order for the new VFC adapters to log into the SAN. Although there was an unsupported method* for doing this already (see links below). Nor will the SAN admins need to “blind” zone the WWPNs.

 There was some indication of this in the latest VIOS FP readme:

 

https://www-304.ibm.com/support/docview.wss?rs=0&uid=isg400000693

 

  • Enabled SAN login from VIOS

And there was this:

IZ95569: ENABLE SAN LOGIN FROM VIOS FOR IMPROVED UABILITY

https://www-304.ibm.com/support/docview.wss?uid=isg1IZ95569

 

Problem summary

  • Customer will be able to instruct the VIOS to login to the SAN
  • for a given WWPN on a given virtual adapter to allow the
  • customer to see the WWPN in SAN management tools and easing
  • the task of configuring new NPIV client
  • partitions.

Problem conclusion

  • add commands to VIOS manager interface to allow the HMC to
  • login, logout and query virtual adapters.

 

And the manpage of these commands:

 

chnportlogin:  http://pic.dhe.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7edm/chnportlogin.html

lsnportlogin:   http://pic.dhe.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7edm/lsnportlogin.html
The new lsnportlogin and chnportlogin commands on the 7.730 HMC provide the ability to utilize the new function in the VIOS. From the Readme:

Added the chnportlogin and lsnportlogin commands.

 

1.  The chnportlogin command allows you to perform N Port login and logout operations for virtual fibre channel client adapters that are configured in a partition or a partition profile. Use this command to help you in zoning WWPNs on a Storage Area Network (SAN). A login operation activates all inactive WWPNs, including the second WWPN in the pair assigned to each virtual fibre channel client adapter. This feature is particularly useful for Logical Partition Migration. A logout operation deactivates all WWPNs not in use. A successful login of a virtual fibre channel adapter requires that the corresponding virtual fiber channel server adapter must exist and that it must be mapped.

 

2.  The lsnportlogin command also allows you to list WWPN login status information for virtual fibre channel client adapters configured in partitions or partition profiles.

 

 

Here’s an example of using the lsnportlogin command on one of my systems:

hscroot@HMC1:~>  lsnportlogin -m  770-frame-1 –filter “profile_names=normal”

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=32,wwpn=c060760405f0000c,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=32,wwpn=c060760405f0000d,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=33,wwpn=c060760405f0000e,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=33,wwpn=c060760405f0000f,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=30,wwpn=c060760405f00000,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=30,wwpn=c060760405f00001,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=31,wwpn=c060760405f00002,wwpn_status=0

lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=31,wwpn=c060760405f00003,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=32,wwpn=c060760405f00004,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=32,wwpn=c060760405f00005,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=33,wwpn=c060760405f00006,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=33,wwpn=c060760405f00007,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=30,wwpn=c060760405f00008,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=30,wwpn=c060760405f00009,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=31,wwpn=c060760405f0000a,wwpn_status=0

lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=31,wwpn=c060760405f0000b,wwpn_status=0

 

 

Descriptions of selected command attributes:

wwpn_status

The WWPN status.  Possible values are:

0 – WWPN is not activated

1 – WWPN is activated

2 – WWPN status is unknown

Comments Off

PowerVM NPIV / IBM Switch Configuration

Comments Off

Problem(Abstract)

What is NPIV?

NPIV is an industry standard technology that provides the capability to assign a
physical Fibre Channel adapter to multiple unique world wide port names
(WWPN). To access physical storage from a SAN, the physical storage is
mapped to logical units (LUNs) and the LUNs are mapped to the ports of physical
Fibre Channel adapters. Then the Virtual I/O Server uses the maps to connect
the LUNs to the virtual Fibre Channel adapter of the virtual I/O client.

Symptom

How to configure NPIV

 

Environment

Minimum NPIV Requirements

Diagnosing the problem

 

You must meet the following requirements to set up and use NPIV.

1. Hardware

Any POWER6-based system or higher

Note: IBM intends to support N_Port ID Virtualization (NPIV) on the
POWER6 processor-based Power 595, BladeCenter JS12, and
BladeCenter JS22 in 2009

Install a minimum System Firmware level of EL340_039 for the IBM Power
520 and Power 550, and EM340_036 for the IBM Power 560 and IBM
Power 570

Minimum of one 8 Gigabit PCI Express Dual Port Fibre Channel Adapter
(Feature Code 5735)
Check the latest available firmware for the adapter at:
http://www.ibm.com/support/us/en

Select Power at the support type, then go to Firmware updates.

NPIV-enabled SAN switch

Only the first SAN switch which is attached to the Fibre Channel adapter in
the Virtual I/O Server needs to be NPIV-capable. Other switches in your
SAN environment do not need to be NPIV-capable.

2. Software

HMC V7.3.4, or later
Virtual I/O Server Version 2.1 with Fix Pack 20.1, or later
AIX 5.3 TL9, or later
AIX 6.1 TL2, or later
SDD 1.7.2.0 + PTF 1.7.2.2
SDDPCM 2.2.0.0 + PTF v2.2.0.6
SDDPCM 2.4.0.0 + PTF v2.4.0.1

Note: At the time of writing, only the 8 Gigabit PCI Express Dual Port
Fibre Channel Adapter (Feature Code 5735) was announced.

Note: Check, with the storage vendor, whether your SAN switch is
NPIV-enabled.

For information about IBM SAN switches, refer to Implementing an
IBM/Brocade SAN with 8 Gbps Directors and Switches, SG24-6116,
and search for NPIV.

Use the latest available firmware level for your SAN switch.

 

Resolving the problem

Configuring IBM NPIV and Switch for Virtualization
1. On the SAN switch, you must perform two tasks before it can be used for
NPIV.

a. Update the firmware to a minimum level of Fabric OS (FOS) 5.3.0. To
check the level of Fabric OS on the switch, log on to the switch and run the
version command, as shown in Example 2-20:

Example 2-20 version command shows Fabric OS level
itsosan02:admin> version
Kernel: 2.6.14
Fabric OS: v5.3.0
Made on: Thu Jun 14 19:04:02 2007
Flash: Mon Oct 20 12:14:10 2008
BootProm: 4.5.3

Note: You can find the firmware for IBM SAN switches at:
http://www-03.ibm.com/systems/storage/san/index.html

Click Support and select Storage are network (SAN) in the Product
family. Then select your SAN product.

b. After a successful firmware update, you must enable the NPIV capability
on each port of the SAN switch. Run the portCfgNPIVPort command to
enable NPIV on port 16:

itsosan02:admin> portCfgNPIVPort 16, 1
The portcfgshow command lists information for all ports, as shown in
Example 2-21.

Example 2-21 List port configuration
itsosan02:admin> portcfgshow
Ports of Slot 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
—————–+–+–+–+–+—-+–+–+–+—-+–+–+–+—-+–+–+–
Speed AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN
Trunk Port ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
Long Distance .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
VC Link Init .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Locked L_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Locked G_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Disabled E_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
ISL R_RDY Mode .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
RSCN Suppressed .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Persistent Disable.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
NPIV capability .. ON ON ON ON ON ON ON ON ON .. .. .. ON ON ON
Ports of Slot 0 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
—————–+–+–+–+–+—-+–+–+–+—-+–+–+–+—-+–+–+–
Speed AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN
Trunk Port ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
Long Distance .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
VC Link Init .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Locked L_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Locked G_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Disabled E_Port .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
ISL R_RDY Mode .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
RSCN Suppressed .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
Persistent Disable.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
NPIV capability ON .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
where AN:AutoNegotiate, ..:OFF, ??:INVALID,
SN:Software controlled AutoNegotiation.

Note: Refer to your SAN switch users guide for the command to enable
NPIV on your SAN switch.

2. Follow these steps to create the virtual Fibre Channel server adapter in the
Virtual I/O Server partition.

a. On the HMC, select the managed server to be configured:
Systems Management Servers → <servername>

b. Select the Virtual I/O Server partition on which the virtual Fibre Channel
server adapter is to be configured. Then select Tasks Dynamic
Logical Partitioning Virtual Adapters as shown in Figure 2-18.

c. To create a virtual Fibre Channel server adapter, select Actions
Create Fibre Channel Adapter… as shown in Figure 2-19.

d. Enter the virtual slot number for the Virtual Fibre Channel server adapter.
Then select the Client Partition to which the adapter may be assigned, and
enter the Client adapter ID as shown in Figure 2-20. Click Ok.

e. Click OK.

f. Remember to update the profile of the Virtual I/O Server partition so that
the change will be reflected across restarts of the partitions. As an
alternative, you may use the Configuration Save Current
Configuration option to save the changes to the new profile

3. Follow these steps to create virtual Fibre Channel client adapter in the virtual
I/O client partition.
a. Select the virtual I/O client partition on which the virtual Fibre Channel
client adapter is to be configured. Then select Tasks Configuration
Manage Profiles as shown in Figure 2-22.

b. To create a virtual Fibre Channel client adapter select the profile, select
Actions Edit. Then expand the Virtual Adapters tab and select
Actions Create Fibre Channel Adapter as shown in Figure 2-23.

c. Enter the virtual slot number for the Virtual Fibre Channel client adapter.
Then select the Virtual I/O Server partition to which the adapter may be
assigned and enter the Server adapter ID as shown in Figure 2-24. Click
OK.

d. Click OK OK Close.

4. Logon to the Virtual I/O Server partition as user padmin.

5. Run the cfgdev command to get the virtual Fibre Channel server adapter(s)
configured.

6. The command lsdev -dev vfchost* lists all available virtual Fibre Channel
server adapters in the Virtual I/O Server partition before mapping to a
physical adapter, as shown in Example 2-22.

Example 2-22 lsdev -dev vfchost* command on the Virtual I/O Server
$ lsdev -dev vfchost*
name status description
vfchost0 Available Virtual FC Server Adapter

7. The lsdev -dev fcs* command lists all available physical Fibre Channel
server adapters in the Virtual I/O Server partition, as shown in Example 2-23.

Example 2-23 lsdev -dev fcs* command on the Virtual I/O Server
$ lsdev -dev fcs*
name status description
fcs0 Available 4Gb FC PCI Express Adapter (df1000fe)
fcs1 Available 4Gb FC PCI Express Adapter (df1000fe)
fcs2 Available 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3 Available 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

8. Run the lsnports command to check the Fibre Channel adapter NPIV
readiness of the adapter and the SAN switch. Example 2-24 shows that the
fabric attribute for the physical Fibre Channel adapter in slot C6 is set to 1.

This means the adapter and the SAN switch is NPIV ready. If the value is
equal 0, then the adapter or SAN switch is not NPIV ready and you should
check the SAN switch configuration.

Example 2-24 lsnports command on the Virtual I/O Server
$ lsnports
name physloc fabric tports aports swwpns awwpns
fcs3 U789D.001.DQDYKYW-P1-C6-T2 1 64 63 2048 2046

9. Before mapping the virtual FC adapter to a physical adapter, get the vfchost
name of the virtual adapter you created and the fcs name for the FC adapter
from the previous lsdev commands output.

10.To map the virtual adapters vfchost0 to the physical Fibre Channel adapter
fcs3, use the vfcmap command as shown in Example 2-25.

Example 2-25 vfcmap command with vfchost2 and fcs3
$ vfcmap -vadapter vfchost0 -fcp fcs3
vfchost0 changed

11.To list the mappings use the lsmap -npiv -vadapter vfchost0 command, as
shown in Example 2-26.

Example 2-26 lsmap -npiv -vadapter vfchost0 command
$ lsmap -npiv -vadapter vfchost0
Name Physloc ClntID ClntName ClntOS
============= ================================== ====== ============== =======
vfchost0 U9117.MMA.101F170-V1-C31 3
Status:NOT_LOGGED_IN
FC name: FC loc code:
Ports logged in:0
Flags:1<NOT_MAPPED,NOT_CONNECTED>
VFC client name: VFC client DRC:

12.After you have created the virtual Fibre Channel server adapters in the Virtual
I/O server partition and in the virtual I/O client partition, you need to do the
correct zoning in the SAN switch. Follow the next steps:

a. Get the information about the WWPN of the virtual Fibre Channel client
adapter created in the virtual I/O client partition.

i. Select the appropriate virtual I/O client partition, then click Task
Properties. Expand Virtual Adapters tab, select the Client Fibre
Channel client adapter and then select Actions Properties to list
the properties of the virtual Fibre Channel client adapter, as shown in
Figure 2-25.

ii. Figure 2-26 shows the properties of the virtual Fibre Channel client
adapter. Here you can get the WWPN that is required for the zoning.

b. Logon to your SAN switch and create a new zoning, or customize an
existing one.

The command zoneshow, which is available on the IBM 2109-F32 switch,
lists the existing zones as shown in Example 2-27.

Example 2-27 The zoneshow command before adding a new WWPN
itsosan02:admin> zoneshow
Defined configuration:
cfg: npiv vios1; vios2
zone: vios1 20:32:00:a0:b8:11:a6:62; c0:50:76:00:0a:fe:00:18
zone: vios2 C0:50:76:00:0A:FE:00:12; 20:43:00:a0:b8:11:a6:62
Effective configuration:
cfg: npiv
zone: vios1 20:32:00:a0:b8:11:a6:62
c0:50:76:00:0a:fe:00:18
zone: vios2 c0:50:76:00:0a:fe:00:12
20:43:00:a0:b8:11:a6:62

To add the WWPN c0:50:76:00:0a:fe:00:14 to the zone named vios1,
execute the following command:

itsosan02:admin> zoneadd “vios1″, “c0:50:76:00:0a:fe:00:14″

To save and enable the new zoning, execute the cfgsave and cfgenable
npiv commands, as shown in Example 2-28 on page 76.

Example 2-28 The cfgsave and cfgenable commands
itsosan02:admin> cfgsave

You are about to save the Defined zoning configuration. This
action will only save the changes on Defined configuration.
Any changes made on the Effective configuration will not
take effect until it is re-enabled.

Do you want to save Defined zoning configuration only? (yes, y, no, n): [no]
y
Updating flash …
itsosan02:admin> cfgenable npiv
You are about to enable a new zoning configuration.
This action will replace the old zoning configuration with the
current configuration selected.
Do you want to enable ‘npiv’ configuration (yes, y, no, n): [no] y
zone config “npiv” is in effect
Updating flash …

With the zoneshow command you can check whether the added WWPN is
active, as shown in Example 2-29.

Example 2-29 The zoneshow command after adding a new WWPN
itsosan02:admin> zoneshow

Defined configuration:

cfg: npiv vios1; vios2

zone: vios1 20:32:00:a0:b8:11:a6:62; c0:50:76:00:0a:fe:00:18;
c0:50:76:00:0a:fe:00:14

zone: vios2 C0:50:76:00:0A:FE:00:12; 20:43:00:a0:b8:11:a6:62

Effective configuration:

cfg: npiv
zone: vios1 20:32:00:a0:b8:11:a6:62
c0:50:76:00:0a:fe:00:18
c0:50:76:00:0a:fe:00:14
zone: vios2 c0:50:76:00:0a:fe:00:12
20:43:00:a0:b8:11:a6:62

c. After you have finished with the zoning, you need to map the LUN
device(s) to the WWPN. In our example the LUN named NPIV_AIX61 is
mapped to the Host Group named VIOS1_NPIV, as shown in Figure 2-27.

13.Activate your AIX client partition and boot it into SMS.

14.Select the correct boot devices within SMS, such as a DVD or a NIM Server.

15.Continue to boot the LPAR into the AIX Installation Main menu.

16.Select the disk where you want to install the operating system and continue to
install AIX.

Comments Off

List WWPN of all LPARs or a specific LPAR using HMC command

Comments Off

Question:

How to WWPN of all LPARs or a specific LPAR using HMC command?

 

Solution:

 

To List WWPN of all LPARs on a managed system:

 

MS=Dev-BOX-9117-MMB-SN129SBCP
lshwres -r virtualio --rsubtype fc -m $MS --level lpar -F lpar_name,slot_num,wwpns --header |grep -v null
lpar_name,slot_num,wwpns
devaix101,5,"c05076036cfc002e,c05076036cfc002f"
devaix101,4,"c05078044abc002c,c05078044abc002d"
devaix101,3,"c05078044abc002a,c05078044abc002b"
devaix101,2,"c05078044abc0028,c05078044abc0029"
devaix102,5,"c05078044abc0538,c05078044abc0539"
devaix102,4,"c05078044abc0536,c05078044abc0537"
devaix102,3,"c05078044abc0534,c05078044abc0535"
devaix102,2,"c05078044abc0532,c05078044abc0533"
devaix103,5,"c05078044abc00c6,c05078044abc00c7"
devaix103,4,"c05078044abc00c4,c05078044abc00c5"
devaix103,3,"c05078044abc00c2,c05078044abc00c3"
devaix103,2,"c05078044abc00c0,c05078044abc00c1"

 

Please be noted slot_number is useful to identify the FC adapter on AIX.

For example:

On server devaix103

lsdev -Ccadapter|grep fcs
fcs0 Available C2-T1 Virtual Fibre Channel Client Adapter
fcs1 Available C3-T1 Virtual Fibre Channel Client Adapter
fcs2 Available C4-T1 Virtual Fibre Channel Client Adapter
fcs3 Available C5-T1 Virtual Fibre Channel Client Adapter

 

The location of fcs0 is C2, which means its slot_number is 2.

 

To List WWPN of a specific LPAR:

MS=Dev-BOX-9117-MMB-SN129SBCP
LPAR=devaix103
lshwres -r virtualio --rsubtype fc -m $MS --filter lpar_names=$LPAR --level lpar -F lpar_name,slot_num,wwpns --header

lpar_name,slot_num,wwpns

devaix103,5,”c05078044abc00c6,c05078044abc00c7″

devaix103,4,”c05078044abc00c4,c05078044abc00c5″
devaix103,3,”c05078044abc00c2,c05078044abc00c3″
devaix103,2,”c05078044abc00c0,c05078044abc00c1″

Comments Off