Tuesday, April 19, 2011

WPAR Short notes

WPAR & 6.1

It’s a software based virtualization solution for creating and managing multiple individual AIX OS environments within a single AIX based LPAR.

Live partition Mobility: It’s a PowerVM feature. Its ability to migrate a running LPAR between systems

WPARs reduce the number of managed LPARs

Inside the WPAR, the application having the following benefits:

Private execution environments

Dedicated network addresses and filesystems.

Interprocess communication that is restricted to processes executing only in the same WPAR

System WPAR: It’s a instance of AIX. Contains dedicated writable filesystems and system service daemons. It can share the global environment /usr and /opt filesystems in read only mode.

Application WPAR: It’s a WPAR that’s host only a single application or process. It shares file system of the global environment. It will not run any system service daemons

It’s not possible to remotely log in to an application partition or remotely.

Global Environment: It owns all physical and virtual resources of the LPAR. It allocates the resources to the WPAR. Most performance and tuning activities are performed from this environment. Sys admin must be logged in to the global environment to create,activate and manage WPARs.

Processes: A process running inside a WPAR can only see other processes in the WPAR.

Processe running in other WPARs and global environment are invisible to it. Processes can only access resources that are explicitly available inside the WPAR.

Users: Application WPARs inherit their user profiles from the global environment, so they have same privileges that the global environment does. System WPARs maintain independent set of users.

Resources: Resources created or owned by the global environment can only used by the global environment unless they are explicitly shared with a WPAR. Resources created or owned by a WPAR are visible only to that WPAR and global environment. To isolation of filesystems between system WPARs. A separate directory tree under the /wpars directory is created for each wpar. Inside this directory each WPAR maintains its own home,tmp,var directories. A system wpar will also mount the global environments /opt and /usr filesystems as readonly. Application wpars do not create their own filesystems, so they are usually allowed access to the filesystems owned by the global environments.

Each system WPAR assigned its own network address. Communication between WPARs running under the same instance via the loopback interface.

When to use workload partitions:

  • Improve application availability
  • Simplify OS and APP management
  • Manage application resource utilization

Upper limit of the no. of WPARs that can be executed within LPAR is 8192.

WPAR administration:

  • To use main WPAR menu: smit wpar
  • To use application WPAR menu: smit manage_appwpar
  • To use system WPAR menu: smit mange_syswpar

Create System WPAR: mkwpar –n wpar001

Mkwpar –n wpar001 –N address=

First OS creates and mounts the WPAR’s file system. Next it populates them with the necessary ststem files. Finally it synchronizes the root part of the installed software. When the creation of new WPAR is complete, it is left in the defines state.

Starting a WPAR:

Lswpar ( Defines state)

Name state type hostname directory

Wpar001 D S Wpar001 /wpars/wpar001

Startwpar wpar001(Mounting file systems and adding IP address.)

Lswpar ( Defines state)

Name state type hostname directory

Wpar001 A S Wpar001 /wpars/wpar001

You can login to the wpar using clogin from the global environment or telnet.clogin doesn’t depends on a TCP/IP connection.

To determine you are in the WPAR or inside the global environment execute the uname –W command. It returns 0 if you are in the global environment. And a value other than 0 if you are inside a WPAR

Stopping of a WPAR: shutdown –F (stopping the WPAR from inside the WPAR)

Stopwpar wpar001(stopping the WPAR from Global Environment).

-F ( Stopping a WPAR from global environment force the WPAR shutdown)

-N shutdown immediately.

Rebooting a WPAR: shudown –Fr (Rebooting WPAR from inside the wpar)

Rebootwpar wpar001( Reboot from global environment)

Changing a WPAR:

You can change WPAR’s name only when the WPAR is in the Defined state.

Chwpar –n wpar001.

Broken state:If a WPAR gets an undefined state.


Logs check( /var/adm/ras, /var/adm/WPARs)

Check the processes ps - @(It shows processes by WPAR)

Removing a WPAR: Verify WPAR is in Defined state. Take Backup. Rmwpar wpar001.

WPAR states:

Defined D WPAR is created but not started

Active A It’s a normal state.

Broken B When failure occurs

Transitional T WPAR is in the process of changing from one state to another.

Paused P This state is reached when a WPAR has had a successful checkpoint or restore data.

Mobile partitions can be created by c flag

Creating Application WPAR: Execute the application with in the WPAR: wparexec. Ex: wparexec /hga/myapp

Wparexec command starting myapp immediately after creation. This type of WPAR only exists while the application is running. When the application ends, the WPAR also ends and all of its resources are freed.

If the application WPAR has a dependency on a filesystem that is not mounted, it will mount the file system automatically.

Lswpar(Transitional State)

Name state type hostname directory

Myapp T A myapp /

Lswpar(Active State)

Name state type hostname directory

Myapp A A myapp /

Lswpar( It disappears)

File Systems:

Types of File systems: namefs, jfs, jfs2, NFS.

By default system creates /,/tmp,/home,/var as jfs2 and /opt,/proc,/usr and namefs.

Creating a filesystem for a running WPAR:crfs –v jfs2 –m /wpars/wpar001/newfs –u wpr00 –a logname=INLINE –a size=1G

Changing a file system: chfs –a size=512M /wpars/wpar001/newfs

Backing up the global environment: Stop all wpars, Then run a mksysb, mkdvd, mkcd command with the –N flag.

IBM workload partition manager for AIX is a tool for monitoring and managing WPARs.

Aix 6.1

Workload partition manager (Extra software package need to install)

  • Live application mobility ( move one partition from one system to another)
  • Automatically move partition if necessary

Aix 6 requisites: power 4,5,6

Wpar: light weight miniature aix running in aix. It’s a hypervisor partitioning

Wpars share the global system resources with the copy of aix. It’s shares aix OS kernel and its shares processors, memory and adapters for IO from global resources.

Each wpar shared /usr /opt with global AIX read only.

Private filesystems: /, /tmp, /var, /home.

Its own network ip address and hostname

A separate administrative and security domain

2 types of wpar

· System

· Application

Live application mobility: Moving a running wpar to another machine or LPAR.

  • Install new machine(move wpar very fast way)
  • Multi system work load balancing ( load balancing of cpus, memory and IO)
  • Use mobility when upgrade machine(aix or firmware) or for repair

System wpar: it’s a copy of aix

  • Create it and its goes to defined state, run it, activate it and we can stop it and if its not required remove it.
  • It’s a complete virtualized os environment ( runs multiple services and applications)
  • Runs services like inetd,cron,syslog
  • Own root user, users and groups.
  • Does not share any file systems with other wpars or global system.

Application wpar:

  • Isolate an individual application
  • Light weight , one process . can start further processes.
  • Created and started in seconds
  • Starts when created. Automatically removed when application stops.
  • Shares global file systems
  • Good for HPC(high performance computing) means long running applications

Wpar manager:

  • Install wpar agent and it will talk to the all wpars in a machine
  • Wpar manager can see the wpars running on the machine
  • By using web browser it can communicate with wpars
  • Web servers ruuuning
  • It’s a graphical interface
  • Create, remove and moving wpars
  • Start & stop them
  • Monitoring & reporting
  • Manual relocation
  • Automated relocation

Workload application mobility: relocate

  • On wpar manager select wparàclick relocateàselect target aix
  • Chkptwpar –k àit freeze wpar, save the wpar processes, state to a statefile on nfs.kill the wpar processes once they are no longer needed
  • Restartwpar: this command take the statefile, rebuild the wpar processes & state and start the wpar.

Reasons for using wpars:

  • Reducing system admin time. Many applications on one instance. Reduces install and update of aix, monitoring, becakup, recovery etc..
  • Application encapsulation, treated apps as an isolated unitsàcreate/remove start/stop, checkpoint/resume
  • Rapid environment creation of a new application
  • Reduce costs only one copy of aix plus shared access to aix disks.
  • Simple to move an application to a different machine, application mobility, performance balancing,

Starting and stopping wpar:

  • Access the wpar standard console. It’s a secured link port no:hostname: 14443/ibm/console logon
  • Managed systems(an entire physical server or a LPAR) and work load partitions are under resource views tab
  • Wpar active state means its running, its not runningà defined, green tick means mobility, transitional stateàworking
  • Select wpars in defined stateàactionsàstartàok
  • Select wpars in active stateàactionsàstopàselect normal stop/hard stop/force wpar to stopàok
  • Monitoring the action using monitoringàtask activity
  • (OR) run the /usr/sbin/stopwpar –h sec_wpar on global system.

Application Mobility(moving wpar between machines):

  • Check the wpar mobility or not if not u cant move
  • Select wparàactionsàrelocateà click browseàok
  • Monitor the activity using task connectivity from monitoring tab.

Creating a WPAR(quick way):

  • newàgive wpar nameàgive hostnameàgive managed systemàselect system/applicationàif its application give application name and select/deselect enable mobilityàif its system wpar select/deselect use private /usr,/opt and enable mobility.
  • Give nfs server and remote directoty if u select enable mobility.
  • (OR) /usr/sbin/mkwpar –c –h wparname –n wp13 –M dev=/nfs/wp13root directory=/ host=managed system mountopts=rw vfs=nfs –R active=yes –S
  • It’s a defined state so actionsàstart.

Creating wpar(detailed way):

  • Guided activitiesàCreate workload partitionànextàselect partition type(System/application)àgive partition nameànextàdeploy this wpar to an existing managed systemàgive managed system nameàgive passwordà click on start workload partition when system starts and start the wpar immediately upon deployment à nextàenable relocationàgive network detailsàgive nfs server name and remote directory

Mobility between power4, power5 and power6 machines:

  • Compatibility check: select wparàclick on actionsàcompatability(it shows managed systems that meet the basic requirements for relocating the selected wpar)
  • Wpar cannot move between different machines like power 4 to 5. so first you have to stop the wpar and removed with preserve local file systems on server option. Then wpar is undeployed state. Then click wparàactionsàdeployàenter target system à click on start the wpar immediately upon deployment, preserve file systemsàok.

WPAR properties:

  • Change properties: select wparàactionsàview/modify wpar
  • Change the processors using resource control

Access and controlling via the command line:

  • Lswparà gives wpar details (name,state,type,hostname,directory)
  • Stratwpar mywpar
  • Stopwpar –hN mywpar
  • Lswpar –L mywpar
  • Mkwpar –n first
  • Mkwpar –n –h -N netmask address
  • -c for checkpoint
  • -M directory=/ vfs=nfs host= dev=/nfs/wp13 /opt
  • Startwpar wp13
  • Clogin wp13

Application Mobility:

Source AIX: /opt/mcr/bin/chkptwpar wp13 –d /wpars/wp13/tmp/state –o /wpars/wp13/tmp/checkpoint.log –k

Rmwpar –p wp13

Target AIX: /opt/mcr/bin/restartwpar wp13 –d /wpars/wp13/tmp/state –o /wpars/wp13/rmp/restart.log

Running application wpar:

Wparexec –n temp –h hostname /usr/bin/sleep 30

Process: starting wpar, mounting, loading, stopping

Comparing WPAR & Global AIX:

  • Wpar: df –n (/, /home, /tmp, /var ànfs mounts, /opt,/usr à read only)
  • Host wp13 à hostname and ip address
  • All ip addresses of wpars must be placed as ip alias on global aix
  • No physical volumes available on wpars.
  • No paging space available on wpars
  • All processes reside on wpars must be same running on global aix
  • Ps –ef -@|pg( extra column will that is wpar name)
  • Ps –ef -@ wp13|pg
  • Topas -@ on global aix
  • Topas on wpar will give some results for wpar and some are global aix. Yellow are global aix and white are wpar.

No comments:

Post a Comment