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 partition.

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

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

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

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

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

To list the available NPIV capable ports :
# lsnports

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

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

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.

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

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.

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

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\"\"\"

Virtual SCSI - PowerVM


Commands for VIO Server : 

To view the current reserve policy of a disk :
# lsdev -dev hdisk2 -attr reserve_policy

To set the reservice policy of a disk :
# chdev -dev hdisk2 -attr reserve_policy=no_reserve -P

To view the current values of all the attribtues of a FC adapter :
# lsdev -dev fcs0 -attr

To modify the attributes of a FC adapter :
# chdev -dev fcs0 -attr fc_err_recov=fast_fail dyntrk=yes -P

To map a disk to a Virtual Server SCSI adapter :
# mkvdev -vdev hdisk2 -vadapter vhost0 -dev lpar1_vtd

Note: "-dev lpar1_vtd" is an option to specify the VTD name.
If not specified, it would take a default name.

To unmap a disk fro a Virtual Server SCSI adapter (Technically removing a VTD device) :
# rmvdev -vtd lpar1_vtd

To list all the backing device and Virtual Server SCSI adapter mapping :
# lsmap -all

To list all the backing devices mapped to a Virtual Server SCSI adapter :
# lsmap -vadapter vhost0


Commands for AIX sever :

To list the atttributes of a virtual disk :
# lsattr -El hdisk0

To set the necessary attributes of a virtual disk :
# chdev -l hdisk0 -a hcheck_mode=nonactive hcheck_interval=20 algorithm=fail_over

To list all the paths for the virtual disks :
# lspath

To list the parent device of a virtual disk :
# lsparent -CH -l hdisk1

To display more details for virtual disks :
# lspath -H -F "status name parent path_id connection"

Virtual Ethernet - PowerVM


Commands for the VIO Servers :

To list all the adapters :
# lsdev -type adapter

To list all the virtual adapters :
# lsdev -virtual

To list the configuration of a Ethernet adapter (including its MAC Address) :
# lscfg -l ent3

To list all the slots (Physical  and Virtual) along with the devices :
# lsdev -slots

To create a SEA using the physical adapter (ent0), virtual adapter (ent2), PVID as 1 :
# mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1

To create a SEA using the physical adapter (ent0), virtual adapter (ent2), PVID as 1, control channel (ent4) :
# mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent4

To identify the speed and duplex on a physical adapter :
# lsdev -dev ent0 -att | grep media_speed

To set the speed and duplex on a physical adapter :
# chdev -dev ent0 -attr media_speed=100_Full_Duplex

To remove the current tcpip/ip configuration :
# rmtcpip -all

To configure the IP address on a network interface :
# mktcpip -hostname vios1 -inetaddr 192.168.2.1 -interface ent3 -netmask 255.255.255.0 -gateway 192.168.2.1

To list the IP table :
# lstcpip -num -state

To list the routing table :
# lstcpip -routtable

To list the Physical/Virtual/Shared Ethernet Adapter mapping :
# lsmap -all -net

To identify the port VLAN ID of a virtual adapter :
# entstat -all ent2 | grep "Port VLAN ID"

To identify the port VLAN ID of a virtual adapter :
# entstat -all ent2 | grep "Switch ID"

To identify the Control Channel of a SEA :
# entstat -all ent5 | grep "Control Channel"

To identify the priority of a SEA :
# entstat -all ent5 | grep "Priority"

Commands for AIX Partition :

To identify the VLAN ID :
# entstat -d ent0 | grep ID

To identify the MAC Address :
# entstat -d ent0 | grep Address

How to update Virtual I/O Server ?

Follow the below steps to update your VIO server :

1. Shutdown the VIO clients. This would not be required in case of dual VIO setup.

2. Apply the update using the below command (you have to use the proper syntax)

# updateios

3. Reboot the Virtual I/O server

# shutdown -restart

4. Once the server comes back online, login and check the OS level

# ioslevel

5. After few weeks, you may have to commit the applied filesets

# updateios -commit


Here are the various ways of updating a Virtual I/O server

To update Virtual I/O server from a local directory :
# updateios -dev /tmp/viopack -install -accept


To update Virtual I/O servers from remote filesystem :
# mount NFS-server:/share-name /mnt
# updateios -dev /mnt -install -accept


To update Virtual I/O server from an optical drive :
# updateios -dev /dev/cd0 -install -accept


To commit all the uncommited filesets and then to update Virtual I/O server from an optical drive :
# updateios -f -dev /dev/cd0 -install -accept


Now let us look at the various uses of updateios command.

To commit  all the applied filesets :
# udpateios -commit

To clean up after an interrupted installation :
# updateios -cleanup

To reject all the applied (uncommited) filesets :
# updateios -reject

To remove a fileststem from Virtual I/O server :
# updateios -remove fileset-name

How to backup VIOS in AIX

BACKUP OF VG STRUCTURE :

You can backup the structure of any volume group so that the configuration data will be stored under /tmp/vgdata. This will be automatically done if you run backupios (and even the configuration data will be automatically backed up).

Here are some commands.

To backup the structure of datavg :
# savevgstruct datavg

To display a list of saved volume groups
# restorevgstruct -ls

To restore the structure of datavg on 2 available disks :
# restorevgstruct -vg datavg hdisk2 hdisk3



BACKUP OF USER-DEFINED VIRTUAL DEVICES :

You can take a backup of all the user-defined virtual devices using the viobr command. But it requires minimum VIOS level 2.1.2.0.  Backup file includes logical devices like storage pools, SEA, virtual server SCSI/FC/Ethernet adapters, device attributes for disks, optical devices, tape devices, LHEA, ethernet devices/interfaces.

Here are some commands

To take a backup of user-defined virutal devices in an XML file :
# viosbr -backup -file filename

To view the backup information :
# viosbr -view -file filename

To restore the virtual device configuration :
# viosbr -restore -file filename

To validate the backup file :
# viosbr -restore -validate -file filename


BACKUP OF VO SERVER :

To perform backup on a tape media :
# backupios -tape /dev/rmt0

To perform backup on a DVD media :
# backupios -cd /dev/cd0 -udf

To perform backup on a DVD-RAM disk :
# backupios -cd /dev/cd0 -udf -accept

To take backup on a file (Creates a file called nim_resources.tar) :
# backupios -file /mnt

To perform mksysb backup :
# backupios -file /mnt/vioserver1.mksysb -mksysb

Networking in VIO Server

Networking in VIO Server



To configure initial TCPIP setup:
# mktcpip -hostname vios1 -inetaddr 192.168.10.55 -interface en0 -netmask 255.255.255.0 -gateway 192.168.10.1 -nsrvdomain mydomain.com -start

To list stored tcpip configuration:
# lstcpip -stored

To list ethernet adapters on the server:
# lstcpip -adapters

To show system hostname:
# lstcpip -hostname

To show dns servers:
# lstcpip -namesrv

To display routing table:
# lstcpip -routtable

To display routing table in numbers:
# lstcpip -num -routtable

To list all open inet sockets:
# lstcpip –sockets –family inet

To show the state of all configured network interfaces:
# lstcpip –state

To flush (remove) all tcpip settings:
# rmtcpip -all

To unconfigure a network interface:
# rmtcpip -interface en0

To clean up routing table:
# rmtcpip –f -routing

To remove DNS information:
# rmcpip –namesrv

To unconfigure tcpip information on en0 during next reboot:
# rmtcpip –f –interface en0 -nextboot

To add an entry to /etc/hosts:
# hostmap -addr 192.168.10.34 -host alpha

To list the contents of hosts file:
# hostmap -ls

To remove a specific entry on hosts files:
# hostmap -rm 192.168.10.34


To enable / start all network services:
# startnetsvc ALL

To disable / stop all network services:
# stopnetsvc ALL

To enable telnet on a VIO Server:
# startnetsvc telnet

To enable ftp on a VIO ServerL
# startnetsvc ftp

To enable ldap daemon:
# startnetsvc ldap

To enable xntpd:
# startnetsvc xntpd

To enable cimserver:
# startnetsvc cimserver

To send CLI tracing info to system log:
# startnetsvc tracelog

To send system error log to the system log:
# startnetsvc errorlog

To list the start of ftp daemon:
# lsnetsvc ftp

To add a domain name entry:
# cfgnamesrv -add -dname abc.aus.century.com

To add a name server entry:
# cfgnamesrv –add -ipaddr 192.9.201.1

To list all resolv.conf entries:
# cfgnamesrv  -ls

To display statistics on a network interface:
# entstat en0

To reset statistics on a network interface:
# entstat –reset ent0

To trace a route:
# traceroute nis.nsf.net

History of AIX

Versions : 

AIX 5L 5.3, August 2004
NFS Version 4 support
Advanced Accounting
Virtual SCSI
Virtual Ethernet
Simultaneous multithreading (SMT) support
Micro-Partitioning support
POWER5 support
JFS2 Quota support
JFS2 Filesystem shrink support


AIX 5L 5.2, October 2002
Minimum level required for POWER5 hardware
Support for MPIO Fibre Channel disks
iSCSI Initiator software
Dynamic LPAR support


AIX 5L 5.1, May 2001
Minimum level required for POWER4 hardware and the last release that supported Micro Channel architecture
Introduction of 64-bit kernel, installed but not activated by default
Introduction of JFS2
Static LPAR support
The L stands for Linux affinity
Trusted Computing Base (TCB)


AIX 4.3.3, September 1999
Added online backup function
Workload Management (WLM)


AIX 4.3.2, October 1998

AIX 4.3.1, April 1998

AIX 4.3, October 1997
Support for 64-bit architecture
Support for IPv6

AIX 4.2.1, April 1997
NFS Version 3 support


AIX 4.2, May 1996

AIX 4.1.5, August 1996

AIX 4.1.4, October 1995

AIX 4.1.3, July 1995
CDE 1.0 became the default GUI environment, replacing Motif X Window
Manager.

AIX 4.1.1, October 1994

AIX 4.1, August 1994

AIX v4, 1994

AIX v3.2 1992

AIX v3.1
Introduction of Journaled File System (JFS)

AIX v3, February 1990
Developer release licensed only to OSF; the LVM was incorporated into OSF/1.
SMIT was introduced.

AIX v2.0
last version was 2.2.1.

AIX v1, 1986
last version was 1.3