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.

Thursday, 24 October 2013

How to become master in HACMP ?

When I asked this question to the most senior guy in my organization, he simply said it’s not something which not written somewhere we have everything given we don’t use it and just try to find out the shortcut to become a master.
Mastery will never come using shortcuts.
You may get an offer or pass an interview but you would not be able to get the satisfaction of doing it truly.
If you want to become a master of any technology just read all given publication by them so here I would suggest you to go through below all guides to become HACMP guy and after that you will never come to me asking for something for HACMP (in this case).
And he gave all below references

HACMP for AIX: Administration Guide, SC23-4862
HACMP for AIX: Concepts and Facilities Guide, SC23-4864
HACMP for AIX: Installation Guide, SC23-5209
HACMP for AIX: Master Glossary, SC23-4867
HACMP for AIX: Planning Guide, SC23-4861
HACMP for AIX: Programming Client Applications, SC23-4865
HACMP for AIX: Troubleshooting Guide, SC23-5177
HACMP on Linux: Installation and Administration Guide, SC23-5211
HACMP for AIX: Smart Assist Developer's Guide, SC23-5210

It’s guilt in my heart that I am not at all using the power I have. Do you think so?
Just start doing what you understand now, I too started it! 

Wednesday, 23 October 2013

HACMP/PowerHA


PowerHA/SystemMirror

PowerHA implementation steps

PowerHA Limits 



ComponentMaximum number/other limits
Nodes32
Resource groups64
Networks48
Network interfaces, devices, and labels256
Cluster resourcesWhile 128 is the maximum that clinfo can handle, there can be more in the cluster
Parent-Child dependenciesMax of 3 levels
Site2
Interfaces7 interfaces per node per network
Application monitors per site128
Persistent IP aliasOne per node per network
XD_data networks4 per cluster
GLVM ModesSynchronous, Asynchronous, non concurrent
GLVM DevicesAll PVs supported by AIX, no need to be same local and remote

 Log Files



FileDescription
/var/hacmp/adm/cluster.logGenerated by cluster scripts and daemons
/var/hacmp/log/hacmp.outGenerated by event scripts and utilities
/var/hacmp/adm/history/cluster.mmddyyyyCluster history files generated daily
/var/hacmp/clcomd/clcomd.logGenerated by clcomd daemon
/var/hacmp/clcomd/clcomddiag.logGenerated by clcomd daemon, debug information
/var/hacmp/clverify/clverify.logGenerated by Cluster Verification utility
/var/hacmp/log/autoverify.logGenerated by Auto Verify and Synchronize
/var/hacmp/log/clavan.logGenerated by Application Availability Analysis tool
/var/hacmp/log/clinfo.logGenerated by client node running clinfo
/var/hacmp/log/cl_testtool.logGenerated by the Cluster Test Tool
/var/hacmp/log/clconfigassist.logGenerated by Two-Node Cluster Configuration Assistant
/var/hacmp/log/clstrmgr.debugGenerated by the clstrmgr daemon
/var/hacmp/log/clstrmgr.debug.longDetail information from the clstrmgr daemon
/var/hacmp/log/clutils.logGenerated by cluster utilities and file propagation
/var/hacmp/log/cspoc.logGenerated by CSPOC commands
/var/hacmp/log/cspoc.log.remoteDetail information from CSPOC commands
/var/hacmp/log/migration.logGenerated by cluster migration
/var/hacmp/log/sa.logGenerated by Application Discovery
"odmget HACMPlogs"Displays a complete list of HACMP Log Files
/var/ha/log/topsvcs.defaultTopology Services starup configuration log.
/var/ha/log/topsvcs.dd.hhmmss.langTopology Services start/stop log
/var/ha/log/topsvcs.dd.hhmmssTopology Services activity log
/var/ha/log/nim.topsvcs.IF.clusternameNIM hearthbeat activity log for each interface.
/var/ha/log/nmDiag.topsvcs.IF.clusterNIM diagnostic log for each interface.
/var/ha/log/grpsvcs.default.nodenum_instnumGroup Services startup log
/var/ha/log/grpsvcs_nodenum_instnumGroup Services activity log.
  
Useful HACMP Commands
 
CommandPurpose
clstatDisplays topology and resource groups status.
clinfoES and snmpd must be running.
cldumpDisplays topology & resource group status and configuration.
snmpd must be running.
cldispLike cldump, but application oriented.
snmpd must be running.
cltopinfo (cllsif)Displays topology configuration.
clRGinfo (clfindres)Displays resource group status.
clsshowresDisplays resource groups configuration.
clshowsrvCalls lsrsc to display status of:
HACMP subsystems (clshowrsrv -a)
HACMP and RSCT subsystems (clshowsrv -v)
clcycleRotates selected log files.
clgetactivenodesDisplays active nodes.
Must specify which nodo to ask (-n node)
clsnapSave HACMP log files and configuration information.
cl_ls_shared_vgsList shared vgs.
cl_lsfsList shared fs.
cllsgrpList the resource groups.
cllsresShow short resource group information.
clRGmoveBrings a RG Offline/Online or move it
lssrc -ls clstrmgrESDisplays Cluster Services


Notes:

Installation changes 
The following AIX configuration changes are made: 

1. Files modified:
/etc/hosts
/etc/inittab
/etc/rc.net
/etc/services
/etc/snmpd.conf
/etc/snmpd.peers
/etc/syslog.conf
/etc/trcfmt
/var/spool/cron/crontab/root  

2. The hacmp group is added.  

3. Also, using cluster configuration and verification, the file /etc/hosts can be changed by adding or modifying entries. 

4. The following network options are set to “1” by RSCT topsvcs startup:
- nonlocsrcroute
- ipsrcrouterecv
- ipsrcroutesend
- ipsrcrouteforward

- ip6forwarding

5. The verification utility ensures that the value of each network option is consistent across all cluster nodes for the following settings:
- tcp_pmtu_discover
- udp_pmtu_discover
- ipignoreredirects
- routerevalidate


The cluster communications daemon
With the introduction of clcomdES, there is no need for an /.rhosts file to be configured. The cluster communications daemon is started by inittab, with the entry being created by the installation of PowerHA. The daemon is controlled by the system resource controller, so startsrc, stopsrc and refresh work. In particular, refresh is used to re-read /usr/es/sbin/cluster/etc/rhosts and moving the log files. The cluster communication daemon uses port 6191.


Resource group components:
Service IP Label
Volume Group
Filesystem
Application Server
NFS mounts
NFS exports



Resource group Startup options:
Online on home node only.
Online on first available node.
Online on all available nodes.
Online using distribution policy.


Resource group Fallover options:
Fall over to next priority node in list:
Fallover using dynamic node priority:
Bring offline (on error only)

Resource group Fallback options:
Fall back to higher priority node in list
Never fall back

Resource group attributes
Settling time
Delayed fallback timers
Distribution policy
Dynamic node priorities
Resource group processing order
Priority override location
Resource group dependencies - parent / child
Resource group dependencies - location


Resource Groups operations 
Bring a resource group offline
Bring a resource group online
Move a resource group to another node/site
Suspend/resume application monitoring


Sources of HACMP information
HACMP manuals come with the product –READ THEM!
Sales Manual: www.ibm.com/common/ssi
/usr/es/sbin/cluster/release_notes
IBM courses:
– HACMP Administration I: Planning and Implementation (AU54/Q1554)
– HACMP Administration II: Administration and Problem Determination (AU61/Q1561)
– HACMP V5 Internals (AU60/Q1560)
IBM Web Site:
– http://www-03.ibm.com/systems/p/ha/
Non-IBM sources (not endorsed by IBM but probably worth a look):
– http://www.matilda.com/hacmp/
– http://groups.yahoo.com/group/hacmp/

hardware Management Console (HMC)


.: AIX Hardware Installation Using HMC CLI :.


1. Log in to the HMC
> ssh hscroot@hmc

2. Identify the Managed System were you need to work:
> lssyscfg -r sys -F name

3. Verify the Managed System status:
> lssyscfg -m "managed-system" -r sys -F name:state

4. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

5. List processors, memory and IO on HMC managed system (system/lpar)
> MEM: lshwres -r mem -m "managed-system" --level sys ; lshwres -r mem -m "managed-system" --level lpar
> PROC: lshwres -r proc -m "managed-system" --level sys ; lshwres -r proc -m "managed-system" --level lpar
> IO: lshwres -r io --rsubtype slot -m "managed-system" -F "description,lpar_name" ; lshwres -r io -m "managed-system" --level lpar

6. Take a profile backup
> mksyscfg -r prof -m "managed-system" -o save -p "lpar" -n newProfile
Then you can see new profile from GUI or command line.
> lssyscfg -r prof -m "managed-system" --filter lpar_names="lpar"

7. Shutdown an LPAR using the operating system:
> chsysstate -m  "managed-system" -r "lpar" -n "partition-name" -o shutdown

8. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

9. Power off a managed system (all the LPARs need to be down):
> chsysstate -m "managed-system" -r sys -o off

10. Verify the Managed System status:
> lssyscfg -m "managed-system" -r sys -F name:state

11. Install Hardware: 

12. Power on a managed system:
> chsysstate -m managed-system -r sys -o on

13. List processors, memory and IO on HMC managed system (system/lpar) to validate.
> MEM: lshwres -r mem -m "managed-system" --level sys ; lshwres -r mem -m "managed-system" --level lpar
> PROC: lshwres -r proc -m "managed-system" --level sys ; lshwres -r proc -m "managed-system" --level lpar
> IO: lshwres -r io --rsubtype slot -m "managed-system" -F "description,lpar_name" ; lshwres -r io -m "managed-system" --level lpar

14. Assign the resources to the profile
> MEM: chsyscfg -r prof -m  "managed-system" -i "name=$profile1,lpar_name=$partition3,min_mem=X,desired_mem=X,max_mem=X"
> PROC: chsyscfg -r prof -m  "managed-system" -i "name=$profile1,lpar_name=$partition3,min_procs-=X,desired_procs-=X,max_procs-=X"
> IO: chhwres -r io -m o a -p -l (DLPAR)

15. Activate an LPAR:
chsysstate -m  "managed-system" -r "lpar" -n "partition-name" -o on

16. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

17. Exit

Performance Management




Performance Analysis Tools

CPUMemoryI/ONetwork
vmstat, iostatvmstatiostatlsattr
pslspsvmstatnetstat, entstat
sarsvmonlspsnfsstat
trace, trcrpt, trussfilemonlsattrnetpmon
tprof, gprof, proftrace, trcrpt, trusslspv, lslv, lsvgifconfig
time, timextopas, nmonfilemoniptrace, ipreport
netpmon, curt, splatlparstatlvmstattcpdump
locktracefileplacetrace, trcrpt, truss
emstat, alstattrace, trcrpt, trussnfs4cl
topas, nmontopas, nmontopas, nmon
lparstat, mpstat, smtctllsdev

Performance Tunning Tools

CPUMemoryI/ONetwork
nice, renicevmovmono
schedoiooioo, lvm0nfso
bindprocess, bindintcpuchps, mkpschlvifconfig
chdevchdevchdevchdev
wlmwlmmigratepv
wparwparreorvg



Tuesday, 22 October 2013

How to use the HMC Commandline

How to use the HMC Commandline

This documents contains the most important HMC commands. It covers both, the old power4 commands (up to HMC Version 3) and the new power5 style commands (HMC Version 4-6). A lot of nice commands still available for version 3 (power4) are removed from newer releases. One example of these nice commands is lslparsand it's not available for HMC version 4 and higher. The real reason behind it is that IBM wants to force us to use the web based tools wsm and WebSM or the new HMC browser GUI. This documents helps you to survive with the HMC commands in case working with the web based tools is not feasible.
In the examples below we call a whole power4 or power5 frame (aka Managed System) pserver. We call an LPAR mylpar. If an example output shows more than one LPAR name we enumerate it. LPAR Profiles are shown as myprofile. You have to replace these names with your object names.
If you use power6 systems, you need the new HMC version7. Although the GUI has changed from wsm to a browser based service, the commandline remains compatible. You can just use the power5 examples for power6 and power7. However, additional features have been implemented.

Contents

HMC Management

  1. HMC Version
  2. Network configuration of the HMC
  3. Reboot the HMC
  4. How to change the HMC password (of user hscroot)
  5. Show Available Filesystem Space

LPAR Management: Status Information

  1. LPAR Status
  2. Show Status and LED/LCD Display of an LPAR
  3. Show Status and LED/LCD Display of a Systems Running in FullPartitionMode
  4. Overview LPAR IDs
  5. Overview Connection State
  6. Show a List of all I/O Adapters
  7. Overview DLPAR status

LPAR Management: Operations

  1. Soft Reset of an LPAR
  2. Soft Reset of a Systems Running in FullPartitionMode
  3. Hard Reset of an LPAR
  4. Hard Reset of a Systems Running in FullPartitionMode
  5. Virtual Console
  6. Activation of an LPAR
  7. How to boot an LPAR into SMS Menu
  8. How to Power on a System Running in FullPartitionMode
  9. Bring the key switch to position NORMAL

LPAR Configuation

  1. Change an LPAR's Name
  2. Rename a Managed System
  3. DLPAR: Increase the Number of Processing Units of an LPAR

Operations in an virtualized environment

  1. Make virtual WWPNs visible to the SAN
  2. Show all virtual WWPNs assigned to an LPAR
  3. Logout virtual WWPNs from the SAN

HMC Management

1. HMC Version

hscroot@hmc> lshmc -V
 Version: 3
 Release: 3.2
HMC Build level 20040827.1
power4 HMCs could never show a version higher 3.x - HMC version 4.x and higher are only for power5 systems. Power6 systems need HMCs version 7.x.

2. Network configuration of the HMC

hscroot@hmc> lshmc -n

3. Reboot the HMC

power4 + power5/6/7:
hscroot@hmc> hmcshutdown -t now -r

4. How to change the HMC password (of user hscroot)

power4 + power5/6/7:
hscroot@hmc> chhmcusr -u hscroot -t passwd
Enter the new password:
Retype the new password:

5. Show Available Filesystem Space

power5/6/7:
hscroot@hmc> monhmc -r disk -n 0
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             16121184   4958484  10343788  33% /
udev                    517300       156    517144   1% /dev
/dev/sda3              6040320   1341736   4391744  24% /var
/dev/sda7              8056524    154132   7493140   3% /dump
/dev/sda8             38669964    203056  36502564   1% /extra
It's just the same as you would expect from the UNIX command df.

LPAR Management: Status Information

1. LPAR Status

That's how you get an overview of all systems controlled by your HMC:
power4:
hscroot@hmc> lslpars
power5/6/7:
hscroot@hmc> lssyscfg -r sys -F name:serial_num:state
pserver1:656D24A:Operating
pserver2:656FFFF:Operating
The format string 'lpar_id:name:serial_num:state' also tells you the serial number of the systems. You can omit the field 'serial_num' if you don't need to know.
However, for every system from the list above you get the LPAR overview as shown below:
hscroot@hmc> lssyscfg -m pserver -r lpar -F name:state
Example:
hscroot@hmc> lssyscfg -m pserver1 -r lpar -F name:state
mylpar1:Running
mylpar2:Running
mylpar3:Not Activated
Don't know where to start? Find the managed system to an LPAR with a query:
hscroot@hmc> for m in $(lssyscfg -r sys -F name); do echo $m ; lssyscfg -r lpar -m $m -F name:state ; done

2. Show Status and LED/LCD Display of an LPAR

power4:
hscroot@hmc> lssyscfg -r lpar -m pserver -n mylpar
power5/6/7:
 
hscroot@hmc> lsrefcode -m pserver -r lpar --filter "lpar_names=mylpar" -F lpar_name:refcode
You can even see the history of LED codes. Just use -n  for the last NUM codes. For example, if you want to see the last 5 LED codes of an LPAR type
hscroot@hmc> lsrefcode -m pserver -r lpar --filter "lpar_names=mylpar"  -n 5 -F lpar_name:refcode
mylpar:
mylpar:0c33
mylpar:
mylpar:0539
mylpar:0538
... and for the status LEDs:
hscroot@hmc> lsled -m pserver -r sa -t virtuallpar --filter ""lpar_names=mylpar""

3. Show Status and LED/LCD Display of a Systems Running in FullPartitionMode

power4:
hscroot@hmc> lssyscfg -r sys -n pserver

4. Overview LPAR IDs

power5/6/7:
hscroot@hmc> lssyscfg -r lpar -m pserver -F lpar_id:name:serial_num:state | sort -n
1:vioserver1:Running
2:vioserver2:Running
3:mylpar1:Not Activated
4:mylpar2:Running
5:mylpar3:Running
6:mylpar4:Running
7:mylpar5:Running
8:mylpar6:Running
9:mylpar7:Running
10:mylpar8:Not Activated

5. Overview Connection State

Are all service processors connected to my HMC?
power5/6/7:
hscroot@hmc> lssysconn -r all -F type_model_serial_num:ipaddr:state | sort
9117-570*65AE18C:172.16.255.253:Connected
9117-570*65AE18C:172.16.254.255:Connected
9117-570*65AE2AC:172.16.255.254:Connected
9117-570*65AE2AC:172.16.254.254:Connected
9117-570*650D70D:172.16.255.252:Connected
9117-570*650D70D:172.16.253.255:Connected
9117-570*650D71D:172.16.254.253:Connected
9117-570*650D71D:172.16.255.251:Connected
9131-52A*065F7BB:172.16.253.254:Connected
9131-52A*065F8BA:172.16.254.252:Connected
The link to the name of the managed system is the serial number - not the IP address! The IP addresses listed above are mounted on the service processor's private NIC and managed by the integrated DHCP server of the HMC.

6. Show a List of All I/O Adapters

The command below will show a list of all adapters physically plugged into a Managed System:
power5/6/7:
hscroot@hmc> lshwres -r io -m pserver --rsubtype slot --filter -F lpar_name:drc_name:description
null:U78C0.001.DBJC357-P2-C8-T5:Universal Serial Bus UHC Spec
mylpar1:U78C0.001.DBJC357-P2-C1:Fibre Channel Serial Bus
null:U78C0.001.DBJC357-P2-C2:Fibre Channel Serial Bus
vios2:U78C0.001.DBJC357-P2-T3:RAID Controller
vios2:U78C0.001.DBJC357-P2-C8-T7:Generic XT-Compatable Serial Controller
vios2:U78C0.001.DBJC357-P2-C5:Fibre Channel Serial Bus
vios2:U78C0.001.DBJC357-P2-C6:Ethernet controller
vios2:U78C0.001.DBJC357-P2-C9-T2:PCI-E SAS Controller
vios2:U78C0.001.DBJC357-P2-C9-T1:PCI-E SAS Controller
null:U78C0.001.DBJC373-P2-C8-T5:Universal Serial Bus UHC Spec
mylpar1:U78C0.001.DBJC373-P2-C1:Fibre Channel Serial Bus
null:U78C0.001.DBJC373-P2-C2:Fibre Channel Serial Bus
vios1:U78C0.001.DBJC373-P2-T3:RAID Controller
vios1:U78C0.001.DBJC373-P2-C8-T7:Generic XT-Compatable Serial Controller
vios1:U78C0.001.DBJC373-P2-C5:Fibre Channel Serial Bus
vios1:U78C0.001.DBJC373-P2-C6:Ethernet controller
vios1:U78C0.001.DBJC373-P2-C9-T2:PCI-E SAS Controller
vios1:U78C0.001.DBJC373-P2-C9-T1:PCI-E SAS Controller
A leading "none" indicates that the adapter is not assigned to an LPAR. To show a list of all I/O adapters owned by a specific LPAR use the "--filter" modifier:
power5/6/7:
hscroot@hmc> lshwres -r io -m pserver --rsubtype slot -F lpar_name:drc_name:description --filter "lpar_names=mylpar1"
mylpar1:U78C0.001.DBJC357-P2-C1:Fibre Channel Serial Bus
mylpar1:U78C0.001.DBJC373-P2-C1:Fibre Channel Serial Bus

7. Overview DLPAR status

power5/6/7:
hscroot@hmc> lspartition -dlpar
<#0> Partition:<6 111.111.15.66="" mylpar1.unixwerk.de="">
       Active:<0>, OS:, DCaps:<0x0>, CmdCaps:<0x0 0x0="">, PinnedMem:<512>
<#1> Partition:<2 111.111.15.65="" vios1.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x4f9f>, CmdCaps:<0x1b 0x1b="">, PinnedMem:<520>
<#2> Partition:<1 111.111.15.64="" vios2.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x4f9f>, CmdCaps:<0x1b 0x1b="">, PinnedMem:<518>
<#3> Partition:<3 111.111.226.4="" mylpar2.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x2f>, CmdCaps:<0xb 0xb="">, PinnedMem:<1707>
<#4> Partition:<1 111.111.226.2="" mylpar3.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x2f>, CmdCaps:<0xb 0xb="">, PinnedMem:<884>
<#5> Partition:<1 111.111.0.26="" mylpar7.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x2f>, CmdCaps:<0xb 0xb="">, PinnedMem:<406>
<#6> Partition:<4 111.111.226.5="" mylpar4.unixwerk.de="">
       Active:<1>, OS:, DCaps:<0x2f>, CmdCaps:<0xb 0xb="">, PinnedMem:<967>
A value <1> for Active: should be fine.

LPAR Management: Operations

1. Soft Reset of an LPAR

power4:
hscroot@hmc> chsysstate -m pserver -r lpar -n mylpar -o reset
power5/6/7:
hscroot@hmc> chsysstate -r lpar -m pserver -o shutdown -n mylpar

2. Soft Reset of a System Running in FullPartitionMode

power4:
hscroot@hmc> chsysstate -n pserver -r sys -o reset

3. Hard Reset of an LPAR

power4:
hscroot@hmc> chsysstate -m pserver -r lpar -n mylpar -o off
power5/6/7:
hscroot@hmc> chsysstate -r lpar -m pseries -o shutdown -n mylpar --immed

4. Hard Reset of a System Running in FullPartitionMode

power4:
hscroot@hmc> chsysstate -n pserver -r sys -o off

5. Virtual Console

That's how you get a connection to an LPAR's serial console:
power4 + power5/6/7:
hscroot@hmc> mkvterm -m pserver -p mylpar
If your system is running in FullSystemPartition-Mode you connect with a command like this:
power4:
hscroot@hmc> mkvterm -m pserver
You can escape from the console connection by typing ~~. (twice tilde followed by a dot)
If you cannot connect to the serial console and you get an error message instead:
All available virtual terminal sessions have been opened and are in use. 
To force a new open session, perform a Close Terminal Session operation
which frees up the session.
there is still another active connection to this console. You can close this connection with:
power4 + power5/6/7:
hscroot@hmc> rmvterm -m pserver -p mylpar
If you're not sure which managed system belongs to an LPAR you could walk through the vtmenu:
hscroot@hmc> vtmenu
 Retrieving name of managed system(s) . . . 
 
 ----------------------------------------------------------
  Managed Systems:
 ----------------------------------------------------------
   1) pserver1
   2) pserver2
   3) pserver3
 
 Enter Number of Managed System.   (q to quit): 1
 
 ----------------------------------------------------------
  Partitions On Managed System:  pserver1
 ----------------------------------------------------------
   1)    mylpar1                              Running
   2)    mylpar2                              Running
   3)    mylpar3                              Running
   4)    mylpar4                              Running
   5)    mylpar5                              Running
 
 
 Enter Number of Running Partition (q to quit):
Just enter a number and you will be connected to the console of the corresponding LPAR.

6. Activation of an LPAR

power4:
hscroot@hmc> chsysstate -r lpar -m pserver -o on [ -f myprofile ] -n mylpar 
power5/6/7:
hscroot@hmc> chsysstate -r lpar -m pserver -o on -f myprofile -n mylpar

7. How to Boot an LPAR into SMS Menu

power4:
You have to create an additional profile. In this profile set the boot mode to 'sms'. We call the profile mysmsprofile. Then start the LPAR with this profile:
hscroot@hmc> chsysstate -r lpar -m pserver -o on -f mysmsprofile -n mylpar 
power5/6/7:
With new HMCs a special profile is not any longer needed. The profile's boot mode can be overwirtten with -b:
hscroot@hmc> chsysstate -r lpar -m pserver -o on -f myprofile -b sms -n mylpar
The same way the LPAR can be bootet into the Open Firmware prompt (Bootmode: 'of'):
hscroot@hmc> chsysstate -r lpar -m pserver -o on -f myprofile -b of -n mylpar

8. How to Power on a System Running in FullPartitionMode

power4:
hscroot@hmc> chsysstate -o on -r sys -n pserver -c full

9. Bring the key switch to position NORMAL

This might be necessary on some power5 HMCs when an LPAR does not properly boot after issuing the power on command above. You might see a message like this:
0514-440 cfgcon: failed to create log file: check path name, permissions, and available space
When seeing this you can only access diag mode or boot the LPAR in singleuser mode. This command sets the key switch back to normal position:
power5/6/7:
hscroot@hmc> chsysstate -r lpar -o chkey -k norm -n mylpar -m pserver

LPAR Configuration

1. Change an LPAR's Name

Let's say we have these five LPARs defined on a managed system:
hscroot@hmc> lssyscfg -r lpar -m pserver -F lpar_id:name:state
1:vios1:Running
2:vios2:Running
3:barney:Running
4:mylpar2:Running
5:mylpar3:Running
Now we want to change the name of LPAR 3 from barney to mylpar1:
power5/6/7:
hscroot@hmc> chsyscfg -r lpar -m pserver -i "name=barney,new_name=mylpar1"
We check and see that the name of LPAR 3 indeed has changed to mylpar1:
hscroot@hmc> lssyscfg -r lpar -m pserver -F lpar_id:name:state
1:vios1:Running
2:vios2:Running
3:mylpar1:Running
4:mylpar2:Running
5:mylpar3:Running

2. Rename a Managed System

This would change the name of the manages system pserver to pserver1:
power5/6/7:
hscroot@hmc> chsyscfg -r sys -m pserver -i "new_name=pserver1"

3. DLPAR: Increase the Number of Processing Units of an LPAR

To assign 8 additonal processing units to an LPAR run the following command:
power5/6/7:
hscroot@hmc> chhwres -r proc -m pserver -o a -p mylpar --procunits 8


Operationen in einer virtualisierten Umgebung

HMC Version 7 can run operations on Virtual I/O Servers.

1. Make virtual WWPNs visible to the SAN

The below command would login all virtual adapters of the LPAR with ID 12 to the SAN:
HMC Version 7
hscroot@hmc> chnportlogin -o login -m pserver --id 12

2. Show all virtual WWPNs assigned to an LPAR

e.g. for an LPAR with ID 12, type
HMC Version 7
hscroot@hmc> lsnportlogin -m pserver --filter "lpar_ids=12"
lpar_name=mylpar,lpar_id=12,profile_name=default,slot_num=51,wwpn=c050726660a0002c,wwpn_status=1,logged_in=vios,wwpn_status_reason=null
lpar_name=mylpar,lpar_id=12,profile_name=default,slot_num=51,wwpn=c050726660a0002d,wwpn_status=1,logged_in=vios,wwpn_status_reason=null
lpar_name=mylpar,lpar_id=12,profile_name=default,slot_num=52,wwpn=c050726660a0002e,wwpn_status=1,logged_in=vios,wwpn_status_reason=null
lpar_name=mylpar,lpar_id=12,profile_name=default,slot_num=52,wwpn=c050726660a0002f,wwpn_status=1,logged_in=vios,wwpn_status_reason=null
You can also list the status of more than one LPAR in one go:
HMC Version 7
hscroot@hmc> lsnportlogin -m pserver --filter "\"lpar_ids=12,13\""

3. Logout virtual WWPNs from the SAN

HMC Version 7

hscroot@hmc> chnportlogin -o logout -m pserver --id 12