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.

Tuesday 19 November 2013

Restarting VIO Server Logical Partition

Before the admin shutdown VIO server LPAR, admin must remember the following points:
  1. If client LPAR uses storage and networking virtual resources provided by VIO server then admin must deactivate the LPAR and then shutdown the client LPAR.
  2. Each shared memory partition must be a shutdown because every partition accesses its paging space device using VIO server LPAR that the admin is planning to shutdown.
To restart VIO server from HMC:
  1. Expand system management -> servers
  2. Click managed systems on which LPAR is located
  3. Select LPAR
  4. Click Operations -> Restart
  5. Click OK
And now complete the following task:
  1. Activate client LPAR
  2. Activate each shared memory partition that accesses paging space device using VIO server LPAR that is restarted.
P.S: Please refer the redhat IBM pdfs for detailed understanding!
Happy Learning!

PowerVM

What is PowerVM ?

Licensed software/firmware feature which enables IBM virtualization technology on IBM POWER systems.
Available on Power5, Power6 and Power7 Systems
Allows AIX 5L V5.3 or later and Linux LPARs to run without physical adapters.

It is available in the following 3 editions
1. IBM PowerVM Express Edition 
2. IBM PowerVM Standard Edition
3. IBM PowerVM Enterprise Edition

Virtual I/O server is available as part of the PowerVM Editions (formarley known as Advanced POWER Virtualization) feature.

Virtual I/O Server facilitates:

1. Sharing of physical resources between LPARs on the system.
2. Creating LPARS without requiring additional physical resources like Network Adapter, HBA, SCSI Adapter.
3. Creating more LPARs than there are I/O slots or physical devices.
4. Maximizing use of phyiscal resources on the system

Integrated Virtual Ethernet

IVE :

It is the collection of hardware, software ad hypervisor feature that provides the hardware-based virtualization capabilities on POWER machines.
It is available on POWER6 and later machines.

What is Host Ethernet Adapter ?
It is the majoy hardware component of the IVE.
It is the Ethernet Adapter built on the Power chip that provides IVE feature on POWER machines.

There are 3 types of HEA's available
Type-1 is a 2-Port 1GB Adapter (FC 5636)  - Copper, 16 MAC addresses, one port group
Type-2 is a 2-Port 10GB Adapter (FC 5637) - Optical - 32 MAC addresses, two port groups
Type-3 is a 4-Port 1GB Adapter (FC 5639) - Copper, 32 MAC addresses, two port groups


What is an IVE port?
It is the physical port on the HEA which can be logically presented to LPARs.
Basically IVE ports are part of port groups.
A port group supports a maximum or 16 logical ports a.k.a Logical Host Ethernet Adapter (Which can be assigned to LPARs).
On a Copper based HEA, 2 physical ports belongs to a port group whereas on a Optical adapters its 1 port per port group.

-> Type-1 adapter can support 16 logical ports (ie., can be assigned to 16 lpars).

-> Type-2 adapter can support 16+16 ie., 32 logical ports.

->Type-3 adapter can support 16+16 ie., 32 logical ports.


  • While ordering a POWER machine, you need to choose the type of HVE Otherwise you will receive a Type-1 adapter which is the default. 
  • IVE feature is installed during manufacturing. 
  • IVE is not a hot-swappable or hot-pluggable feature. 
  • IVE must be serviced only by an IBM Service Engineer.
  • All the logical ports in a port group can talk to each other without external connectivity, which means all the LPARs on a port group are connected to each other via Layer2 switch on IVE.
  • You can assign the logical ports to LPARs only thru HMC.

MCS : 
  • Multiple Core Scaling (MCS) is a parameter that allows multiple receive and transmit queues (QP) to be supported in each LPAR.
  • It is defined at the port group level.
  • Default value is 4.
  • Depending on the MCS value, the maximum number of logical ports per port group varies.
  • MCS value can be set only thru HMC.





IVE Configuration :
An LPAR can use only one logical port per physical port.
While activating an LPAR containing IVE logical ports, the resource is required for activation.
Whereas during DLPAR operation, the IVE logical port is considered as a desired resource.
If you want to add additional VLANS to an existing configured port, you must remove and add the port again with required VLAN IDs.


What you see on LPAR ?
After assigning a logical port to a LPAR, you have to run cfgmgr to see the below devices
-> lhea0 - Logical Host Ethernet Adapter
-> ent0 - Logical Host Ethernet Port
-> en0 and et0 - Logical interfaces

What is Promiscuous mode ?
You can set a physical port (on a HVE thru HMC) to promiscous mode.
If set, that particular port will be reserved for an LPAR. So other LPARs can't see this port.
This is mostly used whilst using VIO on a POWER machine or while configuring a port for a partition running AIX V5.2.

You can refer the URL to get an idea on how to set promiscuous mode in HMC.

What are the OS requirements ?

# IBM AIX 5L™ Version 5.3
– Service Pack 5300-06-02.
– Packaging APAR for this package is IY99738.
– IVE fileset devices.chrp.IBM.lhea.rte must be at level 5.3.0.2 or later.

# IBM AIX 5L Version 5.2
– Service Pack 5200-10-02.
– Packaging APAR for this package is IZ00822.
– IVE fileset devices.chrp.IBM.lhea.rte must be at level 5.2.0.107 or later.

# Red Hat RHEL 4.5 or later
# SuSE SLES 10 SP1 or later

Here are some commands you may use at the LPAR level to find additional details.

To identify the logical port number :
# entstat -d ent0 | grep "Logical Port Number"

To identify the relation between lheax and entx devices :

#lsslot -c slot | grep -i hea
Slot     Description         Device(s)
HEA 1     Logical I/O Slot     lhea0 ent0 ent1

Here are some commands you may use at HMC shell prompt.

To list all the available adapters and their ports  on a managed system :
# lshwres -r hea --rsubtype phys --level sys -m machine_name

To view the port groups on a managed system :
# lshwres -r hea --rsubtype phys --level port_group -m machine_name

To view the physical ports on a managed system :
# lshwres -r hea --rsubtype phys --level port -m machine_name

To view all the logical ports on a managed system :
# lshwres -r hea --rsubtype logical --level sys -m machine_name

To list port configuration configured for an LPAR :
# lshwres -r hea --rsubtype logical --level port -m machine_name --filter lpar_names=lpar01

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

Power Saver Mode in POWER Systems

Power Saver Mode in POWER system can be used to reduce the power utilization of the physical machine by lowering the voltage and frequency by a fixed percentage(by aroudn 14-15%).


It is supported with 4GHz processor(and later) on Power6(and later) systems.

This is achieved by POWER processors using a low power mode known as Nap that stops processor execution when there is no work to do on the processor core.

You can enable or disable power save mode thru GUI or command line on the HMC.

Here are some commands.

1. To view the current Power Saver mode:
hscroot@hmc1:~> lspwrmgmt -m sys900 -r sys
name=sys900,type_model=8233-E8B,serial_num=0782C2R,curr_power_saver_mode=Enabled,desired_power_saver_mode=Enabled

2. To enable the Power Saver mode:
hscroot@hmc1:~>  chpwrmgmt -m sys900 -r sys -o enable

3. To disable the Power Saver mode:
hscroot@hmc1:~> chpwrmgmt -m sys900 -r sys -o disable

Open Firmware on POWER Systems


                                                                                                                                     
                                                                    
                                             
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

          1 = SMS Menu                          5 = Default Boot List
          8 = Open Firmware Prompt              6 = Stored Boot List


     Memory      Keyboard     Network     SCSI     Speaker  ok

Here you need to press 8 to get into ok prompt.

0 >   ok
0 >   ok

Below procedure will help you to list all the disks available thru the FC adapter.

0 > ioinfo

!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!
This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached
to the system

Select a tool from the following

 1. SCSIINFO
 2. IDEINFO
 3. SATAINFO
 4. SASINFO
 5. USBINFO
 6. FCINFO
 7. VSCSIINFO

q - quit/exit

==> 6



FCINFO Main Menu
Select a FC Node from the following list:
  #  Location Code                Pathname
---------------------------------------------------------------
  1. U8233.E8B.0681C1R-V30-C29-T1   /vdevice/vfc-client@3000001d
  2. U8233.E8B.0681C1R-V30-C30-T1   /vdevice/vfc-client@3000001e

  q - Quit/Exit

==> 1

FC Node Menu
FC Node String: /vdevice/vfc-client@3000001d
FC Node WorldWidePortName: c506000000000009
-----------------------------------------------------------------
1. List Attached FC Devices
2. Select a FC Device
3. Enable/Disable FC Adapter Debug flags

q - Quit/Exit

==> 1

1. 500507680120d43b,0                - 8192 MB Disk drive
2. 500507680120d442,0                - 8192 MB Disk drive
3. 500507680130b855,0                - Unrecognized device type: 3f
4. 500507680130b97c,0                - Unrecognized device type: 3f
5. 500507680120b97c,0                - Unrecognized device type: 3f
6. 500507680120b855,0                - Unrecognized device type: 3f
7. 500507680120581e,0                - Unrecognized device type: 3f
8. 500507680120598e,0                - Unrecognized device type: 3f
9. 500507680130581e,0                - Unrecognized device type: 3f
10. 500507680130598e,0                - Unrecognized device type: 3f
11. 500507680130d43b,0                - 8192 MB Disk drive
12. 500507680130d442,0                - 8192 MB Disk drive

Hit a key to continue...

FC Node Menu
FC Node String: /vdevice/vfc-client@3000001d
FC Node WorldWidePortName: c506000000000009
-----------------------------------------------------------------
1. List Attached FC Devices
2. Select a FC Device
3. Enable/Disable FC Adapter Debug flags

q - Quit/Exit

==> q

FCINFO Main Menu
Select a FC Node from the following list:
  #  Location Code                Pathname
---------------------------------------------------------------
  1. U8233.E8B.0681C1R-V30-C29-T1   /vdevice/vfc-client@3000001d
  2. U8233.E8B.0681C1R-V30-C30-T1   /vdevice/vfc-client@3000001e

  q - Quit/Exit

==> q

Below procedure will help you to list all the disks available thru the
VSCSI adapter.

!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!
This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached
to the system

Select a tool from the following

 1. SCSIINFO
 2. IDEINFO
 3. SATAINFO
 4. SASINFO
 5. USBINFO
 6. FCINFO
 7. VSCSIINFO

q - quit/exit

==> 7



VSCSIINFO Main Menu
Select a VSCSI Node from the following list:
  #  Location Code                Pathname
---------------------------------------------------------------
  1. U8233.E8B.0681C1R-V30-C10-T1 /vdevice/v-scsi@3000000a
  2. U8233.E8B.0681C1R-V30-C20-T1 /vdevice/v-scsi@30000014

  q - Quit/Exit

==> 1

VSCSI Node Menu
VSCSI Node String: /vdevice/v-scsi@3000000a
-----------------------------------------------------------------

1. List Attached VSCSI Devices
2. Select a VSCSI Device

3. Enable/Disable VSCSI Adapter Debug flags

q - Quit/Exit

==> 1

1. 8100000000000000 - 10240 MB Disk drive (bootable)

Hit a key to continue...

VSCSI Node Menu
VSCSI Node String: /vdevice/v-scsi@3000000a
-----------------------------------------------------------------

1. List Attached VSCSI Devices
2. Select a VSCSI Device

3. Enable/Disable VSCSI Adapter Debug flags

q - Quit/Exit

==> q

VSCSIINFO Main Menu
Select a VSCSI Node from the following list:
  #  Location Code                Pathname
---------------------------------------------------------------
  1. U8233.E8B.0681C1R-V30-C10-T1 /vdevice/v-scsi@3000000a
  2. U8233.E8B.0681C1R-V30-C20-T1 /vdevice/v-scsi@30000014

  q - Quit/Exit

==> q


!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!
This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached
to the system

Select a tool from the following

 1. SCSIINFO
 2. IDEINFO
 3. SATAINFO
 4. SASINFO
 5. USBINFO
 6. FCINFO
 7. VSCSIINFO

q - quit/exit

==> q
 ok
0 >

Below command will list all the variables and their current values.

0 > printenv
-------------- Partition: of-config -------- Signature: 0x50 ---------------
ibm,fw-dc-select         100                 0
ibm,fw-default-mac-address? false            false
ibm,fw-forced-boot
ibm,fw-n-bc              255.255.255.255     255.255.255.255
ibm,fw-n-dbfp            00000000            00000000
ibm,fw-n-dafp            00000000            00000000
ibm,fw-n-rc              A                   A
ibm,fw-n-ru              Y                   Y
ibm,fw-prev-neg-vec5     00000000: 0b 40 f7 80 00 80 00 00 00 00 00 00 40 .. .. ..  |.@..........@...|

ibm,fw-src-os-vec5       00000000: 0b 40 f7 80 80 80 20 00 00 00 00 00 40 .. .. ..  |.@.... .....@...|

-------------- Partition: common -------- Signature: 0x70 ---------------
little-endian?           false               false
real-mode?               true                true
auto-boot?               true                true
diag-switch?             false               false
fcode-debug?             true                true
oem-banner?              false               false
oem-logo?                false               false
use-nvramrc?             false               false
ibm,fw-tty-language      1                   1
ibm,fw-new-mem-def       true                true
ibm,fw-show-true-pcie?   true                false
ibm,fw-force-ior         false               false
ibm,fw-oflite-dbg        false               false
ibm,fw-prev-boot-vpd
ibm,fw-keyboard          1                   1
ibm,fw-override-cas      false               false
ibm,fw-nbr-reboots       0                   0
real-base                2000000             2000000
virt-base                ffffffff            ffffffff
real-size                1000000             1000000
virt-size                ffffffff            ffffffff
load-base                4000                4000
screen-#columns          64                  64
screen-#rows             28                  28
selftest-#megs           0                   0
boot-device              /vdevice/v-scsi@3000000a/disk@8100000000000000:2 /vdevice/v-scsi@30000014/disk@8100000000000000:2
boot-file
diag-device              /vdevice/v-scsi@3000000a/disk@8100000000000000:2 /vdevice/v-scsi@30000014/disk@8100000000000000:2
diag-file                diag                diag
output-device            /vdevice/vty@30000000 /vdevice/vty
input-device             /vdevice/vty@30000000 /vdevice/vty
oem-banner
oem-logo
nvramrc
boot-command             boot                boot
reboot-command
menu?                    false               false
ibm,fw-find-tape-alias   false               true
ibm,fw-find-cdrom-alias  false               true
ibm,dasd-spin-interval   5                   5
ibm,associativity-form   5                   1
ibm,fw-menu-3678cc855e02 auto,auto,10.6.139.43,10.6.139.35,10.6.139.254,255.255.255.0,Standard,No,none,5,512,5
bootinfo-aix             /vdevice/v-scsi@3000000a/disk@8100000000000000:1
 ok
0 >

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

Backup on Virtual I/O Server

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

IP Alias

You can set IP alias on any network interface (such as en0, en1,..) temporarily (using ifconfig command) or permanently (by adding entry in ODM) in AIX. Here are some commands which you may refer whilst working on this concept.


To temporarily add IP alias :
You can use the below command to set IP alias temporarily ie., the alias will be lost after a server reboot.
#ifconfig en0 alias 192.168.1.2 netmask 255.255.255.0 up

To permanently add IP Alias :
Below command will amend the ODM entry, so the alias will be available even after a server reboot.
# chdev -l en0 -a alias4=192.168.1.2,255.255.255.0

To remove a temporary IP alias :
This would remove the alias from the current  ip table, but it would not remove from the ODM. If you like to erase it from ODM, then use the "chdev" or "smitty".
# ifconfig en0 delete 192.168.1.2

To remove IP alias permanently :
This command will work only if IP alias was added in ODM using smitty or chdev command. If you have added using "ifconfig" command, then it is set temporarily, so this command would not work.
#chdev -l en0 -a delalias4=192.168.1.2,255.255.255.0

To display current IP table including IP alias :
# ifconfig -a

To display permanently added IP alias :
# lsattr -El en0

Virtual Optical Device, Virtual Optical Drive and Virtual Media Library

1. To create a virtual media repository:

# mkrep -sp rootvg -size 10G

Above command will create a filesystem called /var/vio/VMLibrary.

2. To create an iso from from AIX DVD:
# dd if=/dev/cd0 of=/cg/AIX61-1.iso bs=1m

You can copy the iso file to /var/vio/VMLibrary.

3. To list the contents of virtual media repository:
$ lsrep
Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free
   10198     5828 rootvg                   139776           110592

Name                                    File Size  Optical         Access
AIX61_1.iso                              3679  vtopt0          rw
AIX61_2.iso                               691  None            rw

4. To create a Virtual Optical device :
# mkvdev -fbo -vadapter vhost0

5. To create a virtual optical media from a downloaded ISO image:
# mkvopt -ro -name aix61 -file /home/padmin/aix61.iso

6. To remove a virtual optical media:
# rmvopt -name aix61

7. To list all the virtual optical devices:
# lsvopt

8. To load the virtual optical media on a virtual optical device:
# loadopt -vtd vtopt0 -disk linux

9. To load an ISO file on a virtual optical device:
# loadopt -vtd vtopt0 -disk AIX61_1.iso

10. To check if the ISO was loaded correctly:
# lsmap -vadapter vhost0

11. To unload the virtual media from virtual optical device:
# unloadopt -vtd vtopt0

12. To force remove the virtual media:
# unloadopt -vtd vtopt0 -release

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

Recovering a Failed VIO Disk


Here is a recovery procedure for replacing a failed client disk on a Virtual IO 
server. It assumes the client partitions have mirrored (virtual) disks. The 
recovery involves both the VIO server and its client partitions. However, 
it is non disruptive for the client partitions (no downtime), and may be 
non disruptive on the VIO server (depending on disk configuration). This
procedure does not apply to Raid5 or SAN disk failures.

The test system had two VIO servers and an AIX client. The AIX client had two 
virtual disks (one disk from each VIO server). The two virtual disks 
were mirrored in the client using AIX's mirrorvg. (The procedure would be 
the same on a single VIO server with two disks.) 

The software levels were:


p520: Firmware SF230_145 VIO Version 1.2.0 Client: AIX 5.3 ML3 


We had simulated the disk failure by removing the client LV on one VIO server. The 
padmin commands to simulate the failure were:


#rmdev -dev vtscsi01 # The virtual scsi device for the LV (lsmap -all)
#rmlv -f aix_client_lv # Remove the client LV


This caused "hdisk1" on the AIX client to go "missing" ("lsvg -p rootvg"....The
"lspv" will not show disk failure...only the disk status at the last boot..)

The recovery steps included:

VIO Server 


Fix the disk failure, and restore the VIOS operating system (if necessary)mklv -lv aix_client_lv rootvg 10G # recreate the client LV mkvdev -vdev aix_client_lv -vadapter vhost1 # connect the client LV to the appropriate vhost 


AIX Client 


# cfgmgr # discover the new virtual hdisk2 
replacepv hdisk1 hdisk2 
# rebuild the mirror copy on hdisk2 
# bosboot -ad /dev/hdisk2 ( add boot image to hdisk2)
# bootlist -m normal hdisk0 hdisk2 ( add the new disk to the bootlist)

# rmdev -dl hdisk1 ( remove failed hdisk1)


The "replacepv" command assigns hdisk2 to the volume group, rebuilds the mirror, and 
then removes hdisk1 from the volume group. 

As always, be sure to test this procedure before using in production.
Virtual SCSI Server Adapter and Virtual Target Device.
The mkvdev command will error out if the same name for both is used.

$ mkvdev -vdev hdiskpower0 -vadapter vhost0 -dev hdiskpower0
Method error (/usr/lib/methods/define -g -d):
0514-013 Logical name is required.

The reserve attribute is named differently for an EMC device than the attribute
for ESS or FasTt storage device. It is “reserve_lock”.

Run the following command as padmin for checking the value of the attribute.
lsdev -dev hdiskpower# -attr reserve_lock

Run the following command as padmin for changing the value of the attribute.
chdev -dev hdiskpower# -attr reserve_lock=no

Commands to change the Fibre Channel Adapter attributes And also change the following attributes of the fscsi#, fc_err_recov to “fast_fail” and dyntrk to “yes”
 

$ chdev -dev fscsi# -attr fc_err_recov=fast_fail dyntrk=yes –perm

The reason for changing the fc_err_recov to “fast_fail” is that if the Fibre
Channel adapter driver detects a link event such as a lost link between a storage
device and a switch, then any new I/O or future retries of the failed I/Os will be
failed immediately by the adapter until the adapter driver detects that the device
has rejoined the fabric. The default setting for this attribute is 'delayed_fail’.
Setting the dyntrk attribute to “yes” makes AIX tolerate cabling changes in the
SAN.

The VIOS needs to be rebooted for fscsi# attributes to take effect.

Creating LPAR from command line from HMC

Create new LPAR using command line


mksyscfg -r lpar -m MACHINE -i name=LPARNAME, profile_name=normal, lpar_env=aixlinux, shared_proc_pool_util_auth=1,min_mem=512, desired_mem=2048, max_mem=4096, proc_mode=shared, min_proc_units=0.2, desired_proc_units=0.5,max_proc_units=2.0, min_procs=1, desired_procs=2, max_procs=2, sharing_mode=uncap, uncap_weight=128,boot_mode=norm, conn_monitoring=1, shared_proc_pool_util_auth=1


Note :- Use man mksyscfg command for all flag information.

Onother method of creating LPAR through configuration file we need to create more than one lPAR at same time

Here is an example for 2 LPARs, each definition starting at new line:

name=LPAR1,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/11/1,7/client/9/vio2a/11/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1
name=LPAR2,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/12/1,7/client/9/vio2a/12/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1

Copy this file to HMC and run:

mksyscfg -r lpar -m SERVERNAME -f /tmp/profiles.txt

where profiles.txt contains all LPAR informations as mentioned above.

To change setting of your Lpar use chsyscfg command as mentioned below.

Virtual scsi creation & Mapping Slots
#chsyscfg -m Server-9117-MMA-SNXXXXX -r prof -i 'name=server_name,lpar_id=xx,"virtual_scsi_adapters=301/client/4/vio01_server/301/0,303/client/4/vio02/303/0,305/client/4/vio01_server/305/0,307/client/4/vio02_server/307/0"'

IN Above mentioned command we are creating Virtual scsi adapter for client LPAR & doing Slot mapping with VIO servers. In above scenario there is two VIO servers for redundancy.


Slot Mapping

Vio01_server ( VSCSI server slot) Client ( Vscsi client Slot)
Slot 301 Slot 301
Slot 303 Slot 303

VIO02_server (VSCSI sever Slot) Client ( VSCSI client Slot)
Slot 305 Slot 305
Slot 307 Slot 307


These Slot are mapped in such a way if Any disk or logical volume are mapped to Virtuals scsi adapter through VIO command "mkvdev".

Syntax for Virtual scsi adapter


virtual-slot-number/client-or-server/supports-HMC/remote-lpar-ID/remote-lpar-name/remote-slot-number/is-required


As in command above mentioned command mksyscfg"virtual_scsi_adapters=301/client/4/vio01_server/301/0"

means

301 - virtual-slot-number
client-or-server - client (Aix_client)
4 -- Partiotion Id ov VIO_01 server (remote-lpar-ID)
vio01_server - remote-lpar-name
301 -- remote-slot-number (VIO server_slot means virtual server scsi slot)
1 -- Required slot in LPAR ( It cannot be removed from DLPAR operations )
0 --means desired ( it can be removed by DLPAR operations)


To add Virtual ethernet adapter & slot mapping for above created profile

#chsyscfg -m Server-9117-MMA-SNxxxxx -r prof -i 'name=server_name,lpar_id=xx,"virtual_eth_adapters=596/1/596//0/1,506/1/506//0/1,"'

Syntax for Virtual ethernet adapter


slot_number/is_ieee/port_vlan_id/"additional_vlan_id,additional_vlan_id"/is_trunk(number=priority)/is_required

means

So the adapter with this setting 596/1/596//0/1 would say it is in slot_number 596, Its is ieee, the port_vlan_id is 1, it has no VLAN id assigned, It is not a trunk adapter and it is required.

AIX ISSUES



1.       Hi Friends, 
we have a HACMP cluster setup with 3 node cluster. 2 servers are active and 1 is standby. Now in one of the node we have a RG and 2 VGs with 1 service IP. now i want to rename the application server name and i want to change the service ip. could anyone tell me the procedure how to change the service IP in RG. 
 : Make sure the new ip address is in /etc/hosts. 
Then for service ip: 
smit hacmp 
Extended Configuration 
Extended Resource Configuration 
HACMP Extended Resources Configuration 
Configure HACMP Service IP Labels/Addresses 
Change/ Show a Service IP Label/Address 

For application server: 
smit hacmp 
Extended Configuration 
Extended Resource Configuration 
HACMP Extended Resources Configuration 
Configure HACMP Applications Servers 
Configure HACMP Application Servers 
Change/Show an Application Server
2.       do we need downtime to make these changes? will this change impact to other active node? 
 ANS: It is always recommended after done any configuration changes in cluster 
level, to perform the failover test, to confirm that the changes made are 
working fine. so take minimal down time to change the configuration and 
failover test. 

Resetting Network in VIOS (Virtual I/O Server)





Technote

 To view the current network configuration, issue the following commands:
lsdev | grep ^e
lsmap -all -net
lstcpip -num

Sample configuration (adapter number may change) follows:

1.       Virtual adapters are assigned to a virtual network: ent 2, 3, 4, 5....

2.       VIOS Bridges a vlan using Shared Ethernet adapter: ent6. This has the external VIOS IP address.

3.       LHEA (Logical Host Ethernet Adapter): Only the first LHEA is configurable. It is the backing device for the SEA (Shared Ethernet Adapter). ent0 physical HEA (Host Ethernet Adapter) port.

 Problem 

The VIOS interface is on the LHEA instead of the SEA. The LPARs can no longer be reached from the network. IVM (Integrated Virtualization Manager) no longer shows the SEA in View/Modify network settings. Instead, it shows the LHEA, and the IP is assigned to an interface on the LHEA. In addition, any attempt to remove or alter the virtual Ethernet seems to fail, complaining about the SEA(s) that is not configured: "you may not bridge one physical adapter (ent0) to multiple virtual Ethernets."

Example of invalid configuration
Example of invalid configuration
lstcpip -num
Name Mtu Network    Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2     0.1a.64.44.1e.8 38991 0 1479 0 0
en0 1500 9.5.30     9.5.30.82 38991 0 1479 0 0
 <<<<<<<<<<<

lsmap -all -net :

SVEA Physloc
------ --------------------------------------------
ent4 U7998.61X.100113A-V1-C3-T1

SEA ent8
Backing device ent0
Status Available <<<< Status will show available
Physloc U78A5.001.WIH01E0-P1-T6

SVEA Physloc
------ --------------------------------------------
ent5 U7998.61X.100113A-V1-C4-T1

SEA NO SHARED ETHERNET ADAPTER FOUND

SVEA Physloc
------ --------------------------------------------
ent6 U7998.61X.100113A-V1-C5-T1

SEA NO SHARED ETHERNET ADAPTER FOUND

SVEA Physloc
------ --------------------------------------------
ent7 U7998.61X.100113A-V1-C6-T1

SEA NO SHARED ETHERNET ADAPTER FOUND

Example of a valid configuration
Example of a valid configuration

lstcpip -num 
Name Mtu Network     Address         ZoneID  Ipkts   Ierrs Opkts Oerrs Coll
en8 1500 link#2            0.1a.64.44.1e.8            47829588      457285     0    0
en8 1500 9.5.30            9.5.30.82            47829588      457285        <<< <<<<<<<<<
lo0 16896 link#1                           327632        331070        0
lo0 16896 127        127.0.0.1            327632        331070         0
lo0 16896 ::1 0                                 327632        331070        

lsmap -all -net SVEA Physloc
------ --------------------------------------------
ent4 U7998.61X.100113A-V1-C3-T1

SEA ent8
Backing device ent0
Status Available
Physloc U78A5.001.WIH01E0-P1-T6

SVEA Physloc
------ --------------------------------------------
ent5 U7998.61X.100113A-V1-C4-T1

SEA ent9
Backing device ent1
Status Available
Physloc U78A5.001.WIH01E0-P1-T7

SVEA Physloc
------ --------------------------------------------
ent6 U7998.61X.100113A-V1-C5-T1

SEA NO SHARED ETHERNET ADAPTER FOUND

SVEA Physloc
------ --------------------------------------------
ent7 U7998.61X.100113A-V1-C6-T1

SEA NO SHARED ETHERNET ADAPTER FOUND


Resolution 

The IP should belong to the SEA. Once you create an SEA, you must put any TCP configuration on the SEA interface, not the physical interface. The following procedure can be used if the SEA adapter already exists:

Where X is the physical Interface, and Y is the SEA interface:
$ chdev -dev enX -attr state=detach
$ rmdev -dev enY
$ shutdown -restart (cfgdev might have re-created enY without a reboot)
$ chdev -dev enY -attr state=up -restoreroute
$ mktcpip -hostname intvios1 -inetaddr 9.5.30.50 -interface enY -gateway 9.5.30.1 -nsrvaddr 9.10.244.200 -nsrvdomain rchland.ibm.com -netmask 255.255.255.0 -start

To completely reset the network configuration, do the following:

 

1-      Open VIOS command line interface:
There are several ways to do this. You can either open a console session from HMC. Telnet to VIOS partition. Use PuTTY to connect to the VIOS partition. If you are using IVM to a blade, PuTTY or telnet to the blade center chassis and then open a console to the blade in question.

Reason: You can remove all of your networking when performing the steps in this document. If you remove the interface you are using to access VIOS, your session will hang. If you PuTTY or telnet to the bladecenter, and then use `env -T blade[X], you are accessing the blade using Serial-Over-LAN, and deleting interfaces should not impact your session communication.

2-  Delete all existing network devices and from the VIOS command line interface:
lsdev | grep -i "Shared Ethernet"
rmtcpip -all
rmdev -dev enX (where X is the number of the Shared Ethernet adapter(s)
rmdev -dev etX 
rmdev -dev entX

3-  Re-create the LHEA and virtual adapters by either:
cfgdev 
OR

Reboot VIOS:
shutdown -restart

lsdev | grep ^e (View newly created LHEAs)
 
4-  Re-create your SEA:
$ mkvdev -sea ent0 -vadapter ent2,ent3,ent4,ent5 -default ent2 -defaultid 1

(where ent0 is the Logical Host Ethernet Port and ent2 to ent5 are the Virtual I/O Ethernet Adapters)

Note: For non-blade environment, we need to ensure the HEA is in promiscuous mode with the vios lpar being the promiscuous lpar. See Step 5 in Rochester Support Center knowledgebase document 475229366, Configuring the Host Ethernet Adapter for Use by the System i

 
5-  Re-create your network interface with 'mktcpip' (or use configassist to get smitty screens):
mktcpip -hostname intvios1 -inetaddr 9.5.30.50 -interface en6 -gateway 9.5.30.1 -nsrvaddr 9.10.244.200 -nsrvdomain rchland.ibm.com -netmask 255.255.255.0 -start 
where ent6 is the SEA, en6 is the corresponding device for ent6 which is the device description.