Changing WWPN of a virtual fiber adapter

You’ve probably noticed WWPNs are automatically generated by a HMC.  But you might get to the point when you need specific World Wide Port Name. Each HBA must have an unique number.  That’s why IBM didn’t give us a choice, and generates these strings automatically. First few characters (C050760….) define a virtual resource. The rest of the string is unique.  A serial number of a console is used to generate distinctive identifier. The problem is when you do some maintenance work, and you lost your ‘old’ WWPN, or you need to migrate to a different VIOS. In most situation you can reconfigure your SAN infrastructure. But if you need to keep a WWPN, you can explicitly set it from a HMC command line.

I’ve found two ways how to do it.

First one – add it to a partition profile chsyscfg command (reactivate of a profile=restart of a client required).

Second one – add it dynamically to a running partition by – chhwres. Note – each virtual fiber adapter has always defined two WWPNs. The first one is used to communicate with your SAN infrastructure, the second is used in conjunction with Live Partition Mobility. However, you must define a primary, and a secondary.

Below you can find examples of above commands:

Add specific WWPNs to a partition profile

chsyscfg -r prof -m name_of_your_server  -i ‘name=name_of_partition_profile,lpar_id=client_lpar_id,virtual_fc_adapters=”virtual_slot_number_on_client/client/lpar_id_of_vios/partition_name_of_Vios/virtual_slot_number_on_vios/””wwpn1,wwpn2“”/0′

Attention – This command will overwrite all virtual fiber adapters in the profile. If you have another adapters which suppose not to be changed, you have to define their parameters in the command.

Add specific WWPNs dynamically to an active partition

chhwres -r virtualio –rsubtype fc -o a -m name_of_your_server -p client_partition_name -s virtual_slot_number_on_client -a ‘adapter_type=client,remote_lpar_name= partition_name_of_Vios,remote_slot_num=virtual_slot_number_on_vios,”wwpns=wwpn1,wwpn2“‘

This command adds dynamically a virtual fiber adapter to an active partition. Remember to save the profile after you’ve added the adapter. Configuration -> Save Current Configuration

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s