Documente Academic
Documente Profesional
Documente Cultură
cover
Front cover
Student Notebook
ERC 1.0
Student Notebook
Trademarks The reader should recognize that the following terms, which appear in the content of this training document, are official trademarks of IBM or other companies: IBM is a registered trademark of International Business Machines Corporation. The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both: AIX POWER4 POWER6 PowerVM Tivoli DB2 POWER5 POWER Hypervisor Redbooks Workload Partitions Manager POWER POWER5+ PowerPC System p
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Other company, product, or service names may be trademarks or service marks of others.
Copyright International Business Machines Corporation 2009. All rights reserved. This document may not be reproduced in whole or in part without the prior written permission of IBM. Note to U.S. Government Users Documentation related to restricted rights Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
V5.3
Student Notebook
TOC
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Unit 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Workload partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Why WPARs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 System and application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 LPARs and WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Supported environments for WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Live application mobility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Workload partitions manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 WPAR resource control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17 Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18 Unit 2. Application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Why use application WPARs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Application WPARs and system resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Creating application WPARs (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Creating application WPARs (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Listing application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Naming application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 File systems and application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Logging in to an application WPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Using commands with WPARs (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Using commands with WPARs (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 Stopping application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 Application WPAR networking (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19 Application WPAR networking (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20 Administrative data for application WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 Application WPAR demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23 Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24 Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25 Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26 Unit 3. System WPARs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Why use system WPARs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Contents
iii
Student Notebook
System WPARs and system resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 Creating system WPARs (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6 Creating system WPARs (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7 Creating System WPARs (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8 System WPARs and default file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 Default file systems example (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11 Default file systems example (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12 Other file system configurations (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13 Other file system configurations (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15 Comparing shared and private /usr and /opt . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16 Private /usr and /opt example (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-18 Private /usr and /opt example (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19 Directory file systems example (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-20 Directory file systems example (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21 NFS example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-22 System WPARs and extra file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-23 Specifying file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-24 File system examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25 System WPAR networking (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-27 System WPAR networking (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-28 System WPAR networking (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-29 Create system WPAR examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30 Listing WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32 WPAR states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-33 Listing details of WPAR file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34 Changing a system WPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-35 Starting a system WPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-36 Stopping a system WPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37 Removing a system WPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-38 Administrative data for system WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39 Software maintenance for system WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40 Accessing software images (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42 Accessing software images (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43 Maintaining shared /usr and /opt (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44 Maintaining shared /usr and /opt (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45 Maintaining private /usr and /opt WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-47 System WPAR demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49 Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50 Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-51 Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-52 Unit 4. WPAR manager and live application mobility. . . . . . . . . . . . . . . . . . . . . . . . .4-1 Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Workload partitions manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3 WPAR manager architecture (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4 WPAR manager architecture (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5 WPAR manager architecture (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7 WPAR manager port numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8
iv Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
TOC
WPAR manager installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 WPAR manager configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 Accessing the WPAR manager interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 Navigation area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Managed systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Existing WPARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 Defining a WPAR using WPAR manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 WPAR management terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16 WPAR relocation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 Application mobility compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 WPAR manager demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Appendix A. Checkpoint solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Contents
Student Notebook
vi
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this training document, are official trademarks of IBM or other companies: IBM is a registered trademark of International Business Machines Corporation. The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both: AIX POWER4 POWER6 PowerVM Tivoli DB2 POWER5 POWER Hypervisor Redbooks Workload Partitions Manager POWER POWER5+ PowerPC System p
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Other company, product, or service names may be trademarks or service marks of others.
Trademarks
vii
Student Notebook
viii
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
pref
Course description
Exploring AIX 6 Workload Partitions (WPAR) - Instructor-led Online Duration: 1 day Purpose
Students in this course will learn about the new Workload Partitions (WPAR) feature of AIX 6. Interactive, live demonstrations will reinforce the lecture and give the students the ability to experience the interfaces used to exploit the new features. Students will obtain the knowledge required to implement workload partitions, and be aware of the differences between managing a WPAR compared with a traditional AIX instance.
Audience
The audiences for this training include AIX system administrators, technical support individuals, system architects and engineers, and anyone who needs an operational understanding of the workload partitions feature of AIX 6.
Prerequisites
Students are expected to have AIX V5 system administration skills. The list of required knowledge includes (but is not limited to) the following topics: Creating and administering users and groups Installing and maintaining software Configuring TCP/IP and network adapters Creating and administering file systems, including NFS System backup and restore
Objectives
After completing this course, you should be able to: Describe the reasons for using workload partitions (WPARs) List the software requirements for running WPARs List the implementation differences between an application WPAR and a system WPAR
Copyright IBM Corp. 2009
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Course description
ix
Student Notebook
Describe the function of the Workload Partitions Manager software List the configuration requirements for Live Application Mobility Define the terms application WPAR, system WPAR, and global environment Explain how to configure and remove a WPAR Explain how to start and stop a WPAR List the allowed states for a WPAR Describe how to configure networking for a WPAR List the administrative files and directories used to manage WPARs List WPAR configuration information using lswpar Describe how WPARs can access additional file systems Explain the differences between using private or shared /usr and /opt file systems Explain how to install and maintain software in a WPAR environment Describe the architecture of a Workload Partitions Manager environment List the components used to perform Live Application Mobility
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
pref
Agenda
Day 1
Welcome Unit 1 - Introduction Unit 2 - Application WPARs Unit 3 - System WPARs Unit 4 - WPAR manager and live application mobility Wrap up / Evaluations
Agenda
xi
Student Notebook
Text highlighting
The following text highlighting conventions are used throughout this book: Bold Identifies file names, file paths, directories, user names, principals, menu paths and menu selections. Also identifies graphical objects such as buttons, labels and icons that the user selects. Identifies links to web sites, publication titles, is used where the word or phrase is meant to stand out from the surrounding text, and identifies parameters whose actual names or values are to be supplied by the user. Identifies attributes, variables, file listings, SMIT menus, code examples and command output that you would see displayed on a terminal, and messages from the system. Identifies commands, subroutines, daemons, and text the user would type.
Italics
Monospace
Monospace bold
xii
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Unit 1. Introduction
What this unit is about
This unit provides an overview of concepts and terms used throughout the course. Students are introduced to the concept of workload partitions (WPARs) and the two different types of WPARs: system and application. Other concepts introduced are WPAR resource control options and Live Application Mobility.
References
SG24-7431 SG24-7559 Introduction to Workload Partition Management in IBM AIX Version 6.1, an IBM Redbooks document IBM AIX Version 6.1 Differences Guide, an IBM Redbooks document
The following documents are available from the System p and AIX Information Center (http://publib16.boulder.ibm.com/pseries/index.htm): SC23-5241 SA23-2233 IBM Workload Partitions Manager for AIX IBM Workload Partitions for AIX
Unit 1. Introduction
1-1
Student Notebook
Unit objectives
IBM Power Systems
After completing this unit, you should be able to: List features of workload partitions (WPARs) Differentiate between system and application WPARs Describe the global environment Describe features of Live Application Mobility Describe the resource control options for WPARs List software requirements for using WPARs
AT611.0
Notes:
1-2
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Workload partitions
IBM Power Systems
Maximum of 8192 WPARs in one LPAR A WPAR cannot be hosted within another WPAR Two types of WPARs: System and Application:
AT611.0
Notes: WPARs
WPARs are a way to isolate a process or a subset of the processing environment for better management and monitoring of resources. The application in a WPAR thinks it is being executed in its own AIX instance. WPARs also provide a contained unit that may be moved between LPARs and systems using Live Application Mobility.
Global environment
The hosting AIX instance where WPARs are created is called the global environment or the global operating environment. In the global environment, you can see all processes of all WPARs. Most performance monitoring and tuning is done from the global environment. The global environment owns all of the physical resources. The global environment is not restricted in any way as the administrator can see and monitor all of the WPARs. A WPAR cannot hide file systems or other resources from the global environment.
Copyright IBM Corp. 2009
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Unit 1. Introduction
1-3
Student Notebook
1-4
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Why WPARs?
IBM Power Systems
No performance cost for using virtual devices Enablement for Live Application Mobility for planned outages and workload redistribution
AT611.0
Unit 1. Introduction
1-5
Student Notebook
1-6
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Has own file system namespace: Has its own root user with privileges only within the WPAR:
May create WPAR-specific users and groups System WPARs allow telnet/rsh/rlogin connections
AT611.0
Application WPAR
An application WPAR can have one or more configured processes, as long as one command starts them. When all of the processes exit for that WPAR, the WPAR stops. An application WPAR consists of a light-weight process plus the application itself and can be created and started in seconds (no waiting for file systems to be created as with system WPARs).
Unit 1. Introduction
1-7
Student Notebook
LPAR Asia
LPAR EMEA
WPAR #1 eMail
VIO Server
WPAR #2 Planning
POWER Hypervisor
AT611.0
1-8
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
WPAR Manager is software for GUI-based, complex WPAR management, automation, and mobility:
Available at additional cost
AT611.0
Unit 1. Introduction
1-9
Student Notebook
Moves a running WPAR (application or system) to another LPAR, on same or different server:
Multi-system workload balancing Empty a machine for application outage avoidance Not a replacement for High Availability solutions for unplanned outages
AIX # 2 AIX # 1 WPAR EMail WPAR App Srv
WPAR Billing
Not to be confused with Live Partition Mobility which can move entire running LPARs between different physical POWER6 processor-based servers
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
means that the operating system, and potentially applications, are running. Live Partition Mobility is a feature of POWER6 processor-based servers.
Benefits
Both Live Application Mobility and Live Partition Mobility are designed to help enable you to eliminate planned system outages and to perform workload balancing. If you need to take a system down for reconfiguration, firmware updates or another reason, you will have the option of moving your applications to a different server without any impact to production operation. There are no reboots, no restarts, no service interruption and the users should not detect the change.
Unit 1. Introduction
1-11
Student Notebook
Provides role-based views and tasks Part of the IBM System Director family
Management server software on a managing system:
AT611.0
V5.3
Student Notebook
Uempty
Unit 1. Introduction
1-13
Student Notebook
Resource control:
Prevents an application from monopolizing system resources Each WPAR configuration can specify a resource allocation Optional
rset = set of defined CPUs and memory Resource control is performed using the -R option of the mkwpar, chwpar, wparexec, and lswpar commands
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
Unit 1. Introduction
1-15
Student Notebook
Checkpoint (1 of 2)
IBM Power Systems
1. 2.
True/False: WPARs can be used on any system running AIX 6. Which one of the following terms is given to the operating system that hosts WPARs?
a. b. c. d. WPAR Manager System WPAR Global environment Live Application Mobility
3.
c. d.
AT611.0
Notes:
V5.3
Student Notebook
Uempty
Checkpoint (2 of 2)
IBM Power Systems
4.
5. 6.
True/False: WPAR capability is included in the base AIX 6 operating system. True/False: With WPAR resource control, you can use a configuration based on shares, percentages, and WPAR load averages.
AT611.0
Notes:
Unit 1. Introduction
1-17
Student Notebook
Unit summary
IBM Power Systems
The base AIX 6 operating system has the ability to be partitioned into WPARs A system WPAR functions like a complete AIX instance with its own system and network daemons An application WPAR exists only as long as the application runs The global environment is the hosting AIX 6 image With WPARs and the WPAR Manager software, Live Application Mobility can be used to eliminate planned application outages by moving WPARs between LPARs Resource control can be used to control WPAR resource usage
AT611.0
Notes:
V5.3
Student Notebook
Uempty
References
SG24-7431 Introduction to Workload Partition Management in IBM AIX Version 6.1
2-1
Student Notebook
Unit objectives
IBM Power Systems
After completing this unit, you should be able to: Describe the architecture of an application WPAR including how it uses file systems, users and groups, network interfaces, and devices Create, configure, stop, and monitor application WPARs Describe the administrative files and directories used to manage application WPARs List application WPAR configuration information using the lswpar command
AT611.0
Notes:
2-2
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Application WPARs, like system WPARs, provide the benefits of process isolation, resource control, and mobility plus theyre quick and easy to create If an application or group of applications can be started with one command, it can be run in an application WPAR If any of the following is a requirement, use a system WPAR instead:
Network login capability Custom users Run a different version of an application than the global environment Complex application environment that cannot be started with one command Own file system namespace Different timezone WPAR can exist on its own even if application shuts down
Copyright IBM Corporation 2009
AT611.0
2-3
Student Notebook
It shares all storage, file systems, and devices of the global environment It uses the same users and groups as the global environment It can access the network interfaces in the global environment:
Another IP configuration must be used (configured as an alias) Cannot login remotely to an application WPAR with telnet, ftp, etc.
Processes in a WPAR can use interprocess communication (IPC) mechanisms such as signals, shared memory, semaphores, message queues, etc. to communicate only with other processes in the same WPAR
AT611.0
2-4
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Networking
Optionally, you can configure a unique IP configuration and hostname for an application WPAR. This will be configured as a network alias in the global environment. Even when configured with an IP address, you cannot use network commands such as telnet, ftp, or rlogin to connect to an application WPAR, as it does not run the required set of network daemons, such as inetd, etc. If an application WPAR is not configured with an IP address, it will have no network connectivity.
2-5
Student Notebook
The command that starts the application is passed as an argument to the wparexec command:
Use the absolute pathname to the application executable WPAR takes name of executable by default The application can start additional processes Simple example:
Executable
Starting workload partition 'app1'. Mounting all workload partition file systems. Loading workload partition.
The wparexec command returns to the calling shell when the process (and its children) terminate, unless the & is used
Copyright IBM Corporation 2009
AT611.0
2-6
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
2-7
Student Notebook
You can create, view, and stop WPARs with SMIT SMIT will exit, then run the application WPAR
# smit wpar Workload Partition Administration Move cursor to desired item and press Enter. List All Workload Partitions Administer SYSTEM Workload Partitions Administer APPLICATION Workload Partitions
Administer APPLICATION Workload Partitions Move cursor to desired item and press Enter. List Application Workload Partitions Create an Application Workload Partition or Specification File Change / Show Application Workload Partition Characteristics Stop and Remove an Application Workload Partition
Copyright IBM Corporation 2009
AT611.0
Notes: Managing WPARs with the System Management Interface Tool (SMIT)
SMIT can be used to create, stop, and configure WPARs. The visual above shows the fastpath of wpar can be used to access the WPAR menu options. The SMIT fastpath for the second SMIT menu shown in the visual above is manage_appwpar. When you create an application WPAR with SMIT, SMIT will exit first, then create/start the WPAR in the current shell. The shell prompt will not return until the WPAR terminates.
2-8
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
AT611.0
2-9
Student Notebook
Application WPARs can be given a different name with the n option to the wparexec command You cannot change an application WPARs name while it is running
# wparexec -n myWPAR /home/tools/app2 Starting workload partition 'myWPAR'. Mounting all workload partition file systems. Loading workload partition.
The hostname defaults to the WPAR name if it is not specified on the wparexec command line:
# lswpar Name State Type Hostname Directory
AT611.0
V5.3
Student Notebook
Uempty
All file systems are created in the global environment When creating an application WPAR, file system dependencies can be specified:
Required file systems can be mounted prior to, or when the WPAR is created
Dependent file systems are not unmounted when WPAR is stopped
Use the M option to wparexec to check that all required file systems are mounted and mount them if needed:
AT611.0
2-11
Student Notebook
# clogin myWPAR
(AIX MOTD appears)
WPAR ID
AT611.0
V5.3
Student Notebook
Uempty
root 405632 1 120 20:21:13 pts/0 0:19 /bin/ksh /home/linder/busycpu root 1 0 0 20:21:13 pts/0 0:00 /usr/lib/corrals/vinit newwpar /home/linder/busycpu root 663788 1 0 20:21:35 pts/0 0:00 clogin newwpar ps -ef # (This is the global environments shell prompt.)
2-13
Student Notebook
# vmstat -@ ALL
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
2-15
Student Notebook
Follow the -@ flag with a WPAR name to only show processes in that WPAR
Example showing the new WPAR column:
# ps -@ WPAR myWPAR Global Global myWPAR Global PID 249866 360492 364770 368832 385264 TTY pts/0 pts/0 pts/0 pts/0 TIME CMD 0:00 vinit 0:00 ps 0:00 ksh 0:00 ksh
AT611.0
V5.3
Student Notebook
Uempty
myWPAR 471168 Global 483376 Global 503908 myWPAR 507964 Global 524482 Global 548972 # ps -e@ myWPAR WPAR PID myWPAR 471168 myWPAR 507964
2-17
Student Notebook
The best way to stop an application WPAR is to login to the WPAR with clogin and use the proper shut down command for the application These methods may also be used to stop the application WPAR:
Use stopwpar command from the global environment:
AT611.0
V5.3
Student Notebook
Uempty
AT611.0
IP aliasing
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose. When using aliases, the alias IP address must be on the same subnet as the interface used by the global environment.
2-19
Student Notebook
The ifconfig command from the global environment will show all aliases in use:
# ifconfig -a en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,6 4BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN> inet 9.47.87.162 netmask 0xffffff00 broadcast 9.47.87.255 Globals inet 9.47.87.163 netmask 0xffffff00 broadcast 9.47.87.255 WPARs: tcp_sendspace 131072 tcp_recvspace 65536
AT611.0
V5.3
Student Notebook
Uempty
A specification file can be used to create WPARs to make creating WPARs with complicated configurations easier:
Example creating a specification file from an existing application WPAR:
# wparexec -e myWPAR -w -o /home/mywpars/wparfile1.spec
AT611.0
Specification files
Specification files can be created and used to make creating WPARs easier because you dont have to specify a lot of options on the command line if the configuration is complex. There are multiple ways to create a specification file. You can create it from scratch with an editor or you can use the wparexec command to create a specification file from an
2-21
Student Notebook
existing application WPAR. Once the file exists, it can be used to quickly create new application WPARs. A sample specification file is provided in /usr/samples/wpars/sample.spec. This sample file contains examples of configuration stanzas, as well as their detailed descriptions. If you use a specification file to create a WPAR, you can also specify options on the command line which will override any settings in the specification file.
resources: active = "yes" The above specification file would be useful when you need to create a WPAR again with the same configuration. Note that you cannot create a second WPAR with the same network configuration and WPAR name as an existing WPAR.
V5.3
Student Notebook
Uempty
Create WPARs with wparexec View information about WPARs Login with clogin View commands from within a WPAR Stop a WPAR
AT611.0
Notes:
2-23
Student Notebook
Checkpoint (1 of 2)
IBM Power Systems
1. 2. 3.
True/False: Application WPARs have visibility to all file systems in the global environment. True/False: If an application WPAR needs access to a network, it must be configured with a unique IP address and hostname. Which one of the following cannot be performed with an application WPAR:
a. b. c. d. Create the WPAR with a specification file Use SMIT to configure and manage the WPAR Login to the WPAR with clogin Change the name of a running WPAR
4. 5.
True/False: An application WPAR can be configured to use unique user IDs. True/False: All physical devices are owned by the global environment.
Copyright IBM Corporation 2009
AT611.0
Notes:
V5.3
Student Notebook
Uempty
Checkpoint (2 of 2)
IBM Power Systems
6.
True/False: When an application WPAR is created, a *.cf file is created in the /etc/wpars directory, where * represents the name of the WPAR.
7.
What is the new flag that will cause many AIX commands to display WPAR-specific information? Choose one of the following:
a. b. c. d. The WPAR flag The -@ flag The -& flag The -# flag
AT611.0
Notes:
2-25
Student Notebook
Unit summary
IBM Power Systems
There are some new commands which have been added to manage WPARs:
wparexec, lswpar, clogin, stopwpar Some existing AIX commands have been modified to support WPARs
WPARs are created using the wparexec command with configuration options, or you can create a specification file and use it when starting the WPAR to indicate the configuration The lswpar command can be used to list WPARs and their configurations
AT611.0
Notes:
V5.3
Student Notebook
Uempty
References
SG24-7431 Introduction to Workload Partition Management in IBM AIX Version 6.1
3-1
Student Notebook
Unit objectives
IBM Power Systems
After completing this unit, you should be able to: Explain how to configure, start, stop, and remove a system WPAR List the allowed states for a system WPAR Describe how to configure networking for a system WPAR List the administrative files and directories used to manage system WPARs Explain the differences between using private or shared /usr and /opt file systems List system WPAR configuration information using lswpar Describe how system WPARs can access additional file systems Explain how to install and maintain software in a system WPAR environment
AT611.0
Notes:
3-2
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
System WPARs, like application WPARs, provide the benefits of process isolation, resource control, and mobility plus they also provide:
A separate domain for user and group IDs Ability to login to the WPAR from the network Private file system namespace Optional non-shared /usr and /opt file systems Different timezone from the global environment Can run multiple applications within the WPAR Jobs can be scheduled using cron WPAR can exist even if the application is terminated
AT611.0
3-3
Student Notebook
A system WPAR runs an isolated set of system services, such as cron, init, syslogd, etc. A system WPAR is given a set of pseudo devices, such as /dev/null, /dev/audit, /dev/error, etc.
WPAR does not have direct access to physical devices
AT611.0
3-4
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Networking
A system WPAR may be configured with a hostname and IP address. Access to the network is obtained by using an alias on a physical network interface owned by the global environment. Since a system WPAR runs a subset of system services, you can use network commands such as telnet, ftp, or rlogin to connect to a system WPAR, assuming it is correctly configured to access the network.
3-5
Student Notebook
Use mkwpar to create a new system WPAR based on an existing system WPAR
Arguments given on the command line override the values in the specification file Arguments that are not given (on the command line or specification file) are deduced from the global environment
AT611.0
Notes: Introduction
System WPARs are created using the mkwpar command. There are many different flags and options available for using the command that will change the configuration of the system WPAR that is created. In addition to creating the system WPAR, the mkwpar command can be used to create a specification file which can then be used as input on a subsequent invocation of the command. It can also create a WPAR based on the configuration of an existing WPAR. Arguments supplied on the command line will override the parameters specified in an existing WPAR or specification file being used as the basis for the new WPAR. The mkwpar command has a comprehensive set of default values that will be used if a parameter is not specified. Some parameters, such as network interface and network mask, will be deduced from the global environment if not provided.
3-6
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
AT611.0
Notes: Tasks
The mkwpar command performs multiple tasks when creating a system WPAR. The tasks performed will depend on the arguments supplied to the command. Refer to the man page entry for a full description of all arguments.
3-7
Student Notebook
You can create, list, start, stop, and remove WPARs with SMIT
# smit wpar Workload Partition Administration Move cursor to desired item and press Enter. List All Workload Partitions Administer SYSTEM Workload Partitions Administer APPLICATION Workload Partitions
Administer SYSTEM Workload Partitions Move cursor to desired item and press Enter. List System Workload Partitions Create a System Workload Partition or Specification File Start / Stop / Reboot a System Workload Partition System Workload Partition Software Maintenance Change / Show System Workload Partition Characteristics Remove a System Workload Partition System Workload Partition Backup Manager
Copyright IBM Corporation 2009
AT611.0
Notes: SMIT
System WPARs can be created and managed using SMIT. The fast path smit wpar will start with the Workload Partition Administration menu, as shown on the visual above. The system WPAR menu can be accessed directly with smit manage_syswpar.
3-8
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
File systems for a system WPAR are mounted in the global environment relative to a base directory
Default location is /wpars/wparname
File systems are mounted when the WPAR is started, and unmounted when the WPAR is stopped Default format for each of the /, /home, /tmp and /var file systems is to create a JFS2 with inline log device in a logical volume in rootvg Default for /usr and /opt is a read-only namefs mount of the file system from the global environment
In other words, /usr and /opt are shared with the global environment
AT611.0
3-9
Student Notebook
The WPAR also has read-write access to /proc as a namefs mount, that is filtered to only allow access to processes that are running in the WPAR.
V5.3
Student Notebook
Uempty
Global environment namefs /proc namefs /opt namefs /usr / /home rootvg /tmp /var /wpars/SWPAR1 /wpars/SWPAR1/home /wpars/SWPAR1/tmp /wpars/SWPAR1/var
AT611.0
3-11
Student Notebook
/wpars/SWPAR1/opt namefs Feb 01 14:48 ro /wpars/SWPAR1/proc namefs Feb 01 14:48 rw /wpars/SWPAR1/tmp jfs2 Feb 01 14:48 rw,log=INLINE /wpars/SWPAR1/usr namefs Feb 01 14:48 ro /wpars/SWPAR1/var jfs2 Feb 01 14:48 rw,log=INLINE
AT611.0
V5.3
Student Notebook
Uempty
By default, /, /home, /tmp, and /var are local file systems in the global environment, and /usr and /opt are namefs mounts
Access to /proc always uses a namefs mount
Optionally, /usr and /opt can be configured as local file systems instead of namefs mounts
Private, read-write copies Allows each WPAR to run a different version of application software, but creates issues for software administration Creating the WPAR takes longer, since more data must be copied
To reduce the number of local file systems mounted in the global environment, other options are:
Configure /home, /tmp and /var as directories in the / file system of the WPAR Configure /, /home, /tmp and /var as namefs mounts instead of file systems
AT611.0
3-13
Student Notebook
V5.3
Student Notebook
Uempty
Another option is for the WPARs file systems to be NFS mounted by the global environment
Can either be multiple individual file systems, or a single NFS file system for /, and directories for the others Must be exported to both the global environment and the WPAR This is required for Live Application Mobility
There is no requirement that all file systems for the WPAR are configured in the same way
Can use a combination of local file systems, NFS, namefs and directories
AT611.0
Notes: NFS
The file systems for a system WPAR can be hosted on an NFS server, and mounted by the global environment that is hosting the WPAR. This configuration is required for Live Partition Mobility. The file systems must be exported to both the global environment and the WPAR.
3-15
Student Notebook
AT611.0
V5.3
Student Notebook
Uempty
the software that is installed. One benefit of using private file systems is that each WPAR can be configured with a different version of application software, assuming that software package can only be installed into the /usr or /opt file systems. Even when using private file systems, all WPARs in a global environment must be configured with the same level of AIX. The drawbacks of using private file systems are that creating a system WPAR takes much longer, since there is now a large volume of data to be copied, and software maintenance is more complicated. Another drawback is that the memory footprint is increased, as each WPAR will require a separate set of application executable text to be loaded into memory.
3-17
Student Notebook
Global environment /proc /opt /usr / /home rootvg /tmp /var /wpars/SWPAR3 /wpars/SWPAR3/home /wpars/SWPAR3/tmp /wpars/SWPAR3/var /wpars/SWPAR3/opt /wpars/SWPAR3/usr
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
/wpars/SWPAR3/opt jfs2 Feb 01 19:17 rw,log=INLINE /wpars/SWPAR3/proc namefs Feb 01 19:17 rw /wpars/SWPAR3/tmp jfs2 /wpars/SWPAR3/usr jfs2 /wpars/SWPAR3/var jfs2 Feb 01 19:17 rw,log=INLINE Feb 01 19:17 rw,log=INLINE Feb 01 19:17 rw,log=INLINE
AT611.0
3-19
Student Notebook
Global environment namefs /proc namefs /opt namefs /usr / /home rootvg /tmp /var /wpars/SWPAR2
AT611.0
V5.3
Student Notebook
Uempty
AT611.0
3-21
Student Notebook
NFS example
IBM Power Systems
NFS Server /proc /opt /usr / /home /tmp /var /WP3 /WP3/home /WP3/tmp /WP3/var /WP3/opt /WP3/usr nfs nfs nfs nfs nfs nfs rootvg
Global environment /proc /opt /usr / /home /tmp /var /wpars/SWPAR3 /wpars/SWPAR3/home /wpars/SWPAR3/tmp /wpars/SWPAR3/var /wpars/SWPAR3/opt /wpars/SWPAR3/usr
Copyright IBM Corporation 2009
namefs
AT611.0
V5.3
Student Notebook
Uempty
As well as the required file systems, a WPAR can be configured to access additional application-specific file systems
Can be configured as local file systems, namefs, or NFS mounts
Temporary mounts can be made available to the WPAR by the root user in the global environment
# mkdir /wpars/SWPAR3/appfs # mount v namefs /appfs /wpars/SWPAR3/appfs
The root user in the WPAR can only perform NFS mounts
Cannot access logical volumes to initiate file system mounts Cannot access global environment file system space to initiate namefs mounts
Copyright IBM Corporation 2009
AT611.0
3-23
Student Notebook
The g flag specifies the volume group to use for local file systems The l flag indicates to create private writeable versions of /usr and /opt The M flag is used to specify file system values to mkwpar
/, /home, /var and /tmp will be created as local file systems by default
Syntax of M flag: M directory=dir [vfs=type] [size=MBs] [vg=VG] [logname=logLV] [dev=devicepath] [host=RemHost] [mode=Mode] [mountopts=MountOpts] The M flag can be specified multiple times on the command line
Once for each file system you want to configure
AT611.0
V5.3
Student Notebook
Uempty
Example 1: M directory=/ vfs=jfs2 size=300 vg=wparVG Example 2: M directory=/tmp vfs=directory Example 3: M directory=/home vfs=namefs dev=/home Example 4: M directory=/db2 vfs=nfs dev=/data/WP1/db2 host=server1 M directory=/tmp size=500
AT611.0
Notes: Example 1
This usage of the -M flag indicates that the root file system for the WPAR being created should be a JFS2 file system with an inline log. The file system should be 300 MB in size, and created in the wparVG volume group.
Example 2
This usage of the -M flag indicates that the /tmp file system for the WPAR being created should be configured as a directory within the root file system.
Example 3
This usage of the -M flag indicates that the /home file system for the WPAR being created should be configured as a namefs mount of the /home file system from the global environment.
Copyright IBM Corp. 2009 Unit 3. System WPARs
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
3-25
Student Notebook
Example 4
This example has multiple instances of the -M flag. The first usage indicates that the /db2 file system (an additional, application specific file system) for the WPAR being created should be configured as an NFS mount of the exported file system /data/WP1/db2 from the NFS host server1. The second usage indicates that the /tmp file system should be 500 MB in size. This value overrides the default size for the /tmp file system, however the other default attributes will still be used - it will be a JFS2 format file system, with an inline log device, created in the rootvg volume group.
V5.3
Student Notebook
Uempty
If no hostname is specified with the h flag, the WPAR name (specified with n) will be used as the hostname The N flag of mkwpar is used to specify network settings
Example:
# mkwpar -n SWPAR1 -h mercury169 -N address=9.47.87.169
Any network values not specified will be determined from the global environment interface that is used
Copyright IBM Corporation 2009
AT611.0
3-27
Student Notebook
The N flag can be used multiple times to specify additional IP addresses If no address is given to mkwpar, the command uses gethostbyname() with the WPARs hostname to determine the IP address
If the name is resolved to an address, then it is configured as an alias on the global environment interface on the same subnet If the name cannot be resolved, or the global environment does not have an interface on the subnet, the WPAR will have no networking configured
AT611.0
V5.3
Student Notebook
Uempty
The ifconfig command from the global environment will show all aliases in use:
# ifconfig -a en0: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPR T,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 9.47.87.161 netmask 0xffffff00 broadcast 9.47.87.255 Globals inet 9.47.87.167 netmask 0xffffff00 broadcast 9.47.87.255 WPARs tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
AT611.0
3-29
Student Notebook
Example 1: # mkwpar h mercury169 n SWPAR1 Example 2: # mkwpar n mercury168 g wparVG Example 3: # mkwpar n testWPAR N address=192.168.1.103 M directory=/data vfs=namefs dev=/data mountopts=ro
AT611.0
Notes: Example 1
This command will create a system WPAR using the default file system options. The WPAR is called SWPAR1, but the hostname of the WPAR is mercury169.
Example 2
This command will create a system WPAR using the default file system options, however the local file systems will be created in the wparVG volume group. The WPAR name, and the hostname, is mercury168.
Example 3
This command will create a system WPAR using the default file system options for the required file systems. The WPAR name (and hostname) is testWPAR, and it will be configured with the IP address 192.168.1.103, assuming the global environment has a
3-30 Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
network interface connected to this network. In addition, the WPAR will be configured with an additional file system called /data that is a read-only namefs mount of the /data file system from the global environment.
3-31
Student Notebook
Listing WPARs
IBM Power Systems
Use the lswpar command to list information about known WPARs Lists information on all system WPARs, and information on active application WPARs
Type A = Application WPAR Type S = System WPAR
# lswpar Name APPWPAR1 SWPAR1 SWPAR2 SWPAR3 State A A D A Type A S S S Hostname mercury166 mercury169 mercury168 mercury167 Directory / /wpars/SWPAR1 /wpars/SWPAR2 /wpars/SWPAR3 -------------------------------------------------
AT611.0
V5.3
Student Notebook
Uempty
WPAR states
IBM Power Systems
The lswpar command lists the state of known WPARs State Description A Active - The WPAR is running normally. Defined - The WPAR has been defined by mkwpar, D but is not currently active. This only applies to system WPARs. T Transitional - An administrative operation is in progress. The WPAR is in the process of being created, started, stopped, etc. B Broken - An administrative operation failed, leaving the WPAR in an unusable state.
AT611.0
3-33
Student Notebook
Use the lswpar command with M to list information about the WPARs file systems
Works even when system WPAR is not active
# lswpar -M SWPAR3 Name SWPAR3 SWPAR3 SWPAR3 SWPAR3 SWPAR3 SWPAR3 SWPAR3 MountPoint /wpars/SWPAR3 /wpars/SWPAR3/home /wpars/SWPAR3/opt /wpars/SWPAR3/proc /wpars/SWPAR3/tmp /wpars/SWPAR3/usr /wpars/SWPAR3/var Device /dev/fslv05 /dev/fslv06 /dev/fslv07 /proc /dev/fslv08 /dev/fslv09 /dev/fslv10 Vfs jfs2 jfs2 jfs2 namefs jfs2 jfs2 jfs2 rw rw rw Nodename Options -------------------------------------------------------------------
AT611.0
V5.3
Student Notebook
Uempty
AT611.0
3-35
Student Notebook
Can also start the WPAR when creating it with mkwpar The A flag of mkwpar indicates the WPAR should be started at boot time, or whenever /etc/rc.wpars is run The startwpar command:
Mounts the WPARs file systems, as defined in /etc/filesystems Exports the pseudo devices to the WPAR Assigns and activates the IP addresses for the WPAR Changes the WPARs state to Active
# startwpar SWPAR1 Starting workload partition SWPAR1. Mounting all workload partition file systems. Loading workload partition. Exporting workload partition devices. Starting workload partition subsystem cor_SWPAR1. 0513-059 The cor_SWPAR1 Subsystem has been started. Subsystem PID is 544978. Verifying workload partition startup.
Copyright IBM Corporation 2009
AT611.0
Notes: Startup
The startwpar command is used to start a system WPAR.
V5.3
Student Notebook
Uempty
The command:
Stops the processes running in the WPAR Deactivates the IP addresses (if any) Unmounts the WPARs file systems Changes the WPARs state to Defined
The stopwpar command will fail if any processes cannot be terminated using the kill command, or if any file system cannot be unmounted
In this case, use the F flag to force
# stopwpar SWPAR1 Stopping workload partition SWPAR1. Stopping workload partition subsystem cor_SWPAR1. 0513-044 The cor_SWPAR1 Subsystem was requested to stop. stopwpar: 0960-261 Waiting up to 600 seconds for workload partition to halt. Shutting down all workload partition processes. Unmounting all workload partition file systems.
Copyright IBM Corporation 2009
AT611.0
Notes: Stopping
The stopwpar command is used to stop a system WPAR. Instead of running this command, you could login to the WPAR and issue the shutdown command. Depending on the application being run in the WPAR, it may be best to login and stop the application before shutting down the WPAR.
3-37
Student Notebook
Removes the WPAR from the database, and deletes the WPARs file systems
AT611.0
V5.3
Student Notebook
Uempty
Defined system WPARs are listed in the WPAR database The information consists of:
An entry in the index file /etc/wpars/index A configuration file /etc/wpars/wparname.cf Stanzas in /etc/filesystems
The index file contains information about the name and ID of running application WPARs, and all system WPARs (whether running or not) The WPAR configuration file and /etc/filesystems contain information required to start the system WPAR
Copyright IBM Corporation 2009
AT611.0
3-39
Student Notebook
There are no issues with software maintenance for application WPARs, since they share the global environments file systems The complexity of software maintenance for a system WPAR depends on if it is using shared or private /usr and /opt file systems Operating system updates must be applied to all WPARs within the same global environment
Since all the WPARs are sharing the same running kernel image
If using shared /usr and /opt, install/update operating system and application software from the global environment, then synchronize the WPARs file systems If using private /usr and /opt, install/update operating system software from the global environment, then again in the WPAR, and install/update application software only from within the WPAR
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
When using private /usr and /opt, operating system software must be installed/updated in the global environment, and then in the WPAR. Application software need only be installed/updated from within the WPAR.
3-41
Student Notebook
AT611.0
V5.3
Student Notebook
Uempty
Multiple methods for making the software available in the WPAR Temporarily mount the CD/DVD/NFS file system in the global environment as part of the WPAR file system tree
For example: # mkdir /wpars/SWPAR3/cdrom # mount v cdrfs /dev/cd0 /wpars/SWPAR3/cdrom
Copy the images to a file system on a server, and use NFS within the WPAR to mount the file system Mount the CD/DVD/NFS file system in the global environment and then copy the software images into a directory already mounted by the WPAR Mount the CD/DVD/NFS file system in the global environment, then make the mounted file system available as a namefs mount to the WPAR at creation time Copyright IBM Corporation 2009
Figure 3-35. Accessing software images (2 of 2) AT611.0
3-43
Student Notebook
If /usr and /opt are shared, install and update software from the global environment
The WPARs sharing the /usr and /opt file systems will see the same version of software
Use the installp command (or SMIT), to install/update software in the global environment After install/update, must synchronize the WPARs root component
The /usr and /opt file systems seen by the WPAR are updated, but the WPARs / (root) file system is out of date
AT611.0
V5.3
Student Notebook
Uempty
Usage of syncwpar:
To synchronize a specific WPAR: syncwpar WPARNAME To synchronize all WPARs: syncwpar A
Software products that are not required in the WPARs can be marked as private before the WPARs file systems are created
Use swvpdmgr p to mark a package as private Use swvpdmgr s to mark a package as shared
AT611.0
Notes: Synchronization
Synchronizing the WPARs file systems can be done in one of two ways: - Use the syncwpar command from the global environment - Use the syncroot command from within each WPAR When using the syncwpar command, you can either specify the name of the WPAR you want to synchronize, or use the -A flag to synchronize all WPARs. Software products in the global environment can be hidden from WPARs in a shared file system configuration by using the swvpdmgr command. Software products are shared by default, and can be hidden using the -p flag, and shared again using the -s flag. When a software product is marked as private, it will not be copied into the WPARs root file system when the WPAR is created. Additionally, it will not be synchronized when the syncwpar or syncroot commands are run.
3-45
Student Notebook
After installing or updating operating system software, the global environment may need to be rebooted, which of course will impact all WPARs.
V5.3
Student Notebook
Uempty
When using private /usr and /opt file systems, need to consider if software being installed/updated is operating system or application Application software can be installed within a WPAR using private /usr and /opt without updating the global environment
Since all file systems are private to the WPAR
Operating system software in the WPAR must be the same level as the global environment
First perform install/update in global environment Next perform the same install/update from within the WPAR No need to synchronize using syncwpar or syncroot, since the WPARs /, /usr, and /opt file systems are all private
The global environment may need to be rebooted after installing operating system software updates
This will impact all hosted WPARs
Copyright IBM Corporation 2009
AT611.0
3-47
Student Notebook
After installing or updating operating system software, the global environment may need to be rebooted, which of course will impact all WPARs.
V5.3
Student Notebook
Uempty
Create WPARs with mkwpar Start WPARs with startwpar View information about WPARs Login with clogin and telnet View commands from within a WPAR Stop a WPAR Remove a WPAR
AT611.0
Notes:
3-49
Student Notebook
Checkpoint (1 of 2)
IBM Power Systems
1. 2. 3. 4. 5.
True/False: By default, all file systems for a system WPAR are created as local file systems. True/False: A system WPAR may be configured with multiple IP addresses. True/False: A system WPAR can be configured to use unique user IDs. True/False: All physical devices are owned by the global environment. Which one of the following cannot be performed with a system WPAR:
a. b. c. d. Access additional file systems using NFS Write to a shared copy of /usr Write to a shared copy of /proc Install a different version of application software from the global environment
AT611.0
Notes:
V5.3
Student Notebook
Uempty
Checkpoint (2 of 2)
IBM Power Systems
6.
Which one of the following procedures is used to update operating system software in WPARs using shared /usr and /opt file systems:
a. b. c. Update the software in the global environment, then run the syncwpar A command from the global environment Login to the WPAR and update the software Update the software in the global environment, then run the syncwpar command from within each WPAR
7.
Which one of the following procedures can be used to update operating system software in WPARs using private /usr and /opt file systems:
a. b. c. Update the software in the global environment, then run the syncwpar A command from the global environment Login to the WPAR and update the software Update the software in the global environment, then login to each WPAR, and update the software
Copyright IBM Corporation 2009
AT611.0
Notes:
3-51
Student Notebook
Unit summary
IBM Power Systems
There are some new commands which have been added to manage system WPARs:
mkwpar, lswpar, clogin, startwpar, stopwpar, rmwpar
System WPARs are defined using the mkwpar command by supplying configuration options, or using a specification file, or copying an existing WPAR Once defined, a system WPAR is started using the startwpar command All WPARs hosted in a global environment must have the same version of operating system software
Copyright IBM Corporation 2009
AT611.0
Notes:
V5.3
Student Notebook
Uempty
References
SC23-5241 IBM Workload Partitions Manager for AIX
4-1
Student Notebook
Unit objectives
IBM Power Systems
After completing this unit, you should be able to: Describe the function of the Workload Partitions Manager software Describe the architecture of a Workload Partitions Manager environment List the configuration requirements for Live Application Mobility List the components used to perform Live Application Mobility
AT611.0
Notes:
4-2
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Role-based views and tasks Displays information collected by agents running in managed global environments WPAR feature is included with AIX WPAR Manager is a chargeable product
AT611.0
Notes: Overview
WPAR Manager is a platform management solution that provides multiple functions. WPAR Manager includes the following features: - Cross-system management of WPARs, including lifecycle management - Global load balancing with application mobility - Web-based administration of basic WPAR operations and advanced management tasks - Monitoring and reporting of WPAR performance metrics WPAR technology is included in the base AIX 6 operating system. WPAR Manager is a chargeable product.
4-3
Student Notebook
WPAR Manager
Runs in any AIX 6 instance Includes the GUI, the management software, and the data repository
AT611.0
4-4
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
WPAR Agent
Installed and configured in all managed global environments Filesets for the agent are:
wparmgt.agent wparmgt.cas.agent mcr tivoli.tivguid WPAR Manager uses the Common Agent Services framework, which has three components:
Common agent and product-specific subagent - this is the CAS Agent and WPAR Agent component Agent manager - this is CAS Agent Manager Resource manager - this is the WPAR Manager component Each component can be deployed on a different server By default, WPAR Manager and CAS Agent Manager are installed on the same system, which will be the management server
Copyright IBM Corporation 2009
AT611.0
4-5
Student Notebook
CAS framework
WPAR Manager is based on the Tivoli Common Services Agent framework. An agent is a program that automatically performs some service, such as data collection. The agent is split into two parts. The common agent is a common container for all the subagents to run within. It enables multiple management applications to share resources when managing a system. The common agent is installed once on each endpoint. The product specific subagent (WPAR agent in this case), uses the services of the common agent to provide secure communication with other components. The Agent Manager is the server component of the common agent that provides functions that allow clients to get information about agents and resource managers. It enables secure connections between managed endpoints, maintains the database information about the endpoints and the software running on those endpoints, and processes queries against that database from resource managers. It also includes a registry and an agent recovery service. A resource manager is the server component of a management application product that manages the agents.
4-6
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
WPAR Manager
Database access
Agent Registration
Managed system/LPAR
Managed system/LPAR
NFS Server
AT611.0
Notes: Overview
The diagram on the visual above illustrates the architecture of a WPAR Manager installation. One WPAR Manager server is in contact with multiple global environments, each capable of hosting WPARs.
4-7
Student Notebook
Ports 9510, 9511, 9512, and 9513 are used for communication between WPAR Manager, CAS Agent Manager, and WPAR Agents These are default ports that can be overridden by the user during configuration Ensure ports are opened on any firewalls
AT611.0
4-8
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
Install the WPAR Manager filesets Mount the CD containing the WPAR Manager software mount v cdrfs /dev/cd0 /mnt Change directory to /opt/IBM/WPAR/manager/db/bin
Install script will not work if you're in a different directory
Run the database installation script: ./DBInstall.sh -dbpassword passwd -dbinstallerdir /mnt/db2
This copies the DB2 files from the media in to the file system
AT611.0
Notes: Installation
Installing the WPAR Manager system is more complex than simply installing the required filesets. Once the manager filesets are installed, the DBInstall.sh script must be run to copy the DB2 files from the product media into the file system, and create the database instance. Make sure that you have changed directory to /opt/IBM/WPAR/manager/db/bin before running the script, otherwise it will not complete correctly. Refer to the product documentation for full installation instructions and options. Installation on the agent side is much simpler - just install the required filesets.
4-9
Student Notebook
Optionally, copy and edit the properties file /opt/IBM/WPAR/manager/config/wpmInstall.properties Then supply this file as an argument to WPMConfig.sh as follows: /opt/IBM/WPAR/manager/bin/WPMConfig.sh i silent f copyofwpmInstall.properties
Allows for non-prompted configuration of WPAR manager
Once WPAR Manager is setup, configure the agent in each global environment that is to be managed /opt/IBM/WPAR/agent/bin/configure-agent hostname WPARmgrhost
Copyright IBM Corporation 2009
AT611.0
Notes: Configuration
Once the manager software has been installed, it needs to be configured. The WPMConfig.sh script is used to perform this task. By default, the script runs in interactive mode, and will prompt when required for password information. A non-prompted configuration is possible when using a modified wpmInstall.properties file, which details information about the database, port numbers, and the required passwords. Once the manager has been configured, you can run the configure-agent command in each global environment to register with the WPAR Manager.
V5.3
Student Notebook
Uempty
Once the WPAR Manager is installed and configured, use one of these URLs in a web browser to access:
Public - http://hostname:14080/ibm/console Secure - https://hostname:14443/ibm/console Login as the root user
AIX userids on the WPAR manager system can be configured to access the console
Can be assigned roles which limit the tasks they can use
Copyright IBM Corporation 2009
AT611.0
4-11
Student Notebook
Navigation area
IBM Power Systems
Tabs
AT611.0
V5.3
Student Notebook
Uempty
Managed systems
IBM Power Systems
Once WPAR agent is installed in a global environment, you can register with WPAR Manager A "managed system" to WPAR Manager has an AIX image and is a stand-alone system or LPAR If the managed system is not automatically displayed, in the Resource Views, under Managed Systems, click the Discover button:
AT611.0
4-13
Student Notebook
Existing WPARs
IBM Power Systems
Active and defined WPARs in the registered global environments will show up in WPAR Manager
AT611.0
V5.3
Student Notebook
Uempty
WPAR Manager provides a wizard to define new WPARs Click Create Workload Partition in Guided Activities list in the navigation panel
AT611.0
4-15
Student Notebook
When a WPAR is created using WPAR Manager, the configuration is stored by WPAR Manager At first the WPAR is Undeployed An Undeployed WPAR can then be Deployed on a managed system
That is, the WPAR is Defined in a particular global environment
An Active WPAR can be Stopped, Paused, Relocated or Removed A Paused WPAR can be Resumed
A Paused WPAR cannot be Relocated
Live Application Mobility is the marketing term for relocation of a running WPAR
Copyright IBM Corporation 2009
AT611.0
V5.3
Student Notebook
Uempty
Manager database definition for the WPAR. If the definition is not removed, the WPAR returns to the Undeployed state.
4-17
Student Notebook
A WPAR that is configured as Mobile can be relocated from one managed system to another
Both application and system WPARs can be relocated Application code must be in an NFS mounted file system, even for an application WPAR Uses Metacluster Checkpoint Restart software to freeze the processes in the WPAR prior to relocation
The NFS server must export the file systems to the departure system, the arrival system, and the WPAR The managed systems must pass compatibility tests
Copyright IBM Corporation 2009
AT611.0
Notes: Requirements
In order to be relocated, a WPAR must meet certain configuration requirements. The WPAR must be marked as mobile when configured. Additionally, the WPAR must be configured such that its private file systems are provided by an NFS server. Normally an application WPAR shares the file systems of the hosting global environment. In order to be relocated, an application WPAR must be configured in such a way that the application code and data is provided by a file system mounted from an NFS server. In order for relocation to work, the departure and arrival global environments must be on the same subnet. The private file systems for the WPAR must be provided by an NFS server, that has exported the file systems to both the arrival system and departure system, in addition to the WPAR itself. The managed systems must also pass compatibility tests.
V5.3
Student Notebook
Uempty
When a managed system is registered, WPAR Manager compares the properties against all existing systems
Compatibility tests are performed, comparing departure and arrival systems when a WPAR is to be relocated Mandatory critical tests Optional additional tests
An attempted relocation will have a compatibility state, based on the departure and arrival systems
Fully compatible Outbound compatible Inbound compatible Incompatible
Copyright IBM Corporation 2009
AT611.0
4-19
Student Notebook
- The operating system level on the arrival system must be at least as high as the level on the departure system - The version, release, modification, and fix level of the bos.rte fileset on the arrival system must be at least as high as the level on the departure system - The version, release, modification, and fix level of the bos.wpars fileset on the arrival system must be at least as high as the level on the departure system - The bos.rte.libc file must be the same on the arrival system and the departure system - There must be at least as many storage keys on the arrival system as on the departure system
Compatibility states
Depending on the results of compatibility testing, two managed systems might be fully compatible, outbound compatible, inbound compatible, or incompatible. The compatibility states are as follows: - Fully compatible All critical and user-selected tests comparing the system properties of the departure system to the system properties of the arrival system pass. All tests comparing the properties of the arrival system to the departure system also pass. A WPAR can be relocated from the departure system to the arrival system and can also be relocated from the arrival system back to the departure system. - Outbound compatible Compatibility testing shows that a WPAR can be relocated from the departure system to the arrival system, but it cannot be relocated back from the arrival system to the departure system. Relocation to a newer hardware environment might require changes to an application that cannot be reversed, or the application might begin to exploit certain hardware features, causing a relocation back to an earlier hardware version to fail. - Inbound compatible Compatibility testing shows that a WPAR can be relocated from the arrival system to
4-20 Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
Uempty
the departure system, but it cannot be safely relocated from the departure system to the arrival system. A system that is inbound compatible is not a good candidate for relocation. If the WPAR were already on the arrival system it could be moved back to the original system. A failure might occur if you try to move the WPAR to the inbound compatible system, but it is possible, in some cases, that the relocation might succeed. - Incompatible Compatibility testing shows that a WPAR cannot be safely relocated either from the departure system to the arrival system, or from the arrival system to the departure system.
4-21
Student Notebook
Create WPARs with WPAR Manager View information about WPARs Deploy WPARs using WPAR Manager Relocate a WPAR
AT611.0
Notes:
V5.3
Student Notebook
Uempty
Checkpoint
IBM Power Systems
1. 2. 3. 4. 5.
True/False: Only system WPARs can be relocated. True/False: A WPAR using local file systems can be relocated. True/False: The departure system and arrival system must be on the same subnet. True/False: The NFS server must export the WPAR's file systems to the departure system, the arrival system and the WPAR. Which one of the following cannot be performed using WPAR Manager: a. b. c. d. Create a WPAR Delete a WPAR Deploy a WPAR on a managed system Manage software inside a WPAR
Copyright IBM Corporation 2009
AT611.0
Notes:
4-23
Student Notebook
Unit summary
IBM Power Systems
IBM WPAR Manager is a chargeable software product WPAR Manger has multiple components:
WPAR Manager, which also includes a GUI, and a database WPAR Agent Manager WPAR Agent in each managed system
WPARs can be created and managed using WPAR Manager WPARs that are configured as mobile can be relocated from one managed system to another The destination and arrival systems must pass compatibility tests for a WPAR to be relocated WPAR relocation is facilitated by Metacluster Checkpoint Restart software
Copyright IBM Corporation 2009
AT611.0
Notes:
V5.3
Student Notebook
AP
Checkpoint solutions (1 of 2)
IBM Power Systems
1. 2.
True/False: WPARs can be used on any system running AIX 6. Which one of the following terms is given to the operating system that hosts WPARs?
a. b. c. d. WPAR Manager System WPAR Global environment Live Application Mobility
3.
c. d.
A-1
Student Notebook
Unit 1 (cont.)
Checkpoint solutions (2 of 2)
IBM Power Systems
4.
5. 6.
True/False: WPAR capability is included in the base AIX 6 operating system. True/False: With WPAR resource control you can use a configuration based on shares, percentages, and WPAR load averages. Only shares and percentages-based control can be configured.
A-2
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
AP
Unit 2
Checkpoint solutions (1 of 2)
IBM Power Systems
1. 2. 3.
True/False: Application WPARs have visibility to all file systems in the global environment. True/False: If an application WPAR needs access to a network, it must be configured with a unique IP address and hostname. Which one of the following cannot be performed with an application WPAR:
a. b. c. d. Create the WPAR with a specification file Use SMIT to configure and manage the WPAR Login to the WPAR with clogin Change the name of a running WPAR
4. 5.
True/False: An application WPAR can be configured to use unique user IDs. True/False: All physical devices are owned by the global environment.
Copyright IBM Corporation 2009
A-3
Student Notebook
Unit 2 (cont.)
Checkpoint solutions (2 of 2)
IBM Power Systems
6.
True/False: When an application WPAR is created, a *.cf file is created in the /etc/wpars directory, where * represents the name of the WPAR. What is the new flag that will cause many AIX commands to display WPAR-specific information? Choose one of the following:
a. b. c. d. The WPAR flag The -@ flag The -& flag The -# flag
7.
A-4
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
AP
Unit 3
Checkpoint solutions (1 of 2)
IBM Power Systems
1. 2. 3. 4. 5.
True/False: By default, all file systems for a system WPAR are created as local file systems. /usr and /opt are namefs mounts. True/False: A system WPAR may be configured with multiple IP addresses. True/False: A system WPAR can be configured to use unique user IDs. True/False: All physical devices are owned by the global environment. Which one of the following cannot be performed with a system WPAR:
a. b. c. d. Access additional file systems using NFS Write to a shared copy of /usr Write to a shared copy of /proc Install a different version of application software from the global environment
A-5
Student Notebook
Unit 3 (cont.)
Checkpoint solutions (2 of 2)
IBM Power Systems
6.
Which one of the following procedures is used to update operating system software in WPARs using shared /usr and /opt file systems:
a. b. c. Update the software in the global environment, then run the syncwpar A command from the global environment Login to the WPAR and update the software Update the software in the global environment, then run the syncwpar command from within each WPAR
7.
Which one of the following procedures can be used to update operating system software in WPARs using private /usr and /opt file systems:
a. b. c. Update the software in the global environment, then run the syncwpar A command from the global environment Login to the WPAR and update the software Update the software in the global environment, then login to each WPAR, and update the software
Copyright IBM Corporation 2009
A-6
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
Student Notebook
AP
Unit 4
Checkpoint solutions
IBM Power Systems
1. 2. 3. 4. 5.
True/False: Only system WPARs can be relocated. Both system and application WPARs can be relocated. True/False: A WPAR using local file systems can be relocated. The private file systems for the WPAR must come from an NFS server. True/False: The departure system and arrival system must be on the same subnet. True/False: The NFS server must export the WPAR's file systems to the departure system, the arrival system and the WPAR. Which one of the following cannot be performed using WPAR Manager: a. Create a WPAR b. Delete a WPAR c. Deploy a WPAR on a managed system d. Manage software inside a WPAR
A-7
Student Notebook
A-8
Exploring WPAR
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V5.3
backpg
Back page