Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Wednesday 13 February 2013

N-Port Id Virtualization (NPIV) - PowerVM



N-Port Id Virtualization :

1 Power feature (actually an industry standard) for virtualizing a phyiscal fibre channel port.
2. It allows multiple LPARs to share a physical fibre channel HBA.
 
3. Each logical HBA on the LPARs with have their own WWPN address (given in pairs; second WWPN is used for LPM) which can be used for SAN zoning.
4. Each physical HBA port can support upto 64 virtual ports.
5. Compatible with Live Partition Mobility.


NPIV Requirements :
- POWER6 or later
- FC 5735 PCI 8GB FC adapter (it comes with 2 ports)
- VIOS 2.1 or later
- HMC 7.3.4 or later
 
- OS
 
-- AIX 5.3 TL09 SP 2
-- AIX 6.1 TL02 SP2
-- AIX 7.1 TLxx SPx
-- SLES 10 SP2
-- RHEL 4.7 or later

You also need to have a NPIV capable SAN switch. So first of all check with your storage team before procuring NPIV capable servers.


How to create the Virtual adapters for the VIO and the LPARs ?
You should create the virtual FC adapters for the VIO and the LPARs by logging onto HMC as like we do the VSCSI adapters.

How to configure SAN Zoning ?
SAN zoning should be based on the WWPN from client's Virtual FC adapter and NOT the VIOS server adapters. You need to be very careful with this. Otherwise you would not see the SAN LUNs fron the parition.

Here are some commands that can be used on the VIO server.

1. To map a Physical HBA port to a virtual FC adapter
# vfsmap -vadapter vfchost0 -fcp fcs0

2. To unmap a Physical HBA port and a virtual FC adapter
# vfsmap -vadapter vfchost0 -fcp

3. To list the mapping between a specific virtual and physical FC adapters
# lsmap -npiv -vadapter vfchost0

4. To list the mapping between all Virtual and Physical FC adapters
# lsmap -all -npiv

5. To list the available NPIV capable ports
# lsnports

6. To list the Virtual FC adapter details
# lsdev -dev vfchost0

7. To list the NPIV physical FC adapter details
# lsdev -dev fcs0

8. To monitor I/O traffic on a virtual FChost (server side virtual adapter)
# viostat -adapter vfchost1

Here are some commands that can be used on HMC.

1. To list the virtual FC adapters on all the lpars on a managed system
# lshwres --rsubtype fc -m managed-system --level lpar -r virtualio

2.  To list the WWPN and to check whether its active or not on all the LPARs in a managed system.
# lsnportlogin -m managed-system --filter "profile-names=normal"

Here are some commands that can be used on LPAR level.

1. To view the WWPN of a virtual FC adatper
# lscfg -vpl fcs0 | grep Net

2. To view t he statistics on a virtual FC adapter (client)
# fcstat fcs0

Sometimes you may need to set a specific WWPN on the virtual adapters on the client.
You can use the below commands (in HMC) during that scenario.

To list the Current Profile details:
hscroot@hmc1:~> lssyscfg -r prof -m sys709 --filter "lpar_ids=30,"profile_names=Normal""
name=Normal,lpar_name=lpar01,lpar_id=30,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=1536,max_mem=2048,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.2,max_proc_units=1.0,min_procs=1,desired_procs=1,max_procs=3,sharing_mode=uncap,uncap_weight=128,shared_proc_pool_id=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=50,"virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1","virtual_scsi_adapters=20/client/2/sys506_vios2/4/1,10/client/1/sys506_vios1/4/1",virtual_eth_adapters=2/0/2//0/1/ETHERNET0//all/0,vtpm_adapters=none,"virtual_fc_adapters=""29/client/1/sys709_vios1/29/c506000000000009,c506000000000010/0"",""30/client/2/sys506_vios2/30/c506000000000011,c506000000000012/1""",hca_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,bsr_arrays=0,lhea_logical_ports=none,lhea_capabilities=none,lpar_proc_compat_mode=default,electronic_err_reporting=null


To change the WWPN of the Virtual FC adapters (at slot numbers 29 and 30) on a LPAR Profile:
hscroot@hmc1:~> chsyscfg -r prof -m sys709 -i name=Normal, lpar_name=lpar01, \"virtual_fc_adapters=\"\"29/client/1/sys709_vios1/29/c506000000000009,c506000000000010/0\"\",\"\"30/client/2/sys709_vios2/30/c506000000000011,c506000000000012/1\"\"\"

No comments:

Post a Comment