0% found this document useful (0 votes)
76 views

An14g7 Course

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

An14g7 Course

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 901

V12.

cover

Front cover
Notebook
AIX Jumpstart for UNIX Professionals
Course code AN14G ERC 7.0

IBM Training
May 2024 edition
Notices
© Copyright International Business Machines Corporation 2009, 2024.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM
representative for information on the products and services currently available in your area. Any reference to an IBM product, program,
or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent
product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this
document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, MD-NC119, Armonk, NY 10504-1785, US
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer of express or implied
warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein;
these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s)
and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an
endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those
websites is at your own risk.
IBM may use or distribute any of the information you provide in any way it believes appropriate without incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any
other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible,
the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to
actual people or business enterprises is entirely coincidental.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
V12.0
Contents

TOC

Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi

Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii

Unit 0. AIX Jumpstart for UNIX Professionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-1


Course objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-2
Course agenda (1 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-3
Course agenda (2 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-4
Course agenda (3 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-5
Course agenda (4 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-6
Course agenda (5 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-7
Class logistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-8
Introductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-9

Unit 1. Introduction to AIX and IBM Power servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
AIX overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Additional AIX capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Additional AIX capabilities (continued) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Logical partition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Typical Power server layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-10
HMC and LPAR capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-12
The HMC (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-13
The HMC (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-14
Virtualization example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-15
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-16
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-17
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-18
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-19

Unit 2. AIX system management tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
AIX administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
SMIT main menu (text-based) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Dialog screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10
Output screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-12
SMIT log and script files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15
Distributed System Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16
Setting up DSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
Command Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
DSH log file example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-21
DSM examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-24

© Copyright IBM Corp. 2009, 2024 iii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25


Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-26
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27

Unit 3. AIX software installation and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
AIX media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Software packaging definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Software bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
AIX software levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10
What is my AIX version? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12
Software installation and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Software repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16
Software states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
Software listing and versioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-18
lslpp, filesets, and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19
Installing new software using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-20
Installing software using the command line: Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-23
Applying patches to the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-24
Applying patches, apply, commit, reject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25
Listing fixes (APARs) installed on the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-26
Interim fix management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-27
Removing installed software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-29
Recovering from broken or inconsistent states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-31
RedHat Package Manager filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
AIX and Open Source Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34
AIX Toolbox and DNF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-35
Installing DNF (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37
Installing DNF (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39
DNF commands (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40
DNF commands (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41
DNF commands (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43
DNF commands (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45
Service update management assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46
SUMA base configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-48
Download AIX updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
SUMA command line execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-52
Download AIX security interim fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-53
emgr_check_ifixes command line execution (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-54
emgr_check_ifixes command line execution (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-55
emgr_download_ifix command line execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-56
Fix Central website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-57
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-58
Fix Level Recommendation Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-59
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-60
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-61
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-62
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-63
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-64

© Copyright IBM Corp. 2009, 2024 iv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Unit 4. System configuration and devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Unit topics (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Device terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
System components locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Physical location code examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Virtual location code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10
Unit topics (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-11
System configuration and device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
Device commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13
The prtconf command (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14
The prtconf command (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-15
The lscfg command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-16
The lsdev command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-17
The lsslot command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18
The lsattr and chdev commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19
Unit topics (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-20
Device configuration databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-21
Listing of the /dev directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-22
Device configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-23
Device states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-24
Device configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-25
/dev directory, device configuration, and control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-26
rendev command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-27
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-28
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-29
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-30
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-31

Unit 5. TCP/IP networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Unit topics (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Ethernet adapters and interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
How is TCP/IP configured on AIX (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
How is TCP/IP configured on AIX (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
SMIT, ODM, and the kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Unit topics (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-10
TCP/IP startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-11
TCP/IP start-up flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-12
Command line TCP/IP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-13
Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-14
Unit topics (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-16
Network file system (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-17
Network file system (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-18
NFS server configuration (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-20
Manual NFS client mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-21
Predefined NFS client mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-22
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-23
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27

Unit 6. System startup and shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

© Copyright IBM Corp. 2009, 2024 v


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3


Startup modes for AIX (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Startup modes for AIX (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
AIX startup process overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
AIX partition activation (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
AIX partition activation (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-11
/etc/inittab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-12
AIX run levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-13
Directory and script control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-14
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-15
System Resource Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-16
Listing subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-17
SRC control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-18
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-19
AIX partition shutdown (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-20
AIX partition shutdown (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-21
Managed system shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-22
The alog command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-23
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-25
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-26
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-27
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-28

Unit 7. Basics of configuring logical partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Creating partitions and profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Memory and processor allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Adapter allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Create Logical Partition wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-10
Create Logical Partition wizard steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-11
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-13
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-14
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-15
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-16
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-17

Unit 8. AIX installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Installation methods for AIX 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
AIX installation in a partition (DVD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
Installing AIX from DVD (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Installing AIX from DVD (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
Installation and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9
Installation and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-10
Method of installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-11
Installation disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-12
Set Primary Language Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-13
Security Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-15
Install Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-17
Install summary and installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-19
License Agreements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-20

© Copyright IBM Corp. 2009, 2024 vi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-21


AIX installation: Post-install steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-22
Installation Assistant and login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-23
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-24
AIX installation in a partition using NIM: NIM overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-25
AIX installation in a partition using NIM: Configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-27
Network boot (1 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-28
Network boot (2 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-29
Network boot (3 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-30
Network boot (4 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-31
Network boot (5 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-32
Network boot (6 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-33
Network boot (7 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-34
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-36
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-37
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39

Unit 9. Working with the Logical Volume Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Logical Volume Manager components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
SMIT Volume Groups menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
Creating an original volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Creating a scalable volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Extending and reducing a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Removing a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-11
Activating volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Deactivating volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Changing characteristics of a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14
List all logical volumes by volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-15
Mirroring volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16
Viewing volume group information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Listing PVs in a VG and VG contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-19
Import and Export a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-21
Documenting the disk storage setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-23
Physical partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
SMIT Physical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-25
Viewing physical volume information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-26
Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-27
List logical volumes on a physical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-28
Move contents of physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-29
Logical volumes and logical partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-30
SMIT Logical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-31
Uses of logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-32
Creating a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-33
Creating a logical volume with SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-34
Logical volume placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-35
Changing the characteristics of a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-36
Reorganize logical volumes in a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-37
Increasing the size of a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-38
Increasing the size of a logical volume with SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-39
Renaming a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-40
Removing a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-41

© Copyright IBM Corp. 2009, 2024 vii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-42


Mirrored logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-43
Striped logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-44
Mirrored and striped logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-45
Mirroring, allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-46
Mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-47
Mirroring scheduling policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-49
Mirror write consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-51
LVM options which affect performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-53
Show all logical volumes in a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-56
Show logical volume characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-57
Show LP to PP relationship on physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-58
Show the physical volume layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-59
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-60
Logical Volume Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-61
Creating Encrypted Logical Volumes (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-64
Creating Encrypted Logical Volumes (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-65
Creating Encrypted Logical Volumes (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-68
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-72
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-73
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-74
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-75

Unit 10. File systems administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-3
Journaled file system support in AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-4
Advantages of JFS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-5
JFS2 structural components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-7
Listing inode and block size information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-8
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-9
Creating a JFS2 file system (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Creating a JFS2 file system (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11
Creating a file system on a previously defined logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12
Mounting and unmounting a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13
Mounting over an empty directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Mounting over files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15
Mounting a file system and /etc/filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16
Changing the size of a JFS2 file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
JFS2 logging options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18
Examples - Creating and displaying file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20
Removing a JFS2 file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
File system space management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23
Viewing file system utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24
Viewing disk usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-25
Control growing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-26
Listing file system utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27
Monitoring file system growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28
Listing disk usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29
Block size considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31
Fragmentation considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32
Verify and repair a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-33
Review questions (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-34
Review answers (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-35
Review questions (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-36

© Copyright IBM Corp. 2009, 2024 viii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Review answers (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-37


Review questions (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38
Review answers (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-39
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-41

Unit 11. The Object Data Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-3
What is the ODM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-4
Data managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-5
ODM components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-6
ODM database files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-8
Device configuration summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-9
Configuration manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10
Location and contents of ODM repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11
How ODM classes act together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-13
Data not managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
Let's review: Device configuration and the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
ODM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21
Software vital product data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
Software states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24
ODM and high-level device commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-29
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31

Unit 12. LVM metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-3
Review: LVM terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-4
LVM identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-6
LVM data on disk control blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-8
LVM data in the operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
LVM-related ODM objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-12
Exporting a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
Importing a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
importvg and duplicate names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
importvg and existing logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
importvg and existing file systems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
importvg and existing file systems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
How LVM interacts with the ODM and the VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23
ODM-related LVM problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-24
Fixing ODM problems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
Fixing ODM problems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
Intermediate level ODM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-30
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-33

© Copyright IBM Corp. 2009, 2024 ix


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Unit 13. Disk management procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-3
Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-4
Stale partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-5
Mirroring rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-7
VGDA count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-10
Quorum not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
Nonquorum volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12
Forced vary on (varyonvg -f) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
Physical volume states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-16
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18
Disk replacement: Starting point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-19
Procedure 1 (1 of 4): Disk mirrored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-21
Procedure 1 (2 of 4): Disk mirrored with replacepv . . . . . . . . . . . . . . . . . . 13-22
Procedure 1 (3 of 4): Disk mirrored without replacepv . . . . . . . . . . . . . . . . 13-23
Procedure 1 (4 of 4): Special steps for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-25
Procedure 2 (1 of 2): Disk still working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-26
Procedure 2 (2 of 2): Special steps for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-28
Procedure 3: Disk in missing or removed state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-30
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-32
Procedure 4: Total rootvg failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-33
Procedure 5: Total non-rootvg failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-34
ODM errors from LVM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-36
Removal of disk without reducevg (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-37
Removal of disk without reducevg (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-38
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-39
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-40
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-41
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-42

Unit 14. Backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-3
Backup introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-4
System image backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-5
Creating a mksysb image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-7
image.data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
bosinst.data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13
mksysb tape image format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-15
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-17
Restoring a mksysb from a tape device (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-18
Restoring a mksysb from a tape device (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-19
Restoring a mksysb from a NIM server (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-21
Restoring a mksysb from NIM server (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-22
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23
Creating a backup of a user defined volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24
Restoring a backup of a user defined volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-26
Traditional UNIX and AIX backup commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-27
Backup and restore by filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-28
Backup and restore by inode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-29
Backup and restore by inode example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-30
tar command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-31
cpio command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-32

© Copyright IBM Corp. 2009, 2024 x


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC pax command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-33


dd command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-34
Compression commands (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-35
Compression commands (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-36
Snapshot volume groups (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-37
Snapshot volume groups (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-38
Snapshot volume group commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-39
Snapshot volume group example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-40
JFS2 snapshot (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-41
JFS2 snapshot (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-42
JFS2 snapshot mechanism (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-43
JFS2 snapshot mechanism (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-44
JFS2 snapshot SMIT menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-45
Creating snapshots: External . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-46
Creating snapshots: Internal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-48
Listing snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-50
Using a JFS2 snapshot to recover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-51
Using a JFS2 external snapshot to back up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-52
Using a JFS2 internal snapshot to back up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-53
JFS2 snapshot space management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-54
Backup best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-55
Review questions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-56
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-57
Review questions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-58
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-59
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-60
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-61

Unit 15. Error monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-3
Error logging components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-4
Generating an error report using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-7
The errpt command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-10
A summary report: errpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-12
A detailed error report: errpt -a . . . . . . . . . . . . . . . . . . . . . . . . . 15-13
Types of disk errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-15
LVM error log entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-17
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-18
Maintaining the error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-19
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-22
Error notification methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-23
Self-made error notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-25
ODM-based error notification: errnotify . . . . . . . . . . . . . . . . . . . . . . 15-26
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-29
syslogd daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-30
syslogd configuration examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-31
Redirecting syslog messages to error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-34
Directing error log messages to syslogd . . . . . . . . . . . . . . . . . . . . . . 15-35
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36
Resource Monitoring and Control (RMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-37
Monitoring specific filesystem usage with RMC (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-41
Monitoring specific filesystem usage with RMC (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-44
Monitoring specific filesystem usage with RMC (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-45
RMC rearm event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-48
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-50

© Copyright IBM Corp. 2009, 2024 xi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-51


Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-52
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-53

Unit 16. System initialization: Accessing a boot image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-3
How does a Power server or LPAR boot? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-4
Loading of a boot image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-6
Boot disk and the boot logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-7
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-10
Working with bootlists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-11
AIX 7: Bootlist pathid enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-13
Starting System Management Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15
Working with bootlists in SMS (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-16
Working with bootlists in SMS (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-19
Boot device alternatives (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-20
Boot device alternatives (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-22
Accessing a system that will not boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-23
Booting in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-25
Working in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-27
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-29
How to fix a corrupted BLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-30
Review questions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-32
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-33
Review questions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-34
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-35
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-36
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-37

Unit 17. System initialization: rc.boot and inittab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-3
System software initialization overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-4
Contents of the boot logical volume (hd5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-5
rc.boot 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-7
rc.boot 2 (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-9
rc.boot 2 (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-11
rc.boot 3 (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12
rc.boot 3 (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14
rc.boot summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-15
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-16
Fixing corrupted file systems and logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-17
The alog command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-19
cfgmgr output in the boot log using alog . . . . . . . . . . . . . . . . . . . . . . 17-21
/etc/inittab file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-23
Boot problem management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-27
Let's review: /etc/inittab file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-30
Let’s review solution: /etc/inittab file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-31
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-33
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-34
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-35
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-36

Unit 18. The AIX system dump facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-2

© Copyright IBM Corp. 2009, 2024 xii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-3


System dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-4
Types of dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-5
When a dump occurs – Traditional dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-7
When a dump occurs – Firmware assisted dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-8
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-10
The sysdumpdev command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-11
Configuring the dump type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-17
Dedicated dump device (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-19
Dedicated dump device (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-22
dumpcheck utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-23
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-26
Methods of starting a dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-27
Generating dumps with SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-29
Generating dumps with HMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-32
Copying a system dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-33
Working with AIX support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-35
Capturing system data with snap command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-37
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-39
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-40
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-41
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-42

Unit 19. Install and cloning techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-3
Alternate disk installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-4
Alternate mksysb disk installation (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-5
Alternate mksysb disk installation (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-7
Alternate disk rootvg cloning (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-8
Alternate disk rootvg cloning (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-10
Removing an alternate disk installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-11
NIM alternate disk migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13
AIX Live Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15
AIX Live Update and applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-16
Live Update requirements (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-17
Live Update requirements (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-18
Live Update storage restrictions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-20
Live Update storage restrictions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-21
AIX software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-22
HMC token . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-23
Live Update configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-24
The geninstall command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-26
Performing the Live Update operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-27
Live Update interim fix example: Phase 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-28
Live Update interim fix example: Phase 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-29
Live Update interim fix example: Phase 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-30
Live Update interim fix example: Phase 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-31
Live Update interim fix example: Phase 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-33
Live Update interim fix example: Blackout period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-34
Live Update interim fix example: Phase 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-35
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-36
Topic 2 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-37
multibos utility overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-38
Active and standby BOS logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-39
The multibos utility – setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-40

© Copyright IBM Corp. 2009, 2024 xiii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Contents

TOC The multibos utility – operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-41


The multibos utility – preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-42
The multibos utility – preview operation and review logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-43
The multibos utility – create standby BOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-44
The multibos utility – verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-45
The multibos utility – update AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-46
The multibos utility – strategy and verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-47
mksysb_iso utility overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-49
create_ova utility overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-50
Review questions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-52
Review answers (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-53
Review questions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-54
Review answers (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-55
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-56
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-57

Appendix A. Survey of additional AIX facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1

Appendix B. Printers and queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1

Appendix C. Quick reference: Solaris to AIX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1


Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Installing and upgrading tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Booting and shutting down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Device management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Network management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
File system management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Virtual disk management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Logical volume management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Appendix D. Quick reference: HP-UX to AIX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1


Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Installing and upgrading tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Booting and shutting down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Device management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Network management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
File system management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Logical volume management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1

© Copyright IBM Corp. 2009, 2024 xiv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Trademarks

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, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
AIX® IBM Power® IBM Cloud®
IBM Security® IBM Storage® HMC®
VIOS® Live Partition Mobility® Power Architecture®
PowerVC® PowerHA® PowerPC®
PowerVM® Redbooks® LVM®
SystemMirror® Think® Tivoli®
WebSphere®
PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated in the
United States, and/or other countries.
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United
States and other countries.
Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle
and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and service names might be trademarks of IBM or other companies.

© Copyright IBM Corp. 2009, 2024 xv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Course description

pref

Course description
AIX Jumpstart for UNIX Professionals

Duration: 5 days

Purpose
This course provides focused training for experienced UNIX administrators on how to install,
customize, and administer the AIX operating system in a multiuser Power server partitioned
environment. The course is based on AIX 7.3 running on a Power server managed by Hardware
Management Console version 10 and provides practical discussions that are appropriate to earlier
AIX releases.

Audience
This intermediate course is intended for experienced UNIX system administrators who need
training to support their transition to supporting AIX running on IBM Power processor based
systems in a multiuser partitioned environment.

Prerequisites
The students who are attending this course should already be able to use basic UNIX commands
to:
• Execute basic AIX commands
• Manage files and directories
• Use the vi editor
• Use redirection, pipes, and tees
• Use the utilities find and grep
• Use command and variable substitution
• Set and change Korn shell variables
• Write simple shell scripts
The above skills can be acquired by attending AIX Basics (AN10G or AN10D1DG) or through
equivalent AIX/UNIX knowledge.
In addition, students are expected to have hands-on experience administering a UNIX operating
system (such as Solaris, HP/UX, and others) including:
• User management and system security
• Storage
• Networking

© Copyright IBM Corp. 2009, 2024 xvi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Course description

pref • System shutdown and restart


• Backup and recovery
• System task scheduling

Objectives
• Install the AIX operating system, filesets, and RedHat Package Manager (RPM) packages
• Perform system startup and shutdown
• Discuss and use system management tools such as System Management Interface Tool
(SMIT)
• Manage physical and logical devices
• Discuss the purpose of the logical volume manager
• Perform logical volume and file system management
• Perform and restore system backups
• Use the AIX error log as a tool in problem determination
• Configure Transmission Control Protocol/Internet Protocol (TCP/IP) networking

Contents
• Lecture units
• Lab exercises

© Copyright IBM Corp. 2009, 2024 xvii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Agenda

pref

Agenda

Note

The following unit and exercise durations are estimates, and might not reflect every class
experience.

Day 1
Welcome
Unit 1: Introduction to AIX and IBM Power servers
Exercise 1: Introduction to AIX and IBM Power servers
Unit 2: AIX system management tools
Exercise 2: Using system management tools in AIX
Unit 3: AIX software installation and maintenance
Exercise 3: AIX software installation and maintenance
Unit 4: System configuration and devices
Exercise 4: System configuration and devices

Day 2
Unit 5: TCP/IP networking
Exercise 5: TCP/IP implementation
Unit 6: System startup and shutdown
Exercise 6: System startup and shutdown
Unit 7: Basics of configuring logical partitions
Exercise 7: Configuring logical partitions
Unit 8: AIX installation
Exercise 8: AIX installation
Unit 9: Working with the Logical Volume Manager

Day 3
Exercise 9: Working with LVM
Unit 10: File system administration
Exercise 10: File system administration
Unit 11: The Object Data Manager
Exercise 11: The Object Data Manager
Unit 12: LVM metadata
Exercise 12: LVM metadata issues
Unit 13: Disk management procedures
Exercise 13: Disk management procedures

© Copyright IBM Corp. 2009, 2024 xviii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Agenda

pref
Day 4
Unit 14: Backup and restore
Exercise 14: Backup and restore
Unit 15: Error monitoring
Exercise 15: Error monitoring
Unit 16: System initialization - I
Exercise 16: System initialization – I (Parts 1-3)

Day 5
Exercise 16: System initialization - I (Part 4)
Unit 17: System initialization - II
Exercise 17: System initialization - II
Unit 18: The AIX system dump facility
Exercise 18: System dump
Unit 19: Advanced Install Techniques
Exercise 19: Topic 1: Alternate disk
Exercise 19: Topic 2: Using multibos
(Optional) Appendix A: Survey of additional AIX facilities
(Optional) Appendix B: Printers and queues
(Optional) Appendix C: Quick reference: Solaris to AIX
(Optional) Appendix D: Quick reference: HP-UX to AIX

© Copyright IBM Corp. 2009, 2024 xix


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Unit 0. AIX Jumpstart for UNIX


Professionals
Estimated time
00:15

Overview
Welcome! This course provides focused training for experienced UNIX administrators on how to
install, customize, and administer the AIX operating system in a multiuser Power server
partitioned environment. The course is based on AIX 7.3 running on a Power server managed by
Hardware Management Console version 10 and provides practical discussions that are
appropriate to earlier AIX releases.

© Copyright IBM Corp. 2009, 2024 0-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course • After completing this course, you should be able to:


objectives ƒ Install the AIX operating system, filesets, and RedHat Package
Manager (RPM) packages
ƒ Perform system startup and shutdown
ƒ Discuss and use system management tools such as System
Management Interface Tool (SMIT)
ƒ Manage physical and logical devices
ƒ Discuss the purpose of the logical volume manager
ƒ Perform logical volume and file system management
ƒ Perform and restore system backups
ƒ Use the AIX error log as a tool in problem determination
ƒ Configure Transmission Control Protocol/Internet Protocol
(TCP/IP) networking

© Copyright IBM Corporation 2024

Figure 0-1. Course objectives

© Copyright IBM Corp. 2009, 2024 0-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course agenda (1 of 5) Day 1


• Welcome
• Unit 1: Introduction to AIX and IBM Power
servers
ƒ Exercise 1: Introduction to AIX and IBM Power
servers
• Unit 2: AIX system management tools
ƒ Exercise 2: Using system management tools in
AIX
• Unit 3: AIX software installation and
maintenance
ƒ Exercise 3: AIX software installation and
maintenance
• Unit 4: System configuration and devices
ƒ Exercise 4: System configuration and devices

© Copyright IBM Corporation 2024

Figure 0-2. Course agenda (1 of 5)

© Copyright IBM Corp. 2009, 2024 0-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course agenda (2 of 5) Day 2


• Unit 5: TCP/IP networking
ƒ Exercise 5: TCP/IP implementation
• Unit 6: System startup and shutdown
ƒ Exercise 6: System startup and shutdown
• Unit 7: Basics of configuring logical partitions
ƒ Exercise 7: Configuring logical partitions
• Unit 8: AIX installation
ƒ Exercise 8: AIX installation
• Unit 9: Working with the Logical Volume
Manager

© Copyright IBM Corporation 2024

Figure 0-3. Course agenda (2 of 5)

© Copyright IBM Corp. 2009, 2024 0-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course agenda (3 of 5) Day 3


ƒ Exercise 9: Working with LVM
• Unit 10: File system administration
ƒ Exercise 10: File system administration
• Unit 11: The Object Data Manager
ƒ Exercise 11: The Object Data Manager
• Unit 12: LVM metadata
ƒ Exercise 12: LVM metadata issues
• Unit 13: Disk management procedures
ƒ Exercise 13: Disk management procedures

© Copyright IBM Corporation 2024

Figure 0-4. Course agenda (3 of 5)

© Copyright IBM Corp. 2009, 2024 0-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course agenda (4 of 5) Day 4


• Unit 14: Backup and restore
ƒ Exercise 14: Backup and restore
• Unit 15: Error monitoring
ƒ Exercise 15: Error monitoring
• Unit 16: System initialization - I
ƒ Exercise 16: System initialization – I (Parts 1-3)

© Copyright IBM Corporation 2024

Figure 0-5. Course agenda (4 of 5)

© Copyright IBM Corp. 2009, 2024 0-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Course agenda (5 of 5) Day 5


ƒ Exercise 16: System initialization - I (Part 4)
• Unit 17: System initialization -II
ƒ Exercise 17: System initialization -II
• Unit 18: The AIX system dumpfacility
ƒ Exercise 18: System dump
• Unit 19_ Advanced Install Techniques
ƒ Exercise 19: Topic 1: Alternate disk
ƒ Exercise 19: Topic 2: Using multibos

© Copyright IBM Corporation 2024

Figure 0-6. Course agenda (5 of 5)

© Copyright IBM Corp. 2009, 2024 0-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Class logistics
• Schedule:
ƒ Breaks and lunch
ƒ Start and stop times

• Logistics:
ƒ Building access
ƒ Messages
ƒ Facilities
ƒ Parking
ƒ Emergency exits

Figure 0-7. Class logistics

© Copyright IBM Corp. 2009, 2024 0-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 0. AIX Jumpstart for UNIX Professionals

Uempty

Introductions
• Name
• Company
• Job duties
• AIX or other UNIX experience
• Computer systems at work
• System usage/application
• Expectations

Figure 0-8. Introductions

© Copyright IBM Corp. 2009, 2024 0-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Unit 1. Introduction to AIX and IBM


Power servers
Estimated time
00:35

Overview
This unit provides an introduction to IBM Power servers, AIX, and system administration.

How you will check your progress


• Review questions
• Exercise

References
AIX 7.3 Documentation https://www.ibm.com/docs/en/aix/7.3
AIX - From Strength to Strength – (October 2020 edition):
https://www.ibm.com/support/pages/system/files/inline-files/IBM
%20AIX%20from%20Strength%20to%20Strength%202020%201
3%20July%202020.pdf
AN11G - Power Systems for AIX I: LPAR Configuration and Planning
https://www.ibm.com/training/course/power-systems-for-aix-i-lpa
r-configuration-and-planning-AN11G

© Copyright IBM Corp. 2009, 2024 1-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Define terminology and concepts of IBM Power servers, virtualization,
HMC, and AIX
ƒ Identify the components and their relations in a typical setup of a Power
environment

© Copyright IBM Corporation 2024

Figure 1-1. Unit objectives

The purpose of this unit is to introduce Power servers and AIX, including their key capabilities, for
new AIX system administrators. After completing this unit, you should be able to:
• Define terminology and concepts of IBM Power System servers, virtualization, HMC, and AIX
• Identify the components and their relationships in a typical setup of a Power environment.
The prerequisite for this class is the first-level LPAR course (AN11). However, in reality, many
students jump straight into this class. For some students, the material in the introduction acts as a
refresher. For students new to Power servers and AIX, it should help put the big picture into
context before concentrating on AIX administration.
Let us start by providing an overview of AIX.

© Copyright IBM Corp. 2009, 2024 1-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Topic 1 objectives
• Define terminology and concepts of IBM Power servers, virtualization, HMC, and AIX
• Identify the components and their relations in a typical setup of a Power environment

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 1-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

AIX overview
• IBM’s proprietary operating system based on UNIX System V.
ƒ Also has BSD compatible commands and programming interface extensions
• Advanced Interactive Executive (AIX) runs on proprietary hardware (H/W) called IBM Power
servers.
ƒ Eighth generation of Power, based on Reduced Instruction Set Computer (RISC) technology
• Most Power servers today run many instances of AIX in partitions that are known as logical
partitions (LPAR).
ƒ This is H/W partitioning that is managed by the system firmware, Power Hypervisor

LPAR:
AIX1

LPAR:
AIX2

LPAR:
AIX3
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-3. AIX overview

Advanced Interactive Executive (AIX) is IBM's proprietary UNIX OS based on UNIX System V
with 4.3BSD-compatible command and programming interface extensions. Announcement Letter
Number 286-004 dated January 21, 1986:
• “The AIX Operating System is based on INTERACTIVE Systems Corporation's IN/ix, which, in
turn, is based on UNIX System V, as licensed by AT&T Bell Laboratories. Some portions of the
modifications and enhancements were developed by IBM; others were developed by
INTERACTIVE under contract to IBM.”
Workload partitions (WPAR) are virtualized, secure operating system environments, within a
single instance of the AIX operating system.
Note the difference between the generic term partition with the more specific term of logical
partition. It is important to understand right from the beginning that, today, most AIX OSs live in
LPARs. LPARs are virtual machines. This is a key message.
Let us provide an overview of additional AIX capabilities.

© Copyright IBM Corp. 2009, 2024 1-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Additional AIX capabilities


• Ease of use:
ƒ SMIT, in addition to command line
ƒ Object Data Manager (ODM) for central configuration repository
• Reliability, availability, and serviceability:
ƒ Resiliency that is built into design of components
ƒ Dynamic changes to system without reboot
ƒ High availability clustering with PowerHA
ƒ AIX Live Update without reboot
• Storage management:
ƒ Logical Volume Manager
ƒ Enhanced journaled file system
• Network Installation Manager

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-4. Additional AIX capabilities

• Management tools
AIX provides several easy to use system administration tools. Foremost among them is SMIT.
It allows the system administrator to carry out system administration tasks without having to
know all of the line commands and their syntax (options and arguments). These will be
covered in the next unit.
• Reliability, availability, and serviceability
The IBM hardware and software is designed and tested to be reliable. Still, unanticipated
problems can occur in the field. To handle this, they provide extensive built-in failure
detection and related data collection capabilities to assist in a quick resolution of the problem.
The hardware is designed with redundant components to be able to be resilient through an
individual component failure. What would be permanent failures are reduced to temporary
failures and early notices are provided that a component needs servicing or replacement.
Since many problems are caused by user (system administrator or operator) errors, they build
in protections against such errors and provide tools such as SMIT to reduce the chance of
error. Administrative tasks that might require the operating system component to be cycled
(or the entire operating system shutdown) in non-AIX systems are designed to be
accomplished dynamically without any outage. Most hardware is not only redundant but
hot-swappable. When faced with a situation where you need to disrupt the application
environment, there are ways to relocate the application, non-disruptively, to an alternate
platform.
• Storage management
AIX provides a built-in flexible and powerful storage manager. Applications work with logical
volumes, which can be dynamically allocated and later relocated across a collection of disks.
If needed, it provides software mirroring and striping. The file system services provide a file

© Copyright IBM Corp. 2009, 2024 1-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty
system that is efficient, can grow to extraordinary size, and provides a collection of functional
capabilities. Later units will cover details of both LVM and JFS2.
• Network Installation Manager
AIX provides a built-in capability to centrally manage the remote installation, back up, restore,
and upgrade of the operating systems in your complex. This course makes extensive use of
the Network Installation Manager (NIM) facility.

© Copyright IBM Corp. 2009, 2024 1-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Additional AIX capabilities (continued)


• Workload management and migration
ƒ Workload Manager and Workload Partitions
ƒ Not H/W dependent: supporting POWER4 through POWER10
• Security
ƒ Role-based access, Trojan detection, system hardening, and more

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-5. Additional AIX capabilities (continued)

• Workload management
The POWER-based processor server provides the ability to place each application in its own
logical partition. But sometimes it can be more efficient to have multiple applications share
the same logical partition (only one operating system kernel). To help provide isolation and
guaranteed resource allocation, AIX allows each application to run in a workload partition.
• Security
AIX provides state of the art security. Regular security alerts and fixes make sure that you
have plugged potential security holes before hackers have a chance to use them. Role
assignments provide a secure and flexible way to delegate administrative authority. Trusted
Execution can identify and block the execution of any trojans on your system, should a hacker
manage to break in. Several tools are provided to help provide a hardened system to avoid
potential break-ins. Transparent file encryption allows the user to selectively protect the files
that are important to be protected. And there is much more.
Let’s start looking at the virtual environment where AIX is typically hosted.

© Copyright IBM Corp. 2009, 2024 1-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Logical partition overview


• An LPAR is the allocation of system resources to create logically separate systems within the
same physical footprint.
• The resource allocation and isolation for a logical partition is implemented in firmware that is
called Power Hypervisor.
ƒ Provides configuration flexibility
• Each partition has its own:
ƒ Operating system
ƒ Resources: Processors, memory, devices (defined in a profile)
• Partitions can consist of physical (real) or virtual devices.
ƒ Or a combination of both
sys1 sys2 sys3 sys4
04:42 14:42 11:42 19:42

LPAR 1 LPAR 2 LPAR 3 LPAR 4

Power Hypervisor
System Hardware (memory, processors, devices)
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-6. Logical partition overview

Logical partition (LPAR)


Logical partitioning is the ability to make a single system that runs as if it were two or more
systems. Each partition represents a division of resources in the Power System. The partitions are
logical because the division of resources is logical and not along physical boundaries.
Hypervisor Partitions are isolated from each other by firmware (underlying software) called the
POWER Hypervisor. The names POWER Hypervisor and Hypervisor is used interchangeably in this
course.
Each partition has its own environment, for example – IP address or time of day, just as any AIX
instance.
The visual shows different time zones and country flags to show that because LPARs are separate
operating environments, system variables such as the time zone, can be set in each operating
system of each LPAR.
Let us look at a typical system layout.

© Copyright IBM Corp. 2009, 2024 1-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Topic 1 objectives
• Define terminology and concepts of IBM Power servers, virtualization, HMC, and AIX
• Identify the components and their relations in a typical setup of a Power environment

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-7. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 1-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Typical Power server layout


• LPAR configuration and control are completed through the Hardware Management Console
(HMC).
• The HMC connects to the service processors and the LPARs.
ƒ A private network usually connects HMC and service processors.

Private Service
Processors Managed
network system
Secondary HMC
‘Backup’ LPAR 1

LPAR 2
Primary HMC Public/open SAN
network LPAR 3

LPAR 4

NIM Server Images

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-8. Typical Power server layout

The diagram shows a typical example of a Power server setup configuration. The HMC connects to
the servers through Ethernet adapters. The official term for a server that is managed by an HMC is
Managed System. The server is split into a number of Logical Partitions (LPARs) running AIX. A
Network Installation Manager (NIM) server is highly preferable to install and update the AIX
LPARs over the network (the NIM server could reside, as an LPAR, on the same system as the
other AIX LPARs, or it could be a separate physical Power server or an LPAR on another Power
server). There can be a maximum of 2 HMCs connected to each system and each system has two
dedicated Ethernet ports that are reserved for this. It is recommended that the HMC to Service
Processor communication occurs through a private network that is reserved for that purpose. The
HMC also must have open network connectively to the LPARs if such features as Connection
Monitoring and Dynamic LPAR (DLPAR) operations are to be achieved. It is also preferable to have
a second HMC connected for availability purposes.
Note: A failure of the HMC does not interfere in any way with the running managed system.
The service processor is a separate, independent processor that provides hardware initialization
during system load, monitoring of environmental and error events, and maintenance support.
It is important to note that the public network provides access to the running LPARs (though
allocated network adapters) even if the HMC is down. The HMC is only needed if you require
access to the LPARs system console or you need to work with the system firmware (to define,
start, stop, or modify the LPARs). If an LPAR has a situation that requires HMC access and your
only HMC is down - that would be a problem. This is the reason for the backup HMC.
There can be many alternatives to the network design, such as a single open network (which is
what we typically use in the class lab environment). Note, this is not an HMC course. There is a
class dedicated to LPAR configuration and planning, AN11G. Details on setting up and connecting
the hardware are provided in the AN11G course.

© Copyright IBM Corp. 2009, 2024 1-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty
The HMC is a key box; let us provide an overview.

© Copyright IBM Corp. 2009, 2024 1-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

HMC and LPAR capabilities


• HMC centralizes system and LPAR management:
ƒ Non-disruptive firmware updates
ƒ Central service point for problem reporting and management
ƒ Control LPAR status and resource allocation
ƒ Access to LPAR system consoles
• Better resource utilization:
ƒ Dynamic LPAR resource allocation
ƒ Shared or dedicated processor pools
ƒ Shared or dedicated network adapters
ƒ Shared or dedicated storage adapters
ƒ Shared or dedicated memory
• Workload relocation (entire LPAR):
ƒ Live Partition Mobility
• Static Partition Mobility
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-9. HMC and LPAR capabilities

• Dynamic logical partitioning (DLPAR) 


The term dynamic in DLPAR means we can add, move, or remove resources without having to
reactivate the partition. If there are partitions that need more or can do with fewer resources,
you can dynamically move the resources between partitions within the managed system
without shutting down the partitions. Both the source and the destination partitions must
support the dynamic partitioning operation.
• Processors and memory 
Each running LPAR has an active profile that contains the resources that LPAR is entitled to.
For processor and memory settings, there is a maximum and a minimum range. These
boundaries cannot be exceeded when performing dynamic reallocation operations.
• Live Partition Mobility 
Live Partition Mobility is a new capability that enables users to move partitions between
systems with no application downtime. Live Partition Mobility enables organizations to move
LPARs from CPU intensive servers to improve overall throughput based on requirements at a
particular time. This also allows us to use a maintenance window on a physical machine
without the need for any application downtime. The only interruption of service would be due
to network latency. If sufficient bandwidth is available, a delay of at most, a few seconds, is
typically expected.
Let us take a closer look at how we work with the HMC.

© Copyright IBM Corp. 2009, 2024 1-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

The HMC (1 of 2)
• An appliance for the management of POWER processor-based servers
ƒ IBM provided POWER based server (desktop or rack mount) running a web-based application on a
customized version of Linux
• Access through https (GUI) and SSH (command line)

• Acts as a focal point for collecting and servicing managed system serviceable events
ƒ Can be configured to call home to IBM for parts and service

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-10. The HMC (1 of 2)

The HMC is a POWER based server, which runs a customized version of Linux. Its main purpose is
to configure and control up to 48 managed systems with a maximum of 1024 partitions across the
managed servers.
The HMC also collects diagnostic and error information from the LPARs and Managed System and
logs them as Serviceable events. If configured, the HMC can send these reports to IBM through
the Electronic Service Agent (ESA).
The HMC is needed for Power servers that runs LPARs. The HMC is an independent system.
The first diagram supports the bullet “Access is through https …”
The second diagram supports the bullet “Acts as a focal point...”
For many years the HMC was an Intel based server. Modern HMCs, such as the 7063-CR1, are
now all POWER based servers.
Let us see the main HMC interface.

© Copyright IBM Corp. 2009, 2024 1-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

The HMC (2 of 2)

ManagedSystems

Navigation
Area

LPARs Proc and MEM


running AIX resources

Task Pad

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-11. The HMC (2 of 2)

The diagram above shows the main view of a managed system – sys853. Operations such as
create, stop, shutdown LPAR can be performed from the Tasks pad or bar, or by selecting the
LPAR itself. The view is highly customizable.
The navigation area offers the main features of the HMC, such as:
• Systems plans for producing or deploying system configuration plans done during design
• HMC Management for configuring the HMC, users, roles, network setting, and other HMC
characteristics
• Updates, for updating the HMC and Managed System firmware
This view was taken from an HMC running V10R1 M1020.
Let us provide an example of virtualization technology.

© Copyright IBM Corp. 2009, 2024 1-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Virtualization example

AIX Virtual I/O Server


LPAR LPAR
Physical
Virtual Virtual Physical network
Ethernet Virtual Ethernet SEA Ethernet
ent0 Ethernet ent1 Layer 2 ent0
Switch Bridge
Virtual ent2
Ethernet
ent1
Hypervisor
Virtual
Virtual Physical
Client Device
Server Storage
Adapter vSCSI
Adapter Mapping Adapter
vtscsi0 vhost0 fcs0

SCSI, SAS, FC physical disks


or logical volumes

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-12. Virtualization example

Virtualizing LPARs
The main benefits of virtualized I/O are as follows:
• Partitions can be created without requiring additional physical I/O resources. The new
partitions can be configured to use virtualized I/O resources,. This allows them to be
configured in a timely manner, since no physical reconfiguration of the system, that is, moving
adapter cards and cables, is required.
• Virtualized I/O allows an economical I/O model, since it allows multiple partitions to share
common resources. For example, multiple partitions can share a single physical adapter.
Without virtualized I/O, each partition would require its own adapter, even if the full capacity
of the adapter was not being utilized.
• The use of virtualized I/O facilitates server consolidation. It permits multiple client partitions
to reside on a single machine, and make efficient use of shared resources.
Virtual I/O Server (VIOS)
The IBM Virtual I/O Server software enables the creation of partitions that use the I/O resources
of another partition. In this way, it helps to maximize the utilization of physical resources on
POWER5 and higher systems. Partitions can have dedicated I/O, virtual I/O, or both. Physical
resources are assigned to the Virtual I/O Server partition in the same way physical resources are
assigned to other partitions. The Virtual I/O Server then provides access to these physical
resources from the virtual client LPARs.
Virtual I/O Server is a separate software product and is included as part of the standard PowerVM
feature. It supports AIX Versions 6.1, 7.1, 7.2, 7.3, Linux partitions and IBM i as virtual I/O clients.
Let us review what we covered with some review questions.

© Copyright IBM Corp. 2009, 2024 1-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Review questions
1. What is the name of the device that creates and controls LPARs?

2. What term is used to refer to a server that is managed by an HMC?

3. True or False: An AIX operating system can run in an environment that has no real devices
allocated.

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-13. Review questions

© Copyright IBM Corp. 2009, 2024 1-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Review answers
1. What is the name of the device that creates and controls LPARs?
The answer is the HMC.

2. What term is used to refer to a server that is managed by an HMC?


The answer is the Managed System.

3. True or False: An AIX operating system can run in an environment that has no real devices
allocated.
The answer is true.

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-14. Review answers

© Copyright IBM Corp. 2009, 2024 1-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Exercise

Introduction to AIX and IBM Power servers

Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024

Figure 1-15. Exercise

© Copyright IBM Corp. 2009, 2024 1-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 1. Introduction to AIX and IBM Power servers

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Define terminology and concepts of IBM Power servers, virtualization,
HMC, and AIX
ƒ Identify the components and their relations in a typical setup of a Power
environment

© Copyright IBM Corporation 2024

Figure 1-16. Unit summary

Here’s the unit summary.

© Copyright IBM Corp. 2009, 2024 1-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Unit 2. AIX system management tools


Estimated time
00:40

Overview
This unit describes the system management tools available in AIX, with a particular focus on SMIT
and DSH.

How you will check your progress


• Review questions
• Exercise

References
AIX Version 7.3 Device management:
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
System Management Interface Tool (SMIT):
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-system-management-interface-tool-smi
t

© Copyright IBM Corp. 2009, 2024 2-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the benefits of the system management tools available in AIX
ƒ Discuss the functionality of SMIT and Distributed System Management
(DSM) for AIX
ƒ Explain how system management activity is logged
ƒ Use SMIT user interfaces or DSM commands

© Copyright IBM Corporation 2024

Figure 2-1. Unit objectives

After completing this unit, you should be able to:


• Describe the benefits of the system management tools available with AIX
• Discuss the functionality of SMIT, and Distributed System Management (DSM) for AIX
• Explain how system management activity is logged
• Use SMIT user interfaces or DSM commands
Let us start by looking at a hierarchy of AIX system components and tools.

© Copyright IBM Corp. 2009, 2024 2-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Topic 1 objectives
• Describe the benefits and discuss the functionality of SMIT
• Describe the benefits and discuss the functionality of Distributed System Management (DSM)

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 2-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

AIX administration

• Designed to make AIX administration simple

System
Management
Interface Tool
(SMIT)
Text based

High-level commands

Low-level Intermediate-level
commands commands
System
System Kernel Resource Object Data ASCII
calls services Controller Manager files

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-3. AIX administration

IBM provides users on AIX with a great deal of flexibility and choice when it comes to
administering an AIX system. SMIT is a simple, but highly effective ASCII-based management tool
that has been in AIX since version 3.
Types of commands
Commands are classified high-, medium-, or low-level:
• High-level commands: These are standard AIX commands, either shell/perl scripts, or C
programs, which can also be executed by a user. They execute multiple low-level or
intermediate-level commands to perform the system administrative functions.
• Intermediate-level commands: These commands interface with special AIX components such
as the System Resource Controller and the Object Data Manager. These commands are rarely
executed directly by a user.
• Low-level commands: These are AIX commands that correspond to AIX system calls or kernel
services. They are not normally executed directly by a user.
The basic idea behind both tools is that they present the system administrator with a menu-driven
front end, with built-in help information and lists. The tools can be used to carry out most system
administrative tasks.
Depending on the menus that are selected and the options that are entered, the tools build the
high-level command with all the correct options, and then execute the command when the user
specifies this action.
High-level commands, in turn, call lower-level commands, which interact directly with the
system, that is, the ODM, kernel, and so forth.
At one point in time there were two other tools that could be used to administer AIX. There were
WebSM and IBM Systems Director Console for AIX. Both tools are no longer supported and have

© Copyright IBM Corp. 2009, 2024 2-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
been discontinued. Therefore, the course does not go into the details of administering or using
either of these tools.
Let us look at SMIT.

© Copyright IBM Corp. 2009, 2024 2-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

SMIT
• An interactive application that simplifies virtually every aspect of AIX system administration.
• Part of AIX, SMIT is available by default.
• SMIT does not use any special hooks. Everything is based on standard AIX commands and
Korn shell functions.
ƒ You can see exactly what commands it performs either before or after execution.
ƒ This is especially useful when you need to automate a repetitive task. You can then use these
commands in your own scripts.
• Text / ASCII based by default.
ƒ If on a graphical display, such as the Virtual Network Computing (VNC) viewer, and the DISPLAY
variable is set, a Motif GUI version is displayed.
ƒ Most users prefer the text-based version that is called smitty.

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-4. SMIT

Overview of SMIT
The System Management Interface Tool (SMIT) provides a menu-driven interface that provides
access to most of the common system management functions, within one consistent
environment.
SMIT is an interactive application that simplifies virtually every aspect of AIX system
administration. It is a user interface that constructs high-level commands from the user's
selections, and then executes these commands on-demand. Those commands can be entered
directly by the user to perform the same tasks, or put into scripts to run over, and over again.
Occasionally, a system administrator runs AIX commands or edit ASCII files directly to complete
a particular system administration task. However, SMIT does make the most frequent or
complex/tedious tasks much easier with a greater degree of reliability.
The following are the SMIT interfaces:
System Management Interface Tool (SMIT), a menu-based user interface that constructs
commands from the options you choose and executes them. With SMIT, you can:
• Install, update, and maintain software
• Configure devices
• Configure disk storage units into volume groups and logical volumes
• Make and extend file systems and paging space
• Manage users and groups
• Configure networks and communication applications
• Print

© Copyright IBM Corp. 2009, 2024 2-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
• Perform problem determination
• Schedule jobs
• Manage system resources and workload
• Manage system environments
• Manage cluster system data
An object-oriented graphical user interface that supports the same system management tasks as
SMIT, but eases system management tasks by:
• Reducing user errors through error checking and dialog design
• Offering step-by-step procedures for new or complex tasks
• Offering advanced options for more experienced administrators
• Making it easier to visualize complex data or relationships among system objects
• Monitoring system activity and alerting the administrator when predefined events occur
• Providing context-sensitive helps, overviews, tips, and links to online documentation
Let us have a look at the main menu.

© Copyright IBM Corp. 2009, 2024 2-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

SMIT main menu (text-based)


# smit
System Management

Move cursor to desired item and press Enter.

Software Installation and Maintenance


Software License Management
Manage Editions
Devices
System Storage Management (Physical & Logical Storage)
Security & Users
Communications Applications and Services
Workload Partition Administration
Print Spooling
Advanced Accounting
Problem Determination
Manage the AIX Cryptographic Framework
Performance & Resource Scheduling
System Environments
Processes & Subsystems
Applications
Installation Assistant
Electronic Service Agent
Using SMIT (information only)

F1=Help F2=Refresh F3=Cancel F8=Image


F9=Shell F10=Exit Enter=Do

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-5. SMIT main menu (text-based)

Main menu selections


The SMIT main menu enables you to select the administrative tasks to be performed. You can also
select online help on how to use SMIT.
Use of keys
In the ASCII mode, in order to select from the menus, you must use the up and down arrow keys.
This moves a highlighted bar over the menu items. Press Enter to select the highlighted item. You
can also use some of the keyboard function keys to perform other functions, such as exiting SMIT
or starting a shell.
Importance of TERM environment variable
When using SMIT in the ASCII mode, the menus and dialog panels sometimes come up distorted.
That is the result of not having an appropriate TERM variable value. Setting and exporting this
variable can solve the problem. For example, executing the command export TERM=vt320 might
solve the problem.
General syntax:
smit [-options] [ FastPath ]
Start ASCII version:
# smitty 
or
# smit -C
Log, but do not actually run, commands:
# smit -x

© Copyright IBM Corp. 2009, 2024 2-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
Redirect the log file and script file:
# smit -s /u/team1/smit.script –l /u/team1/smit.log
# smit -s /dev/pts/1 -l /dev/pts/2
Let us see a dialog screen example.

© Copyright IBM Corp. 2009, 2024 2-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Dialog screen
# smit date
Change / Show Day and Time

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
YEAR (00-99) [14] #
MONTH (01-12) [10] #
DAY (1-31) [08] #
HOUR (00-23) [11] #
MINUTES (00-59) [23] #
SECONDS (00-59) [06] #

Shell exit, useful to


check something
before execution Command
preview

F1=Help F2=Refresh F3=Cancel F4=List Current fast path:


F5=Reset F6=Command F7=Edit F8=Image "date"
F9=Shell F10=Exit Enter=Do

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-6. Dialog screen

Dialog screens and selector screens


A dialog screen allows you to enter values that are used in the operation performed. Some fields
are already completed from information held in the system. Usually, you can change this data
from the default values.
A selector screen is a dialog screen on which there is only one value to change. The value usually
indicates the object that is acted upon by the subsequent dialog and AIX command.
Entering data
To enter data, move the highlighted bar to the value you want to change. Then, either enter a value
or select one from a list. Fields that you can type in have square brackets [ ]. Fields that have data
that is larger than the field width, have angle brackets < > to indicate that there is data further to
the left, right, or both sides of the display area.
Special symbols
Special symbols on the screen are used to indicate how data is to be entered:
• Asterisk (*): This is a required field.
• Number sign (#): A numeric value is required for this field.
• Forward slash (/): A path name is required for this field.
• X: A hexadecimal value is required for this field.
• Question mark (?): The value entered is not displayed.
• Plus sign (+): A pop-up list is available.
An asterisk (*) in the leftmost column of a line indicates that the field is required. A value must be
entered here before you can commit the dialog and execute the command. In the ASCII version, a

© Copyright IBM Corp. 2009, 2024 2-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
plus sign (+) is used to indicate that a pop-up list is available. To access a pop-up list, use the F4
key. If a fixed number of options are available, use the Tab key to cycle through the options.
In the Motif version, a List button is displayed. Either click the button or press <Ctrl-l> to display a
pop-up window.
Use of particular keys
The following keys can be used while in the menus and dialog screens. Some keys are only valid in
particular screens. The keys that are only valid for the ASCII interface are marked (A). The keys
that are only valid for the Motif interface are marked (M).
• F1 (or ESC-1) Help: Show contextual help information.
• F2 (or ESC-2) Refresh: Redraw the display. (A)
• F3 (or ESC-3) Cancel: Return to the previous screen. (A)
• F4 (or ESC-4) List: Display a pop-up list of possible values. (A)
• F5 (or ESC-5) Reset: Restore the original value of an entry field.
• F6 (or ESC-6) Command: Show the AIX command that is executed.
• F7 (or ESC-7) Edit: Edit a field in a pop-up box or select from a multi-selection pop-up list.
• F8 (or ESC-8) Image: Save the current screen to a file (A) and show the current fast path.
• F9 (or ESC-9) Shell: Start a subshell. (A)
• F9 Reset: all fields. (M)
• F10 (or ESC-0): Exit: Exit SMIT immediately. (A)
• F10: Go to the command bar. (M)
• F12 Exit: Exit SMIT immediately. (M)
• Ctrl-l List: Give a pop-up list of possible values. (M)
• PgDn (or Ctrl-v): Scroll down one page.
• PgUp (or ESC-v): Scroll up one page.
• Home (or ESC-<): Go to the top of the scrolling region.
• End (or ESC->): Go to the bottom of the scrolling region.
• Enter: Do the current command or select from a single-selection pop-up list.
• /text: Finds the text in the output.
• n: Finds the next occurrence of the text.

© Copyright IBM Corp. 2009, 2024 2-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Output screen

COMMAND STATUS
No standard
Command: OK stdout: yes stderr: no
error
Before command completion, additional instructions may appear below.

Wed 8 Oct 11:23:06 2014 Standard output following


command execution

Command (stdout)
completed
successfully

F1=Help F2=Refresh F3=Cancel F6=Command


F8=Image F9=Shell F10=Exit /=Find
n=Find Next

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-7. Output screen

Fields on first line of output


The Command field can have the following values: OK, RUNNING, and FAILED.
The value of the stdout field indicates whether there is standard output, that is, whether there is
output produced as a result of running the command. The output is displayed in the body section
of this screen.
The value of the stderr field indicates whether there are error messages. In this case, there are no
error messages.
Note that, in the Motif version of SMIT, a representation of a person in the top right-hand corner of
the screen is used to indicate the values of the Command field.
Body of the screen
The body of the screen holds the output or error messages from the command. In this example,
there is output, but there are no error messages.
A useful aspect of SMIT is the log feature; let us take a look this next.

© Copyright IBM Corp. 2009, 2024 2-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

SMIT log and script files


smit.log
smit
command smit.script
execution
smit.transaction
• $HOME/smit.log
ƒ Records a log of all menu and dialog screens visited, all commands that are executed, and their output
ƒ Records any errors during the SMIT session
• $HOME/smit.script
ƒ Shell script containing all AIX commands that are executed by SMIT
• $HOME/smit.transaction
ƒ SMIT transactions log
ƒ Records date, description, and command script output of the commands that were executed
SMIT output is redirected to file:
# smitty –xs /tmp/new-script /tmp/new-script.
No commands will be run.
AIX system management tools © Copyright IBM Corporation 2024

Figure 2-8. SMIT log and script files

Overview
SMIT creates three files in the $HOME directory of the user who is running SMIT. If these files
already exist, then SMIT appends to them. These files can grow quite large over time, especially
during installations. The user must maintain and truncate these files, when appropriate.
The smit.log file
The smit.log file contains a record of every SMIT screen, menu, selector, and dialog visited, the
AIX commands executed, and the output from these commands. When the image key is pressed,
the screen image is placed in the smit.log file. If there are error or warning messages, or
diagnostic or debugging messages from SMIT, then these are also appended to the smit.log file.
The smit.script file
The smit.script file contains the AIX commands executed by SMIT, preceded by the date and
time of execution. This file can be used directly as a shell script to perform tasks multiple times, or
it can be used as the basis for more complex operations.
The smit.transaction file
SMIT since AIX 5.2 has a file, smit.transaction. This file logs all the executed commands similar
to smit.script. The difference being smit.script logs all commands, while smit.transaction only
logs command_to_executes, see smit.log file.
For example, the user backs up the system by using SMIT.

© Copyright IBM Corp. 2009, 2024 2-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
• smit.script file
#
# [Oct 13 2023, 20:00:19]
#
/usr/bin/mksysb '-i' '-A' /mnt/nm_sysb_13Oct23
• smit.transaction file
#=--------------------------------------------
# DATE: Oct 13 2023, 20:00:19
# DESCRIPTION: Back Up the System
#=--------------------------------------------
/usr/bin/mksysb '-i' '-A' /mnt/nm_sysb_13Oct23
Most AIX administrators start by relying heavily on SMIT. The smit.script file is a great way of
seeing what commands it runs. Over time, administrators learn more about these commands and
put them into scripts.
Since AIX 5L V5.3, SMIT creates another output files, $HOME/smit.transaction. This file is
always created in the home directory. While similar in format and usage as the smit.script file,
smit.transaction includes only the final cmd_to_exec, and none of the cmd_to_discover,
cmd_to_list, and so forth, output that might be included in smit.script.

© Copyright IBM Corp. 2009, 2024 2-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Topic 1 objectives
• Describe the benefits and discuss the functionality of SMIT
• Describe the benefits and discuss the functionality of Distributed System Management (DSM)

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-9. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 2-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Distributed System Management


• Starting with AIX 6.1 TL3 a new package available on the base media
ƒ Distributed System Management (DSM)
• Packages required
ƒ dsm.core - Distributed Systems Management Core
ƒ dsm.dsh - Distributed Systems Management Dsh
• DSM commands
ƒ dsh - runs commands concurrently on multiple nodes
ƒ dcp - Copies files to or from multiple nodes
• New DSM programs
ƒ dpasswd - Creates an encrypted password file for an access point.
ƒ dkeyexch - Exchanges default ssh keys with an access point.
ƒ dgetmacs - Collects MAC address information from a machine.
ƒ dconsole - Opens a remote console to a machine.

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-10. Distributed System Management

Starting with AIX 6.1 TL3 a new package is shipped with the base media called Distributed System
Management (DSM). In AIX 7.1 this new DSM package replaces the Cluster Systems Management
package (CSM), which is no longer available on AIX 7.1 or later. Commands such as dcp and dsh
are not available on AIX 7.1 (or higher) without installing the DSM package. The DSM packages are
not installed by default. You must install the filesets from the base AIX installation media. The
DSM packages are in the filesets dsm.core and dsm.dsh.
The dpasswd command is used to create the DSM password file. The password file contains a user
ID and associated encrypted password.
The dkeyexch command is used to exchange ssh keys between the NIM master and a client
access point. The command requires the encrypted password file created by the dpasswd
command.
The dgetmacs command is used to query a client node for its network adapter information. This
information is gathered even if the node has no operating system on it or is powered off.
The dconsole command is used to open a remote console to a client node. The command
operates in both the DEFAULT and NIM contexts. It supports read-only consoles and console
logging.
The dsm.core package has prerequisites to Java, Expect and Tcl/TK, but not openssl, openssh (or
an alternative SSH package), csm.dsh or X11.apps.xterm. Ensure the openssl and openssh (or
alternative) packages have been installed before running any of the DSM commands or NIM
commands that use the DSM commands.

© Copyright IBM Corp. 2009, 2024 2-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Setting up DSH
• Set public key based (password-less) SSH authentication on target nodes
• Set environment variables
ƒ DSH_REMOTE_CMD=/usr/bin/ssh
ƒ DSH_NODE_LIST=/etc/ibm/sysmgt/dsm/nodelist
ƒ DSH_NODE_RSH=/usr/bin/ssh
• List hostnames in /etc/ibm/sysmgt/dsm/nodelist
• Test dsh functionality:
# env | grep -i dsh
DSH_NODE_LIST=/etc/ibm/sysmgt/dsm/nodelist
DSH_NODE_OPTS=-q
DSH_NODE_RSH=/usr/bin/ssh
# cat /etc/ibm/sysmgt/dsm/nodelist
aixsec
aixperf
# dsh -a date
aixperf: Fri Oct 14 12:20:20 CEST 2023
aixsec: Fri Oct 14 12:22:30 CEST 2023

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-11. Setting up DSH

The dsh command runs commands concurrently on remote targets - nodes, hardware devices, or
both. Targets can be selected from multiple contexts. A context is a target database that contains
node and device definitions, such as the NIM database. The dsh command issues a remote shell
command for each target specified. It returns output from all targets in a formatted manner to
enable the command results from all nodes to be managed easily.
To use DSH with SSH, password-less authentication needs to be set to the target node:
1. Generate SSH private and public keys:

© Copyright IBM Corp. 2009, 2024 2-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
source # ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in //.ssh/id_rsa.
Your public key has been saved in //.ssh/id_rsa.pub.
The key fingerprint is:
db:5d:fa:71:d0:b4:3f:f4:82:a0:fd:82:11:66:aa:cb root@stglab-aixsec
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| .|
| + o.|
| +S.. oo.|
| . .= o +..o|
| . ooo + o.+|
| .. . .. . +.|
| E. .. . |
+-----------------+
2. Copy and add public key to the authorized_keys on the target machine:
target # cat .ssh/authorized_keys
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDPVWr7MT7ZXCetcExRlaTXCZhfCJsmu1smGadIccfwquzkKaF
lUqw4pIRb2fmF+bSMY565EwTPHciBH0IkH9BFOqk9mfulULisnuYwsiEKSw9kVSLmy2qwOfZxzaTd7G
UDX3HpE43e3qZUok5+y4nJYtKnoeOFnZcKhyqSu2Iqh75pYKW602ZM8z83Imfggz1/rMJ7ub0mBcSDH
STeMY/3TeLb4HuyNq7/Jvguko0iTPjnvjdg0CnDPGTavb369O6UqkPv4qt7vQM7LeaAbZXY+s3yeyXH
UHwEC8AF9AjJMurJYycMe9PDjGMWBFDju2Y1C7kJBu5ZeOx8cPwrOK2n root@stglab-aixsec
3. Test SSH connectivity and add machine to known hosts:
target # ssh aixsec
The authenticity of host 'aixsec (10.103.4.13)' can't be established.
ECDSA key fingerprint is f2:29:b8:a5:05:fc:6b:d0:13:a0:81:7d:e8:fa:b7:e1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'aixsec,10.103.4.13' (ECDSA) to the list of known
hosts.

© Copyright IBM Corp. 2009, 2024 2-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Command Logging
• By default, DSM programs writes logging information to /var/ibm/sysmgt/dsm/log directory
• Log rotation and location can be set in the DSM configuration file:
Log_File_Rotation = 4
Log_File_Location = /var/ibm/sysmgt/dsm/log/

• Optionally, log file can be specified for each command using the --log parameter
# dsh -a --log dsh.log date

• DSH console sessions can be also logged (dconsole command)


ƒ Console-by-console: use the –l flag (lower-case “L”)
ƒ Globally: dconsole_Global_Console_Logging_Enabled in the dsm.properties file
• Console log file written to /var/ibm/sysmgt/dsm/log/console by default
ƒ Can be override by setting the dconsole_Log_File_Subdirectory in the properties file.

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-12. Command Logging

The DSM programs will write logging information to the /var/ibm/sysmgt/dsm/log directory by
default. Some DSM programs support rotating log files. By default, rotating log files grow to about
256 kilobytes in size, and up to four files (including the current log) are kept. The log directory can
be changed by overriding the “Log_File_Location” entry in the DSM properties file. The number
of files in the rotation may also be changed by overriding the “Log_File_Rotation” entry. If the
rotation value is set to zero, rotation is disabled and the log files will grow up to the available
space in the file system.
DSM offers the ability to log remote console sessions on client nodes. By default logging is
disabled. It may be enabled on a console-by-console basis by issuing the dconsole command
with the “-l” (lower-case “L”) flag. It may also be enabled globally by overriding the
“dconsole_Global_Console_Logging_Enabled” entry in the DSM properties file (setting the value
to “Yes” enables global console logging). When logging is enabled, any data that is visible on the
console will also be written to a log file. The console must be open for logging to take place.
By default, console log files are written to the /var/ibm/sysmgt/dsm/log/console directory. Both
the log directory and console log subdirectory may be changed by overriding the
”dconsole_Log_File_Subdirectory“ entry in the DSM properties file.

© Copyright IBM Corp. 2009, 2024 2-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
DSH session details can also be logged by setting the DSH_LOG environment variable. For example:
# export DSH_LOG=/var/ibm/sysmgt/dsm/log/dsh.log
# dsh cat /home/myfile.txt | dshbak
HOST: an14aix
-------------
HELLO FROM AN14G
# ls -ltr /var/ibm/sysmgt/dsm/log/dsh.log
-rw-r--r-- 1 root system 1442 May 01 20:24
/var/ibm/sysmgt/dsm/log/dsh.log
# cat /var/ibm/sysmgt/dsm/log/dsh.log
-------------------------------------------------------------------------
Command name: Unspecified
Default user: root
Command definition:
cat /home/myfile.txt
Started: Wed May 1 20:22:23 2024
Ended: Wed May 1 20:22:23 2024
Successful targets:
NIM nodes:
an14aix
Failed targets:
none
Targets not run:
none
Status:
Command execution completed.

© Copyright IBM Corp. 2009, 2024 2-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

DSH log file example


--------------------------------------------------------------------

Command name: Unspecified


Default user: root

Command definition:
date
Started: Wed Oct 19 10:21:41 2023
Ended: Wed Oct 19 10:21:41 2023

Successful targets:
NIM nodes:
aixperf
aixsec
Failed targets:
none
Targets not run:
none
Status:
Command execution completed.

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-13. DSH log file example

The visual above shows a dsh command log file. It shows that the date command was run on
target nodes aixperf and aixsec.

© Copyright IBM Corp. 2009, 2024 2-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

DSM examples
• Display a formatted command output from the dsh command:
# dsh date | dshbak
HOST: aix1
-------------
Mon Oct 17 11:15:32 CEST 2023

HOST: aix2
------------
Mon Oct 17 11:17:42 CEST 2023

• Copy a file to all node:


# dcp -a test /tmp/ ; dsh -a ls -la /tmp/test |dshbak
HOST: aix1
-------------
-rw-r--r-- 1 root system 5 Oct 23 11:24 /tmp/test

HOST: aix2
------------
-rw-r--r-- 1 root system 5 Oct 23 11:26 /tmp/test
AIX system management tools © Copyright IBM Corporation 2024

Figure 2-14. DSM examples

The dshbak command formats output from the dsh command. The dshbak command takes lines
in the following format:
host_name: line of output from remote command
The dshbak command formats the lines as follows and writes them to standard output. Assume
that the output from host_name2 and host_name3 is identical, and the -c flag was specified:
HOSTS --------------------------------------------------------
host_name1
--------------------------------------------------------------
.
.
lines from dsh with host_names stripped off
.
.
HOSTS --------------------------------------------------------
host_name2 host_name_3
--------------------------------------------------------------
.
.
lines from dsh with host_names stripped off
.
.
The dcp command concurrently copies files to or from remote target nodes, hardware devices, or
both. Targets can be selected from multiple contexts. A context is a target database that contains

© Copyright IBM Corp. 2009, 2024 2-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty
definitions of nodes and devices, such as NIM. The command issues a remote copy command for
each node or device specified. When files are pulled from a target, they are placed into the
target_path with the name of the remote node or device appended to the copied source_file
name.

© Copyright IBM Corp. 2009, 2024 2-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Review questions
1. What is the main system management tool available on AIX?

2. What is the purpose of the smit.script file?

3. Which command can be used to run a command concurrently on multiple nodes?

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-15. Review questions

© Copyright IBM Corp. 2009, 2024 2-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Review answers
1. What is the main system management tool available on AIX?
The answer is SMIT

2. What is the purpose of the smit.script file?


The answer is to obtain the commands SMIT has just run.

3. Which command can be used to run a command concurrently on multiple nodes?


The answer is dsh.

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-16. Review answers

© Copyright IBM Corp. 2009, 2024 2-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Exercise

Using system management tools in AIX

AIX system management tools © Copyright IBM Corporation 2024

Figure 2-17. Exercise

© Copyright IBM Corp. 2009, 2024 2-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 2. AIX system management tools

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the benefits of the system management tools available in AIX
ƒ Discuss the functionality of SMIT and Distributed System Management
(DSM) for AIX
ƒ Explain how system management activity is logged
ƒ Use SMIT user interfaces or DSM commands

© Copyright IBM Corporation 2024

Figure 2-18. Unit summary

© Copyright IBM Corp. 2009, 2024 2-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Unit 3. AIX software installation and


maintenance
Estimated time
01:15

Overview
This unit describes how to perform software installation and maintenance.

How you will check your progress


• Review questions
• Lab exercise

References
AIX 7.3 Documentation https://www.ibm.com/docs/en/aix/7.3
SG24-7910 IBM AIX Version 7.1 Difference Guide (Redbooks)
http://www.redbooks.ibm.com/redbooks.nsf/RedbookAbstracts/sg247910.html?Open
AIX Version 7.3 Installing
https://www.ibm.com/docs/en/aix/7.3?topic=installing
AIX Version 7.3 BOS installation options
https://www.ibm.com/docs/en/aix/7.3?topic=system-bos-installation-options
Get Started with the AIX Toolbox for Open Source Software
https://www.ibm.com/support/pages/node/6585774
DNF is now available on AIX Toolbox
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2021/05/28/
dnf-is-now-available-on-aix-toolbox
Creating local repo with DNF and AIX Toolbox Media Image
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/09/
creating-local-repo-with-dnf-and-aix-toolbox-media

© Copyright IBM Corp. 2009, 2024 3-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Unit objectives • Define the package definitions and naming conventions


• Determine the current installed level of the OS and individual
filesets
• Apply, commit, and remove AIX software
• Recover from broken and inconsistent software states
• Describe how to download software maintenance using Fix Central
and SUMA
• Identify if all the components in the Power and AIX environment are
compatible and supported

© Copyright IBM Corporation 2024

Figure 3-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 3-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

AIX media
Base Install AIX 7.3

AIX Standard Edition


+ update images
Expansion Pack AIX 7.3

AIX Toolbox for Linux Source

AIX Toolbox for Linux Apps

IBM PowerVC for Private Cloud

IBM PowerSC

ITM for AIX EE

IBM VM Recovery Manager HA


AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-3. AIX media

The images listed in the visual are available to download from IBM Entitled Software Support
(ESS) web site for the AIX Enterprise Edition licensed servers, program ID 5765-CD3 (for AIX 7.2
and 7.3). Also orderable as a program ID is AIX 7.3 and 7.2 Standard Edition, product number
5765-G98. which contains:
• Base install AIX 7.3 + update images
• Expansion pack AIX 7.3
• AIX Toolbox for Linux Source
• AIX Toolbox for Linux APPS
For virtual environments, a PowerVM license is required.
The AIX Expansion Pack is a collection of extra software that extends the base operating system
capabilities, such as OpenSSL, IBM Security Directory Server.
The VM Recovery Manager HA contains packages that provide an automated high availability
solution to recover virtual machines (VMs), also known as logical partitions (LPARs).
Let us define the structure of an LPP package.

© Copyright IBM Corp. 2009, 2024 3-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software packaging definitions


LPP
bos Base Operating
System Component

Package
bos.net Base Networking
package

TCP/IP collection
bos.net.tcp of filesets

Fileset
bos.net.tcp.server_core TCP/IP Server fileset
(the smallest unit)

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-4. Software packaging definitions

A Licensed Program Product (LPP) is a collection of packages that form an installable product.
A package contains a group of filesets with a common function. It is a single, installable image.
AIX packages are a bundle of binaries glued together with meta-information (name, version,
dependencies).
A fileset is the smallest, individually installable unit. Generally, it is a single subsystem. For
example, bos.net.tcp.server_core is a fileset in the bos.net package. This image is a UNIX
Backup File Format file (BFF), created with the backup command.
Files in an LPP can be listed with: restore –Tvf <package> or extracted with restore –xvf
<package>.
Licensed Program Product (LPP)
A collection of packages that form an installable product.
Package
A package contains a group of filesets with a common function. It is a single, installable image.
AIX packages are a bundle of binaries that are glued together with the meta-information (name,
version, dependencies).
Fileset
A fileset is the smallest, individually installable unit. Generally, it is a single subsystem. For
example, bos.net.tcp.server is a fileset in the bos.net package. This image is a UNIX Backup
File Format file (BFF), created with the backup command. Files in an LPP can be listed with:

© Copyright IBM Corp. 2009, 2024 3-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
restore –Tvf <package> or extracted with restore –xvf <package>. For example: To list the
contents of bos.alt_disk_install.rte fileset contained in AIX 7.3 TL2 SP02:
# restore -Tqvf U870418.bff
New volume on U870418.bff:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Sun Apr 17 15:53:29 CEST 2023
Files are backed up by name.
The user is BUILD.
0 ./
366 ./lpp_name
0 ./usr
0 ./usr/lpp
0 ./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.boot_images/7.3.2.2
3232
./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.boot_images/7.3.2.2/liblpp.a
28311552 ./usr/lpp/bos.alt_disk_install/boot_images/bosboot.disk.chrp
The total size is 28315150 bytes.
The number of archived files is 7.
Note: This is the only way, in AIX, to see which files are located within an LPP fileset, before
install.
It is important to understand the association of each of the definitions.
• fileset: Smallest individual installable unit
• Package: Collection of filesets built to form one installable image, for example, bos.net
• LPP: One or more packages that are bundled together, for example, bos
Now we understand LPPs, some are grouped together as bundles. Let us take a look.

© Copyright IBM Corp. 2009, 2024 3-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software bundles
• A bundle is a collection of packages and filesets suited for a particular environment.
• There are many predefined system bundles in AIX that include:
ƒ AllDevicesKernels
ƒ Alt_Disk_Install
ƒ Perftools
• Full list is in /usr/sys/inst.data/sys_bundles. Example:

# cat /usr/sys/inst.data/sys_bundles/PerfTools.bnd
[ ... ]
I:bos.adt.prof
I:bos.perf.libperfstat
I:bos.perf.perfstat
I:bos.perf.proctools
I:bos.perf.tools
I:bos.perf.tune
I:bos.pmapi
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-5. Software bundles

Since there are thousands of filesets, having to determine which individual fileset you want on
your machine can be a time-consuming task. AIX has bundles, which offer a collection of filesets
that suit a particular purpose. For example, if you are developing applications, the App-Dev
bundle would be the logical choice to install.
Some filesets within a bundle are only installed if the prerequisite hardware is available. For
example, a graphic adapter is needed to run X11 and CDE. In some cases, bundles are equivalent
to product offerings. However, often they are a subset of a product offering or a separate
customized bundle. The bundles available might vary from AIX version to AIX version.
The standard bundle definitions that control what selections appear in SMIT or the web-based
System Manager are stored in /usr/sys/inst.data/sys_bundles. The following are examples of
predefined bundles:
• Application Development Bundle (App-Dev)
▪ A collection of software packages that are used for developing application programs.
• Media-Defined Bundle (Media-Defined)
▪ filesets from the installation media.
• Other predefined system bundles are:
▪ CDE
▪ GNOME
▪ KDE
▪ Kerberos_5
▪ Graphics

© Copyright IBM Corp. 2009, 2024 3-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
▪ Alt_Disk_Install
▪ AllDevicesKernels
▪ SbD.Graphics
▪ Firefox
▪ Server
▪ PerfTools
▪ SystemMgmtClient
▪ bosnet_ftp_telnet
Now we understand LPPs and bundles, let us define AIX software levels.

© Copyright IBM Corp. 2009, 2024 3-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe Redhat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-6. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

AIX software levels


• There are four distinct software levels and management for AIX.
ƒ Base level
ƒ Technology level (TL)
ƒ Service pack (SP)
ƒ Interim fixes

Fix Packs
Interim
Base Technology + Service packs fixes
AIX Level level

(Contain APARs)

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-7. AIX software levels

Base AIX level is OS version and release, as first installed.


Maintenance:
• Releases
AIX Releases contain new software features as well as the latest fixes for defects and
exploitation of new hardware.
New Releases are shipped approximately every 4 years. They are supported for usage and
debug for 10 years under standard SWMA, plus 3-5 years of optional, separately priced,
extended support.
• Technology Levels (TLs)
Technology Levels contain fixes for defects found by customers and internal testing,
exploitation of new hardware, and may contain software enhancements. New Technology
Levels generally ship yearly for new Releases. We then transition to shipping new Technology
Levels approximately every 2 years as the Release matures. They are supported with fixes
provided through Service Packs and iFixes for 3 years initially. Support increases to 4 years for
TLs that have transitioned to the ‘every 2 years’ release cadence.
• Service Packs (SPs)
Service Packs contain fixes for defects impacting customers, fixes for critical defects found in
internal testing, and may contain enablement for new hardware. In general, changes that are
allowed in a Service Pack are minimal defect fixes that do not change default behavior nor add
new functionality. New Service Packs are released approximately twice a year for each TL that
is still active for Service Pack Support.
• iFixes (Interim Fixes)

© Copyright IBM Corp. 2009, 2024 3-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
iFixes are temporary relief for defects, which can be used to fix especially critical problems
that cannot be avoided until the permanent fix can be installed. These are custom built one-off
fixes that patch only the required files. iFixes are tested for functionality and some regression,
but generally not exposed to full regression testing or system test. There can only be one iFix
installed at a time for any given file, though there can be multiple iFixes installed for the same
fileset. Installing an iFix will lock the entire fileset from being updated except by an update
containing the fix for the same APAR(s) resolved by the ifix.
• APARs (Authorized Program Analysis Reports)
An APAR is a record of a problem reported with AIX, and also associated with the fix for that
problem. Each APAR applies to a specific Technology Level. If the same problem is reported
and/or fixed on other Technology Levels, there will be different APARs for each of them. It is
important to understand this when tracking and managing a fix across multiple levels of AIX.

Let us see how to discover the installed level (technology level, and service pack) of the system.

© Copyright IBM Corp. 2009, 2024 3-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

What is my AIX version?


• To obtain the AIX level, use the oslevel command:

# oslevel –s
7300–01–01–2246

AIX Level Service Pack


VRMF Release date
Technology for example,
Level (TL) 46th week in 2022
Service Pack (SP)

• To upgrade from one AIX version or release to another a migration must be performed (e.g.
AIX 7.2 to AIX 7.3).
• New TLs or SPs are applied through updates.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-8. What is my AIX version?

The oslevel -s command reports the latest installed technology level, and service pack on the
system.
The visual above shows a system that is currently at AIX version 7.3, technology level 1, service
pack 1. Service packs and technology levels are applied to the running system. Typically, when
you install a service pack or technology level the system will need to be rebooted in order for the
fixes to be activated. This involves some system down time. Starting with AIX 7.2 TL2 SP1, the
AIX Live Update feature can be used to install new technology levels and service packs without
requiring a reboot.
To upgrade the system with a new version or release, for example, from AIX 7.2 to 7.3, a migration
update must take place. This requires the LPAR to be booted from media to perform the
installation. This type of upgrade can require a longer period of system downtime than required
for installing a service pack or technology level. The NIM Alternate Disk Migration (nimadm) tool
can help to reduce the downtime required for an AIX migration activity.

© Copyright IBM Corp. 2009, 2024 3-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software installation and maintenance


• All aspects of software installation and maintenance can be performed from SMIT, the
command line, or systems director console.
• Command line interaction:
ƒ lslpp: Lists installed software
ƒ installp: Traditional AIX command for installing and maintaining LPP packages
ƒ rpm: RedHat Linux command for installing and maintaining rpm filesets (part of the AIX Linux affinity
introduced in AIX 5L)
ƒ geninstall: A generic installer that installs software of various package formats: LPP, RPM, and
ISMP.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-9. Software installation and maintenance

The lslpp and installp commands are vital for interacting, installing, and maintaining software
on AIX. The rpm and geninstall commands were introduced in AIX 5L as a part of the AIX affinity
for Linux applications, which included support for other software formats like RPM and ISMP
(InstallShield MultiPlatform).
Generally speaking, most software installation and maintenance is carried out through a
combination of SMIT and command-line interaction (through installp). RPM is part of the Linux
affinity and is useful when manipulating rpm packages. The command geninstall was added at
AIX 5.1 to scope with various package types: LPP, RPM, ISMP (lots of Tivoli software is packaged
in this format). It is also used to manage AIX Live Update operations (we will discuss this later in
the course).
Before we show how to install software, let us explain the concept of a software repository.

© Copyright IBM Corp. 2009, 2024 3-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software repository
• A location on disk, which contains AIX software
ƒ Standard image directory is: /usr/sys/inst.images
ƒ AIX filesets require a .toc file
• To copy software, for example from an AIX DVD to disk, use:
ƒ The SMIT facility: Copy Software to Hard Disk for Future Installation
ƒ Or the AIX commands: bffcreate or gencopy

Copy Software to Hard Disk for Future Installation

[Entry Fields]
* INPUT device / directory for software /dev/cd0
* SOFTWARE package to copy [all] +
* DIRECTORY for storing software package [/usr/sys/inst.images]
DIRECTORY for temporary storage during copying [/tmp]
EXTEND file systems if space needed? yes +
Process multiple volumes? yes

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-10. Software repository

Generally, it is useful and sometimes necessary, for example when building and managing a NIM
server, to store software to disk. AIX refers to this as a software repository. The default software
repository is sometimes referred to as the default installation image directory. Its location on AIX
is /usr/sys/inst.images. However, it is advisable to create and manage a repository in a separate
file system that is not contained in the AIX root volume group.
The tables of contents (.toc) file
This is a mandatory file required for installing and updating packages on AIX. If the command line
is used (installp), then the user must manually create the .toc file. This is done using the inutoc
command. To create a .toc file in the current directory, type:
# inutoc .

© Copyright IBM Corp. 2009, 2024 3-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
Example .toc file for dsm filesets:
# inutoc .
# ls -ltr .toc
-rw-r--r-- 1 root system 2971 Apr 30 21:43 .toc
# cat .toc
0 050101432224 2
expect.man.en_US.5.45.4.0.I 4 R I expect.man.en_US {
expect.man.en_US 05.45.0004.0000 1 N U en_US Expect man page documentation
...etc...
*prereq tcl.base 8.6.10.0
*prereq tk.base 8.6.10.0
*prereq rpm.rte 4.13.0.10
...etc...
dsm.7.3.0.0.I 4 R I dsm {
dsm.core 07.03.0000.0000 1 N B en_US Distributed Systems Management Core
[
*coreq perl.rte 5.8.2.90
*coreq expect.base 5.42.1.0
*coreq Java8_64.jre 8.0.0.526
%
/opt/ibm 8
/usr/lib/objrepos 32
/opt/ibm/sysmgt 8
/opt/ibm/sysmgt/dsm 8
/opt/ibm/sysmgt/dsm/dsmbin 1120
/opt/ibm/sysmgt/dsm/bin 264
/opt/ibm/sysmgt/dsm/lib 296
/opt/ibm/sysmgt/dsm/doc 776
/opt/ibm/sysmgt/dsm/pm 264
/opt/ibm/sysmgt/dsm/pm/Context 112
/opt/ibm/sysmgt/dsm/pm/RemoteShell 8
/opt/ibm/sysmgt/dsm/codebase 136
/opt/ibm/sysmgt/dsm/codebase/com 8
/opt/ibm/sysmgt/dsm/codebase/com/ibm 8
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt 8
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt/dsm 8
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt/dsm/rsyspasswd 40
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt/dsm/dutil 32
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt/dsm/dkeyexch 48
/opt/ibm/sysmgt/dsm/codebase/com/ibm/sysmgt/dsm/rsysconsoled 360
/opt/ibm/sysmgt/dsm/man 8
...etc...
SMIT (installp, bffcreate and gencopy) automatically creates a .toc file when copying software
files to disk and before installing LPPs.
Let us explain software states, apply, and commit.

© Copyright IBM Corp. 2009, 2024 3-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-11. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software states
• The base installation of software is always in a committed state.
ƒ Committed is a permanent state.
• When updates are installed, they can be either applied or committed.
ƒ Applied software can later be rejected or committed.

bos.perf.tools
7.3.1.0

Action: 7.3.1.0
Install and Commit Committed

bos.perf.tools
7.3.1.1
7.3.1.0 Saved
7.3.1.0
Action:
Action: Committed
Apply
Reject
7.3.1.1 Applied
or
Commit 7.3.1.1
Committed
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-12. Software states

AIX has a number of software states. When you are installing software for the first time, the
software automatically installs to a committed state. This means there is only one level of that
software product installed on your system.
Applied state versus committed state for maintenance: when you are installing a set of fixes or
upgrading to a new technology level on your system, you have the option of installing the software
either in the committed state or the applied state. The applied state allows you to maintain two
levels of the software on your system. When software is installed in the applied state, the older
version is saved on the disk and is deactivated, while the newer version is installed and becomes
the active version.
The applied state gives you the opportunity to test the newer software before committing to its
use. If it works as expected, then you can commit the software, which removes the old version
from the disk. If the newer version is causing a problem, you can reject it, which removes the
newer version and reverts back to the old version.

© Copyright IBM Corp. 2009, 2024 3-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Software listing and versioning


• Software listing is done with the lslpp command.
# lslpp -L perfagent.tools
Fileset Level State Type Description(Uninstaller)
-------------------------------------------------------------------
perfagent.tools 7.3.2.1 C F Local Performance Analysis & Control Commands

State codes: Version Release Modification Fix C & F are State


A -- Applied. and Type codes.
AIX Migration smit update_all
B -- Broken.
C -- Committed.
E -- EFIX Locked.
O -- Obsolete. (partially migrated to newer version)
? -- Inconsistent State...Run lppchk -v.

Type codes:
F -- Installp Fileset
P -- Product
C -- Component
T -- Feature
R -- RPM Package
E -- Interim Fix

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-13. Software listing and versioning

The lslpp command displays information about installed filesets or fileset updates. Each fileset
has a version number associated with it (in the format of Version.Release.Modification.Fix), a
state code, and a type code. For the example of perfagent.tools 7.3.2.1 C F Local Performance
Analysis & Control Commands:
• The version and release is 7.3
• The modification level is 2
• The fix level is 1
The two codes that follow the fileset name represent the State and Type of fileset, there are
legends for the codes at the bottom of the lslpp -L report.
Let us see how to find out what files are in an LPP and what LPP a file belongs to.

© Copyright IBM Corp. 2009, 2024 3-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

lslpp, filesets, and files


• Switches -f and -w are very useful lslpp flags.

List files in an
# lslpp -f alex.grumpy.rte LPP fileset.
Fileset File
---------------------------------------------------------
Path: /usr/lib/objrepos
alex.grumpy.rte 1.0.0.5
/usr/local/grumpy/grumpyrecovery
/usr/local/grumpy/README
/usr/local/grumpy/grumpystart
/usr/sbin/gfunctions
/usr/local/grumpy/grumpycheck
/usr/local/grumpy/grumpystop
To which fileset
# lslpp -w /usr/local/grumpy/grumpystart does a file
File Fileset Type belong?
-----------------------------------------------------------
/usr/local/grumpy/grumpystart alex.grumpy.rte File

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-14. lslpp, filesets, and files

The lslpp command has many useful flags associated with it. It is also possible to see when a
particular LPP was installed using the –h flag. See lslpp man page for more information.
A situation might arise where you want to use a particular command but it is not installed on the
system and you are not sure what LPP fileset to install to be able to use the binary. To help with
this problem, you can use the which_fileset command. The which_fileset command
searches the /usr/lpp/bos/AIX_file_list file for a specified file name or command name, and
print the name of the fileset that the file or command is shipped in. The
/usr/lpp/bos/AIX_file_list file is large and not installed automatically. You must install the
bos.content_list fileset to receive this file. Example:
# which_fileset shutdown
/etc/shutdown -> /usr/sbin/shutdown bos.compat.links 7.3.0.0
/usr/sbin/shutdown bos.rte.control 7.3.0.0
In the visual, alex.grumpy.rte is a demo application that is written in C and packaged as an LPP
fileset. Many development organizations package their own products into LPPs.
Let us see how to install new software.

© Copyright IBM Corp. 2009, 2024 3-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Installing new software using SMIT


• # smit install_all
Install and Update from ALL Available Software

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* INPUT device / directory for software .
* SOFTWARE to install [] +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? no +
Preview new LICENSE agreements? no +
[MORE...7]

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-15. Installing new software using SMIT

There are two SMIT fast paths worth remembering when it comes to software and SMIT:
• install_all – to install new software
• update_all – to update current software
Prior to the screen shown in the visual, you are asked to select the “INPUT device / directory for
software”. The input device can be tape (/dev/rmt0), optical media (/dev/cd0), or a directory.
The period (.) in the example indicates the directory you currently reside in.
The default behavior when installing new software is to commit. To first apply software rather
than commit, change the COMMIT software updates field to No. The SMIT software installation
panel uses the geninstall command to be able to handle various software packaging formats.
Note that .toc files are created automatically when using SMIT.
Let us see how to install software by using the command line.

© Copyright IBM Corp. 2009, 2024 3-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Installing software using the command line: Examples


• The installp command:
ƒ –a (apply), –c (commit), –p (preview), –g (apply prerequites),
–X (expand filesystems, if needed), –Y (accept license agreements)
–d (device or directory location of software), –q (quiet mode)
# installp –acpgXYd . bos.rte.install
# installp –acpgXYd /TL02_SP01 all

• The geninstall command:


ƒ –I (use installp flags, as described above), –p (preview),
–d (device or directory location of software)
# geninstall –I "–acgXY" –p –d . bos.rte.install
# geninstall –I "–acgXY" –p –d /TL02_SP01 all

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-16. Installing software using the command line: Examples

The installp command handles software that is packaged in the traditional AIX Backup File
Format file (BFF). The geninstall command determines the type of packaging and invokes the
appropriate utility to handle the selected packages. For example, it would invoke the rpm
command if the software was packaged in that format.
The installp and geninstall commands install and update software from the command line on
AIX. They both accept a large number of flags; the popular flags are shown in the visual. For
geninstall, the installp command is invoked if the software is in AIX BFF format rather than
RPM. In that case, the needed installp options are passed to the geninstall command as the
value of the -I flag. See the man pages for full details on the flags available and the purpose of
these flags.
The installp command handles software that is packaged in the traditional AIX bff format. The
geninstall command determines the type of packaging and invoke the appropriate utility to
handle the selected packages. For example, it would invoke the rpm command if the software
was packaged in that format.
The installp and geninstall commands install and update software from the command line on
AIX. They both accept many flags; the popular flags are shown in the visual. For geninstall, the
installp command is invoked if the software is in AIX bff format rather than rpm; in that case,
the needed installp options are passed to the geninstall command as the value of the I flag.
Following are partial descriptions of the flags (see the man pages for full details):
• -a Applies one or more software products or updates. This is the default action. This flag can
be used with the -c flag to apply and commit a software product update when installed.
• -c Commits all specified updates that are currently applied but not committed.

© Copyright IBM Corp. 2009, 2024 3-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
• -d <device or directory> Specifies where the installation media can be found. This can be a
hardware device such as tape or DVD, it can be a directory that contains installation images, or
it can be the installation image file itself.
• -g When used to install or commit, this flag automatically installs or commits, respectively,
any software products or updates that are requisites of the specified software product.
• -p Performs a preview of an action by running all preinstallation checks for the specified
action.
• -X Attempts to expand any file systems where there is insufficient space to do the installation.
This option expands file systems based on current available space and size estimates that are
provided by the software product package.
• -Y Agrees to required software license agreements for software to be installed.
The first installp example assumes that the current working directory is a software repository
(notice the use of the dot as the first argument). That example is installing one particular fileset
(second argument). The second installp example is explicitly identifying the /TL02_SP01
directory as the software repository to use and to install all filesets in that repository (they are
likely part of the TL02 SP1 service pack). The geninstall examples are for doing the same two
installs.
Let us see how to update the system.

© Copyright IBM Corp. 2009, 2024 3-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-17. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Applying patches to the system


• Ideally, all systems should be at the latest fix pack (TL and SP level).
• IBM recommends installing the complete fix pack.
• System updates can be applied through smit update_all or using geninstall or installp
commands.

# smitty update_all Some items


removed for
* INPUT device / directory for software /updates clarity
* SOFTWARE to update _update_all
PREVIEW only? (update operation will NOT occur) yes +
COMMIT software updates? no +
SAVE replaced files? yes
[...]

• Updates can first be applied and then committed at a later time.


ƒ This enables you to roll back if needed.
ƒ Once software is committed, there is no going back without removal and reinstall.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-18. Applying patches to the system

In the past, AIX system administrators would often download and install individual filesets on a
system. This caused the software be at mixed levels and sometimes created more problems than
it solved. Now, IBM allows fixes to be downloaded in a fix pack, containing:
• Technology Level (also known as Maintenance level in previous releases)
• Service Pack
AIX updates are provided as Technology Level packages or Service Packs. In accordance with
'Enhanced Service Strategy Releases', these generally available updates have been tested to
operate best when all updates in a fix pack are installed. IBM recommends installing the complete
fix pack.
The install_all_updates command is similar to running smitty update_all, but it works from
the command line. For example:
# install_all_updates -d /updates -p –x
Let us see an update example that uses the command line.

© Copyright IBM Corp. 2009, 2024 3-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Applying patches, apply, commit, reject


• installp example:
# lslpp -L |grep -i cluster |grep pdf
cluster.doc.en_US.es.pdf 5.4.0.0 C F HAES PDF Documentation

# installp -aB -d . cluster.doc.en_US.es.pdf Apply update


(-aB)
# lslpp -L |grep -i cluster |grep pdf
cluster.doc.en_US.es.pdf 5.4.1.0 A F HAES PDF Documentation
Note: installp –s lists all Applied software on the system
Reject
# installp –r cluster.doc.en_US.es.pdf
(-r)
# lslpp -L |grep -i cluster |grep pdf
cluster.doc.en_US.es.pdf 5.4.0.0 C F HAES PDF Documentation

OR
Commit all
# installp –c all applied
software (-c)
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
cluster.doc.en_US.es.pdf 5.4.1.0 USR COMMIT SUCCESS

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-19. Applying patches, apply, commit, reject

The visual above shows a fileset update being applied to cluster.doc.en_US.es.pdf. This can be
done with system management tools like SMIT, or the geninstall or installp commands. It is
often useful to remember key installp flags. The flags, -aB mean apply and update the fileset.
Once applied the update can be rejected (-r) or committed (-c).
In this example, the filesets are stored in a software repository on disk in which we are currently
located. Hence the device location (-d) is set to “dot” (the current directory).
Note that it is often useful to first apply updates and test before committing them, especially
when installing TLs/SPs.
Updates can also be installed without requiring a reboot of AIX, using the AIX Live Update facility.
We will discuss this later in the course.
Let us see how we list fixes.

© Copyright IBM Corp. 2009, 2024 3-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Listing fixes (APARs) installed on the system


• TLs and SPs apply fixes (APARs) to AIX.
• You can list these fixes with the instfix command.
ƒ instfix is useful for listing and searching through applied updates on the system.

# instfix –i

All filesets for IV00149 were found.


All filesets for IV00151 were found.
All filesets for IV00152 were found.
All filesets for IV00153 were found.
All filesets for IV00154 were found.
…… Lines were removed for clarity ……

# instfix -ik IV00149


All filesets for IV00149 were found.

• Interim fixes between services packs, including service advisories, is now done through
interim fix management.
ƒ emgr command

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-20. Listing fixes (APARs) installed on the system

Fixes displayed with the instfix -i command are installed through Technology Level and
Service Pack updates. In previous versions of AIX, interim fixes, between Technology Level
releases, were installed through instfix itself. In AIX7, instfix is really a legacy command. It is
only useful for listing and searching through applied updates on the system.
Necessary fixes that are not part of a TL or SP, are handled through interim fix management with
the emgr command.
How do we patch the system when we are at the latest TL and SP?

© Copyright IBM Corp. 2009, 2024 3-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Interim fix management

# emgr -pe 744A_610.071105.epkg.Z Preview Install


…. Lot of output is produced, removed for clarity!
EPKG NUMBER LABEL OPERATION RESULT
=========== ============== ================= ==============
1 744A_610 INSTALL PREVIEW SUCCESS
Install
# emgr -e 744A_610.071105.epkg.Z
ifix
# emgr -l List installed ifixes
ID STATE LABEL INSTALL TIME ABSTRACT
=== ===== ========== ================== ======================================
1 *Q* 744A_610 10/10/08 23:30:49 Kernel fix for 0744A_610

# emgr –r –L 744A_610 Remove ifix


Log file is /var/adm/ras/emgr.log

EFIX NUMBER LABEL OPERATION RESULT


=========== ============== ================= ==============
1 744A_610 REMOVE SUCCESS

ATTENTION: system reboot is required. Please see the "Reboot Processing"


sections in the output above or in the /var/adm/ras/emgr.log file.

Return Status = SUCCESS

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-21. Interim fix management

The interim fix (ifix) management solution enables users to track and manage ifix packages on a
system. An ifix package might be an interim fix, debug code, or test code that contains commands,
library archive files, or scripts that run when the ifix package is installed.
The ifix management solution consists of the following commands:
• ifix packager (epkg)
• ifix manager (emgr)
The epkg command creates ifix packages that can be installed by the emgr command. The emgr
command installs, removes, lists, and verifies system ifixes.
It is important to examine the state field after installing an interim fix. The codes for the state
field are documented in the AIX Installation and Migration manual. In the above example, the
state value of Q means that a reboot is necessary for this fix to be effective. The AIX
documentation states: “Q=REBOOT REQUIRED: The interim fix was installed successfully and
requires a reboot to fully integrate into the target system. After you reboot the target system, emgr
changes the interim fix state to STABLE ”.

Interim fix installation and AIX Live Update function


Interim fixes that contain kernel extensions or a new kernel and that requires the system to be
restarted can now be installed by using the AIX®Live Update function if the interim fixes are
marked as LU CAPABLE. Install the interim fix in a preview mode by using the emgr -p -e
ifix_pkg command, and search for LU CAPABLE occurrence in the output to determine if the
interim fix is suitable for the Live Update function. This option is available when you use the
geninstall command with the -k flag to install the interim fix. This option is also available in the
following SMIT menus:

© Copyright IBM Corp. 2009, 2024 3-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
Install Software
• The smitty install_latest fast path.
Install Software Bundle
• The smitty install_bundle fast path.
Install and Update from ALL Available Software
• The smitty install_all fast path.
By installing ifixes using live update, a reboot is not required. The bos.liveupdate.rte fileset must
be installed on the AIX operating system if you want to use the Live Update function. We will cover
live update later in the course.
Let's see how we can remove software.

© Copyright IBM Corp. 2009, 2024 3-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Removing installed software


• # smit remove
Remove Installed Software

[Entry Fields]
* SOFTWARE name [cluster.es.cspoc.cmds] +
PREVIEW only? (remove operation will NOT occur) yes +
REMOVE dependent software? yes +
EXTEND file systems if space needed? no +
DETAILED output? no +
[ ... ]

• Removing software from the command line


ƒ Remove the Firefox web browser
# installp -u Firefox.base.rte

ƒ (Preview) Remove all X11 software with associated prerequisites


# installp -upg X11*

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-22. Removing installed software

Software can be removed by using system management tools or the command line. The installp
–u flag, removes the specified software product and any of its installed updates from the system.
The product can be in either the committed or broken state. Any software products that depend on
the specified product must also be explicitly included in the input list unless the -g flag is also
specified. Removal of any bos.rte fileset is never permitted.

Note

The removal of LPP filesets does not necessarily mean that the process will delete all files
included in the filesets. This depends on how the LPP filesets are constructed.

Let us see how to recover from broken, inconsistent filesets.

© Copyright IBM Corp. 2009, 2024 3-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Recovering from broken or inconsistent states


• To list broken or inconsistent filesets, use the lppchk command.
# lslpp -L |grep Firefox.base.rte Look for ?
Firefox.base.rte 1.5.0.12 ? F Firefox Web Browser or B.

# lppchk -v
lppchk: The following filesets need to be installed or corrected to bring
the system to a consistent state: Display
inconsistent
Firefox.base.rte 1.5.0.12 (APPLYING) filesets.

# installp -C
Perform a clean-up
installp: Cleaning up software for: operation. Fileset is
Firefox.base.rte 1.5.0.12 removed

Installation Summary
--------------------
Name Level Part Event Result
------------------------------------------------------------------------------
Firefox.base.rte 1.5.0.12 USR CLEANUP SUCCESS

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-23. Recovering from broken or inconsistent states

If the process of installing, updating, or removing software from the system is interrupted or fails,
the outcome is likely to be either broken or inconsistent filesets on the system. To detect this, use
the lppchk command. If all is OK, the command returns null, otherwise broken, or inconsistent
filesets are displayed. To clean up from any such operation, use the installp command with the
–C option (clean-up) and then retry the original operation again. If the failed operation was an
uninstall, remove the software manually, using installp –u <fileset>.
Let us introduce RPM.

© Copyright IBM Corp. 2009, 2024 3-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-24. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

RedHat Package Manager filesets


• IBM provides strong Linux affinity within AIX
• Many useful packages for AIX come in RPM format
ƒ Developed by RedHat, now used in many Linux flavors
ƒ Examples (included within the Linux Toolbox for AIX):
í cdrecord
í mkisofs
í apache
í bash

# rpm –qa List packages

Remove
# rpm -e cairo-1.0.2-6 package

# rpm -i bash-3.2-1.aix.ppc.rpm Install package

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-25. RedHat Package Manager filesets

In addition to providing the ability to run a Linux operating system on IBM Power Architecture
technology, IBM provides strong Linux affinity within the AIX OS. This affinity enables faster and
less costly deployment of multi-platform, integrated solutions across AIX and Linux platforms.
Linux packages can be installed and manipulated on AIX using the RedHat Package Manager as
shown in the visual.
AIX affinity with Linux includes Linux application source compatibility, compliance with emerging
Linux standards, and a GNU Linux build-time environment with GNU and other open source tools
and utilities that combine to facilitate the development and deployment of Linux applications on
the AIX OS. This AIX affinity with Linux allows Linux programs to be easily recompiled for native
execution on the AIX OS. This approach allows you to benefit from the capabilities of Linux
applications combined with the industrial strength foundation and performance advantages
afforded to native AIX applications.
Quick guide to RPM:
• To install: rpm -i <packagefilename>
• To upgrade (works for install as well): rpm -U <packagefilename>
• To remove/deinstall: rpm -e <packagename> # As in foo, not foo.ppc.rpm
• To query an installed package: rpm -q <packagename>
• To query all installed packages: rpm -qa
• To list files in a package: rpm -ql <packagename>
• To list requirements for a package: rpm -q --requires
• To find package providing requirements: rpm -q --whatprovides
• To query an uninstalled RPM: rpm -qp <packagefilename>

© Copyright IBM Corp. 2009, 2024 3-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
• To get help: rpm --help
IBM’s goal is to enable customers to be able to select the proper applications, operating
environments, and technologies that fit the business, rather than having customers compromise
the business to fit a single environment or technology.
The rpm options that are shown in the visual are as follows:
• -qa: query all
• -e: erase
• -i: install
• --nodeps: no dependency check
Dependencies between lpp and RPM packages:
If an RPM requires a shared library from AIX that was not installed at the time that rpm.rte was
initially installed, then you can run /usr/sbin/updtvpkg to update RPM's database (in
/var/opt/freeware/lib/rpm) of the software that is installed by installp.
Also, note that rpm command does not support automatic installation of requisites and does not
automatically expand file systems.
The preferred method for installing and managing RPM packages on AIX is to use a tool like YUM
or DNF. We discuss this next.

© Copyright IBM Corp. 2009, 2024 3-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

AIX and Open Source Software


• Uses of AIX Toolbox for Open Source Software
ƒ Build and package open source software for use on AIX
ƒ Run other popular software commonly found in Linux distributions
ƒ Manage open source software by using the popular RPM package management system
ƒ Develop new applications for the AIX OS by using GNU and open source software development tools

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-26. AIX and Open Source Software

The AIX Toolbox for Open Source Software contains a collection of open source and GNU software
built for AIX IBM Systems. These tools provide the basis of the development environment of
choice for many Linux application developers. All the tools are packaged by using the easy to
install RPM format. There is a strong affinity between Linux and AIX for applications. The AIX
operating system (OS) has a long history of standards compliance, and it is generally
straightforward to rebuild open source applications for AIX. The AIX Toolbox for Open Source
Software demonstrates the strong affinity between Linux and AIX operating systems.
The AIX Toolbox for Open Source Software contains a wide variety of software, such as:
• Application Development: gcc, g++, gdb, rpm, cvs, automake, autoconf, libtool, git,
subversion, gettext
• GNU base utilities: gawk, m4, indent, sed, tar, diffutils, findutils, grep, coreutils
• Programming Languages: perl, python, ruby, php
• System Utilities: emacs, vim, bzip2, gzip, rsync, wget, lsof, less, samba, zip, unzip
• Libraries: ncurses, readline, libxml2, libyaml, libpng, libjpeg, slang, db, glib2, zlib, gtk+
• System Shells: bash, tcsh, zsh
• Software Management: YUM and DNF
• Cloud environment: cloud-init, python-swift
The AIX Toolbox for Open Source Software is available at the following link:
https://www.ibm.com/support/pages/node/882892
Let’s look at how we can install and manage open source software on AIX using DNF.

© Copyright IBM Corp. 2009, 2024 3-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

AIX Toolbox and DNF


• DNF (the next-generation replacement for YUM) is the recommended tool to install and
manage Open Source software packages and dependencies from the AIX Toolbox.
• DNF (Dandified YUM) package manager for AIX:
ƒ Next-generation replacement for YUM
ƒ Simplifies installation, management, and updating of open-source software packages

IBM hosted repository (internet) OR Locally hosted repository


IBM AIX Toolbox as DNF Repository (Internet) Local DNF Repository

AIX Toolbox AIX Toolbox


Repository Repository Local DNF repos
IBM Server IBM Server Server

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-27. AIX Toolbox and DNF

DNF is a package manager for RPM images. It is supported on AIX 7.1 TL3, 7.2 and 7.3. It provides
the following capabilities:
• Allows automatic package installation, update and dependency management.
• DNF is made available on AIX and it is published on AIX toolbox.
• An easy to install dnf_aixtoolbox.sh script to install DNF on AIX.
• Local DNF repository can be created on and AIX/Linux system. Or, if your AIX system has
internet connectivity, the IBM hosted AIX Toolbox repositories can be used by DNF. Creating a
local repository is a popular choice for hosting the AIX Toolbox on your internal systems.
Reference: Creating local repo with DNF and AIX Toolbox Media Image,
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/0
9/creating-local-repo-with-dnf-and-aix-toolbox-media. The AIX Toolbox snapshot updates
(iso images) are also delivered to the IBM ESS (and Password Advantage) sites to help
facilitate the creation of local repositories.
Reference:
https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_aixtoolbox.sh
https://developer.ibm.com/articles/configure-yum-on-aix/
YUM and DNF
AIX 7.3 does not support YUM as a RPM package manager from the AIX toolbox. DNF (dandified
yum, the next-generation of the Yellowdog Updater) can be installed from AIX toolbox and must
be used to manage RPM packages on AIX 7.3. YUM is still supported on AIX 7.2 and 7.1 but it is
recommended to use DNF going forward as DNF will be supported on AIX going forward. YUM is a
python2 based package manager and python2 is already out of support from the community.
Hence, there was a need to move to a package manager which works with python3. The dnf tool

© Copyright IBM Corp. 2009, 2024 3-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
works with python3. It roughly maintains CLI compatibility with yum and defines a strict API for
extensions and plugins. It has well documented APIs and uses a state-of-the-art (SAT)-based
dependency solver etc.
Existing AIX Toolbox repositories created for yum works with dnf hence no changes needed on the
repository side.
Key Features of DNF:
• Efficient package management for AIX systems
• Automatic resolution of package dependencies
• Transactional updates ensure system stability
Benefits of DNF
• Streamlined software installation process
• Improved performance compared to YUM
• Enables easy management of open-source software on AIX systems
Dependency resolution
• DNF uses metadata information from repositories to determine package dependencies.
• It maintains a local package repository cache with updated metadata.
• When installing a package, DNF compares the package's metadata with installed packages.
• DNF automatically resolves dependencies by checking enabled repositories for the required
packages.

© Copyright IBM Corp. 2009, 2024 3-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Installing DNF (1 of 2)
• For easy DNF installation, use the dnf_aixtoolbox.sh script.
• https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_aixtoolbox.sh
• The script will download and install the required rpm.rte version, and all the packages
needed for DNF.
# ./dnf_aixtoolbox.sh -d
Attempting download of dnf_bundle_aix_73.tar ...
Saving to 'dnf_bundle_aix_73.tar'...
216 MB received in 48 seconds (4.51 MB/sec)

Extracting dnf_bundle_aix_73.tar ...


x ca-certificates-2023.2.60-0.aix7.1.ppc.rpm, 991065 bytes, 1936 tape blocks
x dnf-4.2.17-64_6.aix7.1.noarch.rpm, 11392 bytes, 23 tape blocks
...
30:python3-gpg-1.13.1-64_3 ################################# [100%]

dnf installed successfully.


Please run 'dnf update' to update packages to the latest level.

Please note, RPM packages are downloaded in dnf cache /var/cache/dnf.


RPM packages install files go under the path /opt.
Hence it is recommended to always keep at least 512MB of free space in /var & /opt
to avoid any download and installation/update failures.

#
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-28. Installing DNF (1 of 2)

To setup and run dnf on AIX, one can use the dnf_aixtoolbox.sh script from the IBM AIX
Toolbox website. This script is similar to the yum.sh script which is for setting yum on AIX. As
mentioned, by default, dnf uses the existing IBM AIX Toolbox (internet) repositories and creates
the dnf configuration file during installation. Once dnf is installed no configuration change is
required to use dnf with the IBM hosted repos.
Space and system requirements
• 300 MB /tmp free space
• 460 MB /opt free space
dnf works on AIX 7.1 TL3 and higher versions. Openssl version 1.0.2.2001 or higher is required.
If your AIX system does not have internet connectivity, you can download the DNF install bundle
manually from https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/, then
extract the tar file and run the install_dnf.sh script, similar to the way dnf_aixtoolbox.sh is
run. The install_dnf.sh script looks for rpms extracted from the tar file and will setup DNF
using the extracted files.
Repository conf file and local repositories
dnf uses the default repository conf file, /opt/freeware/etc/dnf/dnf.conf. This is similar to the
/opt/freeware/etc/yum/yum.conf file for yum. dnf understands local repositories created in
/opt/freeware/etc/yum/repos.d or /opt/freeware/etc/yum.repos.d. If you are using local
repositories, rather than IBM hosted repos, once DNF is installed you can configure your local

© Copyright IBM Corp. 2009, 2024 3-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
repositories in the conf file instead. Example DNF configuration file for AIX 7.3 (using IBM internet
repositories):
[main]
cachedir=/var/cache/dnf
keepcache=1
debuglevel=2
logfile=/var/log/dnf.log
obsoletes=1
plugins=1
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=True
[AIX_Toolbox]
name=AIX generic repository
baseurl=https://anonymous:[email protected]/aix/freeSoftware/aixtoolbox
/RPMS/ppc/
enabled=1
gpgcheck=0
[AIX_Toolbox_noarch]
name=AIX noarch repository
baseurl=https://anonymous:[email protected]/aix/freeSoftware/aixtoolbox
/RPMS/noarch/
enabled=1
gpgcheck=0
[AIX_Toolbox_73]
name=AIX 7.3 specific repository
baseurl=https://anonymous:[email protected]/aix/freeSoftware/aixtoolbox
/RPMS/ppc-7.3/
enabled=1
gpgcheck=0

© Copyright IBM Corp. 2009, 2024 3-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Installing DNF (2 of 2)
• Once DNF is successfully installed, update root’s PATH. Then run dnf commands.
# echo "export PATH=$PATH:/opt/freeware/bin" >> /.profile ; su -
# dnf repolist
repo id repo name
AIX_Toolbox AIX generic repository
AIX_Toolbox_73 AIX 7.3 specific repository
AIX_Toolbox_noarch AIX noarch repository
# dnf install cloud-init-0.7.5-4.5.ppc
...
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Installing:
cloud-init ppc 0.7.5-4.5 AIX_Toolbox 433 k
Installing dependencies:
python ppc 2.7.18-4 AIX_Toolbox 22 M
python-PyYAML ppc 3.11-1 AIX_Toolbox 497 k
...
Installed:
cloud-init-0.7.5-4.5.ppc python-2.7.18-4.ppc python-PyYAML-3.11-1.ppc python-cheetah-2.4.4-2.ppc
python-pyserial-2.7-1.ppc python-xml-0.8.4-1.ppc python-boto-2.34.0-1.noarch python-configobj-5.0.5-1.noarch
python-jsonpatch-1.8-1.noarch python-jsonpointer-1.0-1.noarch python-oauth-1.0.1-1.noarch python-
prettytable-0.7.2-1.noarch python-requests-2.4.3-1.noarch python-setuptools-0.9.8-2.noarch python-six-
1.10.0-1.noarch

Complete!
#

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-29. Installing DNF (2 of 2)

Once DNF is successfully installed and configured, you can run dnf commands to install and
manage RPM packages from the configured repositories (local or remote). As shown in the visual,
dnf can be used to install a package and it will automatically install the package, along with any
necessary dependencies. It may be necessary to update root’s .profile (and/or .kshrc file) to
update the $PATH environment variable to include the location of the dnf (and other OSS) binaries
in /opt/freeware/bin.

© Copyright IBM Corp. 2009, 2024 3-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

DNF commands (1 of 4)
• Use dnf install <package> to install a specific package.
# dnf install tcping
Last metadata expiration check: 0:26:07 ago on Wed Jul 12 01:10:43 EDT 2023.
Dependencies resolved.
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Installing:
tcping ppc 1.3.5-1 AIX_Toolbox 14 k

Transaction Summary
=============================================================================================================
Install 1 Package

Total download size: 14 k


Installed size: 14 k
Is this ok [y/N]: y
Downloading Packages:
tcping-1.3.5-1.aix6.1.ppc.rpm 24 kB/s | 14 kB 00:00
...
Installed:
tcping-1.3.5-1.ppc

Complete!
#

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-30. DNF commands (1 of 4)

The visual shows an example of installing an RPM package with dnf on AIX 7.3

© Copyright IBM Corp. 2009, 2024 3-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

DNF commands (2 of 4)
• Use dnf search <keyword> to search for available packages.
• Run dnf check to check for problems in the package database.
• Run dnf check-update to check for available package upgrades.
• Use dnf list installed to display installed packages.
# dnf search nping
Last metadata expiration check: 0:31:42 ago on Wed Jul 12 01:10:43 EDT 2023.
=============================== Name & Summary Matched: nping ================================================
nping.ppc : Nping packet generator
# dnf check
#
# dnf check-update
...
cloud-init.noarch 22.1-2 AIX_Toolbox_noarch
#
# dnf list installed
Installed Packages
AIX-rpm.ppc 7.3.1.1-2 @System
bash.ppc 5.1.16-1 @AIX_Toolbox
bzip2.ppc 1.0.8-2 @AIX_Toolbox
ca-certificates.ppc 2023.2.60-2 @AIX_Toolbox
check.ppc 0.13.0-1 @AIX_Toolbox
cloud-init.ppc 0.7.5-4.5 @AIX_Toolbox
...
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-31. DNF commands (2 of 4)

The visual shows an examples of using dnf to search for specific packages, check the integrity of
the RPM package database and check for available package upgrades.
List of some dnf commands:
• alias: List or create command aliases
• autoremove: Remove all unneeded packages that were originally installed as dependencies
• check: Check for problems in the packagedb
• check-update: Check for available package upgrades
• clean: Remove cached data
• deplist: List package's dependencies and what packages provide them
• distro-sync: Synchronize installed packages to the latest available versions
• downgrade: Downgrade a package
• group: Display, or use, the groups information
• help: Display a helpful usage message
• history: Display, or use, the transaction history
• info: Display details about a package or group of packages
• install: Install a package or packages on your system
• list: List a package or groups of packages
• makecache: Generate the metadata cache
• mark: Mark or unmark installed packages as installed by user.

© Copyright IBM Corp. 2009, 2024 3-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
• module: Interact with Modules.
• provides: Find what package provides the given value
• reinstall: Reinstall a package
• remove: Remove a package or packages from your system
• repolist: Display the configured software repositories
• repoquery: Search for packages matching keyword
• repository-packages: Run commands on top of all packages in given repository
• search: Search package details for the given string
• shell: Run an interactive DNF shell
• swap: Run an interactive DNF mod for remove and install one spec
• updateinfo: Display advisories about packages
• upgrade: Upgrade a package or packages on your system
• upgrade-minimal: Upgrade, but only 'newest' package match which fixes a problem that
affects your system

© Copyright IBM Corp. 2009, 2024 3-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

DNF commands (3 of 4)
• Run dnf update to update installed packages to their latest versions
# dnf update
Last metadata expiration check: 0:33:40 ago on Wed Jul 12 01:10:43 EDT 2023.
Dependencies resolved.
============================================================================================================
Package Architecture Version Repository Size
============================================================================================================
Upgrading:
gnutls ppc 3.7.9-1 AIX_Toolbox 4.4 M
cloud-init noarch 22.1-2 AIX_Toolbox_noarch 1.2 M
Installing dependencies:
python3.9-markupsafe ppc 1.1.1-2 AIX_Toolbox 38 k
python3.9-netifaces ppc 0.11.0-1 AIX_Toolbox 33 k
python3.9-pyrsistent ppc 0.19.3-1 AIX_Toolbox 175 k
...

Transaction Summary
==============================================================================================================
=========================
Install 17 Packages
Upgrade 2 Packages

Total size: 8.1 M


Total download size: 4.4 M
Is this ok [y/N]: y

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-32. DNF commands (3 of 4)

The dnf update command updates all installed RPM packages to the latest level.

© Copyright IBM Corp. 2009, 2024 3-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

DNF commands (4 of 4)
• Run dnf remove to remove (delete) an installed package or packages from the system
# dnf remove wget
Dependencies resolved.
==========================================================================================================
Package Architecture Version Repository Size
==========================================================================================================
Removing:
wget ppc 1.21.2-1 @AIX_Toolbox 1.5 M

Transaction Summary
==========================================================================================================
Remove 1 Package

Freed space: 1.5 M


Is this ok [y/N]: y
...
Preparing :
1/1
Running scriptlet: wget-1.21.2-1.ppc 1/1
Erasing : wget-1.21.2-1.ppc 1/1
Verifying : wget-1.21.2-1.ppc 1/1

Removed:
wget-1.21.2-1.ppc

Complete!

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-33. DNF commands (4 of 4)

The dnf remove command updates all installed RPM packages to the latest level.
Let us introduce SUMA.

© Copyright IBM Corp. 2009, 2024 3-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-34. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Service update management assistant


• Excellent tool for downloading fixes:
ƒ Optional: Tasks can be automated or driven by ksh scripts
• Installed by default in AIX 7.2 and later:
ƒ bos.suma
ƒ Prerequisites of bos.ecc_client.rte and Java8_64.sdk
• Access: smit suma
• Can be used to download:
ƒ By PTF
ƒ Technology level
ƒ Service pack
ƒ All latest fixes
• Internet access must be available from the service update management assistant (SUMA)
host. Has many configuration parameters

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-35. Service update management assistant

SUMA is an excellent tool for quickly downloading fixes with minimum fuss directly onto an AIX
server or NIM server. The bos.suma fileset is installed by default with all the prerequisites on AIX
7.2.
Why SUMA?
Fix automation, the ability to get maintenance fixes onto a system automatically, is becoming a
focus area for IT system administrators. As system administration becomes more complex and
time consuming, it is often a roadblock that prevents systems from being up to date with current
software fixes. Clients want the increased security and reliability benefits, as well as the reduced
downtime and total cost of ownership that comes with keeping current fixes on a system. To meet
these client demands, SUMA has automated the process of determining which fixes are available,
discovering which of the available fixes a system needs, and downloading the necessary fixes
onto a system, thereby reducing both the complexity and the time spent on system administration
to perform these tasks.
SUMA is a great tool for downloading patches without using a web browser on a PC. The only
downside is security, as the server is Internet facing (as shown in the visual). This is the main
reason many customers do not use it. Ensure that you are entitled to download SUMA
maintenance updates. If you are not entitled to download SUMA maintenance updates, check
with your administrator and licensing team for assistance. Without entitlement, you encounter the
following error message from SUMA:
0500-059 Entitlement is required to download.
The system's serial number is not entitled.
Refer to
https://www.ibm.com/docs/en/aix/7.3?topic=suma-service-update-management-assistant

© Copyright IBM Corp. 2009, 2024 3-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty
The diagram in the visual shows how SUMA connects to the fix distribution website through the
internet.
Let's see the task configuration details.

© Copyright IBM Corp. 2009, 2024 3-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

SUMA base configuration


• Base configuration
ƒ # smit suma_config_base

Base Configuration

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Screen output verbosity [Info/Warnings/Errors] +
Logfile output verbosity [Verbose] +
Notification email verbosity [Info/Warnings/Errors] +
Remove superseded filesets on Clean? yes +
Remove duplicate base levels on Clean? yes +
Remove conflicting updates on Clean? Yes +
Fixserver protocol https +
Download protocol http +
Maximum log file size (MB) [1] #
Download timeout (seconds) [180] #

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-36. SUMA base configuration

The Base Configuration menu allows SUMA global configuration settings to be viewed or
changed. These settings are used for each SUMA task that is run and allow the specification of
values for items such as:
• Screen, logfile, and email verbosity levels
• Flag options for the lppmgr command to help manage the size of a download repository
• Download protocol
• Download timeout setting
A clean operation removes unnecessary files from the repository using the lppmgr command.
The global configuration settings can be viewed from the command line, with the suma -c
command.
In AIX 7 and later, use of HTTP or HTTPS proxy connections requires that the IBM Electronic
Customer Care (ECC) service connection be configured. This is shared with Service Agent and
Inventory Scout.
The HTTP proxy configuration is of interest to facilities that want to use SUMA but does not allow
direct connection to the IBM server.
SUMA used to support the ftp protocol for download. In AIX 7.1, it is no longer supported; it only
supported http (uses a multi-threaded download director protocol) and https (single threaded).
In AIX 6, SUMA supported suma command configuration options of HTTP_PROXY and HTTPS_PROXY.
These are disabled in AIX 7.1. In AIX 7.1, SUMA uses the ECC service connection proxy
configuration.
Let us look at SUMA default task configuration.

© Copyright IBM Corp. 2009, 2024 3-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Download AIX updates


• Default task configuration
ƒ # smit suma_task_defaults
View/Change SUMA Task Defaults

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Action [Download] Directory+to
Directory for item storage [/aix/FIXES] store
Type of item to request [All Latest Fixes] downloads+
Name of item to request []
Repository to filter against [/aix/FIXES]
Maintenance or Technology Level to filter against [] +
Maximum total download size (MB) [-1] +#
EXTEND file systems if space needed? yes +
Maximum file system size (MB) [-1] +#
Notify email address [root] +

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-37. Download AIX updates

SUMA default task values can be uniquely set for each SUMA task. The visual above shows the
default settings. The possible actions are:
• Preview: SUMA performs the operations that do not directly affect the file system. The output
displayed reflects what would happen during a download. Use this option to determine which
files will be downloaded for your request.
• Download: SUMA downloads files into the directory specified in Directory for item storage.
• Download and Clean: SUMA performs a download operation and a clean operation to remove
unnecessary files from the repository.
The task configuration settings can be viewed with the suma -D command.
Let us look at some command-line examples.

© Copyright IBM Corp. 2009, 2024 3-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

SUMA command line execution


• SUMA command line examples:
ƒ Download specific service pack
# /usr/sbin/suma -x -a RqType=SP -a Action=Download \ Request type =
-a RqName='7300-02-01-2346' service pack

ƒ Download technology level 4 for AIX 7.1 on Wednesday at 11:00 PM


# /usr/sbin/suma -s "0 23 * * 3" -a RqType=TL –a Action=Download \
-a RqName=‘7100-04'
Task ID 1 created.
List all scheduled
# suma -l SUMA tasks

ƒ Download latest fixes for the currently installed AIX TL


# /usr/sbin/suma -x -a Action=Download -a RqType=Latest

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-38. SUMA command line execution

SUMA tasks can be initiated through the command line. This is most useful when producing
scripts to automatically download fixes. SUMA uses cron when scheduled tasks are created. In
the schedule example above, the following entry is added to root's crontab:
0 23 * * 3 _SUMA=cron /usr/bin/suma -x 1

© Copyright IBM Corp. 2009, 2024 3-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

The output of command:
# suma -l
1:
DisplayName=
Action=Download
RqType=TL
RqName=7100-04
RqLevel=
PreCoreqs=y
Ifreqs=y
Supersedes=n
ResolvePE=IfAvailable
Repeats=y
DLTarget=/aix/FIXES
NotifyEmail=root
FilterDir=/aix/FIXES
FilterML=7100-04
FilterSysFile=localhost
MaxDLSize=-1
Extend=y
MaxFSSize=-1
For further information see the suma man page.

© Copyright IBM Corp. 2009, 2024 3-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-39. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Download AIX security interim fixes


• Two tools for downloading AIX security interim fixes:
ƒ emgr_check_ifixes - Check for the availability of AIX security interim fixes (ifixes) for your current
AIX level.
ƒ emgr_download_ifix - Downloads individual security patches and interim fixes.
• Included with AIX 7.2 and AIX 7.3.
• Delivered with the bos.rte.install AIX fileset.
• Internet access must be available from the AIX host.
• Use emgr_check_ifixes –D to download security ifixes not installed on AIX host.
• Note: The emgr_download_ifix command might fail if the /tmp directory does not have
enough space.
• Ensure that the /tmp directory contains sufficient space before you use
emgr_download_ifix.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-40. Download AIX security interim fixes

If your AIX system has internet connectivity, you can use the emgr_check_ifixes tool to check
for the availability of AIX security interim fixes (ifixes) for your current AIX operating system level.
The tool can also download the fixes to your AIX host. It provides AIX administrators a convenient
way to ensure their AIX systems have known security fixes installed.
The tool is included with AIX 7.2 and AIX 7.3. It is delivered with the bos.rte.install AIX fileset.
# which_fileset /usr/sbin/emgr_check_ifixes
/usr/sbin/emgr_check_ifixes bos.rte.install 7.3.0.0
There’s also the companion tool, emgr_download_ifix, which can be used to download specific
security ifixes.
# which_fileset /usr/sbin/emgr_download_ifix
/usr/sbin/emgr_download_ifix bos.rte.install 7.3.0.0
Note: At the time of writing, April 2024, the emgr_* tools require an ifix, for APAR IJ49378, to
operate correctly. Without this ifix the commands will likely fail and report errors during operation.
You can obtain this ifix from the IBM AIX support team. Open a new support case and request the
fix for your specific AIX version and level. Refer to the following blog for more information,
https://community.ibm.com/community/user/power/blogs/chris-gibson1/2024/02/27/using-emgr
-check-ifixes-aix-73.
Let’s see some examples of using the tools on an AIX system with internet access.

© Copyright IBM Corp. 2009, 2024 3-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

emgr_check_ifixes command line execution (1 of 2)


• emgr_check_ifixes command line example:
ƒ Check the availability of security interim fixes for the current operating system level.
# emgr_check_ifixes
Gathering system information
...etc...
p0.aix=7300-02-01-2346
+-----------------------------------------------------------------------------+
Checking interim fixes on the system ...
+-----------------------------------------------------------------------------+
Searching for AIX security fixes ...
+-----------------------------------------------------------------------------+
Recommended ifixes, please wait..parsing
===============================================================================
38408m9a AIX is vulnerable to unauthorized file access and arbitrary code execution due to OpenSSH
https://aix.software.ibm.com/aix/efixes/security/openssh_fix15.tar Security ifixes
46218ma Multiple vulnerabilities in cURL libcurl affect AIX available for this
https://aix.software.ibm.com/aix/efixes/security/curl_fix3.tar host (not installed)
46218ma AIX is vulnerable to security restrictions bypass due to cURL libcurl (CVE-2023-46218)
https://aix.software.ibm.com/aix/efixes/security/curl_fix4.tar
Vulnerability fixes are not downloaded
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-41. emgr_check_ifixes command line execution (1 of 2)

In the visual we check for any security ifixes that might be available for our AIX system. In this
example several ifixes were found that are NOT installed on my AIX host. The tool displays a list of
each of the security fixes that are available for my AIX host, but they are not downloaded to the
host.

© Copyright IBM Corp. 2009, 2024 3-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

emgr_check_ifixes command line execution (2 of 2)


• emgr_check_ifixes command line example:
ƒ Download ifixes to AIX host.
# emgr_check_ifixes –D Download any
...etc... security ifix not
installed
Downloading 1 of 5 ...
Downloading fix: https://aix.software.ibm.com/aix/efixes/security/openssh_fix15.tar
+-----------------------------------------------------------------------------+

Performing certificate verification ...


OpenSSL success!
Interim fix openssh_fix15.tar has been downloaded to /tmp/ifix_10944936 directory.
+-----------------------------------------------------------------------------+ Each ifix is
downloaded to
/tmp/ifix_${PID}
Downloading 2 of 5 ...
Downloading fix: https://aix.software.ibm.com/aix/efixes/security/curl_fix3.tar
+-----------------------------------------------------------------------------+
...etc...

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-42. emgr_check_ifixes command line execution (2 of 2)

In the visual, we check for security ifixes, and again, there are several security ifixes found that are
NOT installed on my AIX host. By specifying the -D flag we have chosen to automatically
download the required fixes to the host (in /tmp/ifix_ ${PID}, the default location). For example:
# ls -ltr /tmp/ifix_10944936
total 344920
-rw-r--r-- 1 root system 1865 Apr 08 22:23 ssl_connection_flrt.log
-rw-r--r-- 1 root system 20172 Apr 08 22:24 adv_file
-rw-r--r-- 1 root system 256 Apr 08 22:24 adv_file.sig
-rw-r--r-- 1 root system 27258880 Apr 08 22:24 openssh_fix15.tar
-rw-r--r-- 1 root system 2181120 Apr 08 22:24 curl_fix3.tar
-rw-r--r-- 1 root system 1310720 Apr 08 22:24 curl_fix4.tar
-rw-r--r-- 1 root system 19927040 Apr 08 22:24 openssh_fix16.tar
-rw-r--r-- 1 root system 125890560 Apr 08 22:25 openssl_fix40.tar

© Copyright IBM Corp. 2009, 2024 3-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

emgr_download_ifix command line execution


• emgr_download_ifix command line example:
ƒ Download individual curl security ifix to AIX host.
# emgr_download_ifix -L https://aix.software.ibm.com/aix/efixes/security/curl_fix4.tar -P /tmp/ifixes
Downloading fix: https://aix.software.ibm.com/aix/efixes/security/curl_fix4.tar
+-----------------------------------------------------------------------------+ Download curl
security ifix to
/tmp/ifixes
Performing certificate verification ...
OpenSSL success!
Interim fix curl_fix4.tar has been downloaded to /tmp/ifixes directory.
+-----------------------------------------------------------------------------+ ifix is downloaded
to /tmp/ifixes
# ls -ltr /tmp/ifixes
total 2560
-rw-r--r-- 1 root system 1310720 Apr 08 22:46 curl_fix4.tar
# cd /tmp/ifixes
# tar -tvf curl_fix4.tar
-rw-r----- 0 0 1289099 Mar 04 12:01:58 2024 curl_fix4/46218ma.240227.epkg.Z
-rw-r--r-- 0 0 256 Mar 04 14:23:54 2024 curl_fix4/46218ma.240227.epkg.Z.sig
-rw-r--r-- 0 0 9078 Mar 06 16:11:50 2024 curl_fix4/Advisory.asc
-rw-r--r-- 0 0 256 Mar 06 16:11:58 2024 curl_fix4/Advisory.asc.sig
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-43. emgr_download_ifix command line execution

The emgr_download_ifix tool can be used to download a specific fix. The example shown in the
visual downloads the curl_fix4tar fix (46218ma AIX is vulnerable to security restrictions
bypass due to cURL libcurl CVE-2023-46218) to a directory named /tmp/ifixes.
SUMA, emgr_check_ifixes and emgr_download_ifix are easy tools to drive, but If you prefer
not to use them, or cannot, then you can obtain software maintenance directly from the IBM
website.
Let us examine what we would see at that website.

© Copyright IBM Corp. 2009, 2024 3-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Fix Central website


• To download fixes: https://www.ibm.com/support/fixcentral

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-44. Fix Central website

AIX fixes are generally available on the Internet at Fix Central. Fixes at any level, from AIX 4.3.3 to
the present version, can be downloaded.
Each IBM client accessing Fix Central is required to have an individual IBM ID to download fixes
(some exemptions can apply). If not already registered, the registration is quick and simple and
provide users with a customized experience to better serve their needs. To register go to:
https://www.ibm.com/account/profile. Complete the “Create a FREE IBM account” form to
create your new IBMid.
One of the useful Fix type categories is Fix Recommendations. FLRT is web-driven tool that
enables you to select your machine type and software components and levels. It then produces
an easy to read report, which provides recommendations, notices, and status compliance. It
covers not only AIX levels but also System Firmware, HMC, VIOS, PowerHA levels, and more.
Let us take a closer look at the Fix Level Recommendation Tool.

© Copyright IBM Corp. 2009, 2024 3-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Topic 1 objectives
• Define the package definitions and naming conventions
• Determine the current installed level of the OS and individual filesets
• Apply, commit, and remove AIX software
• Applying patches to the system
• Describe RedHat Package Manager and DNF
• Describe how to download software maintenance using Fix Central and SUMA
• Describe how to check for and download AIX security fixes
• Identify if all the components in the Power and AIX environment are compatible and
supported

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-45. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 3-58


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Fix Level Recommendation Tool

AIX software installation and maintenance


https://esupport.ibm.com/customercare/flrt/ © Copyright IBM Corporation 2024

Figure 3-46. Fix Level Recommendation Tool

Today's AIX environment can be complex as lots of components are required. In addition to AIX,
one must also think about but System Firmware, HMC, VIOS, PowerHA levels, and more. How do
you know whether the levels of these products are compliant and supported? The answer is FLRT.
FLRT is web driven tool that enables you to select your machine type and software components
and levels. It then produces an easy to read report which provides recommendations, notices, and
status compliance as shown on the visual.
Let us go over some review questions.

© Copyright IBM Corp. 2009, 2024 3-59


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Review questions
1. Which of the following states must your software be in, in order for you to be able to use it?
(Select all that apply.)
a. Applied state
b. Removed state
c. Install state
d. Commit state
2. What command is used to list all installed software on your system?
3. Which of the following can you install as an entity? Select all that apply.
a. ifix
b. LPP
c. Package
d. Bundle
4. True or False: If a problem is found with the inetd subsystem, it is possible to download and
apply an interim fix to the bos.net.tcp.client_core fileset in AIX to correct the problem.
AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-47. Review questions

© Copyright IBM Corp. 2009, 2024 3-60


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Review answers (1 of 2)
1. Which of the following states must your software be in, in order for you to be able to use it?
(Select all that apply.)
a. Applied state
b. Removed state
c. Install state
d. Commit state
The answer is a and d
2. What command is used to list all installed software on your system?
The answer is lslpp –l or lslpp -L.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-48. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 3-61


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Review answers (2 of 2)
3. Which of the following can you install as an entity? Select all that apply.
a. ifix
b. LPP
c. Package
d. Bundle
The answer is they all apply.
4. True or False: If a problem is found with the inetd subsystem, it is possible to download and
apply an interim fix to the bos.net.tcp.client_core fileset in AIX to correct the problem.
The answer is true.

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-49. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 3-62


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Exercise

AIX software
installation and
maintenance

AIX software installation and maintenance © Copyright IBM Corporation 2024

Figure 3-50. Exercise

© Copyright IBM Corp. 2009, 2024 3-63


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 3. AIX software installation and maintenance

Uempty

Unit summary • Define the package definitions and naming conventions


• Determine the current installed level of the OS and individual
filesets
• Apply, commit, and remove AIX software
• Recover from broken and inconsistent software states
• Describe how to download software maintenance using Fix Central
and SUMA
• Identify if all the components in the Power and AIX environment are
compatible and supported

© Copyright IBM Corporation 2024

Figure 3-51. Unit summary

© Copyright IBM Corp. 2009, 2024 3-64


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit 4. System configuration and


devices
Estimated time
00:45

Overview
This unit describes how to list and understand the system configuration and manipulate devices.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
AIX Version 7.3 What's new in Device management
https://www.ibm.com/docs/en/aix/7.3?topic=management-whats-new
Part locations and location codes
https://www.ibm.com/docs/en/power10/9080-HEX?topic=addresses-part-locations-location-co
des#p10ecs_locations__physlocsmapping.

© Copyright IBM Corp. 2009, 2024 4-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit objectives • Explain device terminology


• List device configuration and status
• Configure new devices
• Manage device states
• Interpret physical and virtual location codes

© Copyright IBM Corporation 2024

Figure 4-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 4-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit topics (1 of 3)
• Explain device terminology and interpret physical and virtual location codes
• List device configuration and status
• Configure new devices and manage device states

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-2. Unit topics (1 of 3)

© Copyright IBM Corp. 2009, 2024 4-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device terminology
• Generic terminology
ƒ Physical devices
ƒ Ports
ƒ Device drivers
ƒ Logical devices
ƒ /dev directory
ƒ Virtual devices
• Power H/W-specific terminology
ƒ CEC
ƒ System planar
ƒ RIO or 12X
ƒ System ports
ƒ GX+, PCI, PCIe
ƒ SR-IOV

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-3. Device terminology

Generic device terminology


• Physical devices are the actual hardware that is connected in some way to the system.
• Ports are the physical connectors and adapters in the system to which physical devices or
cables are attached.
• All POWER servers, except but the entry level models, provide the ability to extend the internal
buses of the system enclosure to the I/O expansion drawers. The I/O expansion drawers have
PCI buses, which can support additional adapters and disks (depending upon the type of I/O
drawer. POWER8 servers use PCIe (PCI Express) buses. Older Power models use a cabling
system called 12X (based on InfiniBand).
• Logical devices: Software interfaces (special files) that present a means of accessing a
physical device to the users and application programs. Data that is appended to logical
devices is sent to the appropriate device driver. Data that is read from logical devices is read
from the appropriate device driver.
• /dev is the directory, which contains all of the logical devices that can be directly accessed by
the user. Some logical devices that are defined are only referenced in the ODM customized
database and cannot be accessed by users.
• Virtual devices are the Ethernet and SCSI devices, which are allocated to the client for
networking access and storage. These devices are not real.
Power hardware-specific terminology
• Central electronics complex (CEC) is the main system unit that contains system processors,
memory, and remote I/O connections.
• System planar is the main component of the CEC where all processor cards, memory DIMMs,
and I/O attachments are interconnected together.

© Copyright IBM Corp. 2009, 2024 4-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty
• RIO and 12X provide high-speed connectivity between the system enclosure (contains the
CEC) and any I/O drawer enclosures. RIO and 12X are consisted of special cables, adapters,
and protocols, which allow the I/O drawers to effectively act as extensions of the system
enclosure’s internal buses. An I/O drawer can consist of PCI slots/adapters, disks, or both,
depending on the type of I/O drawer. The I/O drawers connect to the system enclosure
through either a RIO or 12X GX adapter, which sits on the system enclosure’s GX+ bus.
• System ports are the two serial ports on the system planar. In an operating system
environment, the two system ports become host virtual system ports and are only available for
specific limited functions. For example, the two integrated system ports on a p550 are limited
to serial connected TTY console functionality and IBM approved call-home modems. These
system ports do not support other general serial connection uses, such as UPS, PowerHA
heartbeat, printers, mice, and so on, If you need multi-purpose serial port functions, optional
PCI adapters are available.
• GX+: Each POWER6 and higher processor provides a GX+ bus, which is used to connect to an
I/O subsystem or Fabric Interface card.
• PCI, which stands for Peripheral Component Interconnect, is an industry-standard bus for
attaching peripherals to computers.
• PCIe, high-speed serial computer expansion bus standard, designed to replace the older PCI,
PCI-X.
• SR-IOV: Single root I/O virtualization (SR-IOV) is an extension to the PCI Express (PCIe)
specification that allows multiple operating systems to simultaneously share a PCIe adapter
with little or no runtime involvement from a hypervisor or other virtualization intermediary.
This visual provides a list of need-to-know device terminology.
Let us introduce different devices in system components.

© Copyright IBM Corp. 2009, 2024 4-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

System components locations


EXP24S SFF
Gen2-bay Location:
Drawer • Enclosure
• Bus or planar
SAS • Adapter
• Port
PCIe • Device
PCIe
Gen3 I/O
expansion
drawer SMP
PCIe cables
CEC
Power E870 PCIe PCIe Gen3
System
Enclosures CEC

PCIe PCIe Gen3

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-4. System components locations

A Power server can be consisted of many enclosures. An enclosure is a single box that can be
mounted in a rack. Each enclosure has a unique identifier, which consists of the machine type and
model (MTM) plus a serial number, as in this example: U8204.E8A.65BF831.Virtual devices use
this as the basis for their location.
The most important enclosure is the system enclosure, which contains the CEC (or system node
on POWER9 and Power10). The MTM and serial for the system enclosure is used as the basis for
virtual device locations. The CEC, within the system enclosure, has a separate MTM and serial
number. All of the non-virtual devices within a system enclosure use the CEC identifier as the
basis for their location. For example, device pci1 (on the PCI-X) bus has the device code of
U78A0.001.DNWGCAH-P1. U78A0.001.DNWGCAH is the identifier of the CEC and P1 means that
the device is attached to the main System planar. For certain server models, multiple system
enclosures can be cabled together act as one large server.
An example of that would be a Power E870 (as shown in the visual). Within each enclosure, there
are one or more planars. A planar is often associated with an internal bus, such as a PCI bus. On
each bus, there is one more device adapter. Each device adapter has one or more ports. Most of
the devices that you might want to identify are associated with or connected to one of these ports.
Although the visual shows a POWER8 system, the components for both the newer POWER9 and
Power10 models is very similar (with some exceptions around what I/O drawers and disk bays
can be attached). The concepts are similar across POWER8, POWER9 and Power10 servers.
Please refer to the documentation for your Power server for specific details.
While the system enclosure has a few integrated disk bays and PCI slots, it is common to desire
more of these resources. To support expanding the I/O capacity of the server, the system
enclosures can be connected to I/O expansion drawers, which act as an extension of the server.
These I/O drawers have their own MTM and serial number that is used for locating devices that
are attached to them. The current cabling system for connecting I/O expansion drawers to the

© Copyright IBM Corp. 2009, 2024 4-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty
system drawers is the SMP cabling, though older servers used the 12X cabling. The expansion
drawers contain their own internal PCI buses that support card slots. Some models also have an
integrated SAS or SCSI adapter to support additional disk bays in the enclosure.
Finally, when additional locally attached disks are needed, it is possible to place a disk expansion
drawer. These are cabled to storage adapter in either a system enclosure or an I/O expansion
drawer using SAS cabling, depending on the model I/O drawer. Devices in this type of I/O drawer
are located based upon the storage adapter to which they are cabled. And that storage adapter is
either in a system enclosure or an I/O expansion drawer.
This visual shows a diagram of Power E870 System Enclosures and its components.
Let us take a closer look at device addressing for location codes.

© Copyright IBM Corp. 2009, 2024 4-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device addressing
• The address of a device allows you to identify its location.
• Physical location codes uniquely identify a specific component in a server.
ƒ Assigned by the system firmware
í Example: hdisk0 U78A0.001.DNWGGRX-P2-D5 (SAS Drive)

• Operating system location codes uniquely identify a component only within an AIX instance.
ƒ Assigned by AIX
ƒ Not as useful or meaningful as physical location codes
ƒ Virtual devices do not have AIX location codes.
ƒ Address conventions differ between models and types (adapters, SCSI, non-SCSI).
ƒ Example: hdisk0 00-08-00 (SAS Drive)
• Both physical and AIX codes can be seen side by side with:
ƒ # lsdev –CHF "name, status, physloc, location"

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-5. Device addressing

Every device is assigned a physical location code assigned by the system firmware. These codes
are instrumental in identifying a physical device in case of a hardware failure. For example, in case
of a disk drive failure, an error report is generated which identifies the device and its location. You
can use this information to replace the failed disk drive.
It is important not to confuse physical location codes with AIX location codes. Before LPAR
technology was introduced into Power servers, there were only AIX location codes, and they
remain today for legacy purposes. On POWER processor-based servers that can be partitioned,
you need to use physical location codes.
Note: Virtual devices do not have AIX location codes.

© Copyright IBM Corp. 2009, 2024 4-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Physical location code examples


• Physical location code format:
í Unit_type.Model_no.Serial_no-additional device information
• Examples:
ƒ hdisk0 U78A0.001.DNWGGRX-P2-D5 SAS Disk Drive
í SAS Planar (P2), Device slot reference 5, disk is in the CEC
ƒ ent1 U78A0.001.DNWGGRX-P1-C4-T2 2-Port 10/100/1000 PCI-X Adapter
í System planar (P1), Card slot No 4, 2nd port, Adapter is in the CEC
ƒ hdisk2 U7311.D20.6516D3C-P1-C04-T2-L8-L0 16 Bit LVD SCSI Disk
í Planar 1 (P1), PCI slot No 4, 2nd port, SCSI ID 8,0, Disk is in an attached
7311-D20 I/O expansion drawer
ƒ hdisk5 U78A0.001.DNWGGRX-P1-C3-T1-W500507630E801223-L4011402700000000 FC
SCSI Disk
í System planar (P1), Card slot No 3, Port 1, W = WW unique name of an FC adapter (where the FC
adapter is in a remote storage subsystem), L = LUN ID.
The disk is a logical device (identified by the LUN ID) in the remote storage subsystem.
System configuration and devices © Copyright IBM Corporation 2024

Figure 4-6. Physical location code examples

The visual above shows how to interpret physical location code information.
The example system is an older model Power 550, but the principle applies to all Power servers.
This server has a single system enclosure.
• U78A0 identifies the I/O planar within the CEC/system enclosure
• DNWGGRX is the serial number of the I/O planar board
Power servers usually have I/O expansion drawers, or in the case of the larger machines,
expansion frames containing I/O drawers. U7311.D20 is a remote I/O drawer (RIO) for low to
mid-range systems. The example on the visual shows 6516D3 as the serial number of the drawer.
Note that some Power10 servers, such as the E1080, use updated physical location codes for the
CEC/node, where the cassette locations are P0-C0 to P0-C7 and the adapter slot locations are
P0-C0-C0 to P0-C7-C0. Example, U78D8.ND0.FGD01AK-P0-C2-C0-T1. While any attached I/O
expansion drawers will continue to use the standard location code naming, such as P1-C1- e.g..,
U78CD.001.FZHEP53-P1-C2-T1. Refer to the online documentation for your Power server type.
Reference: Part locations and location codes,
https://www.ibm.com/docs/en/power10/9080-HEX?topic=addresses-part-locations-location-cod
es#p10ecs_locations__physlocsmapping.

© Copyright IBM Corp. 2009, 2024 4-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Virtual location code example


• Virtual devices have location codes similar to physical devices.
• Location codes that contain a V#-C# combination represents the LPAR ID and the virtual
adapter ID.
• Use the uname –L command to display a partition's LPAR ID.
• Use the lscfg or lsdev commands to see a description of a device.
• Use the HMC to view the virtual adapter properties.
• For example, the following location code is for a device on
LPAR ID 3 and the adapter has an ID of 2: U8203.E4A.10CD211–V3–C2
# uname –L
3 LPAR2

# lscfg
...
* vscsi0 U8203.E4A.10CD211-V3-C2-T1 Virtual SCSI Client Adapter
...
* hdisk0 U8203.E4A.10CD211-V3-C2-T1-L8100000000000000 Virtual SCSI Disk Drive
...

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-7. Virtual location code example

Virtual devices are assigned location codes in a similar format to physical devices. The format is:
unit_type.Model_no.serial_no.LPAR_ID.virtual_slot_number.[port].[lun]
The visual above shows a VIOS presenting a virtual disk (hdisk0) to a VIO Client. The first step is
to create a virtual server adapter on the HMC for the VIOS and also a VIO client adapter for the AIX
partition. Each adapter has an assigned ID. In the example: V3 represents LPAR ID 3 for the VIOS.
C2 represents the virtual card slot number, which is always equal to the adapter ID as defined on
the HMC. The vscsi device on the virtual client symbolizes the client adapter. T1 specifies the port
number of the adapter. The client disks associated with the virtual client adapter will always
inherit the location code definition plus one additional field, the LUN ID (L81000000000).

© Copyright IBM Corp. 2009, 2024 4-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit topics (2 of 3)
• Explain device terminology and interpret physical and virtual location codes
• List device configuration and status
• Configure new devices and manage device states

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-8. Unit topics (2 of 3)

© Copyright IBM Corp. 2009, 2024 4-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

System configuration and device overview


• Understanding the configuration of the system is important.
ƒ The configuration should be documented and updated on a regular basis.
• All devices have attributes, some of which can be changed.
ƒ lsattr lists device attributes.
ƒ chdev changes device attributes.
• AIX devices can be physical or virtual.
ƒ An AIX partition does not need to have any physical devices.
• Most devices within AIX are self-configured with cfgmgr.
• Physical and virtual device states can be controlled using mkdev and rmdev commands.

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-9. System configuration and device overview

System configuration is important. We need to understand what devices we have at our disposal
and where these devices are physically located within each box or drawer. This is important when
devices fail, especially disks. Taking out the wrong disk in the system due to failure could result in
data corruption.
An AIX partition does not need to have any real devices. In today's Power environments, virtual
LPARs are the norm. Virtualization is a large topic and is covered in a separate LPAR and
virtualization education track. It is beyond the scope of the course.

© Copyright IBM Corp. 2009, 2024 4-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device commands
• prtconf
ƒ Lists major system configuration items
• lscfg
ƒ Lists device information including physical location codes
• lsdev
ƒ Lists device information including the state of the device
• lsslot
ƒ Displays all specified hot plug slots and their characteristics
• chdev
ƒ Changes the characteristics of a device
• lsattr
ƒ Displays attribute characteristics and possible values of attributes for devices in the system

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-10. Device commands

There are many commands that are useful in determining the current configuration of your
system. These commands will be covered in more detail on the following visuals.

© Copyright IBM Corp. 2009, 2024 4-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The prtconf command (1 of 2)


• The prtconf command is a shell script that collects system information.
# prtconf
System Model: IBM,8233–E8B
Machine Serial Number: 100603P
Processor Type: PowerPC_POWER7
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat
Number Of Processors: 2
Processor Clock Speed: 3000 MHz
CPU Type: 64–bit
Kernel Type: 64–bit
LPAR Info: 15 sys304_118_MA
Memory Size: 1024 MB
Good Memory Size: 1024 MB
Platform Firmware level: AL710_099
Firmware Version: IBM,AL710_099

Network Information
Host Name: sys304_118
IP Address: 10.6.52.118
Sub Netmask: 255.255.255.0
Gateway: 10.6.52.254

Paging Space Information


Total Paging Space: 512MB
Percent Used: 10%

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-11. The prtconf command (1 of 2)

prtconf is a very useful command which displays an overview of the system configuration. This
is particularly useful for documentation purposes. You should run this command on a regular
basis and save or print the output.
Some items were removed for clarity in the example output in the above visual. The output is
continued on the next visual.

© Copyright IBM Corp. 2009, 2024 4-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The prtconf command (2 of 2)


INSTALLED RESOURCE LIST

The following resources are installed on the machine.


+/– = Added or deleted from Resource List.
* = Diagnostic support not available.

Model Architecture: chrp


Model Implementation: Multiple Processor, PCI bus

+ sys0 System Object


+ sysplanar0 System Planar
* pci6 U78A0.001.DNWHNC6–P1 PCI Bus
+ usbhc0 U78A0.001.DNWHNC6–P1 USB Host Controller (33103500)
+ usbhc1 U78A0.001.DNWHNC6–P1 USB Host Controller (33103500)
+ usbhc2 U78A0.001.DNWHNC6–P1 USB Enhanced Host Controller (3310e000)
* pci2 U5877.001.00H0301–P1 PCI Express Bus
+ ent4 U5877.001.00H0301–P1–C5–T1 2–Port 10/100/1000 Base–TX PCI–Express Adapter (14104003)
+ ent5 U5877.001.00H0301–P1–C5–T2 2–Port 10/100/1000 Base–TX PCI–Express Adapter (14104003)
* pci1 U5877.001.00H0301–P1 PCI Express Bus
+ fcs2 U5877.001.00H0301–P1–C3–T1 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet0 U5877.001.00H0301–P1–C3–T1 Fibre Channel Network Protocol Device
+ fscsi1 U5877.001.00H0301–P1–C3–T1 FC SCSI I/O Controller Protocol Device
+ hdisk4 U5877.001.00H0301–P1–C3–T1–W500507680140581E–L4000000000000 MPIO IBM 2145 FC Disk
+ hdisk5 U5877.001.00H0301–P1–C3–T1–W500507680140581E–L5000000000000 MPIO IBM 2145 FC Disk
+ fcs3 U5877.001.00H0301–P1–C3–T2 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet1 U5877.001.00H0301–P1–C3–T2 Fibre Channel Network Protocol Device
+ fscsi2 U5877.001.00H0301–P1–C3–T2 FC SCSI I/O Controller Protocol Device
* vio0 Virtual I/O Bus
* vscsi0 U8233.E8B.100603P–V15–C35–T1 Virtual SCSI Client Adapter
* hdisk3 U8233.E8B.100603P–V15–C35–T1–L8400000000000000 Virtual SCSI Disk Drive
* hdisk2 U8233.E8B.100603P–V15–C35–T1–L8300000000000000 Virtual SCSI Disk Drive
* hdisk1 U8233.E8B.100603P–V15–C35–T1–L8200000000000000 Virtual SCSI Disk Drive
* hdisk0 U8233.E8B.100603P–V15–C35–T1–L8100000000000000 Virtual SCSI Disk Drive
* ent1 U8233.E8B.100603P–V15–C2–T1 Virtual I/O Ethernet Adapter (l–lan)
* vsa0 U8233.E8B.100603P–V15–C0 LPAR Virtual Serial Adapter
* vty0 U8233.E8B.100603P–V15–C0–L0 Asynchronous Terminal

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-12. The prtconf command (2 of 2)

The last function prtconf performs is to run the lscfg command. This is the example command
output shown in the visual above.
Note: The lsconf command is also available and displays the same information as the prtconf
command.

© Copyright IBM Corp. 2009, 2024 4-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The lscfg command


• The lscfg command can be used to display Vital Product Data (VPD) information for devices.
ƒ IBM customer engineers (CEs) need this to order and replace failed components.

# lscfg –v –l ent4
ent4 U5877.001.00H0301–P1–C5–T1 2–Port
10/100/1000 Base–TX PCI–Express Adapter (14104003)

2–P NIC–TX PCI–e:


EC Level....................D76567
Part Number.................46K6601
Manufacture ID..............YL1026
FRU Number..................46K6601
Network Address.............00145E76B484
ROM Level.(alterable).......EP0170
Hardware Location Code......U5877.001.00H0301–P1–C5–T1

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-13. The lscfg command

The lscfg command displays configuration, diagnostic, and vital product data (VPD) information
about the system.
Use the lscfg command to display vital product data (VPD) such as part numbers, serial numbers,
and engineering change levels. VPD data is required for hardware engineers when they need to
order replacement parts due to failures.

© Copyright IBM Corp. 2009, 2024 4-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The lsdev command


• The lsdev command displays device information including the device state.

# lsdev |grep ent


ent0 Available 02–08 2–Port 10/100/1000 Base–TX PCI–X Adapter (14108902)
ent1 Available 02–09 2–Port 10/100/1000 Base–TX PCI–X Adapter (14108902)
ent2 Available Virtual I/O Ethernet Adapter (l–lan)

# lsdev –Cc disk


hdisk0 Available 03–08–01–8,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 01–00–02 MPIO Other FC SCSI Disk Drive
hdisk2 Available 00–08–00 SAS Disk Drive

# lsdev –Cl proc2


proc2 Available 00–02 Processor

# lsdev –p pci5
ent8 Available 05–08 2–Port 10/100/1000 Base–TX PCI–X Adapter (14108902)
ent9 Available 05–09 2–Port 10/100/1000 Base–TX PCI–X Adapter (14108902)

# lsdev –Cl cd1 –F parent


ide0

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-14. The lsdev command

The lsdev command displays information about devices in the device configuration database.
The -C flag requests information about all the customized devices. The -C flag is the default and
can be omitted. Any combination of the -c Class, -s Subclass, -t Type, -l Name, -p Parent,
and -S State flags, selects a subset of the customized devices.
The -P flag displays information about all devices supported by the system. Any combination of
the -c Class, -s Subclass, and -t Type flags selects a subset of the supported devices.
Newer versions of AIX assume customized devices, if neither -P or -C are given.
Commonly used classes include disk, cdrom, adapter, and if (interface).
The -F Format flag displays the output in a user-specified format. Format will list what
information to display.

© Copyright IBM Corp. 2009, 2024 4-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The lsslot command


• The lsslot command displays dynamic reconfigurable slots, such as hot plug slots, and their
characteristics.

# lsslot –c slot
# Slot Description Device(s)
U787F.001.DPM0WB8–P1–C1 Logical I/O Slot pci7 fcs1
U787F.001.DPM0WB8–P1–C3 Logical I/O Slot pci4 sisscsia1
U787F.001.DPM0WB8–P1–T5 Logical I/O Slot pci5 ent0 ent1
U787F.001.DPM0WB8–P1–T10 Logical I/O Slot pci3 sisscsia0
U787F.001.DPM0WB8–P1–T12 Logical I/O Slot pci2 ide0
U9131.52A.063412G–V1–C0 Virtual I/O Slot vsa0

# lsslot –c pci
# Slot Description Device(s)
U787F.001.DPM0WB8–P1–C1 PCI–X capable, 64 bit, 133MHz slot fcs1
U787F.001.DPM0WB8–P1–C3 PCI–X capable, 32 bit, 66MHz slot sisscsia1
U787F.001.DPM0WB8–P1–C4 PCI–X capable, 64 bit, 266MHz slot fcs0

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-15. The lsslot command

The lsslot command displays all the specified hot plug slots and their characteristics. Hot plug
slots are the plug-in points for connecting entities that can be added and removed from the
system without turning the system power off or rebooting the operating system. The -c flag is
required. It specifies the type of hot plug connector, for example, pci for hot pluggable PCI
adapters. You can display only the empty, that is, available, hot plug slots with the -a flag, the
occupied slots with the -o flag, or a specific slot by using the -s flag. The -l flag can be used to
locate the slot associated with the specified device_name, as listed by the lsdev command.

© Copyright IBM Corp. 2009, 2024 4-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

The lsattr and chdev commands


• Use lsattr to view and chdev to change device attribute data.
# lsattr –El rmt0
attribute value description user_settable
block_size 1024 BLOCK size (0=variable length) True
compress yes Use data COMPRESSION True
density_set_1 71 DENSITY setting #1 True
density_set_2 38 DENSITY setting #2 True
extfm yes Use EXTENDED file marks True
mode yes Use DEVICE BUFFERS during writes True
ret no RETENSION on tape change or reset True
ret_error no RETURN error on tape change or reset True
size_in_mb 36000 Size in Megabytes False

• To display a specific attribute:


ƒ # lsattr –E –l rmt0 –a block_size
• Tapes can’t be read when the tape device has a different block size.
ƒ Changing the value to 0 (variable) can help overcome this problem.
# chdev –l rmt0 –a block_size=0
rmt0 changed
# lsattr –EHl rmt0 | grep block_size
attribute value description user_settable
block_size 0 BLOCK size (0=variable length) True

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-16. The lsattr and chdev commands

The lsattr command displays information about the attributes of a given device or type of device.
The last column shows whether the attribute can be changed (True) or not (False). The -H flag
displays the header information.
The chdev command changes the characteristics of the specified device with the given device
logical name that is specified with the -l Name flag. The device can be in the Defined, Stopped,
or Available state. Some changes may not be allowed when the device is in the Available state.
When changing the device characteristics, you can supply the flags either on the command line, or
in the specified -f File flag.

© Copyright IBM Corp. 2009, 2024 4-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit topics (3 of 3)
• Explain device terminology and interpret physical and virtual location
codes
• List device configuration and status
• Configure new devices and manage device states

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-17. Unit topics (3 of 3)

© Copyright IBM Corp. 2009, 2024 4-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device configuration databases


• The Object Data Manager (ODM)
• Predefined device information:
ƒ Each object describes a type of device.
ƒ Example: a SCSI disk
• Customized device information:
ƒ Each object describes an instance of a device type.
ƒ Example: hdisk1

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-18. Device configuration databases

Information about devices is stored in the device configuration database. The database is a group
of binary files managed by the Object Database Manager (ODM). The device configuration
database is divided into two parts:
• Predefined devices: Information in the predefined device database describes all supported
device types. In order for a device type to be supported, the appropriate device software must
be installed on the system.
• Customized devices: Information in the customized device database describes devices
actually configured in this system.

© Copyright IBM Corp. 2009, 2024 4-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Listing of the /dev directory


# ls –l /dev
...
brw–rw–––– 1 root system 10, 8 Aug 06 18:31 hd1
brw–rw–––– 1 root system 10, 9 Aug 06 18:31 hd10opt
brw–rw–––– 1 root system 10, 10 Aug 06 18:31 hd11admin
brw–rw–––– 1 root system 10, 5 Aug 06 18:31 hd2
brw–rw–––– 1 root system 10, 7 Aug 06 18:31 hd3
brw–rw–––– 1 root system 10, 4 Aug 06 18:31 hd4
brw–rw–––– 1 root system 10, 1 Aug 06 18:34 hd5
brw–rw–––– 1 root system 10, 2 Aug 06 18:31 hd6
brw–rw–––– 1 root system 10, 3 Aug 06 18:31 hd8
brw–rw–––– 1 root system 10, 6 Aug 06 18:31 hd9var
brw––––––– 1 root system 18, 1 Aug 06 18:30 hdisk0
brw––––––– 1 root system 18, 0 Aug 06 18:20 hdisk1
brw––––––– 1 root system 18, 2 Aug 06 18:20 hdisk2
...
crw–rw–––– 1 root system 10, 8 Aug 06 18:31 rhd1
crw–rw–––– 1 root system 10, 9 Aug 06 18:31 rhd10opt
crw–rw–––– 1 root system 10, 10 Aug 06 18:31 rhd11admin
crw–rw–––– 1 root system 10, 5 Aug 06 18:31 rhd2
crw–rw–––– 1 root system 10, 7 Aug 06 18:31 rhd3
crw–rw–––– 1 root system 10, 4 Aug 06 18:31 rhd4
crw–rw–––– 2 root system 10, 1 Aug 06 18:31 rhd5
crw–rw–––– 1 root system 10, 2 Aug 06 18:31 rhd6
crw–rw–––– 1 root system 10, 3 Aug 06 18:31 rhd8
crw–rw–––– 1 root system 10, 6 Aug 06 18:31 rhd9var
crw––––––– 2 root system 18, 1 Aug 06 18:20 rhdisk0
crw––––––– 1 root system 18, 0 Aug 06 18:20 rhdisk1
crw––––––– 1 root system 18, 2 Aug 06 18:20 rhdisk2
...
System configuration and devices © Copyright IBM Corporation 2024

Figure 4-19. Listing of the /dev directory

The /dev directory stores the device special files for most of the devices defined for the system.
Ethernet adapters and network interfaces do not have an entry in /dev. Device files don’t occupy
space on the disk. Instead, they are pointers to device drivers in the kernel.
The ls -l command gives you valuable information about each device driver. The first column
indicates the type of file (d for directories, - for regular files, etc.). For device files, the file type will
be either b for block devices or c for character devices. Block device drivers are only used for file
systems. Most block devices also have an equivalent character device. Some utility programs
must be able to send data directly to the disk, bypassing kernel buffering. Device special files for
character devices often start with r. Many devices (like tape drives and terminals) cannot be used
to support file systems and therefore they do not have block device files.
The fifth column is normally used to show a file’s size. However, device files do not have a size.
Instead, it displays the major and minor device numbers in this column. The major number
identifies which device driver in the kernel. The minor number indicates a separate instance of
that device type; a particular device.

© Copyright IBM Corp. 2009, 2024 4-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device configuration
ODM root file system
/dev
Predefined

Customized
cfgmgr or
mid-level commands
mkdev, chdev,
rmdev
Physical devices

Device drivers in kernel

Device drivers

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-20. Device configuration

The configuration manager (cfgmgr) configures devices and optionally installs device software
into the system. The configuration manager uses information in the ODM to detect and configure
devices which are connected to the system. cfgmgr runs every time the system is booted. It can
also be run manually from the command line if new hardware has been added while the system is
running.
Not all devices can be detected by cfgmgr. For example, printers are not detectable. These
devices must be configured manually using mkdev. However, once these devices are defined,
cfgmgr will configure them each time the system boots.
chdev is used to change device attributes.
rmdev can be used to unconfigure devices (unload device driver and remove device file) and
undefine devices (remove device entry from customized database).

© Copyright IBM Corp. 2009, 2024 4-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device states
• Device states include:
ƒ Undefined
í The device is unknown to the system.
ƒ Defined
í The device is known to the system, but it is unavailable for use.
ƒ Available
í The device is available and ready for use.
ƒ Stopped
í The device is unavailable, but it remains known by its device driver.
• Changing device states:
ƒ The mkdev and cfgmgr commands make devices available for use.
ƒ The rmdev command can make devices unavailable for use and completely remove them from the
system.

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-21. Device states

Undefined is not a state one can see assigned in the system, more of a reference statement. If
refers to a device which is supported but is not configured.
Defined means that the device is known to the system. It has been allocated a logical device
name, a location code, and attributes have been assigned to it. However, it is still unavailable for
use.
Available means that the device is fully configured and is ready for use.
Stopped mean that the device is configured, but not available for use by applications. This is only
used for the inet network device.
When a device is first identified, it is configured and put into the Available state. Available
devices can be put into the Defined or Undefined state by using the rmdev command. Devices can
be configured with both the mkdev or cfgmgr commands.
Some devices are always in the Defined state and never make it to the Available state.

© Copyright IBM Corp. 2009, 2024 4-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Device configuration example

# lsdev –c tape; ls –l /dev/*rmt0*


/dev/*rmt0* not found
# cfgmgr
# lsdev –c tape
rmt0 Available 04–08–01–2,0 LVD SCSI 4mm Tape Drive
# ls –l /dev/*rmt0*
crw–rw–rw– 1 root system 37, 0 13 Oct 14:43 /dev/rmt0
crw–rw–rw– 1 root system 37, 1 13 Oct 14:43 /dev/rmt0.1
……. Removed rmt0.2 through rmt0.6
crw–rw–rw– 1 root system 37, 7 13 Oct 14:43 /dev/rmt0.7
# rmdev –l rmt0
rmt0 Defined
# mkdev –l rmt0
rmt0 Available
# rmdev –l rmt0 –d
rmt0 deleted

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-22. Device configuration example

The visual shows a tape drive that is physically connected to a system but undefined. The cfgmgr
command is run to configure and make the device available. Once available, special device files
have been created in /dev directory. Some devices like tapes have several special files. Each file
is assigned a major and minor number. Major and minor numbers are used by the operating
system to determine the actual driver and device to be accessed by the user-level request for the
special device file.
For example, when writing files to a tape, the difference between
tar –cvf /dev/rmt0 myfiles.tar and tar –cvf /dev/rmt0.1 myfiles.tar is that
rmt0 will result in the tape rewinding after the operation, whereas with rmt0.1, the tape will not
rewind after the write operation.

© Copyright IBM Corp. 2009, 2024 4-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

/dev directory, device configuration, and control


• Access to devices is provided through special device files that reside in /dev directory.
# lsdev -Cc tape; ls -l /dev/*rmt0*
/dev/*rmt0* not found
Tape drive is configured
# cfgmgr by loading the device
into the kernel (/unix).
# lsdev -Cc tape
rmt0 Available 04-08-01-2,0 LVD SCSI 4mm Tape Drive

# ls -l /dev/*rmt0*
crw-rw-rw- 1 root system 37, 0 13 Oct 14:43 /dev/rmt0
crw-rw-rw- 1 root system 37, 1 13 Oct 14:43 /dev/rmt0.1
……. Removed rmt0.2 through rmt0.6
crw-rw-rw- 1 root system 37, 7 13 Oct 14:43 /dev/rmt0.7

# rmdev -l rmt0
rmt0 Defined Minor number. Certain
The Kernel references
devices like tapes can
the tape device through
behave in different
# mkdev -l rmt0 the major number (37).
ways.
rmt0 Available

# rmdev -l rmt0 -d
rmt0 deleted

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-23. /dev directory, device configuration, and control

The visual shows a tape drive that is connected to a system but is undefined. The cfgmgr
command is run to configure and make the device available. Once available, special device files
are created in /dev directory. Some devices like tapes have several special files. Each file is
assigned a major and minor number. Major and minor numbers are used by the operating system
to determine the actual driver and device to be accessed by the user-level request for the special
device file.
For example, when writing files to a tape, the difference between tar –cvf /dev/rmt0
myfiles.tar and tar –cvf /dev/rmt0.1 myfiles.tar is that rmt0 will result in the tape rewinding
after the operation, whereas with rmt0.1, the tape will not rewind after the write operation.
The major number identifies the kernel driver that is used to communicate with the device. The
minor number can have different functions such as which instance of the device, and maybe
special handling. In LVM storage, the major number represents the VG and minor number the LV.
Let’s see another example of renaming a device with the command rendev.

© Copyright IBM Corp. 2009, 2024 4-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

rendev command
• You must first unconfigure the device to Defined state first.
# rmdev -l hdisk2
hdisk2 Defined

• Use rendev to change device name.

# rendev -l hdisk2 –n testdisk

Device to be renamed New device name

• Display new device name:

# lsdev –Cc disk


hdisk0 Available Virtual SCSI Disk Drive
hdisk1 Available Virtual SCSI Disk Drive
testdisk Available Virtual SCSI Disk Drive

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-24. rendev command

The rendev command changes the name of the specified device with the given device name that is
specified with the -l name flag. The new name must not exceed 15 characters in length. If the
name is already used or is present in the /dev directory, the operation fails.
One of the use cases would be to rename a group of disks on which application data can reside to
be able to distinguish them from other disks on the system.
Devices that are in use (Available state) cannot be renamed; the device must first be in a Defined
state. If device is a parent of other devices, you must unconfigured all child devices first. The
rendev command restores device to the Available state. The –u flag can be used to prevent the
device from being configured again after it is renamed.
Disk drive devices that are members of the root volume group, or that becomes members of the
root volume group (by means of LVM or install procedures), must not be renamed. Renaming such
disk drives might interfere with the ability to recover from certain scenarios, including boot
failures.
It is time for some review questions.

© Copyright IBM Corp. 2009, 2024 4-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Review questions
1. What does the following location code mean?
fcs0 U78D4.ND1.CSS2FG2-P1-C7-T1 PCIe2 16Gb 2-Port Fibre Channel

2. What is the purpose of a device major number? How would you locate the major number of a
disk, hdisk18?

3. True or False: cfgmgr is a binary executable that runs at system initialization time to
configure devices on the system.

4. What commands can you run on AIX to document the system configuration?

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-25. Review questions

© Copyright IBM Corp. 2009, 2024 4-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Review answers
1. What does the following location code mean?
fcs0 U78D4.ND1.CSS2FG2-P1-C7-T1 PCIe2 16Gb 2-Port Fibre Channel
The answer is port 1 of a 16 Gb Fibre Card, connected to planar 1, card slot 7, in a POWER9 E950
CEC/node (U78D4.ND1).
2. What is the purpose of a device major number? How would you locate the major number of a
disk, hdisk18?
The answers are the AIX kernel can determine the actual driver and device to be accessed for a user-
level request. Perform a long directory list of the /dev directory.
3. True or False: cfgmgr is a binary executable that runs at system initialization time to
configure devices on the system.
The answer is true.
4. What commands can you run on AIX to document the system configuration?
The answers are prtconf, lsdev, lscfg, lsslot, and lsattr.

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-26. Review answers

© Copyright IBM Corp. 2009, 2024 4-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Exercise

System configuration and devices

System configuration and devices © Copyright IBM Corporation 2024

Figure 4-27. Exercise

© Copyright IBM Corp. 2009, 2024 4-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 4. System configuration and devices

Uempty

Unit summary • Explain device terminology


• List device configuration and status
• Configure new devices
• Manage device states
• Interpret physical and virtual location codes

© Copyright IBM Corporation 2024

Figure 4-28. Unit summary

© Copyright IBM Corp. 2009, 2024 4-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit 5. TCP/IP networking


Estimated time
00:40

Overview
This unit describes the essential TCP/IP and networking concepts that are required in order to
work with and configure TCP/IP in AIX.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
AIX Version 7.3 Network management
https://www.ibm.com/docs/en/aix/7.3?topic=networking-network-management
netsvc.conf File
https://www.ibm.com/docs/en/aix/7.3?topic=files-netsvcconf-file
IBM AIX: behavior of host name resolution
https://www.ibm.com/support/pages/ibm-aix-behavior-host-name-resolution
IBM Redbook:
SG246657, NFSv4 in the Enterprise: Planning and Migration Strategies,
http://www.redbooks.ibm.com/abstracts/sg246657.html

© Copyright IBM Corp. 2009, 2024 5-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the TCP/IP startup flow on AIX
ƒ Configure TCP/IP basic functions on AIX
ƒ Use filesystems with NFS server and client setup
ƒ Explain the difference between ODM and bsdnet methods

© Copyright IBM Corporation 2024

Figure 5-1. Unit objectives

Let us start with a discussion of network interface cards, specifically the most common type of
adapter - Ethernet adapter.

© Copyright IBM Corp. 2009, 2024 5-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit topics (1 of 3)
• Describe the TCP/IP startup flow on AIX and discuss how to configure basic
TCP/IP functions
• Explain the difference between ODM and bsdnet methods
• Use filesystems with NFS server and client setup

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-2. Unit topics (1 of 3)

© Copyright IBM Corp. 2009, 2024 5-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Ethernet adapters and interfaces


• Each adapter (entX) has two interfaces (enX and etX)
ƒ enX interface uses the standard Ethernet Version 2 frame format.
ƒ etX interface uses IEEE802.3 frame format.

Network Adapter Card port Interface: en0


adapter device: ent0 Interface: et0
(Layer 1 and 2 physical device) (Layer three logical devices)

# lsdev –Cl ent0


ent0 Available 01–08 10/100/1000 Base–TX PCI–X Adapter
# lscfg –v –l ent0 |grep Network MAC Address
Network Address.............001125BF9018
# lsdev –Cc if IP addresses are
assigned to the
en0 Available 01–08 Standard Ethernet Network Interface interfaces. In
this case, en0.
et0 Defined 01–08 IEEE 802.3 Ethernet Network Interface

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-3. Ethernet adapters and interfaces

Brief history of Ethernet


The original Ethernet is called Experimental Ethernet today. It was developed by Robert Metcalfe
in 1972 (patented in 1978) and was based in part on the ALOHAnet protocol. The first Ethernet
that was generally used was DIX Ethernet (known as Ethernet II) and was derived from
Experimental Ethernet. Today, there are many different standards, under the umbrella of IEEE
802.3, and the technical community has accepted the term Ethernet for all of them. The
standardization for 40 Gbps and 100 Gbps Ethernet (IEEE 802.3ba) was completed in June 2010.
For further information, see http://www.ieee802.org/3.
Configuration of adapters and interfaces
In AIX, when cfgmgr discovers an Ethernet adapter, it creates an entX device object to represent
that adapter in the ODM customized device database (the numeric suffix is incremented for each
instance of that type of adapter). cfgmgr runs a method (a program) which does additional
configuration that is specific to the type of adapter. In the case of an Ethernet adapter, the
method creates two interface devices, enX and etX (where X, the numeric suffix, always matches
the numeric suffix of the adapter upon which they are based). The enX interfaces use the standard
Ethernet Version 2 protocol and frame structure. The etX interface uses the IEEE 802.3 Ethernet
protocol and frame structure. The interfaces are initially placed in a defined state without any IP
configuration. When you configure the interface with an IP address and netmask, the interface
state is changed to available. These interfaces are not interchangeable. An interface that uses
IEEE 802.3 cannot talk to an interface on another machine that is using Ethernet Version 2. A
common error is to accidentally configure etX instead of enX. Since most hosts on the local
network use only Ethernet Version 2, the misconfigured machine cannot talk to any of them. Some
routers dynamically adjusts to whichever format they receive.
Ethernet adapter support on AIX

© Copyright IBM Corp. 2009, 2024 5-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty
There are many network adapters supported on AIX such as:
• TX 10/100/1000Mb up to 100m that uses traditional copper
• SX 1000Mb up to 550m that uses multi-mode fiber
• LX 1000Mb up to 5km that uses single-mode fiber (can also run on multi-mode fiber)
• SR (short range) 10Gb up to 300m that uses multi-mode fiber
• LR (long range) 10Gb up to 25km that uses single-mode fiber
Additionally, AIX provides support for the latest network adapters, such as 25, 40 and 100GB
Ethernet devices. Please refer to the online IBM documentation for the most recent list of
supported network adapters.
Reference: https://www.ibm.com/docs/en/aix/7.3?topic=networking-network-management
Most of the time in AIX, the en (Ethernet version 2 or standard Ethernet) interface is configured;
the et (IEEE 802.3 Ethernet) interface is rarely (if at all) used.
Fiber versus Fibre: when writing about networks and Fiber, it is important to know when to use
the correct spelling. Fiber refers to the medium (wire), whereas Fibre refers to the protocol, as in,
Fibre channel.

© Copyright IBM Corp. 2009, 2024 5-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

How is TCP/IP configured on AIX (1 of 2)


• Most common way to configure TCP/IP: A one stop shop for
# smit mktcpip TCP/IP configuration
on AIX

Minimum Configuration & Startup


To Delete existing configuration data, use Further Configuration
menus
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* HOSTNAME [waldorf]
* Internet ADDRESS (dotted decimal) [10.47.1.18]
Network MASK (dotted decimal) [255.255.0.0]
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) [10.47.1.33]
DOMAIN Name [lpar.co.uk]
Default Gateway
Address (dotted decimal or symbolic name) [10.47.0.1]
Cost [0] #
Do Active Dead Gateway Detection? no +
Your CABLE Type N/A +
START TCP/IP daemons Now no +

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-4. How is TCP/IP configured on AIX (1 of 2)

AIX provides Minimum Configuration & Startup SMIT panel for configuring TCP/IP on the
system. The command fast path is:
# smit mktcpip
It does many configurations, all on one panel. The essential items that you will require are:
• Interface to be configured (provided on a previous selection panel)
• Host name of the machine:
▪ Issues the hostname command.
• IP address and network mask:
▪ Issues the chdev command to define the interface.
▪ Updates /etc/hosts with the host name as the name resolution for the IP address.
• Default gateway (if connecting outside local network):
▪ Issues the chdev and route commands to update the routing table.
Desirable items are:
• DNS parameters (namserver and domain name):
▪ This information populates the /etc/resolv.conf file, as follows:
nameserver 10.47.1.33
domain lpar.co.uk
▪ This does not update the name server with your machine’s information. Contact the name
server administrator to have your IP address and host name added.

© Copyright IBM Corp. 2009, 2024 5-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty
Your CABLE Type is generally not required and can be left as N/A. START TCP/IP daemons Now
refreshes or starts, the TCP/IP subsystems.
All of these can be configured separately by running smit tcpip and selecting Further
Configuration. On that menu, there are separate items for name resolution, routing specification,
interface definition, and more.

© Copyright IBM Corp. 2009, 2024 5-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

How is TCP/IP configured on AIX (2 of 2)


• smit mktcpip should be used only for the first adapter
• Subsequent adapters should be configured with:
• # smit chinet
Change / Show a Standard Ethernet Interface

[Entry Fields]
Network Interface Name en1
INTERNET ADDRESS (dotted decimal) [192.168.1.10]
Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
Current STATE up +
Use Address Resolution Protocol (ARP)? yes +
BROADCAST ADDRESS (dotted decimal) []
Interface Specific Network Options
('NULL' will unset the option)
rfc1323 []
tcp_mssdflt []
tcp_nodelay []
tcp_recvspace []
tcp_sendspace []
Apply change to DATABASE only no +

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-5. How is TCP/IP configured on AIX (2 of 2)

If SMIT is being used to configure further interfaces, you should use the fast path:
# smit chinet
All fields are optional, but essential items are:
• IP address and network mask
• Interface to be configured
• State of the interface
The default of state of the interface is down, so do not forget to switch this to up. This is a common
configuration error.
The interface specific network options (ISNO) are beyond the scope of this class.
The basics of name resolution to connect hostnames to IP addresses is covered later in this unit.

© Copyright IBM Corp. 2009, 2024 5-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

SMIT, ODM, and the kernel

SMIT ODM database

interface objects /etc/rc.net


chdev
mkdev inet0 object (bootup_option=no)
rmdev

netinet kernel
extension

ifconfig Interface ifconfig


configuration
route route
Route table
hostname hostname
Host name

netstat or ifconfig

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-6. SMIT, ODM, and the kernel

The visual shows the relationship between permanent configuration information that is stored in
the ODM, current configuration information that is stored in kernel memory, and commands and
facilities that can be used to change these two configurations.
SMIT simply runs high-level commands, like chdev, mkdev, or rmdev commands. These high-level
commands not only update the ODM database, but also run standard UNIX commands (such as
ifconfig, route, and hostname) to update the kernel.
Network configuration information that is stored in kernel memory can be defined, modified, and
deleted directly by using the ifconfig, hostname, and route commands. The main issue here is
that this information is not automatically persistent through reboots. To ensure persistence, one
would need to place the command in a boot script such as at the end of /etc/rc.net to reissue
the command at each reboot. Making changes directly with the one of these UNIX commands is
an excellent choice when you want the change to be temporary.
The AIX approach is to store the network configuration information as attributes of
network-related objects in the ODM database. When /etc/rc.net runs at reboot, it reads the
ODM database and issues the necessary ifconfig, route, and hostname commands to create the
desired configuration in the kernel.
The two main ways of updating network-related ODM objects are SMIT or the chdev command.
Since it is possible to directly update the kernel network configuration and bypass the ODM, it is
important to understand what source is being accessed when you display network information.
When viewing panels in SMIT or when using the lsattr command, you are being shown the
information in the ODM. If the kernel has been updated, this information might not be showing the
effective configuration. On the other hand, the standard UNIX commands of netstat, ifconfig,
and hostname display what is configured in the kernel.

© Copyright IBM Corp. 2009, 2024 5-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit topics (2 of 3)
• Describe the TCP/IP startup flow on AIX and discuss how to configure basic TCP/IP functions
• Explain the difference between ODM and bsdnet methods
• Use filesystems with NFS server and client setup

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-7. Unit topics (2 of 3)

© Copyright IBM Corp. 2009, 2024 5-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

TCP/IP startup

AIX initialization
# chdev –l inet0 –a bootup_option={yes|no}
init runs
• cfgmgr runs configuration methods including cfgrcnet
rc.boot phase 3
from /etc/inittab • cfgrcnet configures inet0 and the network interfaces
• cfgrcnet checks the inet0 bootup_option attribute
í bootup_option=no (default)
cfgrcnet runs /etc/rc.net
(network configuration that is read from ODM)
– bootup_option=yes
cfgrcnet runs /etc/rc.bsdnet
(network configuration in rc.bsdnet)

init runs rc.tcpip starts selected network daemons:


/etc/rc.tcpip dhcp
from /etc/inittab syslogd
lpd
sendmail
portmap
inetd
. . .

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-8. TCP/IP startup

TCP/IP startup is initiated from the inittab processing. /sbin/rc.boot calls cfgmgr during the
second phase processing. cfgmgr, in turn runs the cfgrcnet method. The cfgrcnet method
examines the inet0 bootup_option attribute to determine how to configure networking in the
kernel. The default value is no. This results in running /etc/rc.net to configure the kernel.
/etc/rc.net first reads the ODM and use the information that is found to configure the kernel. If
you want to bypass using the ODM, you would need to change the bootup_option attribute value
to yes. In this case, the cfgrcnet method runs /etc/rc.bsdnet instead; the only kernel network
configuration would be whatever you provide as contents of that script.
TCP/IP subsystems are started from /etc/rc.tcpip script. This script can be edited directly to
comment or uncomment subsystem startup. The SMIT panels for managing the subsystem
provide options to either start now, start at system restart, or both. SMIT will update
/etc/rc.tcpip appropriately for the selected option. One of the important daemons started by
/etc./rc.tcpip is the super daemon (inetd). The inetd daemon is responsible for loading
network programs upon request, such as ftp and telnet (among others).
Once the core TCP/IP subsystems have been initialized, further TCP/IP-based applications such
as NFS, NIM, and PowerHA SystemMirror can be started from scripts that are listed later in the
inittab.

© Copyright IBM Corp. 2009, 2024 5-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

TCP/IP start-up flow

Partition Activation

Run time init Process /etc/inittab

/sbin/rc.boot calls cfgmgr Process /etc/rc.net

/etc/rc.tcpip Starts TCP/IP subsystems


syslogd
/etc/rc.nfs snmpd
sendmail
portmap
Login inetd Æ /etc/inetd.conf

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-9. TCP/IP start-up flow

TCP/IP startup is initiated from the inittab processing. /sbin/rc.boot calls cfgmgr during the
second phase processing which in turn initialize the network interfaces and set up routing by
processing the /etc/rc.net file. TCP/IP subsystems are started from /etc/rc.tcpip script. This script
can be edited directly to comment or uncomment subsystem startup. The inetd daemon is
responsible for loading network programs upon request, such as ftp, telnet and so on.
Please note: The telnet, tn, ftp, rsh and rexec commands are insecure, as they transmit the
password in cleartext and hackers use these commands to gain access to AIX. These commands
are not a secure communication protocol because they do not use any security mechanism and
transfer the data over the network/internet in a plain-text form (including the passwords) and so
any one can “sniff” the packets to get that important information. Starting with AIX 7.3, telnet,
tn, ftp, rsh and rexec are no longer installed by default and users are strongly recommended to
use OpenSSH (the ssh, sftp and scp commands) instead as they provide secure encrypted
communications. Beginning with AIX 7.3, the OpenSSH client and server software are installed by
default. The lecture material and the lab exercises reflect this and focus on using secure shell
communications only.
TCP/IP subsystems are started from /etc/rc.tcpip script. This script can be edited directly to
comment or uncomment subsystem startup. The SMIT panels for managing the subsystem
provide options to either start now, start at system restart, or both. SMIT will update /etc/rc.tcpip
appropriately for the selected option. One of the important daemons started by /etc./rc.tcpip is
the super daemon (inetd). The inetd daemon is responsible for loading network programs upon
request, such as ftp and telnet (among others).
Once the core TCP/IP subsystems have been initialized, further TCP/IP based applications such
as NFS, NIM, PowerHA, can be started.

© Copyright IBM Corp. 2009, 2024 5-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Command line TCP/IP configuration


• There are two ways to configure network resources:
ƒ AIX ODM (chdev or SMIT)
ƒ Directly, using BSD UNIX commands: hostname, ifconfig, route (valid until reboot, unless coded in
startup script)
• Setting the hostname:
ƒ ODM: # chdev –l inet0 –a hostname=sys1
ƒ Directly: # hostname sys1
• Defining an IP address for an adapter:
ƒ ODM: # chdev –l en0 –a netaddr=192.168.1.10 –a \
netmask=255.255.255.0 –a state=up
ƒ Directly: # ifconfig en0 192.168.1.10 255.255.255.0 up
• To make persistent through reboot, if the direct method is used, place the commands at the end of:
ƒ /etc/rc.net (overrides any matching ODM configuration)
ƒ /etc/rc.bsdnet (if inet0 bootup_option=yes)
• Can use hostname and ifconfig, netstat to check settings
TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-10. Command line TCP/IP configuration

TCP/IP configuration can be driven from the command line, in addition to the SMIT interface.
There are two ways to handle TCP/IP configuration using command line:
• The AIX way, in which configuration is stored in the AIX internal database (ODM). This is the
recommended method of TCP/IP configuration because it is persistent across reboots.
• The traditional BSD UNIX way. This way configuration does not survive restarts unless the
commands are entered into a startup script such as the /etc/rc.net file.
The /etc/rc.net file is run by cfgmgr during system boot. The /etc/rc.net file configures AIX
style configuration and optionally traditional BSD UNIX configuration. If only traditional BSD style
networking is required, then the following command can be run: # chdev -l inet0 -a
bootup_option=yes. Doing this, causes AIX to process the /etc/rc.bsdnet instead of rc.net
file at boot time. Commands such as hostname, ifconfig, route and so on, should be appended
to /etc/rc.bsdnet as appropriate.
Even if using the ODM method, the hostname and ifconfig commands are still of great use in
displaying the current kernel network configuration.

© Copyright IBM Corp. 2009, 2024 5-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Name resolution
• Name resolution methods: Local, DNS, NIS, and LDAP.
• Local: /etc/hosts file (edit or smit hosts)
127.0.0.1 loopback localhost
10.10.1.1 system1 nimserver
10.10.1.2 system2

• DNS: /etc/resolv.conf (edit or smit resolv.conf)


domain lpar.com.au
nameserver 10.47.1.33
• The name resolution order is:
ƒ Default order: bind, nis=auth, local
ƒ Override in /etc/netsvc.conf, with*:
í hosts = local, bind
ƒ Override both with environment variable NSORDER:
í # export NSORDER=local,bind

• Display resolution with:


ƒ # host <name or IP addr>

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-11. Name resolution

Systems use different methods for mapping host names to IP addresses. The method depends
upon the environment in which a system is going to participate.
• Flat Network: This method provides name resolution through the file /etc/hosts and works
well in small, stable environments.
• Domain Name Server (DNS): DNS is a system that allows name and IP lookups, in a tree-like
database structure. It was created due to the growth of the Internet and designed for large
networks.
• Network Information System (NIS) Server: This method provides a centralized server for
administration of configuration, and other files, within a LAN environment.
• Lightweight Directory Access Protocol (LDAP) Server: LDAP is an application protocol for
querying and modifying directory services that run over TCP/IP. Tivoli Directory Server (TDS) is
IBM's version of an LDAP server.
Default name resolution
The existence of /etc/resolv.conf determines how a system resolves host names and IP
addresses within a domain or flat network.
• If /etc/resolv.conf exists, the system attempts to query a DNS server.
• If /etc/resolv.conf does not exist, the system checks to see whether NIS is being used and
if the server is available. NIS is authoritative. This means, that if the NIS client subsystem is
running, and it is not successful in obtaining an answer, then the process stops.
• Finally, the local /etc/hosts file is checked.
Overriding the default name resolution
The default name resolution can be overwritten in two ways:

© Copyright IBM Corp. 2009, 2024 5-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty
• Append to the /etc/netsvc.conf file and specify host ordering. Use the hosts attribute
followed by the name of the resource to use. The resources that are listed depend on what
name resolution processes are running on the network.
• Create an environment variable NSORDER. NSORDER overrides any name resolution that is
specified in the /etc/netsvc.conf file.
*To suppress all IPv6 queries, change /etc/netsvc.conf from hosts = local,bind to hosts =
local4,bind4. Where:
• local4 = Searches the local /etc/hosts file for resolving only IPv4 addresses
• bind4 = Uses BIND/DNS services for resolving only IPv4 addresses

Due to the way some system daemons are designed to support both IPv4 and IPv6 addresses, the
recommended setting in /etc/netsvc.conf is hosts = loca4l,bind4.

Note: Regardless of the system's configuration, some applications, such as JVM applications,
perform an IPv6 host name lookup first, followed by an IPv4 lookup. IPv6 lookups must be
manually disabled using a JVM option (or an equivalent option for your application).
Reference: netsvc.conf File, https://www.ibm.com/docs/en/aix/7.3?topic=files-netsvcconf-file
and IBM AIX: behavior of host name resolution,
https://www.ibm.com/support/pages/ibm-aix-behavior-host-name-resolution

© Copyright IBM Corp. 2009, 2024 5-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit topics (3 of 3)
• Describe the TCP/IP startup flow on AIX and discuss how to configure basic TCP/IP functions
• Explain the difference between ODM and bsdnet methods
• Use filesystems with NFS server and client setup

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-12. Unit topics (3 of 3)

© Copyright IBM Corp. 2009, 2024 5-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Network file system (1 of 2)


• File sharing between heterogeneous systems in a TCP/IP network
• Transparent access to remote files and directories
• Based on a client/server model

/home

/data client1 client2


/data

network

/data nfs_server /home

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-13. Network file system (1 of 2)

Network file system (NFS) is a facility for sharing files in a heterogeneous environment of
machines, operating systems, and networks. The NFS function is built into the kernel of the
operating system so it is transparent to applications and users. NFS is based on a client/server
model, where the server stores files and provides clients with access.

© Copyright IBM Corp. 2009, 2024 5-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Network file system (2 of 2)


• File sets:
ƒ Server: bos.net.nfs.server
ƒ Client: bos.net.nfs.client
• Server configuration
ƒ Starting and stopping NFS daemons (now and at system restart)
í # /usr/sbin/mknfs –B or smit mknfs
í # /usr/sbin/rmnfs –B or smit rmnfs
# lssrc –g nfs
biod nfs 352444 active
nfsd nfs 221328 active
rpc.mountd nfs 315524 active
rpc.statd nfs 364738 active
rpc.lockd nfs 258262 active
...
/etc/exports exportfs –a /etc/xtab rpc.mountd
ƒ Export directory trees
í # /usr/sbin/mknfsexp or smit mknsfexp
TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-14. Network file system (2 of 2)

The mknfs command configures the system to run the NFS daemons. The mknfs command
accepts the following flags:
• -B Adds an entry to the inittab file to run the /etc/rc.nfs file on system restart and runs the
/etc/rc.nfs file immediately to start the NFS daemons.
• -I Adds an entry to the inittab file to run the /etc/rc.nfs file on system restart.
• -N Starts the /etc/rc.nfs file to start the NFS daemons immediately, when started this way,
the daemons run until the next system restarts.
When NFS is started, the following daemons are started:
• The biod daemon runs on all NFS client systems. When a user on a client wants to read or
write to a file on a server, the biod daemon sends this request to the server. The biod daemon
is activated during system startup and runs continuously.
• The nfsd daemon runs on the server and handles client requests for file system operations.
• The rpc.mountd daemon answers client requests to mount file systems. The mountd daemon
finds out which file systems are available by reading the /etc/xtab file. The /etc/xtab file is
created when file systems are exported on the server.
• The rpc.statd and rpc.lockd daemons work together to main stateful locking. NFS
implements an advisory locking mechanism, meaning the locking is done at the record level
not at the file level. When a server crashes, the locking information is recovered. The status
monitor maintains information on the location of connections as well as the status in the
/var/statmon/sm directory, the /var/statmon/sm.bak file, and the /var/statmon/state
file. When restarted, the statd daemon queries these files and tries to re-establish the
connection it had before termination.

© Copyright IBM Corp. 2009, 2024 5-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty
The rmnfs command changes the configuration of the system to stop running NFS daemons. It
accepts the same flags as mknfs.

© Copyright IBM Corp. 2009, 2024 5-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

NFS server configuration (2 of 2)

/etc/exports:
/home
/usr/man -ro mknfsexp
/data -root=sys1:sys2
chnfsexp OR smit nfs
rmnfsexp
exportfs -a

exportfs /home
/etc/xtab /usr/man -ro
/data -root=sys1:sys2

rpc.mountd

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-15. NFS server configuration (2 of 2)

In order to configure an NFS server, you must first decide:


• What directories you want to export
• Which clients you want to have access the directories and files
• The permissions (for example, read-write, read-only) clients will have when accessing the
files
Only when the NFS subsystem is activated, by using the mknfs command, can directories be made
available. When the /etc/export file has been configured, the exportfs command is used to
make the directories available for client mounting. The exportfs -a command exports all items
that are listed in the /etc/exports file and automatically copies the entries to the /etc/xtab file.
/etc/xtab file entries are used by the system and always reflect what is currently exported. This
leaves the /etc/exports file available for updating at any time. The /etc/xtab file must never
the edited directly.
An easy way to maintain the NFS export list is to use SMIT or the AIX commands that are issued
by SMIT. These commands are mknfsexp, chnfsexp, and rmnfsexp. The SMT panels will simplify
the creation of otherwise complicated entries in the /etc/exports files. The panel (and the
underlying AIX command) provides an option to specify whether you want to only update
/etc/exports or also export the change to /etc/xtab.
Let us see how a NFS client can use filesystems from a server.

© Copyright IBM Corp. 2009, 2024 5-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Manual NFS client mounting


• The showmount command can be used to query the directories that are exported by the NFS
server.
kenny:/ # showmount –e nfs_server
export list for nfs_server:
/usr/man (everyone)
/data kenny,kyle,eric
/home (everyone)

• Mounting an NFS server directory:


# mkdir /data_client_mnt
# mount nfs_server:/data /data_client_mnt

# df /data
Filesystem 512–blocks Free %Used Iused %Iused Mounted on
nfs_server:/data 278528 212920 24% 1317 6% /data_client_mnt

• Predefined mounts can also be defined using smit mknfsmnt.

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-16. Manual NFS client mounting

The showmount command is useful for viewing which directories are available for mounting on a
particular NFS server. To mount an NFS directory, first create a directory point and then issue the
mount command, as shown in the visual.
Syntax: mount <NFS_server_name>:<server mount point> <client directory mount point>

© Copyright IBM Corp. 2009, 2024 5-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Predefined NFS client mounting


• smit mknfsmnt
Add a File System for Mounting

* Pathname of mount point [/data_client_mnt] /


* Pathname of remote directory [/data]
* Host where remote directory resides [nfs_server]
* Security method [sys] +
* Mount now, add entry to /etc/filesystems or both? Both +
* /etc/filesystems entry will mount the directory no +
on system restart.
* Mode for this NFS file system read–write +
* Attempt mount in foreground or background background +
* Mount file system soft or hard hard
Note: Many options removed for clarity.

• /etc/filesystems
/data_client_mnt:
dev = "/data"
vfs = nfs
nodename = nfs_server
mount = false
options = bg,hard,intr,sec=sys

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-17. Predefined NFS client mounting

Predefined mounts are NFS mounts which are defined in /etc/filesystems for ease of use when
manual mounting or to enable remote file systems to be mounted during system start time.
Key options are:
• Security Method: Possible values are sys, dh, krb5, krb5i, krb5p, which correspond to UNIX,
DES, Kerberos 5, Kerberos 5 with integrity, and Kerberos 5 with privacy. The default NFS
security used in most implementations is standard UNIX (sys). The other methods are used in
special situations where authentication and encryption are required. These methods are
supported by a new version of NFS, NFS version 4. NFS v4 is not the default version used in
AIX and is a large complex topic which is outside the scope of this class but might want to
refer to the following IBM Redbooks Implementing NFSv4 in the Enterprise: Planning and
Migration Strategies, available at: http://www.redbooks.ibm.com/abstracts/sg246657.html.
• Mode: Read-write or read-only.
• Attempt mount in: Possible values are background (default) or foreground. If the attempt to
mount the directory fails, the mount will be retried in the background. If foreground is
selected, the mount request stays in the foreground even, if the mount request fails.
• Mount type: Possible values are hard or soft. If the mount is soft, the system returns an error
if the server does not respond. If the mount is hard, the client continues trying until the server
responds. The hard mount is the default. When a hard mount is selected, an extra option is
included in /etc/filesystems: intr. The intr option allows signals to interrupt an NFS call.
This is useful for aborting an NFS mount process when the server does not respond.

© Copyright IBM Corp. 2009, 2024 5-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Review questions
1. When you use smit mktcpip, SMIT updates:
a. Only the ODM
b. Only the kernel
c. /etc/rc.net
d. Both the ODM and the kernel

2. True or False: You can choose to configure either en0 or et0 since they both map to the same
Ethernet adapter port.

3. True or False: The core TCP/IP daemons are typically started by /etc/rc.tcpip at system
restart.

4. True or False: You can choose to bypass the ODM and use BSD commands in a startup script
by setting the inet0 bootup_option attribute to yes.
TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-18. Review questions

© Copyright IBM Corp. 2009, 2024 5-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Review answers (1 of 2)
1. When you use smit mktcpip, SMIT updates:
a. Only the ODM
b. Only the kernel
c. /etc/rc.net
d. Both the ODM and the kernel
The answer is both the ODM and the kernel.
2. True or False: You can choose to configure either en0 or et0 since they both map to the same
Ethernet adapter port.
The answer is false. You must configure the interface whose protocol matches the other hosts on your
network (likely en0 using standard Ethernet).
3. True or False: The core TCP/IP daemons are typically started by /etc/rc.tcpip at system
restart.
The answer is true.

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-19. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 5-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Review answers (2 of 2)
4. True or False: You can choose to bypass the ODM and use BSD commands in a startup script
by setting the inet0 bootup_option attribute to yes.
The answer is true.

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-20. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 5-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Exercise

TCP/IP Implementation

TCP/IP networking © Copyright IBM Corporation 2024

Figure 5-21. Exercise

© Copyright IBM Corp. 2009, 2024 5-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 5. TCP/IP networking

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the TCP/IP startup flow on AIX
ƒ Configure TCP/IP basic functions on AIX
ƒ Use filesystems with NFS server and client setup
ƒ Explain the difference between ODM and bsdnet methods

© Copyright IBM Corporation 2024

Figure 5-22. Unit summary

© Copyright IBM Corp. 2009, 2024 5-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Unit 6. System startup and shutdown


Estimated time
01:00

Overview
This unit describes how to start up and shut down the managed system and AIX partitions.

How you will check your progress


• Review questions
• Exercise

© Copyright IBM Corp. 2009, 2024 6-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the AIX startup process
ƒ Activate the AIX partitions
ƒ Explain the difference between SMS and normal startup modes
ƒ Describe the contents of the /etc/inittab file
ƒ Use System Resource Controller commands to start, stop, and display
AIX subsystems
ƒ Explain how to shut down the AIX partitions

© Copyright IBM Corporation 2024

Figure 6-1. Unit objectives

Let us start with the different modes of AIX startup.

© Copyright IBM Corp. 2009, 2024 6-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Topic 1 objectives
• Describe the AIX startup process
• Activate the AIX partitions
• Describe the contents of the /etc/inittab file
• Use System Resource Controller commands to start, stop, and display AIX subsystems
• Explain how to shut down the AIX partitions

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 6-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Startup modes for AIX (1 of 2)


• The two most popular start-up modes are:
ƒ SMS mode (the firmware menu)
ƒ Normal mode
• SMS mode is used for:
ƒ Selecting the boot device or setting remote IPL parameters
ƒ Booting into Service (Maintenance) mode, for example:
í To fix a machine that will not boot
í Recover root password

PowerPC Firmware SMS Top Level


Version FW860.80 (SV860_212) Firmware Menu
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
--------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. I/O Device Information
4. Select Console
5. Select Boot Options

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-3. Startup modes for AIX (1 of 2)

System Management Services


To boot into SMS, either press the 1 key shortly after partition activation, or set the partition to
specifically SMS boot. To do this, click the Advanced button on activation and set the boot mode
to SMS.
SMS is the Power System firmware menu. The code is shipped with the hardware. This resource
can be used to select the boot device, or change the order of the bootlist and boot the system into
Service mode, if maintenance is required.
Service mode enables the user to run diagnostics or access the system in single-user mode.
There are several startup modes for AIX. However, most of the time, the system is booted in
normal mode. To build the system, or to boot into maintenance mode to fix problems, it is often
necessary to boot into SMS mode (the system firmware). The others boot options are rarely used.
Let us continue with normal mode and the other options.

© Copyright IBM Corp. 2009, 2024 6-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Startup modes for AIX (2 of 2)


• Normal mode
ƒ AIX boots into multi-user mode (run level 2).
ƒ Users can log in, the system can be configured, and applications can start.
ƒ The bootlist command can change the start-up boot device list.
# bootlist -m normal -o
hdisk0 blv=hd5 Displays the current
boot device (hdisk0)
# bootlist –m normal hdisk0 hdisk1

• Other less common start-up modes:


ƒ Diagnostic with default boot list
í Boot to service mode that uses default boot list (has optical drive first)
ƒ Diagnostic with stored boot list
í Boot to service mode that uses a user customized bootlist
ƒ Open firmware
í Open firmware prompt; used by service/support personnel to obtain low level debug information

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-4. Startup modes for AIX (2 of 2)

Start-up modes:
• Normal: The logical partition starts up as normal. This is the mode that you use to perform
most everyday tasks. When the machine does a normal boot, it completes the full AIX boot
sequence and start processes, enables terminals and generates a login prompt, to make it
available for multi-user access. It also activates the disks, sets up access to the files and
directories, starts networking, and completes other machine specific configurations.
• Diagnostic with default boot list: The logical partition boots to service mode using the default
boot list that is stored in the system firmware. This mode is normally used to either boot to
diagnostics from a hard drive, or to boot off bootable media (a diagnostics CD or installation
media).
• Diagnostic with stored boot list: The logical partition performs a service mode boot using the
service mode boot list that is saved in NVRAM.
• Open Firmware OK prompt: The logical partition boots to the open firmware prompt. This
option is used by service personnel to obtain additional debug information.
You can display or modify the bootlist. This topic will be covered thoroughly in a later unit.
The the other boot options are only listed at this point for completeness. They are not used as
often these days as one would typically boot into SMS, and then just select the boot device.
The bootlist command can include a network adapter, but then must also provide network
parameters. The only situation where this would be used is if needing to network boot that uses a
boot server such as a NIM server. More often these network boots are controlled though an SMS
configuration (covered later in the AIX Installation unit). An example of using bootlist to identify
a network adapter and the associated network parameters is:
# bootlist -m normal ent0 bserver=10.47.1.33 client=10.47.1.101

© Copyright IBM Corp. 2009, 2024 6-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty
Let us look at how we start a partition from the HMC.

© Copyright IBM Corp. 2009, 2024 6-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX startup process overview


Partition activation

Locate AIX boot image


via firmware or bootlist

Load boot image


RAMFS created AIX Kernel is now in control.

Configure devices init process from RAMFS


Start rootvg runs rc.boot script.

Start ‘real’ init process


Process /etc/inittab, default run-level 2.
from rootvg

LOGIN
System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-5. AIX startup process overview

AIX start-up overview


After the partition is activated, a boot image is located from the boot device, which is specified
from SMS or the bootlist command, and is loaded into memory. During a normal boot, the
location of the boot image is usually a hard drive. Besides hard drives, the boot image could be
loaded from CD/DVD. This is the case when booting into maintenance mode for service. If working
with the Network Installation Manager (NIM), the boot image is loaded through the network.
The kernel restores a RAM file system into memory by using information that is provided in the
boot image. At this stage, the rootvg is not available, so the kernel needs to work with commands
provided in the RAM file system. You can think of the RAM file system as a small AIX operating
system. The kernel starts the init process that was provided in the RAM file system, not from the
root file system. This init process runs a boot script, which is named rc.boot. rc.boot controls the
boot process. The base devices are configured, rootvg is activated or varied on, and the real init
process starts from rootvg, which in turn process the /etc/inittab at run level 2.

© Copyright IBM Corp. 2009, 2024 6-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Topic 1 objectives
• Describe the AIX startup process
• Activate the AIX partitions
• Describe the contents of the /etc/inittab file
• Use System Resource Controller commands to start, stop, and display AIX subsystems
• Explain how to shut down the AIX partitions

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-6. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 6-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX partition activation (1 of 2)


hscroot@<hmc> chsysstate –m <managed_system> –r lpar –o on \
–n <lpar_name> –f <profile_name> –b norm
To activate
into normal
mode

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-7. AIX partition activation (1 of 2)

To activate a logical partition from the HMC GUI, select the partition name and choose Activate
from the Actions menu. The Activate <logical partition name> screen will appear from which the
user can select the startup profile.
Note, a logical partition is also known as an LPAR. An AIX partition is a logical partition running
AIX.

© Copyright IBM Corp. 2009, 2024 6-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX partition activation (2 of 2)

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-8. AIX partition activation (2 of 2)

Partitions can have multiple profiles assigned. One of the assigned profiles will be designated as
the default profile. Profiles contain the attributes of the partition such as processor requirements,
memory requirements, and assigned devices.
The Advanced Settings button enables users to set the startup mode. A default startup mode will
be defined within the profile.

© Copyright IBM Corp. 2009, 2024 6-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Topic 1 objectives
• Describe the AIX startup process
• Activate the AIX partitions
• Describe the contents of the /etc/inittab file
• Use System Resource Controller commands to start, stop, and display AIX subsystems
• Explain how to shut down the AIX partitions

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-9. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 6-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

/etc/inittab
Format of the line: id:runlevel:action:command [#comment]
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog –tboot > /dev/console
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
tunables:23456789:wait:/usr/sbin/tunrestore –R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog –tboot > /dev/console # Multi–User checks
rcemgr:23456789:once:/usr/sbin/emgr –B > /dev/null 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog –tboot > /dev/console
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
cron:23456789:respawn:/usr/sbin/cron
qdaemon:23456789:wait:/usr/bin/startsrc –sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc –swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
……………

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-10. /etc/inittab

The /etc/inittab file lists the commands that init will run, and it also specifies when to run them.
If this file gets corrupted, the system cannot boot properly. Because of this, it is a good idea to
keep a backup of this file. This file should never be edited directly. Use the lsitab, chitab, and
mkitab commands. After editing the /etc/inittab file, force the system to reread the file by using
the telinit q command.
To list the inittab type: lsitab –a
To add an entry into the inittab file, type:
mkitab [-i Identifier] {[Identifier]:[RunLevel]:[Action]:[Command]}
Example: mkitab "tty002:2:respawn:/usr/sbin/getty /dev/tty2”
To change an entry in the inittab file, type:
chitab {[Identifier]:[RunLevel]:[Action]:[Command]}
Example: chitab "tty002:4:respawn:/usr/sbin/getty /dev/tty"

© Copyright IBM Corp. 2009, 2024 6-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX run levels


• Run levels on AIX:
ƒ 0 and 1: Reserved for future use
ƒ 2 default (normal): Multi-user mode
ƒ 3 through 9: Free to be defined by the administrator
• The telinit or init command can be used to change run levels.
ƒ a, b, c, and h can be initiated during any run level start-up, 2 through 9, without killing any existing run
level processes.
ƒ S, s, M, m, results in the system entering single user/maintenance mode.
ƒ Q, q, re-examines and processes the /etc/inittab file on request.
• Example: To go from single user to multi-user mode, execute:
# telinit 2

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-11. AIX run levels

Run levels define the behavior of init, and by extension, those processes which run on the
system when it is at any given level. A run level is a software configuration that allows only a
selected group of processes to exist.
Using the init command or SMIT you can direct the init daemon to change the system’s run
level. The init daemon will stop any processes not defined in the new run level and start any
processes that are defined in the new level.
When init run as a command, it is used to request that the running init daemon perform some
action, such as:
• Re-read the /etc/inittab file
• Take the system to a new run level
The telinit command is a hard link to init and can be used the same way.

© Copyright IBM Corp. 2009, 2024 6-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Directory and script control


• Startup and stop scripts can be defined for each run level that are automatically invoked at
entry and exit.
/etc/rc.d # ls –R

init.d rc rc2.d rc3.d rc4.d rc5.d rc6.d rc7.d rc8.d rc9.d


./init.d:
Scripts starting with S
./rc2.d:
are invoked at boot
Ksshd Kwpars Ssshd
time by
./rc3.d:
/etc/rc.d/rc.

./rc4.d:

./rc5.d:

./rc6.d: Scripts starting with K are invoked


synchronously by shutdown with one
./rc7.d: argument: 'stop'. They are also
called on startup before invoking the
./rc8.d:
start scripts.
./rc9.d:

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-12. Directory and script control

Run level control scripts


Run level scripts enable system administrators to start and stop selected applications and
services, or perform tasks during system start-up, shutdown or during run level change. Run level
scripts need to be created in the subdirectory of /etc/rc.d that is specific to the run level. Scripts
beginning with K are stop scripts, while scripts beginning with S are start scripts.
The visual shows an example (recursive) listing of the /etc/rc.d directory on an AIX system with
open ssh installed.
Note that control scripts of each run level are stored in a separate directory as shown in the visual.
The directories are listed from rc2.d to rc9.d. By default, there is not much in AIX that uses rc.d
scripts and what there is only for the AIX default run level of 2. The traditional AIX design is to
place startup scripts as regular entries in the inittab. The SRC groups provide an easy way to stop
and start groups of subsystems without playing with run levels. The shutdown command handles
stopping the subsystems and (traditionally) any special shutdown logic is placed in
/etc/rc.shutdown.
Let us take a closer look at one of the AIX facilities that is used by inittab entries to start
subsystems: the System Resource Controller.

© Copyright IBM Corp. 2009, 2024 6-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Topic 1 objectives
• Describe the AIX startup process
• Activate the AIX partitions
• Describe the contents of the /etc/inittab file
• Use System Resource Controller commands to start, stop, and display AIX subsystems
• Explain how to shut down the AIX partitions

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-13. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 6-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

System Resource Controller


• Provides a single interface to control subsystems
• Controls individual subsystems or groups of subsystems
# ps -ef |grep src
UID PID PPID C STIME TTY TIME CMD
root 172178 1 0 18 Sep - 0:00 /usr/sbin/srcmstr SRC Master
process

Parent
PID = init
# ps -T 172178
PID TTY TIME CMD
172178 - 0:00 srcmstr
151672 - 0:01 |\--syslogd Subsystem
163968 - 0:00 |\--inetd
303160 - 0:00 | \--rlogind Subserver
512170 pts/0 0:00 | \--ksh
463024 pts/0 0:00 | \--ps
168088 - 0:00 |\--portmap
180418 - 0:00 |\--IBM.ServiceRMd
188650 - 1:24 |\--rmcd
200856 - 3:47 |\--clstrmgr
204904 - 0:00 |\--tftpd
176288 - 0:00 | \--tftpd
213102 - 0:00 |\--sshd
221334 - 0:00 |\--snmpdv3ne

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-14. System Resource Controller

Purpose of the System Resource Controller


The System Resource Controller (SRC) provides a set of commands to make it easier for the
administrator to control subsystems. A subsystem is a daemon, or server, that is controlled by the
SRC. A subserver is a daemon that is controlled by a subsystem. Daemon commands and daemon
names are usually denoted by a d at the end of the name. For example, inetd is a subsystem and
can be controlled through SRC commands. rlogind is a subserver that is started by the inetd
subsystem as shown in the visual.
A subsystem group is a group of any specified subsystems. Grouping systems together allows the
control of several subsystems at one time.
Examples are: TCP/IP, NIS, and NFS.
Subserver: A subserver is a program or process that belongs to a subsystem. A subsystem can
have multiple subservers and is responsible for starting, stopping, and providing status of
subservers.
If the students have terminals available to them, you might want to have them type in lssrc -a to
show them the grouping. These groupings are established in the ODM.
Let us identify some of the commands that the SRC uses to control the subsystems.

© Copyright IBM Corp. 2009, 2024 6-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Listing subsystems
• The lssrc command is used to list subsystems.

# lssrc -a
Subsystem Group PID Status
syslogd ras 151672 active
portmap portmap 168088 active
inetd tcpip 163968 active
tftpd tcpip 204904 active
sshd ssh 213102 active
ctrmc rsct 188650 active
snmpd tcpip 221334 active
clcomdES clcomdES 225414 active
clstrmgrES cluster 200856 active
ctcas rsct 417800 active
qdaemon spooler inoperative
writesrv spooler inoperative
lpd spooler inoperative

…. Removed for clarity …..

# lssrc –g tcpip |grep active


Subsystem Group PID Status
inetd tcpip 163968 active
tftpd tcpip 204904 active
snmpd tcpip 221334 active

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-15. Listing subsystems

In this section, we discuss some examples of SRC commands.


Listing SRC status
The lssrc command is used to show the status of the SRC subsystems. In the example that is
shown on the visual, we are checking the status of all subsystems using the -a flag and the TCP/IP
group using the -g flag.

Specifying a subsystem or subsystem group


The -s and -g flags are used to specify subsystems or subsystem groups, respectively.
Let us see how we can stop, start, and refresh subsystems

© Copyright IBM Corp. 2009, 2024 6-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

SRC control
• Controlling subsystems:

# stopsrc –s inetd
0513–044 The /usr/sbin/inetd Subsystem was requested to stop.

# startsrc –s inetd
0513–059 The inetd Subsystem has been started. Subsystem PID is
311374.

# refresh –s inetd
0513–095 The request for subsystem refresh was completed
successfully.

Not all subsystems


support being
refreshed

# refresh –s sshd
0513–005 The Subsystem, sshd, only supports signal
communication.

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-16. SRC control

If a change is made to a subsystem configuration, then the subsystem will need to be refreshed.
For example, if the entry for the ftp service is disabled in the inetd.conf file, then the inetd
subsystem will need to be refreshed by using refresh command. Not all subsystems can be
refreshed. If this is the case, simply use the startsrc and stopsrc commands.

© Copyright IBM Corp. 2009, 2024 6-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Topic 1 objectives
• Describe the AIX startup process
• Activate the AIX partitions
• Describe the contents of the /etc/inittab file
• Use System Resource Controller commands to start, stop, and display AIX subsystems
• Explain how to shut down the AIX partitions

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-17. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 6-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX partition shutdown (1 of 2)


• The AIX shutdown command:
ƒ Can gracefully stop all activity in the partition
The –F flag executes a fast
ƒ Can warn users of an impending shutdown shut down, bypassing the
messages to users. The –r
flag reboots AIX.
# shutdown –Fr

SHUTDOWN PROGRAM
Thu 9 Oct 20:15:49 2008
0513–044 The sshd Subsystem was requested to stop.
Wait for 'Rebooting...' before stopping.
...

• Use -l flag to log shutdown messages to /etc/shutdown.log.


ƒ # shutdown –rl
• AIX shutdown can also be initiated from the HMC:
ƒ hscroot@<hmc> chsysstate –m <managed_system> –r lpar \
–n <lpar_name> –o osshutdown
System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-18. AIX partition shutdown (1 of 2)

The smit shutdown fastpath or the shutdown command is used to shut down the partition
cleanly. If used with no options, shutdown displays a message on all enabled terminals (using the
wall command), then (after one minute) disables all terminals, kills all processes on the system,
synchronizes the disks, unmounts all file systems, and then halts the system.
You can also use shutdown with the -F option for a fast immediate shutdown (no warning), -r to
reboot after the shutdown or -m to bring the system down into maintenance mode. The -k flag
specifies a “pretend” shutdown. It appears to all users that the machine is about to shut down,
but no shutdown actually occurs.
To shut down a partition to single-user mode, use the command shutdown -m.
If you need a customized shutdown sequence, you can create a file called /etc/rc.shutdown. If
this file exists, it is called by the shutdown command and is executed first. That is, before normal
shutdown processing begins. This is useful if, for example, you need to close a database prior to a
shutdown. If rc.shutdown fails (non-zero return code value), the shut down is terminated.

© Copyright IBM Corp. 2009, 2024 6-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

AIX partition shutdown (2 of 2)


• AIX shutdown can also be initiated from the HMC.
# ssh hscroot@<hmc> chsysstate -r lpar -o osshutdown –m sys –n lpar1

Do a fast shutdown,
shutdown -F

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-19. AIX partition shutdown (2 of 2)

From the HMC, the following shutdown options are supported. Generally, best practice is to
shutdown AIX from within the partition.
• Delayed: The HMC shuts down the logical partition using the delayed power-off sequence.
This allows the logical partition time to end jobs and write data to disks. If the logical partition
is unable to shut down within the predetermined amount of time, it will end abnormally and
the next restart might be longer than normal.
• Immediate: The HMC shuts down the logical partition immediately. The HMC ends all active
jobs immediately. The programs running in those jobs are not allowed to perform any job
cleanup. This option might cause undesirable results if data has been partially updated. Use
this option only after a controlled shutdown has been unsuccessfully attempted.
• Operating System: The HMC shuts down the logical partition normally by issuing a shutdown
command to the logical partition. During this operation, the logical partition performs any
necessary shutdown activities. This option is only available for AIX logical partitions.
• Operating System Immediate: The HMC shuts down the logical partition immediately by
issuing a shutdown -F command to the logical partition. During this operation, the logical
partition bypasses messages to other users and other shutdown activities. This option is only
available for AIX logical partitions. For example: $ chsysstate -r lpar -o osshutdown
--immed -m "sys853" -n "aixmig”
Students should ensure they use the proper shutdown command in the operating systems, either
by logging in or using the HMC operating system options that are shown on the visual. Using one of
the two hypervisor options might corrupt the operating system and should be used only if the
partition is no longer responding. For other operating systems such as the VIOS, IBM i, and Linux,
the recommendation is to log in to the operating system and shut it down normally.

© Copyright IBM Corp. 2009, 2024 6-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Managed system shutdown


• Ensure all partitions have been shutdown first!
ƒ hscroot@<hmc> chsysstate –m <managed_system> –r sys –o off

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-20. Managed system shutdown

Before you power off the managed system, you must first shut down the operating systems in
each of the running partitions. Otherwise, they will terminate abnormally which may lead to file
system corruption.
After selecting the Power Off item from the managed system's Operations task menu, you must
choose between the normal power off procedure and the fast power off procedure.
• Normal power off
The system ends all active tasks in a controlled manner. During that time, the service
processor and the POWER Hypervisor are allowed to perform cleanup
(end-of-job-processing).
• Fast power off
The system ends all active tasks immediately. The programs running in the service processor
and the POWER Hypervisor are not allowed to perform any cleanup.
Note, the Force option allows you to power off a managed system while a dump from the
managed system is being offloaded to the HMC. It is recommended that you wait until the dump
offload operation is complete before powering off. If you choose to not wait the dump may be
corrupted or incomplete and unable to be used for problem determination.

© Copyright IBM Corp. 2009, 2024 6-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

The alog command

User Boot NIM


Install
Applications Process Process

alog program

/var/adm/ras/bootlog
Use the /var/adm/ras/BosMenus.log
alog
command
/var/adm/ras/bosinst.log
to view /var/adm/ras/nimlog
To view the boot log: logs /var/adm/ras/conslog
# alog –o –t boot /var/adm/ras/errlog

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-21. The alog command

Overview
The alog command is a BOS feature that provides a general-purpose logging facility that can be
used by any application or user to manage a log. The alog command reads standard input, writes
the output to standard out, and copies it to a fixed size file at the same time.
The log file
The file is treated as a circular log. This means that when it is filled, new entries are written over
the oldest entries. Log files that are used by alog are specified on the command line or defined in
the alog configuration database that is maintained by the ODM. The system-supported log types
are boot, bosinst, nim, cfg, mdmplog, lvmt, lvmcfg, dumpsys and console.
Use in boot process
Many system administrators start the boot process, and then go and get a cup of coffee.
Unfortunately, boot messages might appear on the screen, only to be scrolled and lost, never to
be seen by the user. In some instances, these messages might be important, particularly if the
system did not boot properly. Fortunately, alog is used by the rc.boot script and the
configuration manager during the boot process to log important events. To view the boot
information, the command alog –o -t boot can be used. If the machine does not boot, boot the
machine into maintenance mode and view the boot log contents.
Viewing logs with SMIT
You can also use SMIT to view the different system-supported logs. Use the following command:
# smit alog
The shutdown command provides the -l flag, which can log additional details when stopping a
system. This flag creates/appends a log file named /etc/shutdown.log. It contains information
about the filesystems, daemons, user login, licensing services, network interfaces being brought

© Copyright IBM Corp. 2009, 2024 6-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty
down. The file may be used for diagnostic and debugging purposes in the event of shutdown
failures. An example shutdown.log file is shown below.
# shutdown –rl
;SYSTEM REBOOTS NOW.
;
;VIEW THE LOG FILE AFTER REBOOT.
;
# cat /etc/shutdown.log
0505-140 alt_disk_install: The altinst_rootvg volume group
does not exist.
Sun May 5 21:38:43 EDT 2024
shutdown: THE SYSTEM IS BEING SHUT DOWN NOW
User(s) currently logged in:
root
Stopping some active subsystems...
0513-044 The hostmibd Subsystem was requested to stop.
0513-044 The snmpmibd Subsystem was requested to stop.
0513-044 The aixmibd Subsystem was requested to stop.
0513-044 The aso Subsystem was requested to stop.
0513-044 The nimsh Subsystem was requested to stop.
0513-044 The qdaemon Subsystem was requested to stop.
0513-044 The writesrv Subsystem was requested to stop.
0513-044 The ctrmc Subsystem was requested to stop.
0513-044 The IBM.HostRM Subsystem was requested to stop.
0513-044 The IBM.ConfigRM Subsystem was requested to stop.
0513-044 The IBM.DRM Subsystem was requested to stop.
0513-044 The IBM.MgmtDomainRM Subsystem was requested to stop.
0513-044 The IBM.ServiceRM Subsystem was requested to stop.
Unmounting the file systems...
/var/adm/ras/livedump unmounted successfully.
/opt unmounted successfully.
/proc unmounted successfully.
/admin unmounted successfully.
/home unmounted successfully.
umount: 0506-349 Cannot unmount /dev/hd3: The requested resource is busy.
Bringing down network interfaces:
detached en0 from the network interface list
detached lo0 from the network interface list
Note: Ensure that there is enough disk space for the shutdown command to log the entries while
using this flag.
Let us review with some review questions.

© Copyright IBM Corp. 2009, 2024 6-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Review questions
1. What is the first process that is created on the system and which file does it reference to
initiate all the other processes that must be started?

2. Which AIX feature can be used to stop and start subsystems and groups of daemons?

3. True or False: You can run the shutdown command only from the console.

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-22. Review questions

© Copyright IBM Corp. 2009, 2024 6-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Review answers
1. What is the first process that is created on the system and which file does it reference to
initiate all the other processes that must be started?
The answer is the initial process is init. The init process references the /etc/inittab file for
information regarding other processes that must be started.

2. Which AIX feature can be used to stop and start subsystems and groups of daemons?
The answer is the System Resource Controller (SRC).

3. True or False: You can run the shutdown command only from the console.
The answer is false.

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-23. Review answers

© Copyright IBM Corp. 2009, 2024 6-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Exercise

System startup and shutdown

System startup and shutdown © Copyright IBM Corporation 2024

Figure 6-24. Exercise

© Copyright IBM Corp. 2009, 2024 6-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 6. System startup and shutdown

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the AIX startup process
ƒ Activate the AIX partitions
ƒ Explain the difference between SMS and normal startup modes
ƒ Describe the contents of the /etc/inittab file
ƒ Use System Resource Controller commands to start, stop, and display
AIX subsystems
ƒ Explain how to shut down the AIX partitions

© Copyright IBM Corporation 2024

Figure 6-25. Unit summary

© Copyright IBM Corp. 2009, 2024 6-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Unit 7. Basics of configuring logical


partitions
Estimated time
00:20

Overview
This unit describes basic things that you need to know to configure a basic partition.

How you will check your progress


• Review questions
• Exercise

References
Power10 Logical partitioning
https://www.ibm.com/docs/en/power10?topic=environment-logical-partitioning
Power10 Partitioning with the HMC
https://www.ibm.com/docs/en/power10?topic=partitioning-hmc
Power10 Creating logical partitions
https://www.ibm.com/docs/en/power10?topic=hmc-creating-logical-partitions
Links to Information Centers:http://www.ibm.com/support/publications/us/library
The following documents can be accessed from the IBM Resource
link:http://www.ibm.com/servers/resourcelink
The following document can be accessed from redbooks.ibm.com:
SG24-7940 IBM PowerVM Virtualization Introduction and Configuration
https://www.redbooks.ibm.com/abstracts/sg247940.html
SG24-7491 IBM Power Systems HMC Implementation and Usage Guide
https://www.redbooks.ibm.com/abstracts/sg247491.html

© Copyright IBM Corp. 2009, 2024 7-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the following partition concepts:
í Partition type
í Partition ID and partition name
í Partition profiles
ƒ Describe basic processor and memory configuration options
ƒ Define Minimum, Maximum, and Desired settings for memory and
processors
ƒ Describe I/O concepts and the Required and Desired settings
ƒ Use the Create Partition wizard to create a basic partition and a default
profile

© Copyright IBM Corporation 2024

Figure 7-1. Unit objectives

This unit describes basic things that you need to know to configure a basic partition.
First, let us look at what is required to define an LPAR.

© Copyright IBM Corp. 2009, 2024 7-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Topic 1 objectives
• Describe partition concepts and describe basic processor and memory configuration options
including:
ƒ Defining Minimum, Maximum, and Desired settings for memory and processors
ƒ Describe I/O concepts and the Required and Desired settings
• Use the Create Partition wizard to create a basic partition and a default profile

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 7-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Creating partitions and profiles


• Partition type
ƒ Select AIX or Linux environment (rather than VIO server).
• Partition name and ID:
ƒ Partitions are assigned an LPAR ID.
ƒ Partitions and profiles have names (easily changed).
• Partition profiles:
ƒ Define characteristics of the partition (such as boot mode).
ƒ Define resource allocated to the LPAR environment:
í Processors
í Memory
í Adapters (devices)
ƒ An LPAR can have multiple profiles.
ƒ LPAR activation must select one profile.

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-3. Creating partitions and profiles

Partitions and profiles


A partition has a name and an ID number that is stored in a table. Partition profiles are like a
configuration file that lists resource configurations and attributes.
System profiles are different. System profiles are a list of partitions and the partitions’ profiles to
provide an easy way to either validate that all of the partitions can run simultaneously with no
resource contention issues, or to easily start a certain set of partitions.
One of the most important aspects of the partition definition is the profile, which defines the
resources that are seen by the operating system. Let us look at the types of resources and how to
configure them in the profile.

© Copyright IBM Corp. 2009, 2024 7-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Memory and processor allocation


• Memory allocation:
ƒ Recommend a minimum of 2 GB for running AIX 7.3 or higher
ƒ Allocated in logical memory blocks (LMB). LMB size for a server is configurable between 128 MB and
256 MB*
• Processor allocation:
ƒ Dedicated (whole processors) or portion of shared processor pool
ƒ Increments in 0.01 processing units
• For each partition, configure for memory and processors:
ƒ Minimum:
í Partition will not start if this amount is not available. Partition can be dynamically decreased to this
amount
ƒ Desired:
í Partition will use up to this amount upon activation if available
ƒ Maximum:
í Partition can be dynamically increased to this amount
Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-4. Memory and processor allocation

Memory configuration
The smallest amount of memory that can be defined for a partition is 128 MB of memory. The
minimum amount of memory that allows the operating system to boot depends on the I/O
resources that are configured. The amount of memory for the smallest configuration for AIX 7.3 to
boot is 2GB. Physical and virtual adapters require memory, so the more devices that are
configured in the operating system, the larger the memory requirement.
Memory is allocated in units of the system’s logical memory block (LMB), which ranges from 16
MB to 256 MB. While configurable, the default amount depends on the size of the server’s
physical memory.
*Power servers initially only supported LMB sizes of 128MB and 256MB. Starting with FW1050,
Power10 has added support for 1024MB, 2048MB and 4096MB. The additional LMB sizes provide
performance benefits for systems that host large memory partitions.

Processor allocation
A dedicated processor logical partition can have as little as one dedicated processor, as much as
all of the processor resources in the system, or any number between.
By default, any processors that are not dedicated to an LPAR are in the shared processor pool.
Partitions can be configured to share these processors and be entitled to a proportion of the
processing power in that shared pool. This can be as small as 1/10 of a processor (POWER7 and
earlier processors) or as large as all the processors in the shared pool. With POWER7+ and later
servers, each LPAR can have a minimum entitlement of 1/20 of a processor, allowing 20 LPARs
per core.

© Copyright IBM Corp. 2009, 2024 7-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty
A dedicated processor can be assigned to only one active partition at a time. Shared processing
units are accessed from the single Shared Processor Pool.

Minimum, desired, and maximum


For processor and memory allocations, you specify three values. These are used to determine
what the actual partition allocation will be.
• Desired - Desired is the most important of the values. The system attempts to allocate the
desired amount when the partition is activated. If it cannot allocate the desired amount, then
it allocates as much as it can up to the desired amount.
• Minimum - The minimum is also important in the activation of the partition. The system must
be able to allocate the minimum amount or the partition will not start. For partitions that
support dynamic partitioning, allocation cannot be reduced to below the minimum amount.
• Maximum - The maximum is the largest amount of processors or memory that the partition
can have if you add the resource dynamically. The maximum memory amount is also used to
determine the size of the hardware page table. If the maximum amount of memory is
configured unnecessarily large, then the size of the hardware page table will be unnecessarily
large, wasting memory that is dedicated to the Hypervisor.
Obviously, there is much more than what is covered here, especially when it comes to the virtual
resources, but this is just the basics. Students could consider attending the virtualization
curriculum (starting with AN11) to get the full training.
Think about an interesting example of where the actual processors or memory might be
somewhere in between the minimum and desired settings. For example, if the memory minimum
is 2 GB, the desired is 3 GB, but there is only 2.25 GB available, then the partition would take the
2.25 GB if using shared processors.
The official AIX 7.3 minimum memory allocation is 2GB. This is typically fine for a partition with
few I/O resources. Partitions with many I/O resources may fail to boot. In actual practice, you
should allocate more memory if LPAR will be assigned more than a few adapters. Some adapter
types (both virtual and physical) require more memory than others. For example, some physical
adapters require 512 MB. In addition, any applications that are running are likely to need more
memory for the best performance.
Students can learn how to design and construct the entire picture when they attend the
virtualization courses.
Let us next look at adapter allocations.

© Copyright IBM Corp. 2009, 2024 7-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Adapter allocation
• Allocation by individual slots:
ƒ Entire adapter dedicated to LPAR
ƒ All adapter ports assigned to the one LPAR
ƒ All accessed devices assigned to the one LPAR
• Slot allocation can be Required or Desired.
• Adapters can be virtual:
ƒ Virtual Ethernet adapters (on server’s virtual Ethernet)
ƒ Virtual SCSI adapters (access VIOS storage)
ƒ Virtual FC (use VIOS physical FC using NPIV)
ƒ Virtual NIC (using SR-IOV)

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-5. Adapter allocation

Physical I/O resources


What is allocated to a partition for I/O device access is the adapter slot and the slot is where the
adapter is connected to the PCI bus. Examples of adapters include: an IDE controller with a
CD-drive, an Ethernet adapter, and a Fibre Channel storage adapter. When a storage adapter is in
the allocated slot, the LPAR has dedicated access to the storage devices that are connected to
that adapter. For example: You cannot take a single SCSI controller with three disks on the SCSI
bus and allocate each disk to a different LPAR. Whichever partition is allocated the adapter is the
partition that has access to the disks on that bus. The same applies to a single HBA connected to
the SAN.

Required versus desired


The partition starts only if all of the required slots are available and it attempts to assign those
that are desired. Slots that are required cannot be dynamically removed or moved from the
partition.

Virtual devices
If there is a single physical storage adapter with many disks, it would be good to be able to provide
access to that adapter from multiple logical partitions. This can be done by allocating the physical
adapter to a Virtual I/O Server (VIOS) and then providing the client logical partitions access to the
devices through virtual adapters. The allocation of a virtual adapter is really the creation of virtual
adapter definition.

© Copyright IBM Corp. 2009, 2024 7-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty
Virtual SCSI adapter
Virtual SCSI is a type of virtual device in which a Virtual I/O Server is configured to allow other
partitions to use its disks or optical devices. The client LPAR sees a vscsi device that acts almost
exactly like a real physical SCSI adapter. The virtual SCSI device that appears under the vscsi
adapter looks and acts just like a SCSI device. The actual devices that are controlled by the VIOS
do not need to be SCSI type devices; for example, the optical media drive can be an IDE type
device or the disk drive might be a LUN in the SAN accessed over a Fibre Channel adapter. The
disks can be whole disks or logical volumes on the Virtual I/O Server. When the client views the
devices from its operating system, it appears as a regular hdisk, rmt, or cd device.
The VIOS and its clients communicate over a pair of virtual SCSI adapters through the Hypervisor:
a server adapter at the VIOS and a client adapter at the client LPAR. When allocating the client
virtual SCSI adapter, you need to specify which VIOS partition and what server adapter to connect
to.

Virtual Ethernet adapter


Virtual Ethernet adapters can be configured in multiple partitions on the same server and these
adapters appear as ent devices to the AIX operating system. The Power Hypervisor acts as a
virtual Ethernet switch to support communication between the virtual Ethernet adapters. The
Power Hypervisor can support multiple VLANs and the virtual Ethernet adapter allocation includes
the specification of what VLAN to use, through a VLAN ID. To connect this virtual Ethernet to an
outside network, a bridge can be configured in a Virtual I/O Server that is called a Shared Ethernet
adapter.

Virtual Fibre Channel adapter


A client Virtual Fibre Channel adapter can be configured on a client LPAR with a matching server
virtual FC on a VIOS that in turn is related to a physical FC adapter allocated to that VIOS. This
provides the client LPAR with access to the SAN, where the virtual FC has its own unique WWPN
and can have LUNS zoned directly to it. The client virtual FC appears to be another port in an
N-port ID Virtualization (NPIV) configuration.
Note that they will be using virtual adapters in the lab. For the virtual Ethernet, we will have all
partitions defined on the same VLAN and they will specify a VLAN ID of 1. For the virtual SCSI,
explain that while there is a client/server relationship between the VIOS and the client LPAR, they
will only build the client side of this. There will only be one VIOS to choose from and we will
provide them with the adapter ID of server side adapter ID.
Having covered some basic concepts, let us see how we use the HMC to define the LPAR using the
Create Logical Partition wizard.

© Copyright IBM Corp. 2009, 2024 7-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Topic 1 objectives
• Describe partition concepts and describe basic processor and memory configuration options
including:
ƒ Defining Minimum, Maximum, and Desired settings for memory and processors
ƒ Describe I/O concepts and the Required and Desired settings
• Use the Create Partition wizard to create a basic partition and a default profile

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-6. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 7-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Create Logical Partition wizard


Select a server and run:
Configuration > Create Partition > AIX or Linux

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-7. Create Logical Partition wizard

Introduction
The first step in creating partitions is to power on your managed system. You do this from the All
Systems work pane on the HMC.
All of the managed system power-on options bring your system up to a state where partitions can
be created.
Once the Power Hypervisor is active, select the server and then, from the Partitions view, select
the Create Partition button to create AIX/Linux type partitions. Other options are to create an
IBM i partition.

© Copyright IBM Corp. 2009, 2024 7-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Create Logical Partition wizard steps


• The Create Logical Partition wizard presents a series of panels prompting for information:
ƒ Partition Name
ƒ Partition Type
ƒ Partition ID (can accept default)
ƒ Shared versus Dedicated processors
ƒ Processor allocation amount
ƒ Memory allocation amount
ƒ Once the Logical Partition is created, edit the profile to assign I/O devices:
í Select adapter slots to allocate:
í Create virtual adapters
í Allocate SR-IOV ports (depending on the model)
í Optional settings (such as boot mode)

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-8. Create Logical Partition wizard steps

Introduction
To access the Create Partition menu, select the server name in the Work pane table (click the
Select column). Then run the Configuration > Create partition > AIX or Linux task. This starts
the Create Logical Partition wizard that walks you through defining the characteristics of the
partition.
Partition name
The partition name can be long and contain spaces. If you plan to use the command-line interface
on the HMC, the partition names should be easy to type. If spaces are used, quotations must be
used on the command-line.
Partition IDs
The first screen in the Create Logical Partition wizard allows you to set the partition ID and the
partition name. The partition ID defaults to the next available number, but you can override it. The
maximum LPAR ID number depends on the number of processors installed.
Set processor type
The first question about processors to answer in the wizard program is whether the partition will
use shared or dedicated processors. What you are prompted for next depends upon your answer.
Dedicated processors
Dedicated processors are allocated in whole numbers from one to the total number of physical
processor cores.
Shared processors

© Copyright IBM Corp. 2009, 2024 7-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty
Configure the quantity of processing units for this partition. For this course, we will leave all of the
advanced processor options (virtual processors and uncapped status and weight) at the default
values.
Allocate memory
Set the minimum, desired, and maximum settings. The granularity for setting the memory amount
is the LMB size. If the server is configured with a shared memory pool, the first question will be
whether you want to use physical or shared memory.
Once the Logical Partition is created, edit the profile to assign I/O devices.
Allocating I/O slots
All of the installed the buses and slots are displayed for the system. To allocate slots to the
partition, select a slot and click either Add as required or Add as desired.
Configuring virtual adapters
On the Virtual Adapters screen, use the Actions menu to create a new virtual adapter.
• The virtual Ethernet adapter is on a virtual Ethernet that is specified with a VLAN ID for which
the Hypervisor acts as the network switch. If the Virtual I/O Server is configured with a special
bridge device called the Shared Ethernet adapter, then the internal server virtual Ethernet
traffic can be bridged to an external network.
• The virtual SCSI client adapter is associated with a matching virtual SCSI server adapter on
the Virtual I/O Server. This allows storage that is allocated to the VIOS to be provisioned to
client LPARs.
• The virtual Fibre Channel client adapter is associated with a virtual FC adapter on the Virtual
I/O Server. This allows client LPARs to access LUNs on a SAN subsystem.
SR-IOV
The Shared Root I/O Virtualization adapter functions basically like the LHEA with minor
differences. It is available on some POWER7+ and POWER8 processor-based servers, and on all
POWER9 and Power10 servers.
Optional settings
This panel allows you to modify various optional settings. For this course, the only one that we
focus on is the boot mode. While you might set the profile to boot in a mode other than normal,
you will almost always leave it set to normal boot mode. You can override this each time that you
activate the partition if you want some other boot mode.
Partition profile name
A partition must have at least one partition profile, which contains the resource configuration
information. When you create a partition using the wizard, a default profile named default_profile
is created for you.
In the lab exercises for this unit, students will create LPARs that use shared processors and virtual
adapters (Ethernet and SCSI). Once the new LPARs are created, students will install AIX in those
LPARs as part of the next unit’s exercise.
Let us review some of what we covered with some review questions.

© Copyright IBM Corp. 2009, 2024 7-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Review questions
1. Match the terms Minimum, Desired, and Maximum to the proper description:
a. This is the upper limit of processors or memory that cannot be exceeded when using dynamic
operations.
b. This is the lower limit of processors or memory when using dynamic operations.
c. This is the amount of processors or memory that a partition receives if there are more than enough
resources on the system when the partition is activated (starts).

2. True or False: The amount of desired processors must always be greater than or equal to the
amount of minimum processors.

3. What is the minimum amount of memory that is recommended for an AIX V7.3 (or later)
partition?

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-9. Review questions

© Copyright IBM Corp. 2009, 2024 7-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Review answers (1 of 2)
1. Match the terms Minimum, Desired, and Maximum to the proper description:
a. This is the upper limit of processors or memory that cannot be exceeded when using dynamic
operations.
The answer is maximum for the upper limit.
b. This is the lower limit of processors or memory when using dynamic operations.
The answer is minimum for the lower limit.
c. This is the amount of processors or memory that a partition receives if there are more than enough
resources on the system when the partition is activated (starts).
The answer is desired, if there is more than enough resources.
2. True or False: The amount of desired processors must always be greater than or equal to the
amount of minimum processors.
The answer is true.

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-10. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 7-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Review answers (2 of 2)
3. What is the minimum amount of memory that is recommended for an AIX V7.3 (or later)
partition?
The answer is 2GB. This is enforced by firmware.

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-11. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 7-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Exercise

Configuring logical partitions

Basics of configuring logical partitions © Copyright IBM Corporation 2024

Figure 7-12. Exercise

© Copyright IBM Corp. 2009, 2024 7-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 7. Basics of configuring logical partitions

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the following partition concepts:
í Partition type
í Partition ID and partition name
í Partition profiles
ƒ Describe basic processor and memory configuration options
ƒ Define Minimum, Maximum, and Desired settings for memory and
processors
ƒ Describe I/O concepts and the Required and Desired settings
ƒ Use the Create Partition wizard to create a basic partition and a default
profile

© Copyright IBM Corporation 2024

Figure 7-13. Unit summary

© Copyright IBM Corp. 2009, 2024 7-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Unit 8. AIX installation


Estimated time
01:00

Overview
This unit describes the process of installing the AIX 7.3 operating system.

How you will check your progress


• Review questions
• Machine exercises

References
AIX Version 7.3 Installing and migrating
https://www.ibm.com/docs/en/aix/7.3?topic=installing
AIX Version 7.3 Installing
https://www.ibm.com/docs/en/aix/7.3?topic=installing
AIX Version 7.3 BOS installation options
https://www.ibm.com/docs/en/aix/7.3?topic=system-bos-installation-options
SG24-7910 IBM AIX Version 7.1 Difference Guide (Redbooks)
http://www.redbooks.ibm.com/redbooks.nsf/RedbookAbstracts/sg247910.html?Open
AIX Version 7.3 Release Notes
https://www.ibm.com/docs/en/aix/7.3?topic=aix-release-notes
AIX Version 7.3 Expansion Pack Release Notes
https://www.ibm.com/docs/en/aix/7.3?topic=notes-aix-732-expansion-pack-release

© Copyright IBM Corp. 2009, 2024 8-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ List the installation methods for AIX
• List the steps necessary to install the AIX base operating system
• Install and understand all the options when installing AIX from
optical media
• Carry out post installation tasks
ƒ Describe the steps necessary to install AIX from NIM

© Copyright IBM Corporation 2024

Figure 8-1. Unit objectives

The objectives list what you should be able to do at the end of this unit.

© Copyright IBM Corp. 2009, 2024 8-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Topic 1 objectives
• List the installation methods for AIX and list the steps necessary to install the AIX base
operating system
• Carry out post installation tasks
• Describe the steps necessary to install AIX from NIM

AIX installation © Copyright IBM Corporation 2024

Figure 8-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 8-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installation methods for AIX 7


• Pre-installation option (for a new system order)
• DVD
ƒ Use physical media loaded in physical optical drive allocated to the AIX partition
ƒ Use physical media loaded in physical optical drive allocated to a VIOS partition, and mapped to the
AIX partition as a virtual optical drive
í Physical media can be obtained from IBM, or created by downloading an ISO image from ESS and
burning to blank media
ƒ Place an ISO image into a virtual media repository then load it in a virtual optical device mapped to the
client partition.
í ISO image can be downloaded from ESS, or created from copying physical media
• Network
ƒ Network Installation Manager (NIM)
ƒ Details covered in IBM training course: AIX Installation Management (AN22G)

AIX installation © Copyright IBM Corporation 2024

Figure 8-3. Installation methods for AIX 7

When a Power servers order is placed with IBM, or a business partner, there are options to have
the system preconfigured. This pre-configuration consists of LPAR creation and installation of OS
software including AIX.
AIX 7.3 is delivered, by default, on DVD media. Optionally, AIX 7.2 can also be ordered on DVD.
Another option is that downloading the ISO image from Entitled Software Support (ESS) website if
you have a valid IBM ID. You can burn the ISO image to a blank media then install from it, or copy
the ISO image to a virtual media repository, and load it into a virtual optical drive that is served
from the VIOS.
• ESS website: (IBM ID is required) https://www.ibm.com/servers/eserver/ess/landing/
In an LPAR environment, NIM is a popular method of installing and updating AIX. NIM is a large
topic and is covered in-depth in the AN22 education class.
The preinstall option is a good choice to ensure that the hardware is working when the machines
are delivered. Most customers choose to configure the systems upon delivery. This is only an
option if the Power server comes pre-installed with physical disks.
AIX base ISO images can be obtained by contacting Entitled Software Support (ESS) at
1-800-879-2755 option 2, option 2. The representatives should be able to verify entitlement and
guide customers on how to download the ISO image.
After the AIX ISO image is downloaded, the image can be stored in the /home/padmin directory of
the VIO server.
• The URL of “How to download ISO images of AIX install media”:
https://www.ibm.com/support/pages/downloading-aix-iso-specific-oslevel
• The URL of “How to configure a VIOS Media Repository/Virtual Media Library (example, AIX
Install/Restore)”:

© Copyright IBM Corp. 2009, 2024 8-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
https://www.ibm.com/support/pages/how-configure-vios-media-repositoryvirtual-media-libra
ry-ex-aix-installrestore
Let us see how to build an AIX system from optical media.

© Copyright IBM Corp. 2009, 2024 8-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

AIX installation in a partition (DVD)


• Steps:
ƒ Assume that a partition and partition profile have already been created.
ƒ Place the AIX DVD in the drive.
ƒ Activate the partition to SMS and open terminal window.
ƒ Select to boot device using SMS menus in the terminal window.
ƒ Interact with the AIX installation menus.
• Note, the partition must either:
ƒ Have PCI slot that controls a drive, which reads CD-ROMs.
OR
ƒ Be allocated a CD-ROM device though a VIOS server (as a virtual optical SCSI device).

AIX installation © Copyright IBM Corporation 2024

Figure 8-4. AIX installation in a partition (DVD)

To install AIX into a partition, the partition and profile must first be created through the HMC. The
partition must have access to a device slot that contains the optical media drawer. If a virtualized
environment is to be deployed, then the VIOS partition probably own the optical device. In that
case, it is still possible to make this CD available to a partition as a virtual optical SCSI device. In
VIOS version 1.5, a new feature was added which allows a media ISO image to be allocated to
multiple partitions, through the file-backed virtual optical device feature.
To install AIX from the optical drive, either boot into SMS mode and choose to boot from the
optical media device, or start the partition with the “Diagnostic with default boot list”. Then,
follow and interact with the menus.
Note that, at a high level, only that in a virtual environment, the CD or ISO image can be made
available to clients.
Let us go through the details of installing from optical media.

© Copyright IBM Corp. 2009, 2024 8-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installing AIX from DVD (1 of 2)


• Boot partition into SMS mode and select DVD.
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. I/O Device Information
4. Select Console
5. Select Boot Options

Multiboot
1. Select Install/Boot Device

Select Device Type


3. CD/DVD

Select Media Type


9. List All Devices

Select Device
Device Current Device Select the CD-ROM
Number Position Name drive from the list.
1. - SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )

AIX installation © Copyright IBM Corporation 2024

Figure 8-5. Installing AIX from DVD (1 of 2)

When SMS starts, choose option 5, followed by the boot device (in this case CD/DVD). Then, the
system displays all devices of this type. In the visual, there is only one such device. Select this
device number and then press Enter.
Let us proceed to SMS, page 2.

© Copyright IBM Corp. 2009, 2024 8-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installing AIX from DVD (2 of 2)


• The system will now boot from the DVD.
Select Task

SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )

1. Information
2. Normal Mode Boot
3. Service Mode Boot

Are you sure you want to exit System Management Services?


1. Yes
2. No

******* Please define the System Console. *******

Type a 1 and press Enter to use this terminal as the


system console.

>>> 1 Type 1 and press Enter to have English during install.

AIX installation © Copyright IBM Corporation 2024

Figure 8-6. Installing AIX from DVD (2 of 2)

Once the optical media device is selected, we need to perform a normal boot and exit SMS as
shown in the visual. Then the partition proceeds and boots from the optical media drive. The first
interactive step is to type <1>, and then press Enter to use the terminal as the system console.
Let us see the install main menu.

© Copyright IBM Corp. 2009, 2024 8-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installation and Maintenance


• Main Installation and Maintenance menu
Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Make Additional Disks Available

5 Select Storage Adapters

88 Help ?
99 Previous Menu

>>> Choice [1]: 2

AIX installation © Copyright IBM Corporation 2024

Figure 8-7. Installation and Maintenance

If option 1 is selected, a default system installation occurs. However, in most cases you might
want to see and change the default settings. To do this, type a <2> and press Enter. Select 88 to
display help on this or any subsequent installation screen.
The first option starts the installation by using the default settings. If you want to view or alter the
current settings, then you need to select the second option, which is discussed in this unit. The
third option allows for maintenance tasks such as going into a maintenance shell, copying the
system dump, carrying out an image backup.
Let us see the menu options following the selection of option 2.

© Copyright IBM Corp. 2009, 2024 8-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installation and Settings


• Installation and Settings menu
Installation and Settings

Either type 0 and press Enter to install with current settings, or type the
number of the setting you want to change and press Enter.

1 System Settings:
Method of Installation.............Preservation
Disk Where You Want to Install.....hdisk0

2 Primary Language Environment Settings (AFTER Install):


Cultural Convention................C (POSIX)
Language...........................C (POSIX)
Keyboard...........................C (POSIX)
Keyboard Type......................Default
3 Security Model.......................Default
4 More Options (Software install options)
5 Select Edition.......................standard
>>> 0 Install with the settings listed above.

+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu |destroy or impair recovery of SOME data on the
|destination disk hdisk0.
>>> Choice [0]:

AIX installation © Copyright IBM Corporation 2024

Figure 8-8. Installation and Settings

The installation and Settings menu enables you to set the key options and configuration settings
to be deployed during installation.
Let us first consider Option 1, the different methods of installation.

© Copyright IBM Corp. 2009, 2024 8-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Method of installation
• Choose option 1 for a fresh installation.
Change Method of Installation

Type the number of the installation method and press Enter.

>>> 1 New and Complete Overwrite


Overwrites EVERYTHING on the disk selected for installation.
Warning: Only use this method if the disk is totally empty or if there
is nothing on the disk you want to preserve.

2 Preservation Install
Preserves SOME of the existing data on the disk selected for
installation. Warning: This method overwrites the usr (/usr),
variable (/var), temporary (/tmp), and root (/) file systems. Other
product (applications) files and configuration data will be destroyed.

3 Migration Install
Upgrades the Base Operating System to the current release.
Other product (applications) files and configuration data are saved.

88 Help ?
99 Previous Menu

>>> Choice [1]:

AIX installation © Copyright IBM Corporation 2024

Figure 8-9. Method of installation

Changing the method of installation


When you select Option 1 in the Installation and Settings menu to change the method of
installation, the Change Method of Installation sub-menu that is shown in the visual is displayed.
The contents of which depends on the current state of the machine.
Complete Overwrite Install
On a new machine, New and Complete Overwrite is the only possible method of installation. On
an existing machine, if you want to completely overwrite the existing version of BOS, then you
should use this method.
Preservation Install
Use the Preservation Install method when a previous version of BOS is installed on your system
and you want to preserve the user data in the root volume group. This method removes only the
contents of /usr, / (root), /var, and /tmp. The Preservation Install option preserves page and
dump devices as well as /home and other user-created file systems. System configuration must
be done after doing a preservation installation.
Migration Install
Use the Migration Install method to upgrade from one version and release of AIX to a different
version and release, while preserving the existing root volume group. For example, when
migrating from AIX 7.2 to an AIX 7.3. This method preserves all file systems except /tmp, as well
as the logical volumes and system configuration files. Obsolete or selective fix files are removed.
The next setting to consider, is on which disks the operating system is going to be installed.

© Copyright IBM Corp. 2009, 2024 8-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installation disks
• Select disks to be used for the installation.
Change Disk(s) Where You Want to Install

Type one or more numbers for the disk(s) to be used for installation and press
Enter. To cancel a choice, type the corresponding number and Press Enter.
At least one bootable disk must be selected. The current choice is indicated
by >>>.

Name Location Code Size(MB) VG Status Bootable

>>> 1 hdisk0 none 6528 rootvg Yes Note: Some SAN disks
2 hdisk1 none 6528 rootvg Yes
3 hdisk2 none 6528 none Yes
might appear non-bootable.
4 hdisk3 none 6528 none Yes If so, change the setting on
the disk subsystem for the
LUNs.
>>> 0Continue with choices indicated above
55
More Disk Options
66
Devices not known to Base Operating System Installation
77
Display More Disk Information
88
Help ?
99
Previous Menu
Name Device Adapter Connection Location
or Physical Location Code
>>> Choice [0]:
>>> 1 hdisk0 U9113.550.65F2E7F-V11-C2-T1-L810000000000
2 hdisk1 U9113.550.65F2E7F-V11-C2-T1-L820000000000
3 hdisk2 U9113.550.65F2E7F-V11-C6-T1-L830000000000
4 hdisk3 U9113.550.65F2E7F-V11-C6-T1-L810000000000

AIX installation © Copyright IBM Corporation 2024

Figure 8-10. Installation disks

Selecting installation disks


After you select the type of installation, you must then select the disks that are to be used for the
installation. A list of all the available disks is displayed, similar to the one shown. This screen also
gives you the option to install to an unsupported disk by adding the code for the device first. When
you have finished selecting the disks, type <0> in the Choice field and press Enter.
After booting from an external media or over the network, BOS install announces its intentions to
install the AIX BOS onto the default disks and asks the user if it is acceptable. The default disks
are where the operating system was previously located. If the user does not want to use the
default disk, then the user can select a target disk. All disks that are available are displayed with a
single option to use a supplemental third-party target device. If the supplemental device option is
selected, the BOS install prompts the user to load the device configuration support drivers.
Option 77 on this menu displays the Physical Volume ID (PVID), which is what is found in the
ODM.
Let us look how we define the primary language environment.

© Copyright IBM Corp. 2009, 2024 8-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Set Primary Language Environment


• Default language environment is en_US (US English).
Set Primary Language Environment

Type the number for the Cultural Convention (such as date, time, and
money), Language, and Keyboard for this system and press Enter, or type
159 and press Enter to create your own combination.

Cultural Convention Language Keyboard

1 C (POSIX) C (POSIX) C (POSIX)


2 Albanian English (United States) Albanian
3 Arabic (Algeria) English (United States) Arabic (Algeria)
4 Arabic (Bahrain) English (United States) Arabic (Bahrain)
5 Arabic (Egypt) English (United States) Arabic (Egypt)
6 Arabic (Jordan) English (United States) Arabic (Jordan)
7 Arabic (Kuwait) English (United States) Arabic (Kuwait)
8 Arabic (Lebanon) English (United States) Arabic (Lebanon)
9 Arabic (Morocco) English (United States) Arabic (Morocco)
>>> 10 MORE CHOICES...

88 Help ?
99 Previous Menu

>>> Choice [10]:

AIX installation © Copyright IBM Corporation 2024

Figure 8-11. Set Primary Language Environment

At this point in the installation process, you can change the language and cultural convention that
is used on the system after installation. This screen displays a full list of supported languages.
It is recommended that if you are going to change the language, change it at this point rather than
after the installation is complete. Whatever language is specified at this point is obtained from the
installation media.
Cultural Convention determines the way numeric, monetary, and date and time characteristics
are displayed.
The Language field determines the language that is used to display text and system messages.
The Keyboard field determines the mapping of the keyboard for the selected language
convention.
The visual shows the list of language environments that can be selected. The environment is
governed by three settings:
• Cultural Conventions, which governs such things as the date format, the monetary symbol,
the sorting collation order, and so forth.
• Language, which sets the language for the messages.
• Keyboard, which governs the character set that is available.
If English (United States) is chosen, a second menu is displayed. On this menu, choose the type of
keyboard being used: 1 for the default keyboard and 2 for the 122-key keyboard.
Point out that C(POSIX) is an English-based POSIX standard compliant language environment.
This is often sufficient for many systems.

© Copyright IBM Corp. 2009, 2024 8-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
The language in which the system runs should be selected at this point, if at all possible. If a
different language is needed after installation is complete, the install media needs to be available
in order to install the appropriate new language file sets.
Let us look at the security options.

© Copyright IBM Corp. 2009, 2024 8-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Security Models
• These settings are beyond the scope of this class.
• Security models are all set to None by default.

Security Models

Type the number of your choice and press Enter.

1. LV Encryption........................................... No

2. Digital Signature Policy................................ None

3. Secure by Default....................................... No

4. Continue to LV Encryption Selection menu.

>>> 0 Continue to more software options.

88 Help ?
99 Previous Menu

>>> Choice [0]:

AIX installation © Copyright IBM Corporation 2024

Figure 8-12. Security Models

The security settings shown in the visual are beyond the scope of this class. The security models
are all set to None by default.
The information below is provided for reference only. Students should consult the AIX online
documentation for details, https://www.ibm.com/docs/en/aix/7.3.
LV Encryption
Before you begin: Evaluate whether your system needs encryption at a logical volume (LV) level.
Ensure that the key size of the Platform Keystore (PKS) is at least 4k bytes and ensure that a
minimum of 3 PKS slots are available. Applies only to overwrite installation. To enable encryption,
change this option to Yes. When you choose this option, the following screen appears where you
can select LVs for encryption. To select LV Encryption, type the number of your choice, and press
Enter. The selections that are set to yes in the following screen are the default LVs to be encrypted
if the LV Encryption is set to yes in the Security Models menu.

Digital Signature Policy


Starting with AIX 7.2 with Technology Level 4, the AIX software images are digitally signed.
Digitally signed software protects against corrupted artifacts, process breakdown that includes
accidentally delivering the wrong item, and any malicious intent. A Digital Signature Policy option
can be set during the operating system install, or can be set on a running system by using the
chsignpolicy command.
Note: Policy settings are not applied during an operating system installation. You must first
complete the operating system installation to ensure a running system. Any additional software or
updates that are installed on an AIX running system are verified based on Digital Signature Policy
configuration. Applies to additional software installation, after the operating system installation is

© Copyright IBM Corp. 2009, 2024 8-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
complete. This option is offered only for overwrite and preservation installation of the operating
system. The Digital Signature Policy is a global setting that is used by the installp command to
determine the level of check that must be performed on a digital signature of a software package.
Software packages are digitally signed when they are created. The digital signatures of software
packages might be checked again before installing software packages to ensure that the software
packages have not been altered.
The Digital Signature Policy option can be set with one of the following values:
• None: The digital signature is not checked during software package installation.
• Low: If the digital signature is invalid, a warning message is displayed. However, the software
package will be installed.
• Medium: If the digital signature is invalid, you must confirm to proceed with the software
package installation.
• High: If the digital signature is invalid, the software package will not be installed.
Secure by Default
Applies only to overwrite installation. The Secure by Default option performs a minimal software
installation, and removes all clear password access such as Telnet and rlogin. Secure by Default
also applies the AIX® Security Expert high-security settings. Secure by Default requires
direct-connect access to the system, such as TTY or direct-connect display, or a secure means of
remote access such as ssh or IPsec Virtual Private Network. For more information about Secure
by Default or AIX Security Expert, see Security.
Security model updates in AIX 7.3.2
Starting with AIX 7.3, the following security models are not available. The following security
options are removed from the Operating System Install menus and from the bosinst.data
templates:
• Trusted AIX
• Trusted AIX LAS/EAL4+ Configuration Install
• BAS and EAL4+ Configuration Install
Trusted AIX is removed in AIX 7.3. If you want to implement a fine-grained security model where
privileges are separated across different users based on applying a labeled model to users and
resources, consider the AIX Domain RBAC feature.
The following security options are available for use:
• Logical volume encryption
• Digital signature policy
• Secure by default

© Copyright IBM Corp. 2009, 2024 8-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Install Options
• Further install / software options
Install Options

1. Graphics Software................................................ Yes


2. System Management Client Software................................ Yes
3. TCP/IP ftp and telnet software................................... No
4. Enable System Backups to install any system...................... Yes
(Installs all devices)
5. Import User Volume Groups........................................ Yes

>>> 6. Install More Software

0 Install with the current settings listed above.

88 Help ?
99 Previous Menu

>>> Choice [6]:

AIX installation © Copyright IBM Corporation 2024

Figure 8-13. Install Options

Install Options
• Graphics Software: When this install option is Yes, X11, CDE, Java, and other software
dependent on these packages is installed.
• System Management Client Software: Includes Java, service agent, lwi.
• TCP/IP ftp and telnet Software: To install the bos.net.tcp.ftp, bos.net.tcp.ftpd,
bos.net.tcp.telnet, and bos.net.tcp.telnetd software, change the choice to Yes.
• Enabling System Backups to install on other systems: Installs all devices code and drivers.
Otherwise, only device drivers necessary to your system hardware configuration are installed.
This is the preferred option, and it is very useful if you want to clone the image to another
system, which differs in type or device layout.
To install more software, select option 6 and press Enter. This menu (below) allows you to select
Kerberos and Server (Volumes 2) software for installation.
Install More Software
1. Kerberos_5 (Expansion Pack)....................................... No
2. Server (Volume 2)................................................. No
The file sets included in the Server (Volume 2) option are:
• Networking
bos.net.nfs.server
bos.net.nis.server
• Performance Tools
bos.perf.diag_tool

© Copyright IBM Corp. 2009, 2024 8-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
bos.perf.tools
perfagent.tools
bos.sysmgt.trace
bos.sysmgt.quota
bos.terminfo.print.data
• Accounting Services
bos.acct
That is all the options. Let us see the summary page before the actual install.

© Copyright IBM Corp. 2009, 2024 8-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Install summary and installation


Overwrite Installation Summary

Disks: hdisk0
Cultural Convention: en_US
Language: en_US
Keyboard: en_US
Graphics Software: Yes
System Management Client Software: Yes
TCP/IP ftp and telnet software: No
Enable System Backups to install any system: Yes
Selected Edition: standard

Optional Software being installed:

>>> 1 Continue with Install


+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [1]: 1

Installing Base Operating System

Please wait...

Approximate Elapsed time


% tasks complete (in minutes)

3 0 Making logical volumes

AIX installation © Copyright IBM Corporation 2024

Figure 8-14. Install summary and installation

Before installation, a summary page is displayed. If you are ready to proceed with your options,
select 1 to continue and the system installation begins. It takes approximately one hour to build
the partition from DVD or CD media.
What happens post install?

© Copyright IBM Corp. 2009, 2024 8-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

License Agreements
Software License Agreements

Show Installed License Agreements


Accept License Agreements

Accept License Agreements

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
ACCEPT Installed License Agreements yes +

Software Maintenance Agreement

View Software Maintenance Terms and Conditions


Accept Software Maintenance Terms and Conditions

Accept Software Maintenance Terms and Conditions

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
ACCEPT Software Maintenance Agreements? yes +

AIX installation © Copyright IBM Corporation 2024

Figure 8-15. License Agreements

When AIX installation is complete, the user must accept both Software and Maintenance License
agreements, as shown in the visual.
License agreements must be accepted, as per the examples that are shown in the visual.
Once we finished the installation, we want to do some minimal configuration of the system.

© Copyright IBM Corp. 2009, 2024 8-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Topic 1 objectives
• List the installation methods for AIX and list the steps necessary to install the AIX base
operating system
• Carry out post installation tasks
• Describe the steps necessary to install AIX from NIM

AIX installation © Copyright IBM Corporation 2024

Figure 8-16. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 8-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

AIX installation: Post-install steps


• Post-install tasks:
ƒ Accept the license agreement.
ƒ Optional: Using the installation assistant:
í Set root password
í Set date and time
í Configure network
ƒ Exit from installation assistant.
ƒ Update for the operating system to the latest TL and SP level.

AIX installation © Copyright IBM Corporation 2024

Figure 8-17. AIX installation: Post-install steps

The installation is not finished until you complete the post setup in the operating system. Once
AIX is installed, the system reboots. Several post installation steps are required. First, you must
accept both the software and maintenance license agreements. Finally, the installation assistant
starts. Although optional, it is recommended that you use the installation assistant at a minimum
to set the root password, date, and time, and configure the network parameters accordingly.
Once AIX is installed, you should update it to the latest technology level and service pack. These
can be downloaded from fix central: https://www.ibm.com/support/fixcentral
Now that we finished a walk-through of the entire install process (starting with boot from
installation media), let us see how the process differs if using a NIM server.

© Copyright IBM Corp. 2009, 2024 8-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Installation Assistant and login


Installation Assistant

Move cursor to desired item and press Enter.

Set Date and Time


Set root Password
Configure Network Communications
Install Software Applications
Using SMIT (information only)
Tasks Completed - Exit to Login

AIX Version 7
Copyright IBM Corporation, 1982, 2022.
login: root Note: No root password is
set, by default, if it is not
*******************************************************************************
* set using
* the Installation
* * above.
Assistant
* Welcome to AIX Version 7.3! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************

AIX installation © Copyright IBM Corporation 2024

Figure 8-18. Installation Assistant and login

After the license agreements is accepted, the installation assistant (ASCII console) or
configuration assistant (Graphical console) will be displayed. The install assistant is similar to a
mini version of SMIT. As mentioned earlier in the unit, it is recommended that one uses the
installation assistant at a minimum to set the root password, date, and time and to configure the
network parameters accordingly. Another approach, would be to exit the installation assistant
immediately and use SMIT, command line, or scripts to configure the system.
The installation assistant can be invoked at any time using the install_assist command. On a
graphical console, either the install_assist or configassist commands can be used to
launch the configuration assistant.
How about installing AIX in a partition using NIM?

© Copyright IBM Corp. 2009, 2024 8-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Topic 1 objectives
• List the installation methods for AIX and list the steps necessary to install the AIX base
operating system
• Carry out post installation tasks
• Describe the steps necessary to install AIX from NIM

AIX installation © Copyright IBM Corporation 2024

Figure 8-19. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 8-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

AIX installation in a partition using NIM: NIM overview


• What is NIM?
ƒ Centralized Installation and Management of AIX over a network

LPAR 4 NIM Client


Systems

LPAR 1

Public/Open LPAR 2
NIM Server network
NIM resources LPAR 3
lpp_source
SPOT
LPAR 4
Client Definitions
LPAR1
LPAR2

Actions:
• Resources are allocated to clients.
• Clients are set for a BOS operation.

AIX installation © Copyright IBM Corporation 2024

Figure 8-20. AIX installation in a partition using NIM: NIM overview

Network Install Manager (NIM) introduction


NIM can be used to manage the installation of the Base Operating System (BOS) and optional
software on one or more networked machines. NIM gives you the ability to install and maintain the
AIX operating system, and any additional software, and fixes that can be applied over time. NIM
allows you to customize the configuration of machines both during and after installation. NIM
eliminates the need for access to physical media, such as tapes and optical media, once the NIM
master has been loaded. You use the NIM master to load other network “clients”. System
backups can be created with NIM, and stored on any server in the NIM environment. The
advantage to using NIM in an LPAR environment is that it solves the device allocation issue. Since
AIX might already be installed once on the system before it is shipped, you can configure this
partition to be the NIM master. Or, you can use another AIX system that is the proper AIX version.
One of the optional steps in creating a NIM master is creating a mksysb (AIX system backup
image). You can use this mksysb to install AIX in the other partitions. The advantage to mksysb is
that it copies AIX customizations from the source system.
NIM resources
All operations on clients in the NIM environment require one or more resources. At a minimum, in
order to perform a BOS installation on a client there must be two resources that are defined:
• SPOT includes everything that a client machine requires in a /usr file system, such as the AIX
kernel, executable commands, libraries, and applications. The SPOT is created, controlled,
and maintained from the master, even though the SPOT can be located on another system.
• An lpp_source resource represents a directory in which software installation images are
stored. NIM uses an lpp_source for an installation operation by first mounting the lpp_source
on the client machine. The installp commands are then started on the client using the
mounted lpp_source as the source for installation images. When the installation operation

© Copyright IBM Corp. 2009, 2024 8-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
has completed, NIM automatically unmounts the resource. In addition to providing images to
install machines, lpp_source resources can also be used to create and update SPOT
resources.
For a deeper understanding of NIM, students should refer to the IBM training NIM class AN22 as a
means to build important NIM skills.
OK, that concludes the high-level NIM introduction. Now, let us define the configuration steps that
are required for a client BOS operation.

© Copyright IBM Corp. 2009, 2024 8-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

AIX installation in a partition using NIM: Configuration steps


• Assume that a partition and partition profile have been created.
ƒ Set up and configure the NIM master to support a BOS installation of your machine.
ƒ Activate the partition using SMS boot mode.
ƒ Specify the IP parameters for a network boot.
ƒ Configure the partition to boot from the network adapter.
ƒ Interact with AIX installation menus, if required (depends on NIM configuration).
• Note:
ƒ Subsequent installs and updates for the same partition can be initiated from the NIM master.
ƒ A mksysb restore example is provided in a later unit (Backup and Restore).

AIX installation © Copyright IBM Corporation 2024

Figure 8-21. AIX installation in a partition using NIM: Configuration steps

To install a partition from a NIM server, you need to create the partition and partition profile, for
the partition where AIX is installed. You would complete this step as if you were installing from
optical media, except that you would not have to allocate the slot for the CD or DVD device. The
partition needs to be activated in SMS boot mode. From SMS, the NIM server network details can
be entered, which causes the client to issue a boot request over the network. From this point, the
menu steps are identical to using optical media.
While the details of installing and configuring a NIM server are covered in a later course, you do
need to understand how to initiate a network install by using an already configured NIM server.
Let us look at what is involved in executing a network boot by using SMS.

© Copyright IBM Corp. 2009, 2024 8-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (1 of 7)
• Select the Setup Remote IPL option:

PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
---------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. I/O Device Information
4. Select Console
5. Select Boot Options

--------------------------------------------------------------------
Navigation Keys:
X = eXit System Management Services
--------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-22. Network boot (1 of 7)

Network boot (remote IPL)


To configure a partition to boot from another system over the network, choose Setup Remote IPL
(Initial Program Load) from the main SMS menu.
Not all SMS versions have menus that look exactly like this. Point out that you need to read the
menu and choose the appropriate item for “Remote IPL” or similar phrase.
The next visual shows the screen that you will see after choosing option 2 from the main SMS
menu.

© Copyright IBM Corp. 2009, 2024 8-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (2 of 7)
• Choose the network adapter:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
NIC Adapters
Device Location Code Hardware
Address
1. Interpartition Logical LAN U8284.22A.21445CW-V39-C2-T1 3e00e47c5702

------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
------------------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-23. Network boot (2 of 7)

NIC adapter
Select which network interface to use. The example in the visual shows two ports on the
integrated Ethernet controller.
The visual shows the screen where you choose which network adapter to use to access the NIM
server.
After selecting the Network adapter, the following menu displays.

© Copyright IBM Corp. 2009, 2024 8-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (3 of 7)
• Select the network service:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
Select Network Service.
1. BOOTP
2. ISCSI

------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
------------------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-24. Network boot (3 of 7)

Select the Network service: BOOTP.


Note that older firmware levels might not provide an ISCSI option.
The visual displays the menu where you specify the network parameters and the network adapter
configuration.

© Copyright IBM Corp. 2009, 2024 8-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (4 of 7)
• Set up the IP parameters, the adapter configuration options, then perform the Ping Test:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
Network Parameters
Interpartition Logical LAN: U8284.22A.21445CW-V39-C2-T1
1. IP Parameters
2. Adapter Configuration
3. Ping Test
4. Advanced Setup: BOOTP

------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
------------------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-25. Network boot (4 of 7)

Network parameters
Choose option 1 and configure the IP parameters. This screen is shown in the next visual.
Then, choose option 2 and configure the adapter settings, such as media speed and duplex
setting.
When everything is configured properly, run the Ping Test and it should be successful.
When the ping test is successful, return to the SMS main menu, select the network adapter as a
boot device, and exit the SMS menu. This starts the network boot process.
At this point, the procedure is to choose option 1, then 2, then 3, and then return to the SMS main
menu and exit SMS.
Let us see the screen if you choose option 1, IP Parameters.

© Copyright IBM Corp. 2009, 2024 8-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (5 of 7)
• IP parameters:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
IP Parameters
Interpartition Logical LAN: U8284.22A.21445CW-V39-C2-T1
1. Client IP Address [10.103.4.73]
2. Server IP Address [10.103.4.3]
3. Gateway IP Address [0.0.0.0]
4. Subnet Mask [255.255.0.0]

------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
------------------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-26. Network boot (5 of 7)

IP parameters
Enter the IP address of the client, which is the partition.
Enter the IP address of the server, which is the NIM server.
Enter the IP address of the gateway. This is the partition’s gateway system; so it must be local on
the partition’s subnet. This value can be a valid route on the same subnet as the client partition or
the IP address of the NIM server. Ask your network administrator which system to use.
Enter the subnet mask that the partition is using.
Adapter configuration
Once you’ve entered this information, return to the previous screen and choose the Adapter
Configuration option. Here you need to specify the media speed and the duplex setting.
Ping test and network boot
After you configured the adapter parameters, return to the main SMS menu. Run the ping test, and
if successful, select the network adapter as a boot device, then exit the SMS menus to begin the
boot process and the installation.
If students are not familiar with network terminology, such as “gateways” or “subnets”, they are
encouraged to discuss these items with their network administrator, or consider taking a TCP/IP
course.
Now, let us see the adapter configuration screen.

© Copyright IBM Corp. 2009, 2024 8-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (6 of 7)
• Adapter configuration:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
Adapter Configuration
Interpartition Logical LAN: U8284.22A.21445CW-V39-C2-T1
Disable
1. Speed,Duplex Spanning Tree
2. Spanning Tree Enabled for faster
3. Protocol operation

------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
------------------------------------------------------------------------------

AIX installation © Copyright IBM Corporation 2024

Figure 8-27. Network boot (6 of 7)

Overview
The adapter configuration screen allows you to set parameters for the adapter itself. Typically,
you can leave it alone except for optionally disabling spanning tree. This makes the boot go much
faster.
The value for option 2 does not change, that is, from Enabled to Disabled. The option should have
a question mark next to it that is answered when you choose the option.
This screen allows you to configure the adapter parameters. You can disable spanning tree for a
faster NIM or media boot.
What is left is the ping test.

© Copyright IBM Corp. 2009, 2024 8-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Network boot (7 of 7)
• When remote IPL is configured, perform the ping test.
ƒ If ping is unsuccessful:
í Is NIM server on network?
í Check IP parameters screen for mistakes.
Is the gateway correct and available?
í Try again.
• Return to SMS Select Boot Options menu.
ƒ Select the network adapter as the Install/Boot Device.
• Exit from SMS initiates network boot.
• AIX Install and Maintenance menu processing is the same as previously described.
• NIM can have unattended installation with no console interaction.

AIX installation © Copyright IBM Corporation 2024

Figure 8-28. Network boot (7 of 7)

Ping Test
This option pings the NIM server. If it fails, suspect your IP configuration or the network. There is
nothing to configure on the ping test screen. Just initiate the ping. The message tells you whether
it is successful or if it failed.

© Copyright IBM Corp. 2009, 2024 8-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty
For example:
PowerPC Firmware
Version FW860.80 (SV860_212)
SMS (c) Copyright IBM Corp. 2000,2016 All rights reserved.
-------------------------------------------------------------------------------
Ping Test
Interpartition Logical LAN: U8286.42A.2143F9V-V6-C2-T1
Speed, Duplex: auto,auto
Client IP Address: 10.8.12.17
Server IP Address: 10.8.12.35
Gateway IP Address: 10.8.12.254
Subnet Mask: 255.255.255.0
Protocol: Standard
Spanning Tree Enabled: 1
Connector Type:
VLAN Priority: 0
VLAN ID: 0
VLAN Tag:
1. Execute Ping Test
-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key: 1
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=3 ttl=? time=21 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=4 ttl=? time=21 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=5 ttl=? time=22 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=6 ttl=? time=21 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=7 ttl=? time=22 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=8 ttl=? time=21 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=9 ttl=? time=11 ms
10.8.12.17: 24 bytes from 10.8.12.35: icmp_seq=10 ttl=? time=21 ms
.-----------------.
| Ping Success. |
`-----------------'
Press any key to continue..........
Next, let’s review this unit.

© Copyright IBM Corp. 2009, 2024 8-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Review questions
1. AIX 7 can be installed from which of the following? (Select all that are correct.)
a. 8 mm tape
b. DVD
c. NIM server

2. True or False: A preservation installation preserves all data on the disks.

3. What is the console used for during the installation process?

AIX installation © Copyright IBM Corporation 2024

Figure 8-29. Review questions

© Copyright IBM Corp. 2009, 2024 8-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Review answers
1. AIX 7 can be installed from which of the following? (Select all that are correct.)
a. 8 mm tape
b. DVD
c. NIM server
The answers are DVD and NIM server.
2. True or False: A preservation installation preserves all data on the disks.
The answer is false. It preserves some of the existing data on the disk (for rootvg) selected for
installation. This method overwrites the user (/usr), variable (/var), temporary (/tmp), and root (/) file
systems. Application files and configuration data stored in these file systems (in rootvg) will be lost.
Information stored in other non-system file systems (and non-rootvg volume groups) is preserved.
3. What is the console used for during the installation process?
The answer is the console is used to display all the system messages and to interact with the
installation.

AIX installation © Copyright IBM Corporation 2024

Figure 8-30. Review answers

© Copyright IBM Corp. 2009, 2024 8-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Exercise

AIX installation

AIX installation © Copyright IBM Corporation 2024

Figure 8-31. Exercise

© Copyright IBM Corp. 2009, 2024 8-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 8. AIX installation

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ List the installation methods for AIX
• List the steps necessary to install the AIX base operating system
• Install and understand all the options when installing AIX from
optical media
• Carry out post installation tasks
ƒ Describe the steps necessary to install AIX from NIM

© Copyright IBM Corporation 2024

Figure 8-32. Unit summary

© Copyright IBM Corp. 2009, 2024 8-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Unit 9. Working with the Logical Volume


Manager
Estimated time
01:30

Overview
This unit describes how to work with logical volumes, physical volumes, and volume groups.

How you will check your progress


• Review questions
• Lab exercises

References
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
AIX Version 7.3 Logical Volume Manager
https://www.ibm.com/docs/en/aix/7.3?topic=management-logical-volume-manager
Limitations for logical storage management
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-limitations-logical-storage-management
AIX 72 TL5: Logical Volume Encryption
https://community.ibm.com/community/user/power/blogs/xiaohan-qin1/2020/11/23/aix-lv-enc
ryption
Encrypted logical volumes
https://www.ibm.com/docs/en/aix/7.3?topic=system-encrypted-logical-volumes
hdcryptmgr command reference
https://www.ibm.com/docs/en/aix/7.3?topic=h-hdcryptmgr-command#hdcryptmgr__hdcryptm
gr_authinit.
Understanding AIX Physical Volume Encryption
https://community.ibm.com/community/user/power/blogs/gary-domrow/2023/02/08/understa
nding-aix-physical-volume-encryption
IBM Redbooks:

© Copyright IBM Corp. 2009, 2024 9-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
SG24-5432, AIX Logical Volume Manager: from A to Z: Introduction and Concepts
https://www.redbooks.ibm.com/abstracts/sg245432.html
SG24-5433, AIX Logical Volume Manager: from A to Z: Troubleshooting and Commands
https://www.redbooks.ibm.com/abstracts/sg245433.html

© Copyright IBM Corp. 2009, 2024 9-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Explain how to work with the Logical Volume Manager
ƒ Add, change, and delete:
í Volume groups
í Logical volumes
í Physical volumes
ƒ Describe essential LVM concepts, such as:
í Mirroring
í Striping
ƒ Describe Logical Volume Encryption

© Copyright IBM Corporation 2024

Figure 9-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 9-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Topic 1 objectives
• Explain how to work with the Logical Volume Manager
• Describe essential LVM concepts, such as mirroring and striping
• Describe Logical Volume Encryption

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 9-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Logical Volume Manager components


• Volume group (VG)
Volume group
• Physical volume (PV) logical
logical
volumes
logical
volumes
Logical
• Physical partition (PP) volumes
volumes

• Logical volume (LV)


physical
physical
• Logical partition (LP) physical
disks
physical
disks
Physical
disks
disks
volumes
# smit lvm
Logical Volume Manager Logical volume
Move cursor to desired item and press Enter.
LP1 LP2 LP3
Volume Groups
Logical Volumes
Physical Volumes
Paging Space
PP20 PP42 PP52
Physical volume Physical volume

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-3. Logical Volume Manager components

LVM includes the physical and logical components of system storage.


LVM maintains the hierarchy of logical structures that manage disk storage. Disk drives are
defined within this hierarchy as physical volumes. Every physical volume in use belongs to a
volume group. Within each volume group, one or more logical volumes are defined. Data on logical
volumes appears to be contiguous to the user, but can be non-contiguous on the physical volume.
This allows file systems, paging space, and other logical volumes to be re-sized or relocated, span
multiple physical volumes, and have their contents replicated for greater flexibility and
availability.
The SMIT Logical Volume Manager menu is used to manage many aspects of the system's
storage. The SMIT Volume Groups menu provides facilities to manipulate the volume groups in
the system. The SMIT Logical Volumes menu provides facilities to manipulate the logical volumes
in the system. Logical volumes which contain journaled file systems, paging space, or dump
volumes can also be manipulated from their respective menus. The SMIT Physical Volumes
menu allows the user to configure the physical volumes in the system.

© Copyright IBM Corp. 2009, 2024 9-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Volume groups
• Volume group types: Volume Group Max Max LVs Max PPs per Max PP
Type PVs VG Size
ƒ Original
ƒ Big Original 32 256 32512 1 GB
(1016 * 32)
ƒ Scalable
Big 128 512 130048 1 GB
• Limits (1016 * 128)

Scalable 1024 4096 2097152 128 GB

• AIX contains one mandatory volume group, rootvg


ƒ rootvg is created on system install
ƒ Contains the AIX operating system
• Why create new volume groups?
rootvg datavg
ƒ Separate user data from operating system files
ƒ Disaster recovery
PV1 PV2 PV3
ƒ Data portability
ƒ Data integrity and security

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-4. Volume groups

When creating a volume group with SMIT or using the mkvg command, scalable volume groups are
the default with AIX 7.3, and original volume groups are the default for AIX 7.2 and earlier
versions of AIX.
A big volume group allows more physical volumes per volume group and doubles the maximum
number of logical volumes per volume group from 256 to 512.
Scalable volume groups were introduced with AIX V5.3. A scalable volume group can
accommodate a maximum of 1024 physical volumes and raises the limit for the number of logical
volumes to 4096.
When the system is installed, the root volume group (rootvg) is created. rootvg consists of a base
set of logical volumes and physical volumes required to start the system, and any other logical
volumes you specify to the installation script.
Additional disks can either be added to rootvg or used to create additional volume groups. There
can be up to 255 volume groups per system.
Reference: Limitations for logical storage management,
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-limitations-logical-storage-management

© Copyright IBM Corp. 2009, 2024 9-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

SMIT Volume Groups menu


# smit lvm
Logical Volume Manager

Move cursor to desired item and press Enter. # smit vg


Volume Groups
Volume Groups
Logical Volumes Move cursor to desired item and press Enter.
Physical Volumes
Paging Space List All Volume Groups
Add a Volume Group
Set Characteristics of a Volume Group
List Contents of a Volume Group
Remove a Volume Group
Activate a Volume Group
Deactivate a Volume Group
Import a Volume Group
Export a Volume Group
Mirror a Volume Group
Unmirror a Volume Group
Synchronize LVM Mirrors
Back Up a Volume Group
Remake a Volume Group
Preview Information about a Backup
Verify the Readability of a Backup (Tape only)
View the Backup Log
List Files in a Volume Group Backup
Restore Files in a Volume Group Backup

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-5. SMIT Volume Groups menu

The SMIT Logical Volume Manager menu is used to manage many aspects of the system's
storage.
The visual shows the SMIT screen that allows for the configuration of volume groups.
To get to this menu, you can go through the SMIT Logical Volume Manager -> Volume Groups
menu or use the SMIT fastpath, smit vg.

© Copyright IBM Corp. 2009, 2024 9-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating an original volume group


# mkvg –a –y datavg hdisk1 hdisk2 Syntax
OR mkvg –a [–y VG] PV(s)
# smit mkvg
Add a Volume Group

Move cursor to desired item and press Enter.

Add an Original Volume Group


Add a Big Volume Group
Add a Scalable Volume Group

Add an Original Volume Group

[Entry Fields]
VOLUME GROUP name [datavg]
Physical partition SIZE in megabytes +
* PHYSICAL VOLUME names [hdisk1 hdisk2] +
Force the creation of a volume group? no +
Activate volume group AUTOMATICALLY yes +
at system restart?
Volume Group MAJOR NUMBER [] +#
Create VG Concurrent Capable? no +
Infinite Retry Option no +

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-6. Creating an original volume group

The mkvg command is used to create a volume group. A new volume group must contain at least
one physical volume. The –a option is used to indicate the type of volume group (original or small).
The -y option is used to indicate the name for the new volume group. If this is not specified, a
system generated name is used.
It is best not to select a physical partition size as the system will select the best fit automatically.
The default is the smallest physical partition size consistent with the maximum physical partitions
per physical volume and the largest physical volume in the volume group.

© Copyright IBM Corp. 2009, 2024 9-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating a scalable volume group


# mkvg –S –y db2_vg hdisk3 Syntax
OR
mkvg –S –y VG PV(s)
# smit mkvg
Add a Volume Group

Move cursor to desired item and press Enter.

Add an Original Volume Group


Add a Big Volume Group
Add a Scalable Volume Group

Add a Scalable Volume Group

[Entry Fields]
VOLUME GROUP name [db2_vg]
Physical partition SIZE in megabytes +
* PHYSICAL VOLUME names [hdisk3] +
Force the creation of a volume group? no +
Activate volume group AUTOMATICALLY yes +
at system restart?
Volume Group MAJOR NUMBER [] +#
Create VG Concurrent Capable? no +
Max PPs per VG in units of 1024 32 +
Max Logical Volumes 256 +
Enable Strict Mirror Pools No +
Infinite Retry Option no +
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-7. Creating a scalable volume group

There is a separate SMIT menu for adding scalable volume groups. The administrator has the
option to set the Maximum PPs per VG, and the Max Logical Volumes for the volume group.
With non-scalable volume groups, LVM allows tuning of the number of physical partitions for each
physical volume through the mkvg -t or chvg -t flag. In scalable volume groups, the physical
partitions are managed on a volume group wide basis.
The maximum number of logical volumes per volume group is fixed, for original and big volume
groups. For scalable volume groups, the maximum number of logical volumes per volume group is
tunable, up to 4095.
Starting with AIX 7.3 the mkvg command, by default, creates a scalable type volume group that
can accommodate up to 1024 physical volumes, 256 logical volumes, and 32768 physical
partitions. The visual includes the -S option to demonstrate how you would create a scalable VG
on AIX 7.2 and earlier versions of AIX.

© Copyright IBM Corp. 2009, 2024 9-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Extending and reducing a volume group


• To add a physical volume to a volume group (example):
ƒ # extendvg datavg hdisk4 OR # smit extendvg
BEFORE AFTER

hdisk1 hdisk2 hdisk4 hdisk1 hdisk2 hdisk4

datavg datavg

• To remove a physical volume from a volume group (example):


ƒ # reducevg [–d] [–f] datavg hdisk4 OR # smit reducevg
BEFORE AFTER

hdisk1 hdisk2 hdisk4 hdisk1 hdisk2 hdisk4

datavg datavg

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-8. Extending and reducing a volume group

To add a disk to an existing volume group, use the extendvg command or SMIT fastpath smit
extendvg. The disk must be configured on the system. extendvg formats the disk into physical
partitions. The space on the new disk is now available to be allocated to logical volumes in the
volume group. If the existing data in the Volume Group Descriptor Area (VGDA) on the disk shows
that it is part of another volume group, the -f option forces the addition of the disk to the volume
group, without requesting confirmation. Use this option with care and only when adding a disk
which has been previously used but contains data which is no longer needed.
The reducevg command is used to remove a physical volume from a volume group. To remove a
disk from the volume group, first free up all the storage on the disk by either deleting the logical
volumes or migrating them to another disk in the volume group. Once there are no logical volumes
on the disk, you can remove that disk from the volume group with the reducevg command or the
SMIT fastpath smit reducevg. If you do not remove the logical volumes first, the -d option
deallocates the existing logical volume partitions, and then deletes resultant empty logical
volumes from the specified physical volumes. User confirmation is required unless the -f flag is
added.

© Copyright IBM Corp. 2009, 2024 9-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Removing a volume group


• Using the reducevg command, when you remove all physical volumes in a volume group, the
volume group is also removed.
ƒ # reducevg [–d] [–f] datavg hdisk1 hdisk2

OR
datavg hdisk2
hdisk1

# smit reducevg2
Remove a Volume Group

Type or select a value for the entry field.


Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name [datavg] +

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-9. Removing a volume group

Using the reducevg command, when you remove all physical volumes in a volume group, the
volume group is also removed. You can also use the SMIT fastpath, smit reducevg2, to remove a
volume group. It runs a script which identifies what physical volumes are in the volume group and
then runs the reducevg command to remove each physical volume until there are no more
physical volumes in the volume group.
The Remove a Volume Group menu does not have a corresponding high-level command. The
correct way to remove a volume group, is to use the Remove a Physical Volume from a Volume
Group option, which calls the reducevg command. This removes the volume group when you
remove the last physical volume within it.

© Copyright IBM Corp. 2009, 2024 9-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Activating volume groups


• varyonvg VG
ƒ Activates a volume group and logical volumes
ƒ Normally done at system startup for all volume groups
ƒ Can be executed on a volume group that is already varied on and will resynchronize and redefine the
structures in the volume group
ƒ Example:
ƒ # varyonvg datavg
• Using the smit varyonvg command:
Activate a Volume Group
[Entry Fields]
* VOLUME GROUP name [datavg] +
RESYNCHRONIZE stale physical partitions? yes +
Activate volume group in SYSTEM no +
MANAGEMENT mode?
FORCE activation of the volume group? no +
Warning––this may cause loss of data integrity.
Varyon VG in Concurrent Mode? no +
Synchronize Logical Volumes? no +

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-10. Activating volume groups

The varyonvg command is used to activate a volume group that is not activated at system startup
or has been added to the system since startup. It can also be executed on a volume group that is
already varied on and will resynchronize and redefine the structures in the volume group.
The -f option is used to force a volume group to be activated. It allows a volume group to be
made active that does not currently have a quorum of available disks. Any disk that cannot be
brought to an active state is put in a removed state. At least one disk must be available for use in
the volume group.

© Copyright IBM Corp. 2009, 2024 9-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Deactivating volume groups


• varyoffvg VG
ƒ Deactivates the volume group and its associated logical volumes
ƒ The logical volumes first must be closed
ƒ Example:
í # varyoffvg datavg

• Using the smit varyoffvg command:


Deactivate a Volume Group

[Entry Fields]
* VOLUME GROUP name [datavg] +
Put volume group in SYSTEM no +
MANAGEMENT mode?

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-11. Deactivating volume groups

The varyoffvg command deactivates a volume group along with its associated logical volumes.
The logical volumes first must be closed. For example, if the logical volume contains a file system,
it must be unmounted.
A volume group that has a paging space volume on it cannot be varied off while the paging space
is active.
Removing a disk without deactivating the volume group could cause errors and loss of data in the
volume group descriptor areas, and the logical volumes within that volume group.

© Copyright IBM Corp. 2009, 2024 9-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Changing characteristics of a volume group


# chvg –a n datavg (example) Syntax
OR chvg flags VG
# smit chvg
Change a Volume Group

[Entry Fields]
* VOLUME GROUP name datavg
* Activate volume group AUTOMATICALLY no +
at system restart?
* A QUORUM of disks required to keep the volume no +
group on–line ?
Concurrent Capable? no +
Change to big VG format? no +
Change to scalable VG format? no +
LTG Size in kbytes 256 +
Set hotspare characteristics n +
Set synchronization characteristics of stale n +
partitions
Max PPs per VG in units of 1024 32 +
Max Logical Volumes 256 +
Mirror Pool Strictness +

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-12. Changing characteristics of a volume group

The chvg command, or the smit chvg fastpath, changes the characteristics of a volume group. In
the example shown in the visual, the attributes, Activate volume group AUTOMATICALLY at
system restart? was set to no, which causes the following command to run: chvg –a n datavg.

© Copyright IBM Corp. 2009, 2024 9-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

List all logical volumes by volume group


# lsvg -o | lsvg -i –l

datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
datalv jfs2 30 90 3 closed/syncd N/A
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 2 2 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 15 15 1 open/syncd /
hd2 jfs2 177 177 1 open/syncd /usr
hd9var jfs2 26 26 1 open/syncd /var
hd3 jfs2 8 8 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 20 20 1 open/syncd /opt
hd11admin jfs2 8 8 1 open/syncd /admin
livedump jfs2 16 16 1 open/syncd /var/adm/ras/livedump

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-13. List all logical volumes by volume group

From the smit lv fast path, the List all Logical Volumes by Volume Group option uses lsvg -o to
find out the active volume groups, and then lsvg -il to list the logical volumes within them. The -i
option of lsvg reads the list of volume groups from standard input.
Let us end the LV section by showing how to mirror an entire VG.

© Copyright IBM Corp. 2009, 2024 9-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirroring volume groups


• Mirroring rootvg.
# smit mirrorvg # mirrorvg rootvg hdisk1
Mirror a Volume Group
Can be used to
Type or select values in entry fields. mirror any VG
Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name rootvg
Mirror sync mode [Foreground] +
PHYSICAL VOLUME names [hdisk1] +
Number of COPIES of each logical 2 +
partition
Keep Quorum Checking On? no +
Create Exact LV Mapping? no +

# bosboot -a -d /dev/hdisk1
Additional
# bootlist -m normal hdisk0 hdisk1 steps required
for rootvg

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-14. Mirroring volume groups

With the introduction of Storage Area Network (SAN) disk subsystems, mirroring rootvg is not
typically required any more, as most SAN systems provide the required level of redundancy and
availability. It is shown here as an example only.
The mirrorvg command takes all the logical volumes on a given volume group and mirrors those
logical volumes. This same functionality might also be accomplished manually if you run the
mklvcopy command for each individual logical volume in a volume group. As with mklvcopy, the
target physical drives to be mirrored with data, must already be members of the volume group.
When mirrorvg is run, the default behavior of the command requires that the synchronization of
the mirrors must complete before the command returns to the user. If you want to avoid the
delay, use the –S (background sync) or -s (disable sync) option. The default value of two copies
is always used.
If there are only two disks in the volume group to be mirrored, Keep Quorum Checking On should
be set to no. Otherwise, if a disk fails, the entire volume group would go offline.
Mirroring the data is one way to protect rootvg from failure and/or data loss. When mirroring
rootvg there are additional steps to perform:
• Create a boot image on the mirrored disk, by using bosboot command.
• Add the newly mirrored disk to the bootlist.
• Shut down and reboot the system.
Note, that prior to AIX version 6, a reboot was required after mirroring rootvg, running bosboot
and setting the new bootlist. For example, # shutdown –Fr (not required with AIX6 and later).
This is no longer required.

© Copyright IBM Corp. 2009, 2024 9-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
If your AIX system (rootvg) is not installed on SAN disk, but is instead using internal physical disk
(SAS, SSD, NVME) then it is often critical that rootvg is protected. In order to do this, in most
cases, it is mirrored.

© Copyright IBM Corp. 2009, 2024 9-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Viewing volume group information


# lsvg
rootvg
datavg
db2_vg

# lsvg –o
datavg
rootvg

# lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00f943f900004c000000018929b456cb
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1276 (20416 megabytes)
MAX LVs: 256 FREE PPs: 1276 (20416 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no
FS SYNC OPTION: no CRITICAL PVs: no
ENCRYPTION: yes
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-15. Viewing volume group information

The lsvg command, with no parameters, lists the volume groups in the system. If used with the –o
option, all volume groups that are active are displayed.
To view detailed information about the status and content of a particular volume group, use the
lsvg VG command.
The output provides status information about the volume group. Some of the information here is:
• Volume group state (VG STATE) - active or inactive/complete if all physical volumes are active
• Physical partition size (PP SIZE)
• Total number of physical partitions (TOTAL PPs)
• Number of free physical partitions (FREE PPs)

© Copyright IBM Corp. 2009, 2024 9-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Listing PVs in a VG and VG contents


# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 99 23 15..00..00..00..08
hdisk5 active 31 31 07..06..06..06..06

# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 2 2 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 15 15 1 open/syncd /
hd2 jfs2 177 177 1 open/syncd /usr
hd9var jfs2 26 26 1 open/syncd /var
hd3 jfs2 8 8 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 20 20 1 open/syncd /opt
hd11admin jfs2 8 8 1 open/syncd /admin
livedump jfs2 16 16 1 open/syncd /var/adm/ras/livedump

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-16. Listing PVs in a VG and VG contents

The lsvg -p Volumegroup command gives information about all of the physical volumes within
the volume group. The information given is:
• Physical volume name (PV_NAME)
• Physical volume state (PV STATE - active or inactive)
• Total number of physical partitions (TOTAL PPs)
• Number of free physical partitions (FREE PPs)
• How the free space is distributed across the disk (FREE DISTRIBUTION). Free distribution is
the number of physical partitions that are allocated within each section of the physical
volume: outer edge, outer middle, center, inner middle, and inner edge.
The lsvg -l Volumegroup command gives information about all of the logical volumes within the
volume group. The details given are:
• Logical volume name (LVNAME)
• Type of logical volume (TYPE, for example, file system, paging)
• Number of logical partitions (LPs)
• Number of physical partitions (PPs)
• Number of physical volumes (PVs)
• Logical volume state (LV STATE)
• Mount point (MOUNT POINT), if the logical volume contains a journaled file system
Can you see any any mirrored logical volumes in the example that is shown on the visual? The
answer is no because the number of PPs and the number of LPs are same for all LVs.

© Copyright IBM Corp. 2009, 2024 9-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
Now that you can create VGs, let us see how you can change a VG.

© Copyright IBM Corp. 2009, 2024 9-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Import and Export a Volume Group


# smit importvg # importvg –y datavg hdisk3

Import a Volume Group

[Entry Fields]
VOLUME GROUP name [datavg]
* PHYSICAL VOLUME name [hdisk3] +
Volume Group MAJOR NUMBER [] +#

# smit exportvg # exportvg datavg


Export a Volume Group

[Entry Fields]
* VOLUME GROUP name [datavg] +

Note:
The volume group must be inactive before it is exported.
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-17. Import and Export a Volume Group

Exporting a volume group


If you export the volume group from the current system using the exportvg command, this
removes all information about the volume group from the system. This is only a local system
operation to update the ODM; no data in the volume group is changed. To export a volume group,
it must be inactive first.
Importing a volume group
If you have a volume group on one or more external disks that you want to access on another
system, it must be imported to the system using the importvg command. Never attempt to import
volume group that is active (varied on) on another system.
Let us next look at how we work with the logical volumes, which are allocated out volume group
disk space.

© Copyright IBM Corp. 2009, 2024 9-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Documenting the disk storage setup


• List the volume groups:
ƒ # lsvg
• List the disks on the system (PVID and volume group):
ƒ # lspv
• List which logical volumes are contained in each volume group:
ƒ # lsvg -l vgname
• List the logical volumes on each disk:
ƒ # lspv -l pvname

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-18. Documenting the disk storage setup

It is important to have your storage information readily available in case you have a problem with
your system, or in the worst case, a system crashes. The commands in the visual help you to get
this information.
Let us now turn our attention to PVs.

© Copyright IBM Corp. 2009, 2024 9-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Physical volumes
• A disk must be configured as a physical volume before it can be assigned to a volume group
and used by the LVM.
• A physical volume can be a:
ƒ Hard disk
ƒ Virtual disk
ƒ Logical unit from a storage array
• The physical type of disk is transparent to the LVM.
• Use lspv to view the status of physical volumes:

# lspv
hdisk0 00066bf2564d966e rootvg active
hdisk1 00066bf2c28f6f9f datavg active
hdisk2 00066bf2c28f7023 datavg active
hdisk3 00066bf2c358bb27 db2_vg
hdisk4 00066bf2c35bc561 None

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-19. Physical volumes

Once a disk is configured on the system, the type of drive is transparent to LVM. It is simply a
storage space, available for use.
A disk must be designated as a physical volume and be put into an Available state before it can be
assigned to a volume group. A physical volume has certain configuration and identification
information written on it. This information includes a physical volume identifier (PVID) that is
unique to the disk. No two PVIDs can be the same on a system.
The lspv command with no parameters can be used to list the physical volume name, physical
volume identifier, the volume group for all physical volumes in the system, and if the volume
group is active.

© Copyright IBM Corp. 2009, 2024 9-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Physical partitions
• Smallest unit of contiguous storage space on a physical volume

• Physical partition size is the same for all physical volumes within a volume group

Physical Disk

...
Physical Partitions

...
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-20. Physical partitions

A physical partition is a fixed size, contiguous set of bytes on a physical volume.


All of the physical volumes in a volume group are divided into physical partitions. All the physical
partitions within a volume group are the same size, although different volume groups can have
different physical partition sizes.
The physical partition size is set at the time the volume group is created and cannot be changed.
The size is set in megabytes on power of two boundary (for example: 4 MB,8 MB, 16 MB, up to
1024 MB).
LVM creates the physical partition size of a new volume group to the smallest physical partition
size (equal or greater than 4 MB) which allows full addressing of the first disk defined in the
volume group given the selected maximum number of physical partitions per physical volume
(defaults to 1016 on AIX 7.2 and earlier and 32768 with AIX 7.3 scalable VGs).

© Copyright IBM Corp. 2009, 2024 9-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

SMIT Physical Volumes menu

# smit pv

Physical Volumes

Move cursor to desired item and press Enter.

List All Physical Volumes in System


Add a Disk
Change Characteristics of a Physical Volume
List Contents of a Physical Volume
Move Contents of a Physical Volume

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-21. SMIT Physical Volumes menu

This is the top-level menu for physical volumes.

© Copyright IBM Corp. 2009, 2024 9-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Viewing physical volume information


• List the attributes of a physical volume:
# lspv hdisk1
PHYSICAL VOLUME: hdisk1 VOLUME GROUP: datavg
PV IDENTIFIER: 00066bf2c28f6f9f VG IDENTIFIER
00066bf20000d90000000140c3585a49
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 479 (15328 megabytes) VG DESCRIPTORS: 2
FREE PPs: 479 (15328 megabytes) HOT SPARE: no
USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 96..96..95..96..96
USED DISTRIBUTION: 00..00..00..00..00
MIRROR POOL: None

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-22. Viewing physical volume information

The lspv PV command gives status information about a physical volume. Some of the
information is:
• PV STATE - Active or inactive
• STALE PARTITIONS - Number of physical partition copies that are stale (are not up to date
with other copies)
• TOTAL PPs - Total number of physical partitions
• FREE PPs - Number of free physical partitions
• FREE DISTRIBUTION - Distribution of free space on the physical volume
• USED DISTRIBUTION - Distribution of used space on the physical volume

© Copyright IBM Corp. 2009, 2024 9-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Physical volumes
• Volume group
• Physical volume (PV)
ƒ Hard disk, a virtual disk, or a LUN
• Physical partition (PP)
ƒ Smallest assignable unit of allocation on a physical disk
PV1 PV2

1 1 4
4
2 3 2 3
7 7 10
10 8
8 9 9
13 13 16
16 14
14 15 19 15
19 22 22
20 21 20 21
25 25 28
28 26 27
26 27 31
31 34 34
32 32 33
35 33 35
38 38
36 36 37
41 37 41 44
44 42 43
42 43 47
47 50 50
48 49 48 49

Working with the Logical Volume Manager Physical partitions © Copyright IBM Corporation 2024

Figure 9-23. Physical volumes

A physical partition is a fixed size, contiguous set of bytes, on a physical volume (PV).
Physical partitions (PP) must be the same size across an entire volume group. However, there can
be multiple volume groups on a single system, each with a different PP size.
The limitations for each type of volume group (original, big, and scalable) such as the number of
physical volumes and size of the physical partitions, was discussed early in this unit.
Let us look at what we can do with physical volumes through SMIT.

© Copyright IBM Corp. 2009, 2024 9-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

List logical volumes on a physical volume

# lspv -l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd2 35 35 00..00..03..20..12 /usr
hd9var 5 5 00..05..00..00..00 /var
hd8 1 1 00..00..01..00..00 N/A
hd4 15 15 00..00..15..00..00 /
hd5 1 1 01..00..00..00..00 N/A
hd6 8 8 00..08..00..00..00 N/A
hd10opt 4 4 04..00..00..00..00 /opt
hd3 3 3 00..03..00..00..00 /tmp
hd1 1 1 00..01..00..00..00 /home
hd11admin 2 2 00..02..00..00..00 /admin
fslv00 2 2 02..00..00..00..00 /db2
loglv00 1 1 00..01..00..00..00 N/A

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-24. List logical volumes on a physical volume

The lspv -l pvname command lists all the logical volumes on a physical volume including the
number of logical partitions, physical partitions, and the distribution of the physical partitions on
the disk.
Let us see how we can list a physical volume partition map.

© Copyright IBM Corp. 2009, 2024 9-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Move contents of physical volumes


• The migratepv command moves physical partitions and the data they contain from one
physical volume to one or more other physical volumes.
• The basic syntax is:
ƒ migratepv [–l LV] SourcePV [DestPV..]
• Examples:
ƒ Move the contents of hdisk1 to hdisk2 and hdisk3:
í # migratepv hdisk1 hdisk2 hdisk3

hdisk1 hdisk2 hdisk3

ƒ Move the physical partitions belonging to lv00 from hdisk1 to hdisk2:


í # migratepv –l lv00 hdisk1 hdisk2

lv00 lv00
hdisk1 hdisk2
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-25. Move contents of physical volumes

The migratepv command can be used to move all physical partitions, or physical partitions from a
selected logical volume, from one physical volume to one or more other physical volumes in the
same volume group. This would be used if the physical volume is about to be taken out of service
and removed from the machine or to balance disk usage.
The allocation of the new physical partitions follows the policies defined for the logical volumes
that contain the physical partitions being moved.
To limit the transfer to specific physical volumes, use the names of one or more physical volumes
in the DestPV parameter. Otherwise, all the physical volumes in the volume group are available for
the transfer. All physical volumes must be within the same volume group (including the
destination physical volume(s). The specified source physical volume cannot be included in the
list of DestPV parameters.

© Copyright IBM Corp. 2009, 2024 9-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Logical volumes and logical partitions


Volume Group LOGICAL VOLUME
logical
logical
logical
volumes LP1 LP2 LP3
volumes
logical
volumes
volumes

physical
physical PP20
physical
disks
physical
PP42 PP52
disks
physical
disks
disks
volumes
PHYSICAL VOLUME PHYSICAL VOLUME

STRIPED LOGICAL VOLUME MIRRORED LOGICAL VOLUME

123456 LP1 LP1 LP2

PP1 PP1 PP20


PP22 PP2 PP3
PHYSICAL VOLUME PHYSICAL VOLUME PHYSICAL VOLUME PHYSICAL VOLUME

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-26. Logical volumes and logical partitions

Within each volume group, one or more logical volumes are defined. Logical volumes are groups of
information located on physical volumes. Data on logical volumes appears to be contiguous to the
user, but can be non-contiguous on the physical volume, or can even be located on several
physical volumes.
Each logical volume consists of one or more logical partitions. Logical partitions are the same size
as the physical partitions within a volume group. There is a one-to-one mapping of the physical to
logical partitions except when the logical volume is mirrored. If the logical volume is mirrored,
then there will be two or three physical partitions mapped to each logical partition. Although the
logical partitions are numbered consecutively, the underlying physical partitions are not
necessarily consecutive or contiguous. This allows file systems, paging space, and other logical
volumes to be resized or relocated, to span multiple physical volumes, and to have their contents
replicated for greater flexibility and availability in the storage of data.
Striping is a technique for spreading a logical volume across several disk drives in such a way that
the I/O capacity of the disk drives can be used in parallel to access data.

© Copyright IBM Corp. 2009, 2024 9-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

SMIT Logical Volumes menu

# smit lv
Logical Volumes

Move cursor to desired item and press Enter.

List All Logical Volumes by Volume Group


Add a Logical Volume
Set Characteristic of a Logical Volume
Show Characteristics of a Logical Volume
Remove a Logical Volume
Copy a Logical Volume

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-27. SMIT Logical Volumes menu

This is the top-level SMIT menu for logical volumes. The next few pages discuss these items.

© Copyright IBM Corp. 2009, 2024 9-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Uses of logical volumes


• A logical volume may contain one of the following:
ƒ Journaled (JFS) or enhanced journaled file system (JFS2)
ƒ Journal log
ƒ Paging space
ƒ Boot logical volume
ƒ Dump device
ƒ Application data (raw logical volume)
# lsvg –l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 3 3 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 2 2 1 open/syncd /
hd2 jfs2 13 13 1 open/syncd /usr
hd9var jfs2 1 1 1 open/syncd /var
hd3 jfs2 1 1 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 1 1 1 open/syncd /opt
hd11admin jfs2 1 1 1 open/syncd /admin
lg_dumplv sysdump 8 8 1 open/syncd N/A
livedump jfs2 2 2 1 open/syncd /var/adm/ras/livedump
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-28. Uses of logical volumes

Logical volumes can serve a number of different purposes, such as paging, file system storage or
raw data storage. However, each logical volume can only serve a single purpose.
The example in the visual shows the default logical volumes on rootvg created by the installation
process.

© Copyright IBM Corp. 2009, 2024 9-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating a logical volume


• A logical volume can be created with the mklv command or SMIT.
• The mklv command syntax is:
í # mklv [flags] VG LV–size [PV(s)]
• The logical volume size can be specified as:
ƒ Number of logical partitions
íThe logical partition size is the same as the physical partition size.
ƒ Number of 512 blocks (B/b), KB (K/k), MB (M/m) or GB (G/g)
í Will be rounded up to the nearest number of logical partitions needed
• If you specify one or more physical volumes with the PV parameter:
ƒ Only those physical volumes are available for allocating physical partitions
ƒ Otherwise, all the physical volumes within the volume group are available
• The –t flag specifies the type of logical volume to create (jfs2 is the default with AIX 7.3 and
jfs with AIX 7.2 and earlier).

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-29. Creating a logical volume

The mklv command creates a logical volume. The name of the logical volume can be specified, or
a system-generated name is used. The volume group to create the logical volume in and the size
must be specified. Other characteristics that can be set are the allocation policy, copies
(mirroring), mirror scheduling policy, and striping.
If you specify one or more physical volumes when creating the logical volume, only those physical
volumes are available for allocating physical partitions. To create a logical volume that is not
restricted to certain physical volumes, simply do not specify any physical volumes on the
command line.

© Copyright IBM Corp. 2009, 2024 9-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating a logical volume with SMIT


# smit mklv Add a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Logical volume NAME [mylv]
* VOLUME GROUP name datavg
* Number of LOGICAL PARTITIONS [3] #
PHYSICAL VOLUME names [] +
Logical volume TYPE [] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [] #
to use for allocation
Number of COPIES of each logical 1 +
partition
Mirror Write Consistency? active +
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
RELOCATE the logical volume during yes +
reorganization?
Logical volume LABEL []
MAXIMUM NUMBER of LOGICAL PARTITIONS [512] #
Enable BAD BLOCK relocation? yes +
SCHEDULING POLICY for writing/reading parallel +
logical partition copies
Enable WRITE VERIFY? no +
File containing ALLOCATION MAP []
Stripe Size? [Not Striped] +
Serialize IO? no +
Mirror Pool for First Copy +
Mirror Pool for Second Copy +
Mirror Pool for Third Copy +
Infinite Retry Option no +
Enable Logical Volume Encryption? no
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-30. Creating a logical volume with SMIT

This is the SMIT panel for creating a logical volume.

© Copyright IBM Corp. 2009, 2024 9-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Logical volume placement


• Intra-physical volume allocation policy (mklv –a flag):
Middle (m) Center (c)

Inner-middle (im)

Edge (e)

Inner-edge (ie)

• Inter-physical volume allocation policy:


ƒ Minimum (default) (mklv –e m flag)
í For one logical volume copy
One physical volume should contain all physical partitions
í For two or three logical volume copies
Use as many physical volumes as copies
ƒ Maximum (mklv –e x flag)
í Physical partitions should be spread over as many physical volumes as possible
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-31. Logical volume placement

When creating or changing a logical volume you can define the way the LVM decides which
physical partitions to allocate to the logical volume.
The intra-physical volume allocation policy choices are based on the five regions of a disk platter
where physical partitions can be located.
The inter-physical volume allocation policy defines whether to use the minimum or maximum
number of disks for the logical volume. If the minimum inter-physical volume setting is selected
(the default), the physical partitions assigned to the logical volume are located on a single disk to
enhance availability. If you select the maximum inter-physical volume setting (range =
maximum), the physical partitions are located on multiple disks to enhance performance.

© Copyright IBM Corp. 2009, 2024 9-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Changing the characteristics of a logical volume


# smit chlv Change a Logical Volume

Change a Logical Volume * Logical volume NAME mylv


Logical volume TYPE [jfs2] +
Change a Logical Volume POSITION on physical volume middle +
Rename a Logical Volume RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [1024] #
to use for allocation
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
RELOCATE the logical volume during yes +
reorganization?
Logical volume LABEL [None]
MAXIMUM NUMBER of LOGICAL PARTITIONS [512] #
SCHEDULING POLICY for writing/reading parallel +
logical partition copies
OR PERMISSIONS
Enable BAD BLOCK relocation?
read/write
yes
+
+
Enable WRITE VERIFY? no +
Mirror Write Consistency? passive +
# chlv flags LV Serialize IO? no +
Mirror Pool for First Copy +
Mirror Pool for Second Copy +
Mirror Pool for Third Copy +
Infinite Retry Option no +

Rename a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* CURRENT logical volume name [] +
* NEW logical volume name []

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-32. Changing the characteristics of a logical volume

The chlv command or smit chlv fastpath allows you to change characteristics of logical
volumes.
Some of the chlv flags are:
• -a positionChanges the intra-physical volume allocation policy. The position can be e, m, c,
im, or ie.
• -e rangeChanges the inter-physical volume allocation policy. The range can be m (for
minimum) or x (for maximum).
• -n newlogicalvolumeChanges the name of the logical volume to that specified by the
newlogicalvolume variable.
• -t typeChanges the logical volume type.
• -u upperboundSets the maximum number of physical volumes to use.
• -x maximumSets the maximum number of logical partitions that can be allocated to the
logical volume.

© Copyright IBM Corp. 2009, 2024 9-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Reorganize logical volumes in a volume group


• The reorgvg command reorganizes the placement of allocated physical partitions within the
volume group, according to the allocation characteristics of each logical volume.
• Example:

hdisk3 hdisk4
datavg

1 2 3 4
empty
5 6 7 8

ƒ # chlv –e x mylv (set to maximum number of disks)


ƒ # reorgvg datavg mylv

hdisk3 hdisk4
datavg

1 3 5 7 2 4 6 8

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-33. Reorganize logical volumes in a volume group

The inter-physical volume allocation policy defines whether to use the minimum or maximum
number of disks for the logical volume. If it is changed after the logical volume is created, the
physical partitions are not relocated automatically. The reorgvg command is used to redistribute
the physical partitions of the logical volumes of a volume group according to their preferred
allocation policies. Preference is given in the order listed on the command line.
The syntax is: reorgvg VG [LV(s)]
If you don’t specify a logical volume with the reorgvg command, the entire volume group is
reorganized.
Using SMIT, no other arguments can be supplied. The entire volume group is reorganized.

© Copyright IBM Corp. 2009, 2024 9-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Increasing the size of a logical volume


• The size of a logical volume can be increased with the extendlv command or SMIT.
• The extendlv command syntax is:
ƒ # extendlv [flags] LV amount–to–add [PV]
• The amount–to–add is the additional space you want to add to the logical volume and can
be specified as:
ƒ Number of logical partitions
íThe logical partition size is the same as the physical partition size
ƒ Number of 512 blocks (B/b), KB (K/k), MB (M/m) or GB (G/g)
í Will be rounded up to the nearest number of logical partitions needed
• To limit the allocation to specific physical volumes, use the names of one or more physical
volumes in the PV parameter.

.
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-34. Increasing the size of a logical volume

The extendlv command increases the number of logical partitions allocated to the logical volume,
by allocating the number of additional logical partitions represented by the amount-to-add
parameter. The LV parameter can be a logical volume name or a logical volume ID. To limit the
allocation to specific physical volumes, use the names of one or more physical volumes in the PV
parameter. Otherwise, all the physical volumes in a volume group are available for allocating new
physical partitions.
The default maximum number of logical partitions for a logical volume is 512. Before extending a
logical volume to more than 512 logical partitions, use the chlv -x # command to increase the
default value.
LVM tries to follow the allocation policies of the logical volume when it assigns physical partitions
to the logical volume.

© Copyright IBM Corp. 2009, 2024 9-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Increasing the size of a logical volume with SMIT


# smit extendlv
Increase the Size of a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* LOGICAL VOLUME name mylv
* Number of ADDITIONAL logical partitions [5] #
PHYSICAL VOLUME names [] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [1024] #
to use for allocation
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
File containing ALLOCATION MAP []

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-35. Increasing the size of a logical volume with SMIT

This is the SMIT panel for increasing the size of a logical volume.

© Copyright IBM Corp. 2009, 2024 9-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Renaming a Logical Volume

# smit chlv # chlv -n datalv1 datalv

Rename a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* CURRENT logical volume name [datalv] +
* NEW logical volume name [datalv1]

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-36. Renaming a Logical Volume

To Change the Name of a Logical Volume


# chlv -n newlogicalvolume logicalvolume
Note:
1. Changing the name of a log logical volume requires that you run the chfs -a log=LVName on
each file system using that lo
2. If the logical volume has a file system mounted, the file system is automatically updated with
the new logical volume name only if it is a JFS2 file system. For all other file system types, the
user have to run unmount and mount options after the completion of the chlv command to
update the filesystem with the new logical volume name.
3. Bad block relocation policy of a logical volume is not supported on a volume group that is
created with 4 KB block physical volumes.

© Copyright IBM Corp. 2009, 2024 9-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Removing a logical volume


• A logical volume can be removed with the rmlv command or SMIT.
• The rmlv command syntax is:
ƒ # rmlv LV
• The logical volume must be closed before it can be removed.
• All data in the logical volume will be destroyed.
ƒ # smit rmlv
Remove a Logical Volume

[Entry Fields]
LOGICAL VOLUME name [mylv] +

+--------------------------------------------------------------------------+
| ARE YOU SURE? |
| |
| Continuing may delete information you may want |
| to keep. This is your last chance to stop |
| before continuing. |
| Press Enter to continue. |
| Press Cancel to return to the application. |
+--------------------------------------------------------------------------+

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-37. Removing a logical volume

The rmlv command removes logical volumes, and in the process, destroys all the links to the data.
The LV parameter can be a logical volume name or logical volume ID. The logical volume first must
be closed. For example, if the logical volume contains a file system, it must be unmounted.

© Copyright IBM Corp. 2009, 2024 9-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Topic 1 objectives
• Explain how to work with the Logical Volume Manager
• Describe essential LVM concepts, such as mirroring and striping
• Describe Logical Volume Encryption

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-38. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 9-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirrored logical volumes


• A logical volume is mirrored when each logical partition maps to two or three physical partitions.
• By default, no logical partition copy can share the same physical volume (strictness allocation policy).
• A logical volume can be mirrored:
ƒ When it is created, with the command
í # mklv –c #–of–copies VG lv–size [PV]
ƒ After it has been created, with the command
í # mklvcopy LV #–of–copies [PV]
í OR
í with smit mklvcopy
MIRRORED LOGICAL VOLUME

• To mirror all the logical volumes in a volume group, LP1 LP2


use the command:
í # mirrorvg –c #–of–copies VG
• To remove a mirror copy, use:
í # rmlvcopy LV #–of–copies [PV]
PP20 PP22 PP2 PP3
í OR PHYSICAL VOLUME
PHYSICAL VOLUME
í with smit rmlvcopy
Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-39. Mirrored logical volumes

Mirroring of data over multiple drives protects against a potential hardware failure. By default,
each physical partition is mapped to a logical partition. When you mirror data, the ratio becomes
one logical partition to two physical partitions for a two-way mirror. Or one logical partition to
three physical partitions for a three-way mirror. The AIX mirror function does not apply to a
physical disk, only to logical volumes.
The mklvcopy command is used to have up to three copies to a logical volume. This only succeeds
if there are enough physical partitions to satisfy the requirements on the physical volumes that
are specified to be used. That is, if all copies need to be on different physical volumes. Also, in
order for the copies to match, the logical volume has to be synchronized using the syncvg
command. This can be done with the mklvcopy -k option when the copy is originally started. It
can also be done later, using the syncvg command.
The rmlvcopy command is used to reduce the total number of copies for a logical volume. Specify
the total number wanted. The rmlvcopy command allows you to specify which disk to remove the
copy from.

© Copyright IBM Corp. 2009, 2024 9-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Striped logical volumes


• Striped logical volumes have data spread across disks in such a way that I/O can occur in
parallel.
• Each logical partition is divided into chunks called the stripe size.
ƒ Use the mklv –S stripe–size flag.
• The stripe width is the number of disks to stripe across.
ƒ Use the mklv –C stripe–width flag.
LOGICAL VOLUME: stripelv

LP1 LP2 LP3 LP4 LP5 LP6 ...


1- 1- 1- 1- 2- 2- 2- 2- 3- 3- 3- 3- 4- 4- 4- 4- 5- 5- 5- 5- 6- 6- 6- 6-
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3

hdisk14 hdisk15 hdisk16 hdisk17


1st I/O 3rd I/O
Working with the Logical Volume Manager 2nd I/O 4th I/O © Copyright IBM Corporation 2024

Figure 9-40. Striped logical volumes

The striping mechanism is a technology that was developed to achieve I/O performance gain. The
basic concept of striping is that in the write phase, each logical partition is chopped into small
pieces (called stripe units, or chunks) and these chunks are written to separate physical volumes
in parallel. In the read phase, these chunks are read from those separate physical volumes in
parallel and re-assembled into the actual data.
The size of the stripe unit is specified at creation time. The stripe size can range from 4 KB to128
MB in powers of two.

© Copyright IBM Corp. 2009, 2024 9-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirrored and striped logical volumes


• Striping and mirroring a logical volume allows redundant storage for very high-performance
access.
• Requires additional disks:
ƒ Twice the number of disks for a mirror with two copies
ƒ Three times the number of disks for three copies
• By default, partitions allocated for one lv00
LP1 LP2
mirror cannot share a physical volume
1-1 1-2 2-1 2-2
with the partitions from another mirror
(superstrict allocation policy). hdisk1 hdisk2
PP20
PP2

hdisk3 hdisk4
PP20
PP2

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-41. Mirrored and striped logical volumes

AIX allows striping and mirroring together on the same logical volume. This feature provides a
convenient mechanism for high-performance redundant storage. Striping with mirroring improves
availability and performance. The disadvantage is the cost of additional hardware.

© Copyright IBM Corp. 2009, 2024 9-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirroring, allocation
• When mirroring, it is essential that all PP copies are stored on different disks.
• This setting is controlled by the Allocation policy.
ƒ This is also referred to as strictness.
• Allocation can be set to:
ƒ No: This is not recommended.
ƒ Yes (default): This ensures that no LP copies can share the same PV.
ƒ Superstrict: Ensures that a given PV does not have a mixture of primary and secondary copies, in
addition to strictness.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-42. Mirroring, allocation

When mirroring data, it is essential that all PP copies are stored on different disks. The placement
of PP is governed by the allocation policy, which by default is set to strict. Strict policy ensures
that all mirrored copies are placed on different disks. However, under LVM RAID 0 +1
configurations, strict policy can lead to situations where mirrored copies of the data are on the
same disk. To protect against this, the system automatically sets the allocation policy to
superstrict. Also, using an initial non-mirrored allocation with the inter-policy set to spread the
allocations over multiple disks (the so called poor man’s striping) can result in a non-superstrict
situation when mirroring is implemented. When implementing the LVM snapshot VG, the mirroring
must be superstrict.
Let us look at another way of allocating logical volumes on more than one physical volume:
striping.

© Copyright IBM Corp. 2009, 2024 9-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirror pools
• Mirror pools simplify the task of isolating a logical volume copy to a specific group of physical
volumes.

hdisk0
PP1
First copy PP3
on PoolA
hdisk1
PP2
lv00
PP4 LP1
LP2
LP3
hdisk2
hdisk2
2 LP4
PP1
PP3
Second copy
on PoolB hdisk3
PoolB hdisks PP2
should be on a PP4
remote storage
server!

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-43. Mirror pools

This visual shows an example of RAID 10, a combination of RAID 1 + 0. Mirroring of data over
multiple drives protects against a potential hardware failure. Copies of LP1 are on hdisk0 and
hdisk2, and copies of LP2 are on hdisk1 and hdisk3. Physically, hdisk0/hdisk1 and
hdisk2/hdisk3 are placed on different SAN storage servers. Now, let‘s imagine that lv00 is placed
to more than four hdisks and we need to be sure that all copies are placed on different storage
servers. Also consider that we need to increase the size of lv00 and that we are required to attach
more hdisks to our system. Proper PP distribution is not an easy task in this situation. Mirror pools
simplify the task of mirroring data over multiple drives.
Mirror pool requirements and restrictions:
• A mirror pool is made up of one or more physical volumes (hdisk).
• Each physical volume can belong to only one mirror pool.
• Mirror pools are only available for scalable volume groups.
• rootvg cannot be assigned to mirror pools (rootvg cannot be a scalable volume group).
• Mirror pools are available in AIX 7.1 and AIX V6.1 TL 2 and up.
• After assigning PVs (physical volumes) to a mirror pool, the volume group can no longer be
imported to a previous version of AIX that does not support mirror pools.
• Any changes to mirror pool characteristics do not affect physical partitions that are allocated
before the changes were made. The reorgvg command should be used after mirror pool
changes are made to move the allocated physical partitions to conform to the mirror pool
restrictions.
No additional commands for mirror pools have been added to AIX. Instead, the existing AIX LVM
commands have been extended to incorporate the mirror pool functionality. Following are some
examples of mirror pool enhanced AIX LVM commands.

© Copyright IBM Corp. 2009, 2024 9-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
To create a mirror pool with the defined list of disk (disks should be part of a volume group):
# chpv –p <mirror_pool_name> <hdisk list>
To create a logical volume in the given mirror pools:
# mklv -c 2 -p copy1=PoolA -p copy2=PoolB datavg 10
To list mirror pools that are defined in volume group:
# lsmp datavg
The example in the visual shows PoolA and PoolB. PoolB hdisks should be on a remote (different)
storage server in this mirror pool configuration.
Let us see how logical volumes are allocated on a physical volume.

© Copyright IBM Corp. 2009, 2024 9-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirroring scheduling policy


• Scheduling policies when mirroring:
ƒ Parallel (default)
í Write operations on different physical partitions start at the same time.
í When the longest write finishes, the write operation is complete.
í Improves performance (especially RAID-Performance)
Parallel write/sequential read
> Primary copy is read first, If unsuccessful, the next copy is used.
Parallel write/round robin read
> Round-robin reads alternate disks between copies.

ƒ Sequential
í Second physical write operation is not started unless the first operation has completed successfully.
í In case of a total disk failure, there is always a “good copy”.
í Increased availability, but decreases performance

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-44. Mirroring scheduling policy

Scheduling policies
The scheduling policy determines how reads and writes are conducted to a mirrored logical
volume. LVM offers several scheduling policies for mirrored volumes to control how data is written
and read from the copies.
Parallel write
Parallel mirroring simultaneously starts the write operation for all the physical partitions in a
logical partition. When the write operation to the physical partition that takes the longest to
complete finishes, the write operation is completed.
Sequential write
Sequential mirroring writes to multiple copies or mirrors in order. The multiple physical partitions
representing the mirrored copies of a single logical partition are designated primary, secondary,
and tertiary. In sequential scheduling, the physical partitions are written to in sequence. The
system waits for the write operation for one physical partition to complete before starting the
write operation for the next one. When all write operations have been completed for all mirrors,
the write operation is complete.
Parallel read
On each read, the system checks whether the primary is busy. If it is not busy, the read is initiated
on the primary. If the primary is busy, the system checks the secondary, and then the tertiary. If
those are also busy, the read is initiated in the copy with the least number of outstanding I/Os.
Sequential read
When a sequential read is specified, the primary copy of the read is always read first. If that read
operation is unsuccessful, the next copy is read. During the read retry operation on the next copy,

© Copyright IBM Corp. 2009, 2024 9-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
the failed primary copy is corrected by LVM with a hardware relocation. This patches the bad
block for future access.
Round-robin read
Round-robin reads alternate between copies. This results in equal utilization for reads, even when
there is more than one I/O outstanding.
Which is right for me?
Each of the scheduling policies provides benefits, as well as drawbacks. When deciding on a
method of mirroring, you need to consider how critical the data is and performance. The trade off
is performance, versus availability. In general, a mirrored logical volume is slower than an
unmirrored logical volume because you must write the data in two or three places. The exception
can be a mirrored LV in a high-read environment. If your application does mostly reads, and you
are using parallel or parallel/round robin scheduling, reads might complete faster because the
I/Os are spread across multiple disks, which can occur simultaneously if the disks are on separate
controllers. One of the parallel scheduling policies usually provides the best performance in a
write intensive environment because writes can proceed in parallel. However, there is some
additional overhead, and mirrored logical volumes are usually slower than comparable
unmirrored logical volumes in a write intensive environment. Sequential scheduling provides the
worst performance, but provides the best chance of recovering data in the event of a system crash
in the middle of a write operation. Sequential scheduling makes it more likely that you have at
least one good copy, the primary copy, of a logical partition after a crash.
Synchronization
When turning on mirroring for an existing logical volume, the copies must be synchronized so the
new copy contains a perfect image of the existing copy, at that point in time. This can be done by
using the -k option on the mklvcopy command at the time mirroring is turned on, or with the
syncvg command at a later time. Until the copies are synchronized, the new copy is marked stale.
Let us look at possible problems that might occur during mirror writing and their solutions.

© Copyright IBM Corp. 2009, 2024 9-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Mirror write consistency


• Problem: If the system crashes before the write to all mirrors is complete, the mirrors are in an
inconsistent state, and the system must distinguish between the old copy and the new copy.
Solution: Mirror write consistency
ƒ Ensures PPs are consistent after reboot
ƒ Three modes: off, active, and passive
ƒ Active (default)
í Uses a cache on disk
í The physical write operation proceeds when the cache has been updated.
ƒ Passive (Big VGs only)
í Logging of LV updates, but does not log writes
í If the system crashes on reboot, a forced synchronization of the LVs takes place.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-45. Mirror write consistency

The LVM always ensures data consistency among mirrored copies of a logical volume during
normal I/O processing.
For every write to a logical volume, the LVM generates a write request for every mirror copy. A
problem arises if the system crashes in the middle of processing a mirrored write, and before all
copies are written. If mirror write consistency recovery is requested for a logical volume, the LVM
keeps additional information to allow recovery of these inconsistent mirrors. Mirror write
consistency recovery should be performed for most mirrored logical volumes. Logical volumes,
such as the paging space that does not use the existing data when the volume group is varied-on,
do not need this protection.
The Mirror Write Consistency (MWC) record consists of one sector. It identifies which logical
partitions might be inconsistent if the system is not shut down correctly. When the volume group
is varied back online, this information is used to make the logical partitions consistent again. Note:
With Mirror Write Consistency LVs, because the MWC control sector is on the edge of the disk,
performance can be improved if the mirrored logical volume is also on the edge.
Beginning in AIX 5.1, a mirror write consistency option that is called Passive Mirror Write
Consistency is available. The default mechanism for ensuring mirror write consistency is Active
MWC. Active MWC provides fast recovery at reboot time after a crash has occurred. However, this
benefit comes at the expense of write performance degradation, particularly in the case of
random writes. Disabling Active MWC eliminates this write-performance penalty, but upon reboot
after a crash, you must use the syncvg -f command to manually synchronize the entire volume
group before users can access the volume group. To achieve this, automatic vary-on of volume
groups must be disabled.
Enabling Passive MWC not only eliminates the write-performance penalty that is associated with
Active MWC, but logical volumes are automatically resynchronized as the partitions are being
accessed. This means that the administrator does not have to synchronize logical volumes

© Copyright IBM Corp. 2009, 2024 9-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
manually or disable automatic vary-on. The disadvantage of Passive MWC is that slower read
operations can occur until all the partitions have been resynchronized.
You can select either mirror write consistency option within SMIT, when creating or changing a
logical volume. The selection option takes effect only when the logical volume is mirrored (copies
> 1).

© Copyright IBM Corp. 2009, 2024 9-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

LVM options which affect performance


• Inter- and intra-policy
ƒ Logical volume placement on disk
• Scheduling policy
ƒ Dictates how data is read/written for mirrored LVs
• Mirror write consistency
ƒ Ensures mirrored PPs are consistent
• Write verify
ƒ Verifies all writes with a read operation
ƒ Default is no. Generally it is not recommended to set to yes as it impacts system (write) performance.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-46. LVM options which affect performance

The visual highlights key LVM options that affect performance. We will not go into much detail
here as most environments have systems where the high disk activity is to a data caching storage
(SAN) subsystem. In which case most AIX systems should just keep all of the defaults. Students
who want more detail can refer to the notes below.
• Introduction
In most cases, the LVM options that are discussed do not need to be changed from the default
and if they are, the points that are made in the visual are sufficient. The details that are
provided below are beyond the scope of this course, but are provided for those who enjoy the
technical details. It is suggested that you attend the AIX Performance course for a complete
training on all aspects of AIX performance.
• Intra- and inter-policies
Intra-physical volume allocation policy specifies which band on the physical volume is
preferred. The intra-policies have no effect when used in SAN environments, in which LUNs
are in RAID configurations. But for local disks with no hardware RAID, the policy can affect
performance. The default of middle is a compromise. For older, smaller disks the center is
optimal. For newer, larger disks the outer edge is a better location.
Inter-physical volume allocation policies control how many disks we spread the data across. A
value of minimum is the default. If possible, it places all the data on one disk. For availability, a
single disk is safer than multiple (without managing them as an array that uses RAID). If LVM
mirroring is being used with strictness (guarantees copies are on different disks), then it tries
to have only one disk for each copy. A value of maximum tries to spread PPs over as many PVs
as possible.
• Scheduling policies when using LVM mirroring

© Copyright IBM Corp. 2009, 2024 9-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
▪ Parallel (default):
- Write operations on copies all start at the same time.
- When longest write finishes, the write operation is complete.
- Read operations use the disk with the shortest request queue.
- Improves performance but in a system crash, where only one copy was written, we do
not know which copy was completed. When resynchronizing the copies, the primary
(source for resync) can be either the old or new version of the data.
- Variations on read scheduling (with parallel write):
○ Parallel write/sequential read: Primary copy is read first. If unsuccessful, the next
copy is used.
○ Parallel write/round-robin read: Round-robin reads alternate disks between
copies.
▪ Sequential:
- Writes to primary copy first, then secondary copy, and then last copy.
- Waits for each write to complete (of fail) before writing next copy.
- Primary copy is read first. Other copies are accessed if primary fails.
- In system crash – primary copy has latest data version.
- Primary copy is source for re-syncing other copies.
- Improves predictability in a system crash because we know that, if the data being
written during crash was completed anywhere, it was the primary copy. A
synchronization of the copies uses that primary copy. On the other hand, it decreases
performance.
• Mirror write consistency
Unless you plan to recovery from backup or run a forced synchronization of the mirror copies
after every system crash, you need to have some form of mirror write consistency (MWC)
enabled. For LUNs on data caching disk arrays, the default of active works well.
If the system crashes before a write to all mirrors is complete, the mirrors are in an
inconsistent state. One copy would have the old data and another copy would have the new
data. In a system crash, there is no opportunity to mark partitions as stale and a normal
synchronization synchronizes only the partitions that are marked as stale. The result is that,
without MWC, a series of queries for the same data can get different answers (inconsistent).
MWC ensures that a resynchronization (of the data that was being written at the time of the
crash) occurs immediately after the system boots backup.
Note that MWC does not guarantee what version of the data is the final version; it can be either
the old or the new version. It only ensures that all copies have the same data.
There are three modes for MWC: off, active, and passive.
▪ Active (default):

© Copyright IBM Corp. 2009, 2024 9-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
Uses an MWC cache on the outer edge of the disk to identify what logical track groups
(LTG) on the disk are being written to. After a system crash, this information is used to
selectively resynchronize on the data in those active LTGs.
The performance problem is when the location of the data being written is not near the
MWC cache. On a physical disk (versus a LUN on an array with data caching), this results in
a lot of arm movement that significantly impacts performance. Thus, mirrored logical
volumes on physical disks should be placed on the outer edge, when using active MWC.
For LUNs on disk arrays that provide data caching there is no significant performance cost
(just a little added Fibre Channel I/O).
▪ Passive. (Big VG only)
Passive MWC does not record the LTGs of the active writes and thus does not incur the
performance penalty of active MWC. Instead, it just keeps track of whether the logical
volume was properly closed. At reboot, if the logical volume had not been properly closed,
the system knows that there must have been a system crash. In that situation, it initiates a
force resynchronization of the entire logical volume in the background. Because the
resynchronization is not selective, the overhead in recovering from a system crash is
greater than when using active MWC. But we hope that recovering from a crash is an
unusual situation.
• Write verify
This option is off by default. Most facilities trust the storage device enough to accept the
default. If you do not trust the storage device to correctly record the data, then you can use
write verify to validate that it was written correctly by immediately reading the data back in to
compare with the memory copy of the data just written. On a physical disk, this incurs a
penalty of one rotation to come back to the data, plus extra I/O overhead. On a data caching
storage array, there is no rotational delay, but there is also no benefit. In that case, you are
reading only from the storage array’s own data cache (it might not have even been written to a
disk in the array at that point).
Let us first look at mirroring.

© Copyright IBM Corp. 2009, 2024 9-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Show all logical volumes in a volume group

# lsvg –l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 2 2 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 2 2 1 open/syncd /
hd2 jfs2 13 13 1 open/syncd /usr
hd9var jfs2 2 2 1 open/syncd /var
hd3 jfs2 1 1 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 2 2 1 open/syncd /opt
hd11admin jfs2 1 1 1 open/syncd /admin
lg_dumplv sysdump 4 4 1 open/syncd N/A
livedump jfs2 1 1 1 open/syncd /var/adm/ras/livedump

# lsvg –l datavg
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
mylv jfs 8 8 2 closed/syncd N/A

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-47. Show all logical volumes in a volume group

The lsvg -l VG command gives information about all of the logical volumes in the volume group.
The details given are:
• Logical volume name (LV NAME)
• Type of logical volume (TYPE)
• Number of logical partitions (LPs)
• Number of physical partitions (PPs)
• Number of physical volumes (PVs)
• Logical volume state (LV STATE)
• Mount point (MOUNT POINT), if the logical volume contains a file system

© Copyright IBM Corp. 2009, 2024 9-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Show logical volume characteristics


# lslv mylv
LOGICAL VOLUME: mylv VOLUME GROUP: datavg
LV IDENTIFIER: 00066bf20000d90000000140ebb8c814.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 32 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 8 PPs: 8
STALE PPs: 0 BB POLICY: relocatable
INTER–POLICY: maximum RELOCATABLE: yes
INTRA–POLICY: middle UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no

# lslv –l mylv
mylv:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk1 004:000:000 100% 000:004:000:000:000
hdisk2 004:000:000 100% 000:004:000:000:000

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-48. Show logical volume characteristics

To list the characteristics of a logical volume use the command: lslv LV


The –l flag lists the following fields for each physical volume in the logical volume:
• PV: Physical volume name
• COPIES:
▪ The number of logical partitions containing at least one physical partition on the physical
volume
▪ The number of logical partitions containing at least two physical partitions on the physical
volume
▪ The number of logical partitions containing three physical partitions on the physical
volume
• IN BAND: The percentage of PPs on the physical volume that belong to the logical volume,
and were allocated within the area specified by intra-physical allocation policy
• DISTRIBUTION: The number of PPs allocated within each area of the physical volume (outer
edge, outer middle, center, inner middle, and inner edge) of the physical volume

© Copyright IBM Corp. 2009, 2024 9-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Show LP to PP relationship on physical volumes


• A single copy logical volume:
# lslv –m mylv
mylv:N/A
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0097 hdisk1
0002 0097 hdisk2
0003 0098 hdisk1
0004 0098 hdisk2
0005 0099 hdisk1
0006 0099 hdisk2
0007 0100 hdisk1
0008 0100 hdisk2

• A logical volume with two copies:


# mklv –y mirrlv –c 2 datavg 3
mirrlv

# lslv –m mirrlv
mirrlv:N/A
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0101 hdisk1 0101 hdisk2
0002 0102 hdisk1 0102 hdisk2
0003 0103 hdisk1 0103 hdisk2

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-49. Show LP to PP relationship on physical volumes

The lslv –m flag shows the logical partition to physical partition relationship. In the first example
in the visual, logical partition 1 for mylv, is mapped to physical partition 97 on hdisk1, logical
partition 2 is mapped to physical partition 97 on hdisk2, etc.
In the second example, a two-way mirrored logical volume, mirrlv, is created. The lslv -m
mirrlv command shows logical partition 1 or mirrlv is mapped to physical partition 101 on
hdisk1 and is also mirrored to physical partition 101 on hdisk2.

© Copyright IBM Corp. 2009, 2024 9-58


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Show the physical volume layout


# lspv –p hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1–1 used outer edge hd5 boot N/A
2–8 free outer edge
9–12 used outer edge lg_dumplv sysdump N/A
13–14 used outer middle hd6 paging N/A
15–15 used outer middle livedump jfs2 /var/adm/ras/livedump
16–17 free outer middle
18–18 used outer middle hd11admin jfs2 /admin
19–20 used outer middle hd10opt jfs2 /opt
21–21 used outer middle hd1 jfs2 /home
22–22 used outer middle hd3 jfs2 /tmp
23–24 used outer middle hd9var jfs2 /var
25–25 used center hd8 jfs2log N/A
26–27 used center hd4 jfs2 /
28–35 used center hd2 jfs2 /usr
36–40 used inner middle hd2 jfs2 /usr
41–47 free inner middle
48–59 free inner edge

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-50. Show the physical volume layout

The lspv -p PV command lists all the logical volumes on the given physical volume and the
physical partitions to which its logical partitions are mapped. It is listed in physical partition order
and shows what partitions are free and which are used, as well as the location; that is, center,
outer middle, outer edge, inner edge, and inner middle.

© Copyright IBM Corp. 2009, 2024 9-59


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Topic 1 objectives
• Explain how to work with the Logical Volume Manager
• Describe essential LVM concepts, such as mirroring and striping
• Describe Logical Volume Encryption

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-51. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 9-60


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Logical Volume Encryption


• AIX logical volume encryption allows administrators to enable encryption per logical volume.
• Previously AIX users could employ EFS (Encrypted File System) for encryption at the file
system level, with an encryption key at the file level and an encryption key per user.
• However, EFS per user was complex to manage. In the era of pervasive encryption, the
paradigm has shifted away from selective encryption.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-52. Logical Volume Encryption

Starting with AIX 7.2 TL5, the LVM supports data encryption at the logical volume (LV) level. Using
this feature, you can encrypt the data at rest to protect data exposure because of lost or stolen
hard disk drives or because of inappropriately decommissioned computers. The term data at rest
refers to an inactive data that is stored physically in any digital form.
Each LV is encrypted with a unique key. The logical volume data is encrypted before the data is
written to the physical volume. This data is decrypted when it is read from the physical volume. By
default, data encryption is not enabled in logical volumes. You must enable the data encryption
option at the volume group level before you enable the data encryption option at the logical
volume level.
The hdcryptmgr command manages the encryption keys, data encryption, and data decryption of
the logical volume.

Previously AIX administrators could employ EFS (Encrypted File System) for encryption at the file
system level. The EFS solution provided the flexibility of selective file encryption. It managed the
data encryption key at the file level and the protection of the data encryption key for each user.
The EFS per user key protection scheme added complexity to system management and impacted
applications in some cases. And in the era of pervasive encryption, the paradigm has shifted away
from selective encryption.

The visual shows the solution architecture, with a typical I/O stack and existing kernel crypto
library (pkcs11). The LVM driver, LVM commands, and the pkcs11 library have all been enhanced
to support the LV encryption feature. New components, were introduced to support encryption,
such as a pseudo encryption device driver, hdcrypt, and new utilities for encrypted LV status and
key management, etc. There is tight interaction between the hdcrypt driver and LVM driver. For an

© Copyright IBM Corp. 2009, 2024 9-61


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
encryption enabled logical volume, the hdcrypt driver intercepts the IOs directed to logical
volume. It is also possible to support encryption for dump and paging devices, which is not
possible with EFS.

LV encryption creates one data encryption key per logical volume. The data encryption key is
protected by wrapping keys (up to 6) to be stored separately from the data storage devices. Four
types of wrapping key protection methods are supported: paraphrase, key file, cryptographic
key server and PKS (Platform Key Store). The PKS method, is a new PowerVM feature which
provides a small secure storage space to LPAR for storing key materials or other objects. The
feature is added to POWER9 systems via system firmware FW950 and HMC 9.2.950.
The hdcryptmgr can be used to manage all aspects related to encrypted LVs, including display of
logical volume and volume encryption information, authentication control (initializing, adding,
deleting authentication methods, etc.), management of PKS storage, and change of logical volume
type from un-encrypted to encrypted and vice versa. Detailed documentation for the hdcryptmgr
command can be found here:
https://www.ibm.com/docs/en/aix/7.3?topic=h-hdcryptmgr-command#hdcryptmgr__hdcryptmgr
_authinit.
Additional information:
AIX 7.3 introduced the following enhancements to the LV encryption function:
• You can encrypt LVs in the root volume group (rootvg) that are used in the boot process. You
must select the LV encryption option during the installation of the base operating system. For
more information, see BOS installation options,
https://www.ibm.com/docs/en/aix/7.3?topic=system-bos-installation-options. Encryption is
enabled, by default, for rootvg with AIX 7.3
• After the base operating system installation, you can use the hdcryptmgr conversion
commands to change the encryption setting of an LV. However, the conversion of an LV in the
rootvg is different from the conversion of an LV in a user volume group. When you run the
hdcryptmgr conversion command to change the encryption status of an LV in a rootvg, the
hdcryptmgr command creates an LV to store the conversion recovery data. When you run the
hdcryptmgr conversion command to change the encryption status of an LV in a user volume
group, the hdcryptmgr command stores the conversion recovery data in a file in the
/var/hdcrypt directory. Therefore, the rootvg must have at least one free partition for
successful conversion. When the conversion of the encryption status completes successfully,
the LV that contains the conversion recovery data is deleted.
• When the rootvg is varied on, the network is not available. Hence, the Platform Keystore (PKS)
authentication method must be available for LVs that are used in the boot process. If the PKS
authentication method is not available for an encrypted LV in the rootvg, the LV remains
locked and thus, will not be accessible until it is unlocked explicitly later. Also, you cannot
delete a valid PKS authentication method from an LV in the rootvg that are used in the boot
process. If you convert an unencrypted LV, which is used in the boot process, to an encrypted
LV, the PKS authentication method is automatically added to the LV. If the PKS authentication
method is not available or is corrupted for an encrypted LV that is used in the boot process,
you must boot the operating system in maintenance mode and repair the PKS authentication
method before you can resume the normal boot operation.

© Copyright IBM Corp. 2009, 2024 9-62


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
• The following commands are enhanced to support LV encryption: cplv, splitvg,
splitlvcopy, chlvcopy, snapshot, savevg, and restvg.
Reference: AIX 72 TL5: Logical Volume Encryption,
https://community.ibm.com/community/user/power/blogs/xiaohan-qin1/2020/11/23/aix-lv-encr
yption
Reference: Encrypted logical volumes,
https://www.ibm.com/docs/en/aix/7.3?topic=system-encrypted-logical-volumes

© Copyright IBM Corp. 2009, 2024 9-63


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating Encrypted Logical Volumes (1 of 3)


• Create a volume group with encryption enabled (note encryption is enabled by default for new
volume groups on AIX 7.3):
ƒ # mkvg –k y -y encryptvg hdisk1
• Check the encryption state of varied on volume groups:
ƒ # hdcryptmgr showvg
• Show the volume group encryption metadata:
ƒ # hdcryptmgr showmd encryptvg
• Create a logical volume with encryption enabled:
ƒ # mklv -k y -y encryptlv encryptvg 10
encryptlv
mklv: Please run :
hdcryptmgr authinit lvname [..] to define LV encryption options.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-53. Creating Encrypted Logical Volumes (1 of 3)

The visual shows the steps to create an encrypted LV. First a volume group is created, with VG
encryption enabled. Example:
# hdcryptmgr showvg
VG NAME / ID ENCRYPTION ENABLED
encryptvg yes
rootvg yes
# hdcryptmgr showmd encryptvg
.....
..... Wed Jul 12 23:30:39 2023
..... Device type : VG
..... Device name : encryptvg
.....
=============== B: VG HEADER ================
Version : 0
Timestamp : Wed Jul 12 23:24:00 2023
Default data crypto algorithm: AES_XTS
Default MasterKey size : 32 bytes
Auto-auth (during varyonvg) : Enabled
=============== E: VG HEADER ================
=============== B: VG TRAILER ===============
Timestamp : Wed Jul 12 23:24:00 2023
=============== E: VG TRAILER ===============
A logical volume is created in the encryptvg volume group, named encryptlv. The mklv
command displays a message stating that the encrypted LV is not accessible until the first
passphrase method is initialized for the LV and that we need to run hdcryptmgr authinit
lvname. This is shown on the next slide.

© Copyright IBM Corp. 2009, 2024 9-64


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating Encrypted Logical Volumes (2 of 3)


• Check the authentication state of the logical volume:
ƒ # hdcryptmgr showlv encryptlv
• Initialize the primary key for an encrypted logical volume. The logical volume is not accessible
until the first passphrase method is initialized:
ƒ # hdcryptmgr authinit encryptlv
• Check the Authentication status and authentication methods:
ƒ # hdcryptmgr showlv encryptlv –v
NAME CRYPTO_STATUS %ENCRYPTED NOTE
encryptlv unlocked 100
-- Authentication methods ------------
INDEX TYPE NAME
#0 Passphrase initpwd

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-54. Creating Encrypted Logical Volumes (2 of 3)

Before we can use a new encrypted LV we must first check the authentication state of the logical
volume. In the example below we observe that the CRYPTO_STATUS is uninitialized:
# hdcryptmgr showlv encryptlv
NAME CRYPTO_STATUS %ENCRYPTED NOTE
encryptlv uninitialized n/a not_accessible
We must initialize the primary key for an encrypted logical volume. The logical volume is not
accessible until the first passphrase method is initialized. The hdcryptmgr authinit command
configures the passphrase for the LV.
# hdcryptmgr authinit encryptlv
Enter Passphrase:
Confirm Passphrase:
Passphrase authentication method with name "initpwd" added successfully.
The hdcryptmgr showlv command shows that the LV status is now unlocked and the
authentication method is Passphrase. As shown in the visual. The %ENCRYPTED field shows 100
for the LV. The encrypted LV is now ready for use and the administrator could, for example, create
a filesystem using the LV at this point. If the AIX LPAR is rebooted, encrypted LVs that use only the
passphrase protection method must be manually unlocked using the hdcryptmgr authunlock
action. If one of the other methods, such as using a key server or PKS, has been added to the LV
using the authadd action, AIX attempts to automatically unlock the LV during boot. Any attempt to
do I/O to an encrypted LV that is still locked fails, including mounting filesystems.
It is possible to change the encryption policy for the LVs. Below are some examples of changing
the encryption policy for a LV.

© Copyright IBM Corp. 2009, 2024 9-65


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
Change the encryption policy of the logical volume that has encryption enabled:
# mount | grep myfs
/dev/encryptlv /myfs jfs2 Jul 12 23:18 rw,log=INLINE
# lslv encryptlv | grep ENCR
ENCRYPTION: yes
# chlv -kn encryptlv
3020-0203 LV data must first be converted to plain.
3020-0136 LV is not ready to remove encryption enablement.
0516-704 chlv: Unable to change logical volume encryptlv.
# hdcryptmgr crypt2plain encryptlv
A backup of data should be preserved until end of conversion.
Confirm to proceed further (y|n): y
In case of conversion abort, run conversion command again to resume.
Successfully converted LV encryptlv to an encryption disabled LV.
# hdcryptmgr showlv encryptlv -v
NAME CRYPTO_STATUS %ENCRYPTED NOTE
encryptlv not_enabled 0
-- Authentication methods ------------
INDEX TYPE NAME
Change the encryption policy of the logical volume that has encryption disabled:
# hdcryptmgr plain2crypt encryptlv
Enter Passphrase:
Confirm Passphrase:
Passphrase authentication method with name "initpwd" added successfully.
A backup of data should be preserved until end of conversion.
Confirm to proceed further (y|n): y
In case of conversion abort, run conversion command again to resume.
Successfully converted LV encryptlv to an encrypted LV.
It is possible to change the encryption policy for a VG. Below are some examples of changing the
encryption policy for a VG.
To disable encryption for a volume group:
# lsvg encryptvg | grep ENC
ENCRYPTION: yes

© Copyright IBM Corp. 2009, 2024 9-66


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
Before you can disable encryption for a VG you must first disable encryption for any LVs in the VG.
# chvg -kn encryptvg
0516-2045 chvg: Encryption is enabled in some logical volumes in the volume group.
0516-732 chvg: Unable to change volume group encryptvg.
# hdcryptmgr crypt2plain encryptlv
A backup of data should be preserved until end of conversion.
Confirm to proceed further (y|n): y
In case of conversion abort, run conversion command again to resume.
Successfully converted LV encryptlv to an encryption disabled LV.
# chlv -kn encryptlv
# chvg -kn encryptvg
# lsvg encryptvg | grep ENC
ENCRYPTION: no
Note, you cannot disable encryption for rootvg:
# chvg -kn rootvg
0516-1777 chvg: rootvg contains an active paging device. Cannot execute this
command on a Volume Group with active paging space.
0516-732 chvg: Unable to change volume group rootvg.
To enable encryption for a volume group:
# chvg -ky encryptvg
# lsvg encryptvg | grep ENC
ENCRYPTION: yes

© Copyright IBM Corp. 2009, 2024 9-67


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Creating Encrypted Logical Volumes (3 of 3)


• varyoff and varyon the volume group and check the authentication status:
ƒ # varyoffvg encryptvg ; varyonvg encryptvg
ƒ # hdcryptmgr showlv encryptlv
NAME CRYPTO_STATUS %ENCRYPTED NOTE
encryptlv locked 100
• Logical volume encryptlv is not authenticated and locked. Requires authunlock before
accessing the LV:
ƒ # hdcryptmgr authunlock encryptlv
Enter Passphrase:
Passphrase authentication succeeded.
# hdcryptmgr showlv encryptlv
NAME CRYPTO_STATUS %ENCRYPTED NOTE
encryptlv unlocked 100

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-55. Creating Encrypted Logical Volumes (3 of 3)

As stated previously, after a reboot you must unlock an encrypted LV before it can be accessed (if
using the passphrase wrapping key protection method only). If the LV is locked, you cannot
access it. For example, if this was a new logical volume on which you wanted to create a new file
system, and you attempted to create the filesystem on a locked LV, the following message would
be displayed, crfs: The encryptlv logical volume is locked. Please unlock it to
continue the operation. Similarly, if you had previously created a filesystem on an encrypted
logical volume and you attempted to mount the filesystem, while the LV was locked, the following
message would be displayed, mount: 0506-324 Cannot mount /dev/encryptlv on
/encryptfs: There is an input or output error.
In the visual, our encrypted volume group is varied off and then on, simulating a reboot of the
system. We then unlock the encrypted logical volume, in the encryption-enabled volume group.
Once we enter the passphrase the LV is authenticated and unlocked. It is now ready for use and
can be accessed as normal.
Additional information:
AIX 7.3 TL1 introduced encrypted physical volumes. This capability encrypts data at rest on disks,
and since the data is encrypted in the OS, the disk data in flight is encrypted as well.
Using Encrypted Physical Volumes
To use physical volume encryption, the disk must first be formatted for encryption. This operation
erases any data on the disk. There is no support for directly encrypting existing data on a disk.
Instead, a new disk must be allocated and formatted for encryption and then the data is copied to
the new disk.
For example, the command to enable encryption on disk hdisk3 is hdcryptmgr pvenable hdisk3.
This command prompts the user for a passphrase to use to unlock the disk and then reserves
some space at the beginning of the disk for metadata. As with logical volume encryption, a data

© Copyright IBM Corp. 2009, 2024 9-68


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
encryption key is created automatically when the disk is initialized for encryption. The pvenable
action also prompts the user to add a passphrase wrapping key to encrypt the data encryption
key. Additional wrapping keys may be added using the authadd action of the hdcryptmgr
command. Note that since space is reserved for metadata, the space available for user data on an
encrypted physical volume is slightly smaller than the total size of the physical volume.
Once the disk is initialized for encryption and unlocked, it may be used just as any other hdisk in
AIX, except encrypted disks cannot be used as part of the rootvg volume group. As the OS writes
data to the disk, the data is encrypted; when data is read from the disk it is decrypted before being
passed to the user.
To enable encryption for a PV:
# hdcryptmgr pvenable hdisk3
Warning, all data contained on Physical Volume hdisk3 will be destroyed.
Do you wish to continue? y(es) n(o)?y
Enter Passphrase:
Confirm Passphrase:
Passphrase authentication method with name "initpwd" added successfully.

© Copyright IBM Corp. 2009, 2024 9-69


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
To shown encryption metadata for a PV:
# hdcryptmgr showmd hdisk3
.....
..... Wed Jul 12 22:53:02 2023
..... Device type : PV
..... Device name : hdisk3
.....
=============== B: PV HEADER ================
Version : 0
Timestamp : Wed Jul 12 22:52:57 2023
Default data crypto algorithm: AES_XTS
Default MasterKey size : 32 bytes
Auto-auth (during boot) : Enabled
=============== E: PV HEADER ================
========== B: AUTH METHODS HEADER ==========
Version : 1
MasterKey : Defined
MasterKey size : 32 bytes
Encryption status : Fully encrypted
Data crypto algorithm : AES_XTS
========== E: AUTH METHODS HEADER ==========
============== B: AUTH METHODS =============
---- Index #0 -------------------------------
Method defined : yes
Method name : initpwd
Authentication type : Passphrase
Auto-auth method : no
MasterKey crypto algorithm : AES_GCM
---- Index #1 -------------------------------
Method defined : no
---- Index #2 -------------------------------
Method defined : no
---- Index #3 -------------------------------
Method defined : no
---- Index #4 -------------------------------
Method defined : no
---- Index #5 -------------------------------
Method defined : no
============== E: AUTH METHODS =============
=============== B: PV TRAILER ===============
Timestamp : Wed Jul 12 22:52:57 2023
=============== E: PV TRAILER ===============

© Copyright IBM Corp. 2009, 2024 9-70


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty
To view encryption status for a PV:
# hdcryptmgr showpv
NAME CRYPTO_STATUS %ENCRYPTED NOTE
hdisk3 unlocked 100
# lspv hdisk3 | grep ENC
MIRROR POOL: None ENCRYPTION: yes
If the AIX LPAR is rebooted, encrypted disks that use only the passphrase wrapping key
protection method must be manually unlocked using the hdcryptmgr authunlock action. If one
of the other methods, such as using a key server or PKS, has been added to the disk using the
authadd action, AIX attempts to automatically unlock the disk during boot. Any attempt to do I/O
to an encrypted disk that is still locked fails, including varying on a volume group using encrypted
PVs. Example:
# lspv hdisk3 | grep ENC
MIRROR POOL: None ENCRYPTION: yes
# mkvg -y pvencvg hdisk3
0516-1254 mkvg: Changing the PVID in the ODM.
# varyoffvg pvencvg
# rmdev -l hdisk3
hdisk3 Defined
# mkdev -l hdisk3
hdisk3 Available
# varyonvg pvencvg
0516-013 varyonvg: The volume group cannot be varied on because
there are no good copies of the descriptor area.
The varyonvg command (above) fails because the encrypted VG is locked. It must be unlocked, by
entering the passphrase, before the VG can be varied on, as shown below.
# hdcryptmgr authunlock hdisk3
Enter Passphrase:
Passphrase authentication succeeded.
# varyonvg pvencvg
# lsvg -o
pvencvg
rootvg
Reference: Understanding AIX Physical Volume Encryption,
https://community.ibm.com/community/user/power/blogs/gary-domrow/2023/02/08/understand
ing-aix-physical-volume-encryption

© Copyright IBM Corp. 2009, 2024 9-71


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Review questions
1. True or False: A logical volume can span more than one physical volume.

2. True or False: A logical volume can span more than one volume group.

3. True or False: The contents of a physical volume can be divided between two volume groups.

4. True or False: If mirroring logical volumes, it is not necessary to perform a backup.

5. True or False: Striping can be combined with mirroring to provide increased performance and
availability.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-56. Review questions

© Copyright IBM Corp. 2009, 2024 9-72


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Review answers
1. True or False: A logical volume can span more than one physical volume.
The answer is true.
2. True or False: A logical volume can span more than one volume group.
The answer is false.
3. True or False: The contents of a physical volume can be divided between two volume groups.
The answer is false.
4. True or False: If mirroring logical volumes, it is not necessary to perform a backup.
The answer is false. You still need to back up to external media.
5. True or False: Striping can be combined with mirroring to provide increased performance and
availability
The answer is true.

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-57. Review answers

© Copyright IBM Corp. 2009, 2024 9-73


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Exercise

Working with LVM

Working with the Logical Volume Manager © Copyright IBM Corporation 2024

Figure 9-58. Exercise

© Copyright IBM Corp. 2009, 2024 9-74


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 9. Working with the Logical Volume Manager

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Explain how to work with the Logical Volume Manager
ƒ Add, change, and delete:
í Volume groups
í Logical volumes
í Physical volumes
ƒ Describe essential LVM concepts, such as:
í Mirroring
í Striping
ƒ Describe Logical Volume Encryption

© Copyright IBM Corporation 2024

Figure 9-59. Unit summary

© Copyright IBM Corp. 2009, 2024 9-75


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Unit 10.File systems administration


Estimated time
01:05

Overview
This unit covers important concepts and procedures that are related to AIX file systems.

How you will check your progress


• Review questions
• Lab exercises

References
AIX Version 7.3 File systems
https://www.ibm.com/docs/en/aix/7.3?topic=management-file-systems
AIX Version 7.3 Managing File systems
https://www.ibm.com/docs/en/aix/7.3?topic=systems-managing-file-system
Conversion of a JFS to JFS2 filesystem
https://www.ibm.com/support/pages/conversion-jfs-jfs2-filesystem
JFS2 size limits
https://www.ibm.com/docs/en/aix/7.3?topic=limitations-jfs2-size-limits
JFS and JFS2 functions
https://www.ibm.com/docs/en/aix/7.3?topic=jfs2-jfs-functions
JFS and JFS2 size limitations
https://www.ibm.com/docs/en/aix/7.3?topic=jfs2-jfs-size-limitations
chfs command reference
https://www.ibm.com/docs/en/aix/7.3?topic=c-chfs-command

© Copyright IBM Corp. 2009, 2024 10-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Identify the components of an AIX file system
ƒ Work with enhanced journaled file systems
í Add, list, change, and delete
ƒ Monitor file system disk space usage
ƒ Manage file system growth and control growing files

© Copyright IBM Corporation 2024

Figure 10-1. Unit objectives

JFS2 will be the main focus of this unit. Let us start by providing an overview of journaled file
systems.

© Copyright IBM Corp. 2009, 2024 10-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Topic 1 objectives
• Identify the components of an AIX file system
• Work with enhanced journaled file systems: Add, list, change, and delete
• Monitor file system disk space usage: managing file system growth and control growing files

File systems administration © Copyright IBM Corporation 2024

Figure 10-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 10-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Journaled file system support in AIX


• Two types supported:
ƒ Journaled File System (JFS)
ƒ Enhanced JFS (JFS2)
• JFS is the original AIX file system.
• JFS2 is the default file system (since AIX 5.3).
• Journaling:
ƒ Before writing actual data, a journaling file system logs the metadata to a circular log on disk.
ƒ In the event of an OS crash, journaling restores consistency by processing the information in the log
file.
• There is no easy migration path from JFS to JFS2.
ƒ Conversion can only be achieved through backup and restore.

File systems administration © Copyright IBM Corporation 2024

Figure 10-3. Journaled file system support in AIX

The journaled file system (JFS) and the enhanced journaled file system (JFS2) are built into the
base operating system. Both file system types link their file and directory data to the structure
used by the Logical Volume Manager (LVM) for storage and retrieval.
One of the key features of JFS and JFS2 file systems is logging. JFS and JFS2 record all file system
transactions that would change file system metadata in log devices. Then, in case of a system
crash or other potentially damaging event, AIX will search through the log and recover any
changes that were not written to the file system. This can speed up repair of the file system as
well as recovering data that may otherwise have been lost.
JFS file systems can co-exist on the same system with JFS2 file systems. A JFS filesystem cannot
be converted to become a JFS2 filesystem. However, to fully utilize the JFS2 features, the
following steps are necessary:
1. Backup JFS file system data
2. Create new JFS2 file systems
3. Restore JFS file system data to new JFS2 file systems
Reference: Conversion of a JFS to JFS2 filesystem,
https://www.ibm.com/support/pages/conversion-jfs-jfs2-filesystem

© Copyright IBM Corp. 2009, 2024 10-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Advantages of JFS2
• Increased performance
• Increased flexibility:
ƒ File systems can be dynamically increased and decreased
ƒ Support for larger file systems
ƒ Internal or external JFS2 logging
ƒ Data encryption
ƒ Support for snapshots

File systems administration © Copyright IBM Corporation 2024

Figure 10-4. Advantages of JFS2

JFS2 provides increased performance and flexibility when compared to its predecessor, JFS.
JFS file systems:
• Cannot be dynamically decreased.
• Can only support large files, greater than 2 GB, if created in a special large file enabled file
system. Individual file size can be up to 64 GB with JFS as opposed to 16 TB with JFS2.
• Only support external JFS logging.
• Have no support for data encryption or snapshots. A snapshot is a point-in-time image, like a
photograph, of a JFS2 file system.
• JFS file systems are not supported on disks that have a sector size of 4 KB.
AIX 7.3 introduced support for the large files and large file systems (lff) feature. By default, the
maximum size of a JFS2 file system is 32 TB. If the value of the lff attribute for a JFS2 file system
is set to yes (lff=yes), the maximum potential size of a JFS2 file system is 4 PB. The lff attribute
is set to no by default.
# lsfs -q /data
Name Nodename Mount Pt VFS Size Options Auto
Accounting
/dev/fslv00 -- /data jfs2 2883584 -- yes no
(lv size: 2883584, fs size: 2883584, block size: 4096, sparse files: yes, inline
log: yes, inline log size: 8, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS:
no, ISNAPSHOT: no, MAXEXT: 0, MountGuard: no, LFF: no)
Additionally, if the lff attribute is set to yes, the file system can only be mounted on AIX 7.3, or
later. Notes: You cannot change the value of the lff attribute after you set it to yes. The lff
attribute is only supported on a filesystem with an aggregate block size of 4096 bytes.

© Copyright IBM Corp. 2009, 2024 10-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty
Reference: JFS2 size limits,
https://www.ibm.com/docs/en/aix/7.3?topic=limitations-jfs2-size-limits

© Copyright IBM Corp. 2009, 2024 10-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

JFS2 structural components


• Superblock:
ƒ The superblock maintains information about the entire file system.
• Inodes:
ƒ Each file has an inode that contains access information such as file type, access permissions, owner's
ID, and the number of links to that file.
• Data blocks:
ƒ Contains file data
ƒ Each file system has a user settable fixed block size attribute:
í 512, 1024, 2048, or 4096 bytes
• Allocation maps:
ƒ Record the location and allocation of all inodes and the allocation state of each data block.
• Allocation groups:
ƒ Responsible for dividing the file system space into chunks so related data blocks and inodes can be
clustered together to achieve good locality.
File systems administration © Copyright IBM Corporation 2024

Figure 10-5. JFS2 structural components

The superblock contains information such as the file system name, size, number of inodes, and
date/time of creation. The superblock is critical to the file system and, if corrupted, prevents the
file system from mounting. The first addressable logical block on the file system is the superblock
and a copy at block 31.
Each file and directory has an associated inode which contains metadata such as ownership and
access times. JFS2 allocates inodes as required.
An individual file within a file system, by default, has units allocated to it in blocks of 4096 bytes.
The file system block size can be set to 512, 1024, 2048, or 4096 bytes.
A JFS2 file system has two allocation maps:
• inode allocation map records the location and allocation of all inodes in the file system
• Block allocation map records the allocation state of each file system block
Allocation groups divide the space on a file system into chunks. Allocation groups allow JFS2
allocation policies to use well-known methods for achieving optimum I/O performance.
Reference: JFS and JFS2 functions,
https://www.ibm.com/docs/en/aix/7.3?topic=jfs2-jfs-functions

© Copyright IBM Corp. 2009, 2024 10-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Listing inode and block size information


• To view inode information:
# ls –li
total 8
4 –rw–r––r–– 1 root system 89 Nov 20 18:32 datafile i-node
3 drwxr–xr–x 2 root system 256 Nov 07 12:09 lost+found number

# istat datafile
Inode 4 on device 36/2 File
Protection: rw–r––r––
Owner: 0(root) Group: 0(system)
Link count: 1 Length 89 bytes

Last updated: Wed Nov 20 18:32:35 PST 2013


Last modified: Wed Nov 20 18:32:35 PST 2013
Last accessed: Wed Nov 20 18:32:28 PST 2013

• To view file system block size information:


# lsfs –cq /data
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct
/data:/dev/fslv00:jfs2:::2097152:rw:no:no
(lv size 2097152:fs size 2097152:block size 4096:sparse files yes:inline log Block size
no:inline log size 0:EAformat v1:Quota no:DMAPI no:VIX yes:EFS no:ISNAPSHOT
no:MAXEXT 0:MountGuard no)

File systems administration © Copyright IBM Corporation 2024

Figure 10-6. Listing inode and block size information

inode numbers can be displayed using the -i flag with the ls command.
The istat command can be used to display the inode information for a particular file or directory.
You can specify the file either by providing a file or directory name, or by providing an inode
number using the -i flag.
The file system block size information can be displayed using the lsfs command. The -c flag
displays the output in a colon separated list. The -q flag displays additional information, as shown
within the parentheses.

© Copyright IBM Corp. 2009, 2024 10-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Topic 1 objectives
• Identify the components of an AIX file system
• Work with enhanced journaled file systems: Add, list, change, and delete
• Monitor file system disk space usage: managing file system growth and control growing files

File systems administration © Copyright IBM Corporation 2024

Figure 10-7. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 10-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Creating a JFS2 file system (1 of 2)


# crfs –v jfs2 –g datavg –a size=500M –m /data (example)
OR
# smit crfs_j2
Add an Enhanced Journaled File System

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System


Add an Enhanced Journaled File System on a Previously Defined Logical Volume

Add an Enhanced Journaled File System

[Entry Fields]
Volume group name datavg
SIZE of file system
Unit Size Megabytes +
* Number of units [500] #
* MOUNT POINT [/data]
Mount AUTOMATICALLY at system restart? no +
PERMISSIONS read/write +
Mount OPTIONS [] +
Block Size (bytes) 4096 +
Logical Volume for Log +
Inline Log size (MBytes) [] #
Extended Attribute Format +
ENABLE Quota Management? no +
Enable EFS? no +
Allow internal snapshots? no +
Mount GROUP []

File systems administration © Copyright IBM Corporation 2024

Figure 10-8. Creating a JFS2 file system (1 of 2)

The SMIT screen in the visual shows the creation of a 500 MB file system (/data) in volume group,
datavg. The creation is done by the crfs command.
In this example, the crfs command will create a file system on a new logical volume, within a
previously created volume group. An entry for the file system is put into the /etc/filesystems file.
The actual size of the file system is dependent on the physical partition size in the volume group.
For example, if the size of the file system given in the crfs command is 500 MB and the physical
partition size is 32 MB, then LVM will assign 16 logical partitions to the logical volume containing
the file system. The actual file system size will be 512 MB (16*32 MB), in this example.
The minimum size of a JFS2 file system is 16 MB.
Reference: JFS and JFS2 size limitations,
https://www.ibm.com/docs/en/aix/7.3?topic=jfs2-jfs-size-limitations

© Copyright IBM Corp. 2009, 2024 10-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Creating a JFS2 file system (2 of 2)


# crfs –v jfs2 –d lv_for_data –m /data2 –A yes (example)
OR
# smit crfs_j2
Add an Enhanced Journaled File System

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System


Add an Enhanced Journaled File System on a Previously Defined Logical Volume

Add an Enhanced Journaled File System

[Entry Fields]
* LOGICAL VOLUME name lv_for_data +
* MOUNT POINT [/data2]
Mount AUTOMATICALLY at system restart? yes +

PERMISSIONS read/write +
Mount OPTIONS [] +
Block Size (bytes) 4096 +
Logical Volume for Log +
Inline Log size (MBytes) [] #
Extended Attribute Format +
ENABLE Quota Management? no +
Enable EFS? no +
Allow internal snapshots? no +
Mount GROUP []
Enable LFF? no +
File systems administration © Copyright IBM Corporation 2024

Figure 10-9. Creating a JFS2 file system (2 of 2)

Adding a file system to a previously created logical volume provides greater


control over where the file system will reside on disk and provides options for
availability and performance.
On creation, the size of the file system is set to the size of the logical volume.
For example, if the physical partition size for the volume group is 64 MB, and the
logical volume is 4 logical partitions in size, then the size of the file system
would be (4 x 64 MB) 256 MB.
After the file system is created:
• If the logical volume is expanded, the size of the file system is not increased
• The underlying logical volume policies can be dynamically changed

© Copyright IBM Corp. 2009, 2024 10-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Creating a file system on a previously defined logical volume


# smit crfs_j2
Add an Enhanced Journaled File System

[Entry Fields]
* LOGICAL VOLUME name lv_for_data +
* MOUNT POINT [/data2]
Mount AUTOMATICALLY at system restart? yes +
PERMISSIONS read/write +
Mount OPTIONS [] +
Block Size (bytes) 4096 +
Logical Volume for Log +
Inline Log size (MBytes) [] #
Extended Attribute Format +
ENABLE Quota Management? no +
Enable EFS? no +
Allow internal snapshots? No +
Mount GROUP []

# crfs -v jfs2 –d lv_for_data –m /data2 –A yes

File systems administration © Copyright IBM Corporation 2024

Figure 10-10. Creating a file system on a previously defined logical volume

This visual shows the SMIT menu for creating a standard enhanced journaled file system on a
previously defined logical volume.
Adding a file system to a previously created logical volume provides greater control over where
the file system resides on disk and provides options for availability and performance. When
creating file systems in highly available environments (for example, using PowerHA or Veritas
Cluster Services), one should always follow this method, in order to use your own naming
convention for the logical volume names.
On creation, the size of the file system is set to the size of the logical volume. For example, if the
PP size for the volume group is 64 MB, and the logical volume was 4 LPs in size, then the size of
the file system would be (4 x 64 MB) 256 MB.
After the file system is created:
• If the logical volume is expanded, the size of the file system is not increased.
• The underlying logical volume policies can be dynamically changed. However, there is a
performance hit, especially for large file systems.

© Copyright IBM Corp. 2009, 2024 10-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Mounting and unmounting a file system


• mount is the glue that logically connects file systems to the directory hierarchy.
• File systems are associated with devices represented by special files in the /dev directory.
• When a file system is mounted, the logical volume and its contents are connected to a
directory in the hierarchical tree structure.

# mount /dev/fslv00 /data

What to mount Where to mount it

• To unmount a file system, use the umount command.


# umount /data

File systems administration © Copyright IBM Corporation 2024

Figure 10-11. Mounting and unmounting a file system

A file system has to be mounted in order for it to be available for use. Use the mount command or
SMIT to do this. The file system can also be unmounted using the umount or unmount command, or
SMIT. These commands can be executed by either the root user or a member of the system
group.
It is possible to have file systems automatically mounted at boot time. This can be specified in the
/etc/filesystems file using the mount=automatic or mount=true parameters.
Full path names must be used when specifying the mount point. If SMIT is used to create the file
system, the mount point is created automatically.

© Copyright IBM Corp. 2009, 2024 10-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Mounting over an empty directory


Before After

/ /

home usr data home usr data

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents of data file system

.profile .profile
.exrc files doc .exrc files doc
myscript myscript

File systems administration © Copyright IBM Corporation 2024

Figure 10-12. Mounting over an empty directory

In order for users to get access to the data contained in a file system, it must be mounted. When
the file system is mounted, it becomes a part of the hierarchical tree structure of files and
directories. From the user’s perspective, there is no way to tell where one file system ends, and
another begins.

© Copyright IBM Corp. 2009, 2024 10-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Mounting over files


Before After

/ /

home usr data home usr data

reports pgms .profile


.exrc

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents of data file system .profile
.exrc files doc
myscript
.profile
.exrc files doc
myscript
File systems administration © Copyright IBM Corporation 2024

Figure 10-13. Mounting over files

It is possible to mount a file system over a directory that already contains files and subdirectories.
The result is that the files and subdirectories that have been mounted over are now hidden from
the users and are no longer accessible. They have not been lost though. They are again accessible
when the umount command has been executed on the covering file system.
Not everyone has the authority to mount file systems. Authority is based on two things; what the
default mount point is, as specified in the file /etc/filesystems, and whether the user has write
authority to that mount point. Users can issue file or directory mounts, provided they belong to the
system group and have write access to the mount point. They can mount only to the default
mount point that is in /etc/filesystems. root can mount anywhere under any set of permissions.

© Copyright IBM Corp. 2009, 2024 10-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Mounting a file system and /etc/filesystems


• When a file system is created, the device and mount point information is stored in the
/etc/filesystems file.
# grep –p /data /etc/filesystems
/data:
dev = /dev/fslv00
vfs = jfs2
log = INLINE
mount = false
options = rw
account = false

# mount /data

# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Jul 03 04:58 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Jul 03 04:58 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Jul 03 04:58 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Jul 03 04:58 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Jul 03 04:59 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Jul 03 04:59 rw,log=/dev/hd8
/proc /proc procfs Jul 03 04:59 rw
/dev/hd10opt /opt jfs2 Jul 03 04:59 rw,log=/dev/hd8
/dev/livedump /var/adm/ras/livedump jfs2 Jul 03 04:59 rw,log=/dev/hd8
/dev/fslv00 /data jfs2 Jul 09 20:41 rw,log=INLINE

File systems administration © Copyright IBM Corporation 2024

Figure 10-14. Mounting a file system and /etc/filesystems

Upon creation of a file system, a stanza is appended to the /etc/filesystems file. The stanza
includes:
• The device (dev) which is the underlying logical volume
• The virtual file system type (vfs)
• The path to the JFS log device (log). AIX 7.3 inline log (INLINE) or AIX 7.2 and earlier, a logical
volume name e.g. /dev/loglv00
• Whether the file system should be mounted at system start time (mount) and processed by
the AIX accounting system (account)
Before the file system can be used, it must first be mounted using the mount command. With the
stanza in the /etc/filesystems file, the only parameter required with mount is the name of the file
system.
If you enter the mount command without any flags, it displays the information for the file systems
that are currently mounted.

© Copyright IBM Corp. 2009, 2024 10-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Changing the size of a JFS2 file system


• To increase the size of a file system:
# chfs –a size=+500M /data
Filesystem size changed to 2097152

• To shrink the size of a file system:


# chfs –a size=–100M /data
Filesystem size changed to 1900544

• Using SMIT: # smit chjfs2


Change / Show Characteristics of an Enhanced Journaled File System

[Entry Fields]
File system name /data
NEW mount point [/data]
SIZE of file system
Unit Size Gigabytes +
Number of units [10] #
...

File systems administration © Copyright IBM Corporation 2024

Figure 10-15. Changing the size of a JFS2 file system

JFS2 file systems can be dynamically increased or decreased in size (subject to available space
and LVM rules). You can either choose to increase or decrease by a set amount, using + or -
options respectively, or by providing a specific set number, as shown in the SMIT example.
The actual amount the file system is increased or decreased is dependent on the physical
partition size in the volume group. For example, if we want to add 500 MB and the physical
partition size is 32 MB, then LVM will add 16 logical partitions to the logical volume containing the
file system. The actual file system size will be increased by 512 MB (16*32 MB), in this example. If
we want to decrease the file system by 100 MB and the physical partition size is 32 MB, LVM will
reduce the logical volume containing the file system by 3 logical partitions. The actual file system
size will be decreased by 96 MB
(3*32 MB).
The minimum size you can decrease by is 16 MB.

© Copyright IBM Corp. 2009, 2024 10-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

JFS2 logging options


• For JFS2 file systems, there are three logging options:
ƒ Use the global JFS2 log for the volume group.
ƒ Create a specific JFS2 log for certain file systems.
í Format the log using the logform command.
í Initial recommended size is 1 logical partition.
# mklv –y my_jfs2_log –t jfs2log datavg 1

# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y

# crfs –v jfs2 –g datavg –a size=1G –m /data2 –a logname=my_jfs2_log

ƒ Create an inline log inside the file system (JFS2 only). The default with AIX 7.3.
í 0.4% of the file system space will be reserved for this option.
# crfs –v jfs2 –g datavg –a size=1G –m /data3 –a logname=INLINE \
–a logsize=<value in MB>

File systems administration © Copyright IBM Corporation 2024

Figure 10-16. JFS2 logging options

In JFS and JFS2, a log device or journal is used to allow faster file system recovery in case of a
system crash. The log can be an external logical volume, or for JFS2, can be an inline log built into
the end of the file system itself (this is the default for jfs2 on AIX 7.3).
A JFS or JFS2 log file is created when the first file system is created in a volume group. This log
will act as the global logging device for all file systems, unless:
• An external log is created for specific file systems in the volume group. This will aid
performance and availability. If the logging device were to become corrupt, it would only
affect the associated file system.
• The JFS2 log device is internal to the file system (inline). This saves time having to create,
format, and manage a separate JFS2 log volume. On AIX 7.3 the default action is to create an
INLINE log device.
JFS logs and JFS2 logs are not the same format. The logform command knows which format to
use based on the type (-t) value of the logical volume used as the log device (jfslog or jfs2log).
The log logical volume must be in the same volume group as the file system that will use it.
AIX 7.3 TL1 and higher allows administrators to use chfs to convert or swap existing JFS2 file
systems to either inline or external (outline) log devices. A new option for chfs called logshuffle
can be used to specify which log device a file system should use i.e., -a logshuffle={INLINE |
logdevicename}. This sets a file system to use the specified log. The specified log device must be
in the same volume group as the current log device. If you specify logshuffle=INLINE, the logical
volume will be extended to create an inline log device of the default size (0.4% of the file system,
size up to 2047 MB) for the file system. Specifying an outline log device does not shrink the logical
volume. Example of converting to inline logging:
# chfs -a logshuffle=INLINE /myfs

© Copyright IBM Corp. 2009, 2024 10-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

When using logshuffle, please note that the file system is quiesced while the log change is
taking place. The file system does not need to be unmounted for the change to take effect, but it is
quiesced to ensure file system data integrity. You can find more information about this new option
in the chfs command reference material here:
https://www.ibm.com/docs/en/aix/7.3?topic=c-chfs-command

© Copyright IBM Corp. 2009, 2024 10-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Examples - Creating and displaying file systems


# crfs –v jfs2 –g datavg –a size=1G –m /data

# mklv –y my_jfs2_log –t jfs2log datavg 1

# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y

# crfs –v jfs2 –g datavg –a size=1G –m /data2 –a logname=my_jfs2_log

# crfs –v jfs2 –g datavg –a size=1G –m /data3 –a logname=INLINE –a logsize=32

# lsfs
Name Nodename Mount Pt VFS Size Options Auto Accounting
...
/dev/fslv00 –– /data jfs2 2097152 –– no no
/dev/fslv01 –– /data2 jfs2 2097152 –– no no
/dev/fslv02 –– /data3 jfs2 2097152 –– no no

# lsvg –l datavg
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 closed/syncd N/A
fslv00 jfs2 32 32 1 closed/syncd /data
my_jfs2_log jfs2log 1 1 1 closed/syncd N/A
fslv01 jfs2 32 32 1 closed/syncd /data2
fslv02 jfs2 32 32 1 closed/syncd /data3

File systems administration © Copyright IBM Corporation 2024

Figure 10-17. Examples - Creating and displaying file systems

The visual shows the creation of the /data JFS2 file system using the default log device, the
/data2 JFS2 file system using a specific log device (my_jfs2_log) and the /data3 JFS2 file system
using a JFS2 inline log.
You can list the various file systems that are defined using the lsfs command. This command
displays information from /etc/filesystems and from the logical volumes in a more readable
format.
The SMIT fastpath to get to the screen which accomplishes the same task as the lsfs command is:
smit fs.

© Copyright IBM Corp. 2009, 2024 10-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Removing a JFS2 file system

Example:
# rmfs /data2

OR
# smit rmjfs2

Remove an Enhanced Journaled File System

[Entry Fields]
* FILE SYSTEM name /data2 +
Remove Mount Point no +

File systems administration © Copyright IBM Corporation 2024

Figure 10-18. Removing a JFS2 file system

The rmfs command or SMIT can be used to remove a file system.


In order to remove a file system, it must be unmounted from the file tree. This cannot be done if
the file system is in use, that is, some user or process is using the file system or has it as its
current directory.
The rmfs command removes any information for the file system from the ODM and
/etc/filesystems. When the file system is removed, the logical volume on which it resides is also
removed. However, the log logical volume is not removed, even if this is the only file system using
it.
The syntax of the rmfs command is:
rmfs [-r] [-i] FileSystem
-r: Removes the mount point of the file system
-i: Displays warning and prompts the user before removing the file system

© Copyright IBM Corp. 2009, 2024 10-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Topic 1 objectives
• Identify the components of an AIX file system
• Work with enhanced journaled file systems: Add, list, change, and delete
• Monitor file system disk space usage: managing file system growth and control growing files

File systems administration © Copyright IBM Corporation 2024

Figure 10-19. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 10-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

File system space management


• File systems can be expanded.
• To keep from running into problems:
ƒ Monitor file system growth
ƒ Determine causes
ƒ Control growing files
ƒ Manage file system space usage
ƒ Control user disk usage
ƒ Block size considerations
ƒ Fragmentation considerations

File systems administration © Copyright IBM Corporation 2024

Figure 10-20. File system space management

If a file system fills up, typically there is no warning to the end user or program. This is why it is so
important to monitor the status of the file systems.

© Copyright IBM Corp. 2009, 2024 10-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Viewing file system utilization


• The df command displays information about total space and available space on a file system.
• Syntax:
ƒ # df [–k] [–m] [–g] [filesystem]

# df –g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.50 0.30 41% 10380 13% /
/dev/hd2 3.25 0.57 83% 95065 41% /usr
/dev/hd9var 0.50 0.18 65% 10149 19% /var
/dev/hd3 0.25 0.25 2% 89 1% /tmp
/dev/hd1 0.25 0.25 2% 204 1% /home
/dev/hd11admin 0.25 0.25 1% 5 1% /admin
/proc – – – – – /proc
/dev/hd10opt 0.50 0.25 51% 3313 6% /opt
/dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump

File systems administration © Copyright IBM Corporation 2024

Figure 10-21. Viewing file system utilization

The df command lists the free space on all mounted file systems or a specified file system.
This is an important command to know about and use frequently. If you run out of space in a file
system (especially / or /tmp), system corruption could occur.
A number of flags can be used with the df command. Some of the most useful of these flags are:
• -i: Displays the number of free and used inodes for the file system; this output is the default
when the specified file system is mounted
• -I: Displays information on the total number of blocks, the used space, the free space, the
percentage of used space, and the mount point for the file system
• -k: Displays statistics in units of 1024-byte blocks
• -m: Displays statistics in units of MB blocks
• -g: Displays statistics in units of GB blocks

© Copyright IBM Corp. 2009, 2024 10-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Viewing disk usage


• The du command lists the number of blocks used by a file or a directory.
• Syntax:
ƒ # du [–k] [–m] [–g] [–s] [–a] [File...]

# pwd
/

# du –sg
4.78 .

# du –s /var
669504 /var

# du –a /var | pg
0 /var/aacct
16 /var/adm/SRC/active_list
8 /var/adm/SRC/watch_list
24 /var/adm/SRC
0 /var/adm/acct
...

File systems administration © Copyright IBM Corporation 2024

Figure 10-22. Viewing disk usage

There may be a number of files or users that are causing the increased use of space in a particular
file system. The du command helps to determine which files, users, or both, are causing the
problem.
If the File parameter specified is a directory, all files within the directory are reported on. The
number of blocks reported is the sum of blocks allocated for the files in the directory and the
blocks allocated for the directory itself. If no File parameter is provided, the du command uses
the files in the current directory.
By default, du gives size information in 512-byte blocks. Use the -k option to display sizes in 1 KB
units, use the -m option to display sizes in 1 MB units, or use the -g option to display sizes in 1 GB
units.
Specifying the -a flag reports the number of blocks in individual files. Whether the -a flag is used
or not, individual files specified by the File parameter are always listed. Specifying the -s flag
reports the total blocks for all specified files or all files in a directory.

© Copyright IBM Corp. 2009, 2024 10-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Control growing files


• /var/adm/wtmp

• /etc/security/failedlogin

• /var/adm/sulog

• /var/spool/*/*

• /var/tmp/*

• $HOME/smit*

File systems administration © Copyright IBM Corporation 2024

Figure 10-23. Control growing files

Growing files should be monitored and cleaned out periodically. Some of the files that grow are
listed on the visual.
The files /var/adm/wtmp, /etc/security/failedlogin, and /var/adm/sulog are needed because
they contain historical data regarding login activity. Thus, these files should always contain a few
days of login activity. If accounting is turned on, /var/adm/wtmp is kept to a reasonable size. If
accounting is not turned on, to capture the data to archive it, use who -a on /var/adm/wtmp and
/etc/security/failedlogin and redirect the output to a file. Then, the log file can be purged by
overwriting it with a null string. The file /var/adm/sulog can be edited directly.
The directory /var/spool contains cron entries, mail, and other items that grow on an ongoing
basis, along with printer files.
Files such as smit.log in the home directory of the root user, and other system administration
accounts, can also become quite large. These files need to be monitored regularly and managed
appropriately.

© Copyright IBM Corp. 2009, 2024 10-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Listing file system utilization


• The df command displays information about total space and available space on a file system.
ƒ # df [-k] [-m] [-g]
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 1.44 1.10 24% 9896 2% /
/dev/hd2 2.50 0.10 97% 49616 8% /usr
/dev/hd9var 0.31 0.24 25% 1308 2% /var
/dev/hd3 0.12 0.12 6% 128 1% /tmp
/proc - - - - - /proc
/dev/hd10opt 0.25 0.03 88% 4567 7% /opt
/dev/fslv00 8.00 1.40 83% 6888 3% /export
/dev/fslv01 9.00 2.33 75% 4059 1% /aix
/dev/lv00 0.12 0.12 4% 20 1% /audit
/dev/hd11admin 0.12 0.12 4% 18 1% /admin
/dev/hd1 0.62 0.16 75% 270 1% /home
apollo:/nimmksysb 25.00 3.26 87% 9 1% /mnt

File systems administration © Copyright IBM Corporation 2024

Figure 10-24. Listing file system utilization

Importance of the df command


The df command lists the free space on all mounted file systems.
This is an important command to know about and use frequently. If you run out of space in a file
system (especially / or /tmp), system corruption can occur.
Useful df command flags
A number of flags (options) can be used with the df command. Some of the most useful of these
flags are shown below:
• -i: Displays the number of free and used i-nodes for the file system; this output is the default
when the specified file system is mounted
• -I: Displays information on the total number of blocks, the used space, the free space, the
percentage of used space, and the mount point for the file system
• -k: Displays statistics in units of 1024-byte blocks
• -m: Displays statistics in units of MB blocks
• -g: Displays statistics in units of GB blocks
Let us write a simple script that uses df to monitor file system growth.

© Copyright IBM Corp. 2009, 2024 10-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Monitoring file system growth


• A simple script using the df command, which can be run at regular intervals to warn against
file systems becoming full.
#!/bin/ksh

df | egrep -v ahafs |egrep -v '(used|proc)' | awk '{print $4" "$7}' \


| sed 's:%::g' | while read LINE
do
PERC=`echo $LINE | awk '{print $1}'`
FILESYSTEM=`echo $LINE | awk '{print $2}'`

if [ $PERC -gt 70 ]
then
mail -s "Filesystem check on box: `hostname`" \
[email protected] << EOF
$FILESYSTEM is $PERC% full, please check
EOF
fi
done

File systems administration © Copyright IBM Corporation 2024

Figure 10-25. Monitoring file system growth

The need to monitor file system growth


Although AIX provides for dynamic expansion of a file system, it does not expand the file system
dynamically. The system administrator must continually monitor file system growth and expand
file systems as required before they get full. If a file system becomes 100% full, then the users
receive out of space messages when they try to extend files.
Regular use of the df command
One useful technique is to run the df command through cron, the job scheduler to perform a
regular check of the space available in the file system and produce a report. cron is covered in a
later unit.
This simple and short script takes advantage of the df and other common commands to check for
file system size. Students do not need to understand every line or command in the script. In a lab
environment, they can copy the content in the visual to create a script called fsmon.sh. A good
way to understand what the script does is to run it and verify the output.
Let us see how you can list file system disk usage, with the du command.

© Copyright IBM Corp. 2009, 2024 10-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Listing disk usage


• The du command lists the number of blocks that are used by a file or a directory.
/export # du -sg .
6.59 .

/export # du FirstBoot.sh
8 FirstBoot.sh

/export # du –sm * | sort -rn

2131.16 mksysbaix73
1846.36 mksysbaix72
1373.11 mksysbaix72.minimal
248.52 spot
0.01 nim
0.01 bosinst.data
0.00 FirstBoot.sh
0.00 BUILD.sh

File systems administration © Copyright IBM Corporation 2024

Figure 10-26. Listing disk usage

Use of the du command


There may be a number of files or users that are causing the increased use of space in a particular
file system. The du command helps to determine which files, users, or both, are causing the
problem.
Specifying the units du should use
By default, du gives size information in 512-byte blocks. Use the -k option to display sizes in 1 KB
units, use the -m option to display sizes in 1 MB units, or use the -g option to display sizes in 1 GB
units.
Specifying output by file
By default, du gives a hierarchical listing of directories only. With the -a option, the hierarchical
listing includes the non-directory files. With the -s option, only the specified file is listed. For each
listed directory, the size is the total amount of space for that directory and all files underneath it,
recursively.
Using du with sort
If the output of du is sorted numerically and in descending order (using the -n and –r flags of the
sort command) by the value in the first column, this output can be an aid in determining which
files/directories are the largest. Then using an ls -l, you can determine the file/directory's
owner.
The -x flag
The -x flag/option is also useful. When you use du -ax, the report shows information only from
the specified file system. This is the best way to determine what file is filling a particular file
system.

© Copyright IBM Corp. 2009, 2024 10-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty
Using the find command to locate large files
The find command is useful for locating files that are over a certain size. For example, to find all
files that contain more than 1 000 000 characters, and then list them, use the following
command:
# find / -size +1000000c -print

© Copyright IBM Corp. 2009, 2024 10-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Block size considerations


• Default block size for a JFS2 file system is 4 KB.
ƒ Block size can be specified with the mkfs command with the –o flag:
ƒ –o agblksize=size_in_bytes
ƒ Possible values are: 512, 1024, 2048, 4096 bytes
• If a directory structure is to contain many small files, it is beneficial to store them in a separate
file system with a small block size.
ƒ Otherwise, the file system may fill up and still contain lots of free space.
4096 bytes 4096 bytes

2000 bytes 2000 bytes

1024 1024 1024 1024

This free space cannot These free blocks can


be used by another file be used by other files

File systems administration © Copyright IBM Corporation 2024

Figure 10-27. Block size considerations

Different file systems can have different block sizes, but only one block size can be used within a
single file system.
Smaller block sizes minimize wasted disk space by more efficiently storing the data in a file or
directory's partial logical blocks. Smaller block sizes can also result in additional operational
overhead. Also, device drivers must provide disk block addressability that is the same or smaller
than the file system block size.

© Copyright IBM Corp. 2009, 2024 10-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Fragmentation considerations
• Over time, due to data relocation, extensions, reductions, and deletions, contiguous free space
can run out and data can become fragmented.

File system

Used block

Free block
FileA

• There are three options to deal with this situation:


ƒ Try to increase a file system’s contiguous free space using the defragfs command.
ƒ Backup, delete, and recreate the file system, then restore the data.
ƒ Create a new file system and migrate the data.

File systems administration © Copyright IBM Corporation 2024

Figure 10-28. Fragmentation considerations

Regardless of the block size, over time data can become fragmented on disk. The defragfs
command will attempt to increase a file system's contiguous free space by reorganizing free block
allocations to be contiguous rather than scattered across the disk. The file system to be
defragmented can be specified with the device variable, which can be the path name of the logical
volume (for example, /dev/hd4) or the name of the file system which is the mount point in the
/etc/filesystems file.
Another approach, is to backup and restore the data in a new file system or backup the data,
delete, recreate the file system and restore. This method is cleaner, but requires some downtime.

© Copyright IBM Corp. 2009, 2024 10-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Verify and repair a file system


• The fsck command:
ƒ Checks file system consistency and interactively repairs the file system
ƒ If no file system name is specified, the fsck command checks all file systems which have the
check=true attribute set in /etc/filesystems.
ƒ Orphan files are placed in the lost+found directory.
• Unmount the file system before running fsck.
# umount /data
# fsck /data
The current volume is: /dev/fslv00
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/fslv00
Primary superblock is valid.
*** Phase 1 – Initial inode scan
*** Phase 2 – Process remaining directories
*** Phase 3 – Process remaining files
*** Phase 4 – Check and repair inode allocation map
*** Phase 5 – Check and repair block allocation map
File system is clean.

File systems administration © Copyright IBM Corporation 2024

Figure 10-29. Verify and repair a file system

Always run the fsck command on file systems after a system crash. The internal integrity of a file
system should be checked before the file system is mounted. By default, the fsck command runs
interactively and prompts for the action to perform in order to repair the file system. If orphaned
files or directories (those that cannot be reached) are found, fsck will attempt to store them in the
/lost+found directory in the file system.
It’s time for some review questions.

© Copyright IBM Corp. 2009, 2024 10-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review questions (1 of 3)
1. Does the size of the file system change when the logical volume it is on is increased in size?

2. If you remove a file system, is the logical volume that it is on removed as well?

3. When a file system is created, what needs to be done in order to make it available for use?

4. What is the default size of an inline JFS2 log?

File systems administration © Copyright IBM Corporation 2024

Figure 10-30. Review questions (1 of 3)

© Copyright IBM Corp. 2009, 2024 10-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review answers (1 of 3)
>] Does the size of the file system change when the logical volume it is on is increased in size?
The answer is no.

?] If you remove a file system, is the logical volume that it is on removed as well?
The answer is yes.

@] When a file system is created, what needs to be done in order to make it available for use?
The answer is the file system must be mounted using the PRXQW command.

A] What is the default size of an inline JFS2 log?


The answer is the JFS2 INLINElog device defaults to 0.4% of the logical volume size if the
logsize attribute is not specified. The default action is to create an INLINE log device.

File systems administration © Copyright IBM Corporation 2024

Figure 10-31. Review answers (1 of 3)

© Copyright IBM Corp. 2009, 2024 10-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review questions (2 of 3)
5. What command can you use to determine if a file system is full?

6. What command can produce a report listing the size of all the files and subdirectories
contained in a specific directory?

7. What command checks and can interactively repair inconsistent file systems?

File systems administration © Copyright IBM Corporation 2024

Figure 10-32. Review questions (2 of 3)

© Copyright IBM Corp. 2009, 2024 10-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review answers (2 of 3)
5. What command can you use to determine if a file system is full?
The answer is df.

6. What command can produce a report listing the size of all the files and subdirectories
contained in a specific directory?
The answer is du.

7. What command checks and can interactively repair inconsistent file systems?
The answer is fsck.

File systems administration © Copyright IBM Corporation 2024

Figure 10-33. Review answers (2 of 3)

© Copyright IBM Corp. 2009, 2024 10-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review questions (3 of 3)
Use the following output to answer the questions below:
# lsfs
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/hd4 -- / jfs2 360448 -- yes no
/dev/hd1 -- /home jfs2 65536 -- yes no
/dev/hd2 -- /usr jfs2 3964928 -- yes no
/dev/hd9var -- /var jfs2 655360 -- yes no
/dev/hd3 -- /tmp jfs2 262144 -- yes no
/dev/hd11admin -- /admin jfs2 262144 -- yes no
/proc -- /proc procfs -- -- yes no
/dev/hd10opt -- /opt jfs2 65536 -- yes no
/dev/livedump -- /var/adm/ras/livedump jfs2 524288 -- yes no
/dev/fslv00 -- /data jfs2 1032192 rw no no
/dev/cd0 -- /cdrom cdrfs 16322152 ro no no

8. Which logical volume is the /home file system associated with?

9. What type of file systems are being displayed?

10.What is the mount point for the file system located on the /dev/hd4 logical volume?

File systems administration © Copyright IBM Corporation 2024

Figure 10-34. Review questions (3 of 3)

© Copyright IBM Corp. 2009, 2024 10-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Review answers (3 of 3)
Use the following output to answer the questions below:
# lsfs
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/hd4 -- / jfs2 360448 -- yes no
/dev/hd1 -- /home jfs2 65536 -- yes no
/dev/hd2 -- /usr jfs2 3964928 -- yes no
/dev/hd9var -- /var jfs2 655360 -- yes no
/dev/hd3 -- /tmp jfs2 262144 -- yes no
/dev/hd11admin -- /admin jfs2 262144 -- yes no
/proc -- /proc procfs -- -- yes no
/dev/hd10opt -- /opt jfs2 65536 -- yes no
/dev/livedump -- /var/adm/ras/livedump jfs2 524288 -- yes no
/dev/fslv00 -- /data jfs2 1032192 rw no no
/dev/cd0 -- /cdrom cdrfs 16322152 ro no no

8. Which logical volume is the /home file system associated with?


The answer is GHYKG]
F] What type of file systems are being displayed?
The answer is  ?` #$U2/-s t.
>;] What is the mount point for the file system located on the /dev/hd4 logical r
4  y]
File systems administration © Copyright IBM Corporation 2024

Figure 10-35. Review answers (3 of 3)

© Copyright IBM Corp. 2009, 2024 10-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Exercise

File systems administration

File systems administration © Copyright IBM Corporation 2024

Figure 10-36. Exercise

© Copyright IBM Corp. 2009, 2024 10-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 10. File systems administration

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Identify the components of an AIX file system
ƒ Work with enhanced journaled file systems
í Add, list, change, and delete
ƒ Monitor file system disk space usage
ƒ Manage file system growth and control growing files

© Copyright IBM Corporation 2024

Figure 10-37. Unit summary

© Copyright IBM Corp. 2009, 2024 10-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Unit 11.The Object Data Manager


Estimated time
01:10

Overview
This unit covers important concepts and procedures that are related to AIX file systems.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Object data manager
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-object-data-manager
AIX Version 7.3 Command Reference
https://www.ibm.com/docs/en/aix/7.3?topic=commands
AIX Version 7.3 General Programming Concepts: Writing and Debugging Programs
https://www.ibm.com/docs/en/aix/7.3?topic=aix-general-programming-concepts
AIX Version 7.3 Technical Reference: Kernel Services and Subsystem Operations
https://www.ibm.com/docs/en/ssw_aix_73/pdf/kerneltechref_pdf.pdf

© Copyright IBM Corp. 2009, 2024 11-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the structure of the ODM
ƒ Use the ODM command-line interface
ƒ Explain the role of the ODM in device configuration
ƒ Describe the function of the most important ODM files

© Copyright IBM Corporation 2024

Figure 11-1. Unit objectives

Importance of this unit


The ODM is an important component of AIX and is one major feature that distinguishes AIX from
other UNIX systems. This unit describes the structure of the ODM and explains how you can work
with ODM files that use the ODM command-line interface.
A good understanding of the ODM is important and can help in analyzing problems. Point out that
the ODM is primarily used for device configuration and that is a major focus in this unit.
Let’s start with the basics, an introduction to the ODM.

© Copyright IBM Corp. 2009, 2024 11-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Topic 1 objectives
• Describe the structure of the ODM
• Use the ODM command-line interface and explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 11-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

What is the ODM?


• The Object Data Manager (ODM) is a database that is intended for storing system information.
• Physical and logical device information is stored and maintained by using objects with
associated characteristics.

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-3. What is the ODM?

This visual is intentionally kept simple. The goal here is to introduce the ODM with details later.
The ODM is made of object classes, which are broken into individual objects and descriptors.
AIX offers a command-line interface to work with the ODM files.
The device information is held in the customized and the predefined databases (Cu*, Pd*).

© Copyright IBM Corp. 2009, 2024 11-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Data managed by the ODM

Devices Software

System
SMIT menus
Resource ODM and panels
Controller

TCP/IP Error Log,


NIM
configuration Dump

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-4. Data managed by the ODM

System data that is managed by ODM


The ODM manages the following system data:
• Device configuration data *
• Software Vital Product Data (SWVPD)*
• System Resource Controller (SRC) data
• TCP/IP configuration data
• Error log and dump information
• NIM (Network Installation Manager) information
• SMIT menus and commands

Emphasis in this unit


The main emphasis in this unit is on the use of the ODM to store and manage information for
*devices and *software products (software vital product data). During the course, many other
ODM classes are described.
Note that in the visual the two “hands” on the visual “point” to the types of data that is
emphasized. Later on, we will learn the corresponding ODM database files where the data is
stored.
What is some key terminology for ODM?

© Copyright IBM Corp. 2009, 2024 11-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

ODM components
1

uniquetype attribute deflt values

tape/scsi/scsd block_size none 0-2147483648,1

disk/scsi/osdisk pvid none

tty/rs232/tty login disable enable, disable, ...

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-5. ODM components

This visual shows an extraction out of the ODM class PdAt. We are not yet concerned with the
meaning of PdAt or the different fields on this page. Instead we will concentrate on the
components of the ODM.

Completing the drawing on the visual


The drawing on the visual identifies the basic components of ODM, but some terms were
intentionally omitted from the drawing. Your instructor completes this drawing during the lecture.
Complete your own copy of the drawing by writing in the terms that are supplied by your
instructor.

ODM data format


For security reasons, the ODM data is stored in binary format. To work with ODM files, you must
use the ODM command-line interface. It is not possible to update ODM files with an editor.
Complete the visual during the lesson. ODM components are:
• Object classes (1)
The ODM consists of many database files, where each file is called an object class.
• Descriptors (2)
The descriptors describe the layout of the objects. They determine the name and data type of
the fields that are part of the object class.
• Objects (3)
Each object class consists of objects. Each object is one record in an object class.

© Copyright IBM Corp. 2009, 2024 11-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
It is also important to understand how the terms predefined device information and customized
device information are used when discussing the ODM.

© Copyright IBM Corp. 2009, 2024 11-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

ODM database files

Predefined device information PdDv, PdAt, PdCn


Customized device information CuDv, CuAt, CuDep, CuDvDr, CuVPD,
Config_Rules

Software vital product data history, inventory, lpp, product


SMIT menus sm_menu_opt, sm_name_hdr, sm_cmd_hdr,
sm_cmd_opt

Error log, alog, and dump information SWservAt

System resource controller SRCsubsys, SRCsubsvr, ...


Network Installation Manager (NIM) nim_attr, nim_object, nim_pdattr

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-6. ODM database files

Major ODM files


The table in the visual summarizes the major ODM files in AIX. As you can see, the files that are
listed in this table are placed into several different categories.

Current focus
This unit concentrates on ODM classes that are used to store device information and software
product data. This section focuses on ODM classes that store device information.

Predefined and customized device information


The first two rows in the table on the visual indicate that some ODM classes contain predefined
device information and that others contain customized device information. What is the difference
between these two types of information?
Predefined device (PdDv) information describes all supported devices.
Customized device (CuDV) information describes all devices that are defined (configured) on the
system.
It is important that you understand the difference between these two information classifications.
The classes are described in more detail in the next topic of this unit.
The next visual shows just the ODM object classes that are used during the configuration of a
device. It also introduces cfgmgr, the configuration manager.

© Copyright IBM Corp. 2009, 2024 11-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Device configuration summary

Predefined databases
PdDv

PdCn PdAt

Configuration manager
Config_Rules
(cfgmgr)

Customized databases

CuDep CuDv CuAt

CuDvDr CuVPD

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-7. Device configuration summary

ODM classes that are used during device configuration


The visual shows the ODM object classes that are used during the configuration of a device.

Roles of cfgmgr and the Config_Rules ODM object class


When an AIX system boots, the Configuration Manager (cfgmgr) is responsible for configuring
devices. One ODM object class that the cfgmgr uses to determine the correct sequence when
configuring devices is Config_Rules. This ODM object class also contains information about
various method files that are used for device management.
The role of the Config_Rules object class is covered here and on the next visual (and the
associated student notes), but more detail about each of the other object classes is shown later.
Look at the device configuration process a little more closely.

© Copyright IBM Corp. 2009, 2024 11-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Configuration manager
Predefined "Plug and Play"
PdDv
PdAt
PdCn

Config_Rules
cfgmgr

Customized Methods
CuDv Define
Device Load
CuAt Configure
Driver
CuDep Change
CuDvDr Unload Unconfigure
CuVPD Undefine

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-8. Configuration manager

Importance of Config_Rules object class


Although cfgmgr gets credit for managing devices (adding, deleting, changing), it is the programs,
called methods, which are defined in the predefined devices object class that do the actual work.
The Config_Rules object class defines the order in which cfgmgr examines various buses to look
for attached devices to configure.
Try entering the command odmget Config_Rules to find out more about the content of this object
class. Note the frequent references to the directories /etc/methods and /usr/lib/methods.
The ODM object classes are stored in three repositories.

© Copyright IBM Corp. 2009, 2024 11-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Location and contents of ODM repositories


CuDv Constant for machines of same architecture
CuAt
CuDep Constant for all machines
CuDvDr
CuVPD
Config_Rules PdDv
PdAt
history PdCn
inventory
lpp history
product inventory
lpp history
nim_* product inventory
SWservAt lpp
SRC* sm_* product

/etc/objrepos /usr/lib/objrepos /usr/share/lib/objrepos

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-9. Location and contents of ODM repositories

Introduction
Originally, the three parts of the ODM were designed to support diskless, dataless, and other
workstations. The ODM object classes are held in three repositories. Each of these repositories is
described in the material that follows.

/etc/objrepos
The purpose of this location is to hold information that is expected to vary from machine to
machine. It contains the part of the product that cannot be shared among machines. Each client
must have its own copy. Most of this software requires a separate copy of the product for each
machine that is associated with the configuration of the machine or product. One example is the
customized device information. For example, the location of a device or the overrides to the
default attributes can be expected to vary. This repository contains the customized devices object
classes and the four object classes that are used by the Software Vital Product Database (SWVPD)
for the / (root) part of the installable software product. The root part of the software contains files
that must be installed on the target system. For example, any configuration files that are used by
the programs would be in the root part. To access information in the other directories, this
directory contains symbolic links to the predefined devices object classes. The links are needed
because the ODMDIR variable points to only /etc/objrepos.

/usr/lib/objrepos
This repository contains the predefined devices object classes, SMIT menu object classes, and
the four object classes that are used by the SWVPD for the /usr part of the installable software
product. The object classes in this repository can be shared across the network by /usr clients,

© Copyright IBM Corp. 2009, 2024 11-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
dataless and diskless workstations. Software that is installed in the /usr part can be shared
among several machines with compatible hardware architectures.

/usr/share/lib/objrepos
Contains the four object classes that are used by the SWVPD for the /usr/share part of the
installable software product. The /usr/share part of a software product contains files that are not
hardware-dependent. They can be shared among several machines, even if the machines have a
different hardware architecture. An example is terminfo files that describe terminal capabilities.
As terminfo is used on many UNIX systems, terminfo files are part of the /usr/share part of a
system product.
lslpp options
The lslpp command can list the software that is recorded in the ODM. When run with the -l
(lowercase L) flag, it lists each of the locations ( /, /usr/lib, /usr/share/lib) where it finds the
fileset. If you are not concerned with these distinctions, it can be distracting. Alternately, you can
run lslpp -L that reports each fileset one time, without distinguishing between the root, usr, and
share portions.

When should you be concerned about private versus shared ODM


repositories?
Most of you do not deal with diskless and dataless servers, so the distinctions for the device
objects generally do not concern you; every machine has all three repositories local for those
objects. If you are working with Workload Partitions (WPARs), then the different software object
class repositories are a major concern. A WPAR would have the private or root portion of the
software in its private file systems. The other object repositories for the software would be
maintained in global environment file systems, which would be shared among all WPARs, with
read-only mounts. For details, refer to the online AIX documentation.
It is important to understand how ODM classes interact.

© Copyright IBM Corp. 2009, 2024 11-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

How ODM classes act together


# cfgmgr

PdDv: CuDv:
type = "14106902" name = "ent1"
class = "adapter" status = 1
subclass = "pci" chgstatus = 2
prefix = "ent" ddins = "pci/goentdd"
... location = "02-08"
DvDr = "pci/goentdd" parent = "pci2"
Define = /usr/lib/methods/define_rspc" connwhere = "8“
Configure = "/usr/lib/methods/cfggoent" PdDvLn = "adapter/pci/14106902"
...
uniquetype = "adapter/pci/14106902"

# chdev -l ent1 -a jumbo_frames=yes

PdAt: CuAt:
uniquetype = "adapter/pci/14106902" name = "ent1"
attribute = "jumbo_frames" attribute = "jumbo_frames"
deflt = "no" value = "yes"
values = "yes,no" type = "R"
... ...

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-10. How ODM classes act together

Interaction of ODM classes


The visual and the notes summarize how ODM classes act together.
• For a particular device to be defined in AIX, the device type must be defined in ODM class
PdDv.
• A device is defined with either the cfgmgr (if the device is detectable), or by the mkdev
command. Both commands use the define method to generate an instance in ODM class
CuDv. The configure method is used to load a specific device driver and to generate an entry
in the /dev directory.
• Notice the link PdDvLn from CuDv back to PdDv.
• Default attribute values are only in PdAt which, in the example of a gigabit Ethernet adapter,
means you might not use jumbo frames (default is no). If you change the attributes, for
example, jumbo_frames to yes, you get an object with the nondefault value in CuAt.
As you know, the ODM does not manage all the system data.

© Copyright IBM Corp. 2009, 2024 11-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Data not managed by the ODM

File system
information ?

User/security
information ?

Queues and
queue devices ?
The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-11. Data not managed by the ODM

The visual shows only a subset of data that is not in ODM.

Completion of this page


The visual identifies some types of system information that the ODM does not manage, but the
names of the files that store these types of information are intentionally omitted from the visual.
Your instructor completes this visual during the lecture. Complete your own copy of the visual by
writing in the file names that are supplied by your instructor.
Consider the following questions:
1. Which file contains information about the file systems on your system?
/etc/filesystems
2. Which file contains most of the basic information (such as home directory and shell) about the
users on your system?
/etc/passwd
Which file contains user attributes like password rules?
/etc/security/user
3. Where is information about your queues and queue devices stored?
/etc/qconfig
Another interesting example is that the TCP/IP configuration can still be set up without using
ODM. In this case, traditional ASCII files are used for storing TCP/IP data. To determine whether
ODM is used for TCP/IP, use the following command:
# lsattr -El inet0

© Copyright IBM Corp. 2009, 2024 11-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
If the attribute bootup_option is set to no, ODM files are used. If it is set to yes, ODM is not used.
Be sure to complete the appropriate line on the visual as you answer each question.
Let’s review some of the points we have covered so far in this unit.

© Copyright IBM Corp. 2009, 2024 11-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Let's review: Device configuration and the ODM

1.
_______

Undefined Defined Available

2. 3.
AIX kernel Applications

D____ D____ 4. /____/_____ 5.

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-12. Let's review: Device configuration and the ODM

Instructions
Answer the following questions by writing them on the picture in the visual. If you are unsure
about a question, leave it out.
1. Which command configures devices in an AIX system? Note: It is not an ODM command.
2. Which ODM class contains all devices that your system supports?
3. Which ODM class contains all devices that are configured in your system?
4. Which programs are loaded into the AIX kernel to control access to the devices?
5. If you have a configured tape drive rmt1, which special file do applications access to work
with this device?
Answers:
1. cfgmgr
2. PdDv
3. CuDv
4. Device driver
5. /dev/rmt1
To summarize the picture:
To configure a device, it must have an entry in the PdDv object class. It is not possible to configure
a device that does not have an entry in PdDv. If a device is in the defined state, you definitely have
an object in ODM class CuDv. The difference between the defined state and the available state is
that, in the defined state, no device driver for the device is loaded into the AIX kernel.

© Copyright IBM Corp. 2009, 2024 11-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
When a device is made available, the device driver is loaded into the kernel. Additionally, a
special file is created in the /dev directory that applications need to access the device.
These steps are done dynamically without a need to recompile the AIX kernel (which historically
had to be done on other UNIX systems). This capability gave a significant advantage of AIX against
other UNIX systems.
What are some commands that work with the ODM?

© Copyright IBM Corp. 2009, 2024 11-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Topic 1 objectives
• Describe the structure of the ODM
• Use the ODM command-line interface and explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-13. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 11-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

ODM commands
Object class: odmcreate, odmdrop

Descriptors: odmshow

uniquetype attribute deflt values

tape/scsi/scsd block_size none 0-2147483648,1

disk/scsi/osdisk pvid none

tty/rs232/tty login disable enable, disable, ...

Objects: odmadd, odmchange, odmdelete, odmget

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-14. ODM commands

Introduction
Different commands are available for working with each of the ODM components: object classes,
descriptors, and objects.

Commands for working with ODM object classes


• Creating object classes
You can create ODM classes that use the odmcreate command. This command has the
following syntax: odmcreate descriptor_file.cre
The file descriptor_file.cre contains the class definition for the corresponding ODM class.
Usually, these files have the suffix .cre. The exercise for this unit contains an optional part that
shows how to create self-defined ODM object classes.
• Deleting object classes
To delete an entire ODM class, use the odmdrop command. The odmdrop command has the
following syntax: odmdrop -o object_class_name
The name object_class_name is the name of the ODM class you want to remove. Be careful
with this command. It removes the complete class immediately.

Command to view ODM descriptors


To view the underlying structure of an object class, use the odmshow command. The odmshow
command has the following syntax: odmshow object_class_name

© Copyright IBM Corp. 2009, 2024 11-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
The visual shows an extraction from ODM class PdAt, where four descriptors are shown
(uniquetype, attribute, deflt, and values).

Commands for working with ODM objects


Usually, system administrators work with ODM objects. The odmget command retrieves object
information from an existing object class. To add new objects, use the odmadd command. To
delete objects, use the odmdelete command. To change objects, use the odmchange command.
Working on the object level is explained in more detail on the following pages.

The ODMDIR environment variable


All ODM commands use the ODMDIR environment variable, which is set in the file
/etc/environment. The default value of ODMDIR is /etc/objrepos.
The commands for working with ODM objects are the commands system administrators use most
often.

© Copyright IBM Corp. 2009, 2024 11-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Topic 1 objectives
• Describe the structure of the ODM
• Use the ODM command-line interface and explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-15. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 11-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Software vital product data


product:
lpp_name = "bos.rte.printers"
comp_id = "5765-G6200"
update = 0
cp_flag = 2359571 inventory:
fesn = "0000" lpp_id = 38
name = "bos" private = 0
state = 5 file_type = 0
ver = 7 format = 1
rel = 1 loc0 = "/etc/qconfig"
mod = 0 loc1 = ""
fix = 0 loc2 = ""
ptf = "" size = 0
media = 0 checksum = 0
sceded_by = ""
...
fixinfo = ""
prereq = "*coreq bos.rte 7.1.0.0"
description = ""
supersedes = "" history:
lpp_id = 38
lpp: event = 2
name = "bos.rte.printers" ver = 7
size = 0 rel = 1
state = 5 mod = 0
cp_flag = 2359571 fix = 0
group = "" ptf = ""
magic_letter = "I" corr_svn = ""
ver = 7 cp_mod = ""
rel = 1 cp_fix = ""
mod = 0 login_name = "root"
fix = 0 state = 1
description = "Front End Printer Support" time = 1310159341
lpp_id = 38 comment = ""

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-16. Software vital product data

Role of the installp command


Whenever installing a product or update in AIX, the installp command uses the ODM to maintain
the Software Vital Product Database (SWVPD).

Contents of SWVPD
The following information is part of the SWVPD:
• The name of the software product (for example, bos.rte.printers)
• The version, release, modification, and fix level of the software product (for example, 7.3.2.1
or 7.2.1.1)
• The fix level, which contains a summary of fixes that are implemented in a product
• Any Program Temporary Fix (PTF) installed on the system
• The state of the software product:
▪ Available (state = 1)
▪ Applying (state = 2)
▪ Applied (state = 3)
▪ Committing (state = 4)
▪ Committed (state = 5)
▪ Rejecting (state = 6)
▪ Broken (state = 7)

© Copyright IBM Corp. 2009, 2024 11-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
SWVPD classes
The Software Vital Product Data is stored in the following ODM classes:
• lpp The lpp object class contains information about the installed software products, including
the current software product state and description.
• inventory The inventory object class contains information about the files that are associated
with a software product.
• product The product object class contains product information about the installation and
updates of software products and their prerequisites.
• history The history object class contains historical information about the installation and
updates of software products.
Note the data is stored in the ODM classes (version, release, and so forth). Observe that the lpp_id
descriptor links the classes together. Note that the list of descriptors is not complete and the slide
lists only selected descriptors for teaching purposes.
Note that the lslpp command, has options like -l, -h, -f, and -w. This command queries the
software vital product database. Most of this information can be seen with the high level lslpp
command. The flags (and the related object classes) are:
• -L: Lists the filesets (lpp object class)
• -d: Lists the fileset dependencies (product object class)
• -p: Lists the fileset prerequisites (product object class)
• -w: Lists the fileset for a specific file (inventory object class)
• -f: Lists the files for a specific fileset (inventory object class)
• -h: Lists the maintenance history for a fileset (history object class)
The commands that are used to produce the output on the visual are:
• lpp:
# odmget -q name=bos.rte.printers lpp
• product:
# odmget -q lpp_name=bos.rte.printers product
• inventory:
# odmget -q lpp_id=38 inventory | pg
Since there are a number of files in the root file system for this fileset, many objects match this
query (hence the pg command). There are also files in this fileset in the /usr file system. To
display these files: ODMDIR=/usr/lib/objrepos, then rerun the last odmget command. Note:
ODMDIR defaults to /etc/objrepos.
• history:
# odmget -q lpp_id=38 history
What are the most important software states?

© Copyright IBM Corp. 2009, 2024 11-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Software states

Applied • Only possible for PTFs or updates


• Previous version stored in /usr/lpp/Package_Name
• Rejecting update recovers to saved version
• Committing update deletes previous version
Committed • Removing committed software is possible
• No return to previous version

Applying If installation was not successful:


Committing 1. installp -C
Rejecting 2. smit maintain_software
Deinstalling
Broken • Cleanup failed
• Remove software and reinstall

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-17. Software states

Introduction
The AIX software vital product database uses software states that describe the status of an
installation or update package.

The Applied and Committed states


When installing a Program Temporary Fix (PTF) or update package, you can install the software
into an Applied state. Software in an Applied state contains the newly installed version (which is
active) and a backup of the old version (which is inactive). Software in the Applied state gives you
the opportunity to test the new software. If it works as expected, you can commit the software,
which removes the old version. If it does not work as planned, you can reject the software, which
removes the new software and reactivate the old version.
Install packages cannot be applied. These packages are always in the committed state. If you
would like to return to the old version after a product is committed, you must remove the current
version and reinstall the old version.

States indicating installation problems


If an installation does not complete successfully, for example, if the power fails during the
installation, you might find software states like applying, committing, rejecting, or deinstalling.
To recover from this failure, run the command installp -C or use the SMIT fastpath smit
maintain_software. Select Clean Up After Failed or Interrupted Installation when working in
SMIT.

© Copyright IBM Corp. 2009, 2024 11-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
The broken state
After a cleanup of a failed installation, you might detect a broken software status. In this case, the
only way to recover from the failure is to remove and reinstall the software package.
What is in the PdDv ODM object class?

© Copyright IBM Corp. 2009, 2024 11-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

ODM and high-level device commands


• Listing objects in the Predefined and Customized object classes:
ƒ List the PdDv object class:
í # lsdev –P [-c <class>] [-s <subclass>] [-t <type>]
ƒ List the CuDv object class:
í # lsdev –C [-l <device name>] [-c <class>] [-s <subclass>] [-t <type>]
• Listing default and effective attributes:
ƒ List default attributes from PdAt object class:
í # lsattr –D –c <class> -s <subclass> -t <type> [-a <attribute>]
í # lsattr –D –l <device name> [-a <attribute>]
ƒ List an enumeration or range of acceptable attribute values:
í # lsattr –R –l <device name> -a <attribute name>
ƒ List effective attributes (PdAt and overrides in CuAt):
í # lsattr –E –l <device name> [-a <attribute>]

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-18. ODM and high-level device commands

Most of the time the information in the ODM device database is accessed and managed by using
high-level commands. Understanding the object classes and their roles helps when using these
commands.
The lsdev command has options that control which ODM object class you list. To see the objects
in the predefined device (PdDv) object class, use the -P flag. If you want to control the output,
you can optionally qualify the command with any combination of the three key descriptors: class,
subclass, and type.
To see objects in the customized device (CuDv) object class, use the -C flag. To control the output,
you can either specify a particular device (by using its logical device name) or you can use any
combination of the PdDv object class key descriptors. Here is an example of specifying a
particular device:
# lsdev -l hdisk0
The most common PdDv descriptor qualification is the class. Thus, it is common to enter
commands such as:
# lsdev -Cc disk
# lsdev -Cc adapter
The lsattr command, also, has options which control which ODM object classes it uses.
To see the default attribute values, which are stored in the predefined attributes (PdAt) object
class, use the -D flag. You must uniquely identify the object by either:
• Specifying the class, subclass, and type for the object.
• Specifying the logical device name of a customized device that is related to the PdAt object.

© Copyright IBM Corp. 2009, 2024 11-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty
The effective attributes are either the attributes in the Customized Attributes (CuAt) object class
for the specified device, or the default attribute value from the related PdAt object. The CuAt
object class has entries for attributes that are different from their default values in PdAt. You
must specify a particular device by providing the logical device name of that device.
When using the chdev command to modify an attribute value, the command logic does not let you
enter unacceptable values. It knows what is allowed by examining the value descriptor for the
attribute in the PdAt object class. If you get an exception message when you attempt to set an
attribute value, it is useful to know what is acceptable. The lsattr command displays this
information when using the -R (range) flag. The -R option requires that the attribute name is
specified in addition to the logical name of the device for which you are attempting modify that
attribute.
The lsattr –P flag displays an attributes value when the device was last configured, or before
modifying any of its attributes by using the chdev command with the -P or -T flag. This option will
display applied attributes that may not yet be in effect on the running system.
Time for some review questions.

© Copyright IBM Corp. 2009, 2024 11-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Review questions
1. True or false: The CuAt ODM object class contains an entry for each attribute for each
supported device.

2. True or false: The /etc/objrepos ODM repository holds object classes that are specific to a
system.

3. True or false: A device in a defined state has an entry in CuDv, but cannot be used at this
time.

4. True or false: An available device has its device driver loaded into the kernel and a device file
created in /dev (if applicable).

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-19. Review questions

© Copyright IBM Corp. 2009, 2024 11-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Review answers
1. True or false: The CuAt ODM object class contains an entry for each attribute for each
supported device.
The answer is false. It is the PdAt ODM object class. The CuAt object class only contains attributes that
are different from the default value.
2. True or false: The /etc/objrepos ODM repository holds object classes that are specific to a
system.
The answer is true.
3. True or false: A device in a defined state has an entry in CuDv, but cannot be used at this
time.
The answer is true.
4. True or false: An available device has its device driver loaded into the kernel and a device file
created in /dev (if applicable).
The answer is true.

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-20. Review answers

© Copyright IBM Corp. 2009, 2024 11-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Exercise

The Object Data Manager

The Object Data Manager © Copyright IBM Corporation 2024

Figure 11-21. Exercise

© Copyright IBM Corp. 2009, 2024 11-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 11. The Object Data Manager

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the structure of the ODM
ƒ Use the ODM command-line interface
ƒ Explain the role of the ODM in device configuration
ƒ Describe the function of the most important ODM files

© Copyright IBM Corporation 2024

Figure 11-22. Unit summary

© Copyright IBM Corp. 2009, 2024 11-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Unit 12.LVM metadata


Estimated time
01:25

Overview
This unit explains how metadata concepts are important in understanding and working with AIX
logical volume manager problems.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Object data manager
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-object-data-manager
AIX Version 7.3 Command Reference
https://www.ibm.com/docs/en/aix/7.3?topic=commands
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
IBM Redbooks:
SG24-5432, AIX Logical Volume Manager: from A to Z: Introduction and Concepts
https://www.redbooks.ibm.com/abstracts/sg245432.html
SG24-5433, AIX Logical Volume Manager: from A to Z: Troubleshooting and Commands
https://www.redbooks.ibm.com/abstracts/sg245433.html

© Copyright IBM Corp. 2009, 2024 12-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Explain where LVM metadata information is stored.
ƒ Use importvg and exportvg to manage LVM metadata.
ƒ Solve ODM-related LVM problems.

© Copyright IBM Corporation 2024

Figure 12-1. Unit objectives

Let’s start with a review of LVM terms.

© Copyright IBM Corp. 2009, 2024 12-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 12-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Review: LVM terms

Physical Logical
Partitions Partitions

Physical Logical
Volumes Volume

Volume
Group
LVM metadata © Copyright IBM Corporation 2024

Figure 12-3. Review: LVM terms

Introduction
This visual and the associated student notes provide a review of basic LVM terms.

Volume groups, physical volumes, and physical partitions


A volume group (VG) consists of one or more physical volumes (PV) that are divided into physical
partitions (PP). When a volume group is created, a physical partition size must be specified. This
physical partition size is the smallest allocation unit for the LVM. The physical partition size is
specified in units of megabytes from 1 (1 MB) through 131,072 (1 GB) for normal or big volume
groups (more on the physical partition size later). The physical partition size for scalable volume
groups can be up to 128 GB. The physical partition size must be equal to a power of 2 (example 1,
2, 4, 8). The default physical partition size for normal and big volume groups is the lowest value
that can be used to remain within a limitation of 1016 physical partitions per physical volume. The
default value for scalable volume groups (introduced in AIX 5.3, now the default in AIX 7.3) is the
lowest value that can be used to accommodate 2040 physical partitions per physical volume.
For scalable volume groups, the maximum number of physical partitions is no longer defined on a
per disk basis but applies to the entire volume group. The scalable volume group can hold up to
2097152 (2048 KB) physical partitions.

Logical volumes and logical partitions


The LVM provides logical volumes (LVs) that can be created, extended, moved, and deleted at
run time. A logical volume can span multiple disks, which is one of the biggest advantages of the
LVM.

© Copyright IBM Corp. 2009, 2024 12-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
Logical volumes contain the JFS and JFS2 file systems, paging spaces, journal logs, the boot
logical volumes, or nothing (when used as a raw logical volume).
Logical volumes are divided into logical partitions (LPs), where each logical partition is
associated with at least one physical partition.
If no physical partition size is specified when creating the volume group, the mkvg command
attempts to figure out an appropriate physical partition size based on the disks in the volume
group.
Look at the unique identifiers that are used by LVM for the volume groups, logical volumes, and
physical volumes.

© Copyright IBM Corp. 2009, 2024 12-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

LVM identifiers

Goal: Unique worldwide identifiers for:


volume groups, hard disks, and logical volumes

# lsvg rootvg | grep IDENT


... VG IDENTIFIER: 00c35ba000004c00000001157f54bf78

# lspv 32 bytes long


hdisk0 00c35ba07b2e24f0 rootvg active
32 bytes long
# lsattr –El hdisk# -a unique_id (16 are shown)
unique_id
3321360050768019102C0F000000000006E2904214503IBMfcp

# lslv hd4 | grep IDENT


LV IDENTIFIER: 00c35ba000004c00000001157f54bf78.4 ...
... VGID.minor number

# uname -m
00C35BA04C00
LVM metadata © Copyright IBM Corporation 2024

Figure 12-4. LVM identifiers

Use of identifiers
The LVM uses identifiers for disks, volume groups, and logical volumes. As volume groups can be
exported and imported between systems, these identifiers must be unique worldwide. AIX
generated identifiers are based on the CPU ID of the creating host and a time stamp.

Volume group identifiers


As shown on the visual, the volume groups identifiers (VGID) have a length of 32 bytes.

Disk identifiers
Disk identifiers have a length of 32 bytes, but currently the last 16 bytes are unused and are all set
to 0 in the ODM. Notice that, as shown on the visual, only the first 16 bytes of this identifier are
displayed in the output of the lspv command.
In a SAN environment, path management needs to have a method for identifying a disk that is
discovered over two different paths. Some storage solutions in an AIX environment use the PVID
for this purpose. Other storage solutions use a IEEE volume identifier (ieee_volname) or a UDID
unique identifier (unique_id) for this purpose. Each of these methods would be attributes of the
disk in the ODM.
The PVID attribute is created the first time that a disk is assigned to a volume group.
If you ever must manually update the disk identifiers in the ODM, do not forget to add 16 zeros to
the physical volume ID.

© Copyright IBM Corp. 2009, 2024 12-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
Logical volume identifiers
The logical volume identifiers consist of the volume group identifier, a period, and the minor
number of the logical volume. Note that these identifiers are important, since the logical name
that you use might not be known and in various problem scenarios you need to work with the
unique identifier instead.
Note that the physical volume IDs are 32 bytes long. The last 16 bytes are currently set to zeros.
This information is important for the lab exercise.
Let’s discuss where LVM stores its information.

© Copyright IBM Corp. 2009, 2024 12-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

LVM data on disk control blocks


• Volume Group Descriptor Area (VGDA)
ƒ Most important data structure of LVM
ƒ Global to the volume group (same on each disk)
ƒ One or two copies per disk
• Volume Group Status Area (VGSA)
ƒ Tracks the state of mirrored copies
ƒ One or two copies per disk
• Logical Volume Control Block (LVCB)
ƒ Historically occupied the first 512 bytes of each logical volume
ƒ Contains logical volume attributes (policies, number of copies)
ƒ Scalable volume groups: The information is merged into VGDA

LVM metadata © Copyright IBM Corporation 2024

Figure 12-5. LVM data on disk control blocks

Disk control blocks that are used by LVM


The LVM uses three different disk control blocks:
• The Volume Group Descriptor Area (VGDA) is the most important data structure of the LVM.
A redundant copy is kept on each disk that is contained in a volume group. Each disk contains
the complete allocation information of the entire volume group.
• The Volume Group Status Area (VGSA) tracks the status of all physical volumes in the volume
group (active or missing) and the state of all allocated physical partitions in the volume group
(active or stale). Each disk in a volume group contains a VGSA.
• The Logical Volume Control Block (LVCB) traditionally is in the first 512 bytes of each logical
volume. If raw devices are used (for example, many database systems use raw logical
volumes), be careful that these programs do not destroy the LVCB. However, LVCB is not kept
at this location in scalable volume groups, but instead is kept in the same reserved disk area
as the VGDA. Also, the administrator of a big volume group can use the -T O option of the
mklv command to request that the LVCB is not stored in the beginning of the logical volume,
but instead part of the VGDA.

VGSA for scalable volume groups


The VGSA for scalable volume groups consists of three areas: Physical Volume Missing Area
(PVMA), Mirror Write Consistency Dirty Bit Area (MWC_DBA), and PP Status Area (PPSA).
• Physical Volume Missing Area: The PVMA tracks if any of the disks are missing.
• MWC dirty bit area: The MWC_DBA holds the status for each logical volume if passive mirror
write consistency is used.

© Copyright IBM Corp. 2009, 2024 12-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
• PP status area: The PPSA logs any stale PPs.
The overall size that is reserved for the VGSA is independent of the configuration parameters of
the scalable volume group and stays constant. However, the size of the contained PPSA changes
in proportion to the configured maximum number of PPs.

LVCB-related considerations
For normal volume groups, the LVCB is in the first block of the user data within the logical volume.
Big volume groups keep more LVCB information in the VGDA. The LVCB structure on the first
logical volume user block and the LVCB structure within the VGDA are similar but not identical. If a
big volume group was created with the -T O option of the mkvg command, no LVCB occupies the
first block of the logical volume. With scalable volume groups, logical volume control information
is no longer stored on the first user block of any logical volume. Therefore, no precautions need to
be taken when using raw logical volumes because there is no longer a need to preserve the
information that is held by the first 512 bytes of the logical device. The mkvg command by default
creates a scalable type of volume group that can accommodate up to 1024 physical volumes, 256
logical volumes, and 32768 physical partitions.
See which other locations are used to store LVM data.

© Copyright IBM Corp. 2009, 2024 12-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

LVM data in the operating system


• AIX files
ƒ /dev/hdiskX - Special file for a disk
ƒ /dev/Vgname - Special file for administrative access to a volume group
ƒ /dev/Lvname - Special file for a logical volume
ƒ /etc/filesystems - Used by the mount command to associate logical volume name, file system log,
and mount point
• Object Data Manager (ODM)
ƒ Metadata on physical volumes, volume groups, and logical volumes
ƒ CuDv, CuAt, CuDvDr, CuDep

LVM metadata © Copyright IBM Corporation 2024

Figure 12-6. LVM data in the operating system

LVM information that is stored in the ODM


Physical volumes, volume groups, and logical volumes are handled as devices in AIX. Every
physical volume, volume group, and logical volume is defined in the customized object classes in
the ODM.

LVM information that is stored in AIX files


As shown on the visual, many AIX files also contain LVM-related data. The kernel always stores
the VGDA in memory to increase performance. This technique is called a memory-mapped file.
Let’s look (at a high level) at what ODM classes hold LVM metadata.

© Copyright IBM Corp. 2009, 2024 12-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

LVM-related ODM objects


• CuDv: Identifies as devices:
ƒ Volume groups, physical volumes, logical volumes
• CuAt: Attributes for each LVM entity, including:
ƒ Physical volume’s PVID value (pvid)
ƒ Logical volume’s LVID value (lvserial_id)
ƒ Volume Group’s VGID value (vgserial_id)
ƒ Volumes group’s PVIDs (pv) – one for each PV
• CuDep: One object per logical volume dependency
• CuDvDr: Device driver information:
ƒ Object for each volume group, physical volume, and logical volume

LVM metadata © Copyright IBM Corporation 2024

Figure 12-7. LVM-related ODM objects

Overview
The LVM metadata that is maintained in the ODM database has a large overlap with the
information maintained in the VGDA and LVCB control blocks on disk. Yet, there is information in
the control blocks (such as the mapping of logical partitions) that is not kept in the ODM. There is
also information (such as device drivers and logical names) that is not kept in the control blocks.
Each metadata location plays a special role. There are mechanisms to ensure that the information
does not conflict.

LVM-related ODM object classes


The visual provides an overview of the ODM objects. Each of these objects is covered in more
detail later in the unit.
Let’s discuss how the importvg and exportvg commands relate to these two LVM metadata
locations.

© Copyright IBM Corp. 2009, 2024 12-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-8. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 12-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Exporting a volume group

To export a volume group:


hdisk9
apollo 1. Unmount all file systems
from the volume group:
# umount /dev/lv10
# umount /dev/lv11

myvg 2. Vary off the volume group:


# varyoffvg myvg

3. Export the volume group:


# exportvg myvg

The complete volume group


is removed from the ODM.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-9. Exporting a volume group

The scenario
The exportvg and importvg commands can be used to fix ODM problems. These commands also
provide a way to transfer data between different AIX systems. This visual provides an example of
how to export a volume group.
The disk, hdisk9, is connected to the system apollo. This disk belongs to the myvg volume group.
This volume group needs to be transferred to another system.

Procedure to export a volume group


Do the following steps to export the volume group:
1. Unmount all file systems from the volume group. In the example, there are three logical
volumes in myvg; lv10, lv11, and loglv01. The loglv01 logical volume is the JFS2 log device
for the file systems in myvg, which is closed when all file systems that use it are unmounted.
2. When all logical volumes are closed, use the varyoffvg command to vary off the volume
group.
3. Finally, export the volume group with the exportvg command. After this point, the complete
volume group (including all file systems and logical volumes) is removed from the ODM.
After exporting the volume group, the disks in the volume group can be transferred to another
system.
Next, we will describe how to import a volume group.

© Copyright IBM Corp. 2009, 2024 12-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Importing a volume group

To import a volume group:

1.Configure the disks.

2.Import the volume group:


# importvg -y myvg hdisk3

mercury 3.Mount the file systems:


# mount /dev/lv10
# mount /dev/lv11

The complete volume group is


hdisk3 added to the ODM.

myvg

LVM metadata © Copyright IBM Corporation 2024

Figure 12-10. Importing a volume group

Procedure to import a volume group


To import a volume group into a system, for example into a system that is named mercury, do the
following steps:
1. Connect all disks (in the example there is only one disk) and reboot the system so that cfgmgr
configures the added disks.
2. You must specify only one disk (either hdisk# or the PVID) in the importvg command.
Because all disks contain the same VGDA information, the system can determine this
information by querying any VGDA from any disk in the volume group. If you do not specify the
-y flag, the command generates a new volume group name. The importvg command
generates new ODM entries. The volume group is automatically varied on.
3. Finally, mount the file systems.
As of AIX 5.2, importvg was enhanced to accept a PVID as a command-line argument. For
example:
# importvg -y myvg 0001810fd3838c5e
Beginning with AIX 5.3, the default algorithm for the importvg command was enhanced to reduce
the execution time while maintaining a maximum of integrity protection. It is no longer the default
to scan every disk of a system for an import operation.
Beginning with AIX 5.3, the importvg command uses the redefinevg command to get all the
PVIDs by reading the VGDA of the disk that is related to the volume group. Then, only the initial
LVM records for those physical volumes are examined. The default method of previous AIX
releases used to read the LVM record of every disk in the system to match the disks that are listed
in the VGDA.

© Copyright IBM Corp. 2009, 2024 12-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
What happens if logical volumes exist during the importvg?

© Copyright IBM Corp. 2009, 2024 12-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

importvg and duplicate names


• Avoid duplicate logical volume names and file system names between systems.
ƒ Avoid default names such as fslv00 and lv01.
ƒ Use functionally meaningful names such as db2pay00.
• importvg generates a new logical volume name for a duplicate.
• importvg does not create an /etc/filesystems entry for a duplicate label (mount point).

LVM metadata © Copyright IBM Corporation 2024

Figure 12-11. importvg and duplicate names

Duplicate names during importvg


If a logical volume name or a file system name (label) exists on the system to which you are
importing a volume group, you run into problems. The best way to avoid this situation is to have a
naming convention for your logical volume and file system names, which ensures uniqueness
across systems. The common reason for having duplicates is the acceptance and use of the AIX
default names.

Duplicate logical volume names


If you are importing a volume group with logical volumes that exist on the system, the importvg
command renames the logical volumes from the volume group that is being imported.

Duplicate file system names and /etc/filesystems stanzas


Normally the importvg command creates new stanzas in /etc/filesystems for file systems in the
imported volume group. If importvg finds that the new file system’s label duplicates the label of
an existing stanza, it provides an error message and does not create the new stanza.
What happens if logical volumes exist during the importvg?

© Copyright IBM Corp. 2009, 2024 12-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

importvg and existing logical volumes


mercury

hdisk3

myvg

# importvg -y myvg hdisk3


importvg: changing LV name lv10 to fslv00
importvg: changing LV name lv11 to fslv01

hdisk2

datavg
importvg can also accept the PVID in place of the hdisk name.
LVM metadata © Copyright IBM Corporation 2024

Figure 12-12. importvg and existing logical volumes

Renaming logical volumes


If you are importing a volume group with logical volumes that exist on the system, the importvg
command renames the logical volumes from the volume group that is being imported.
The logical volumes /dev/lv10 and /dev/lv11 exist in both volume groups. During the importvg
command, the logical volumes from myvg are renamed to /dev/fslv00 and /dev/fslv01.
Let’s looks at what happens if a file system exists during an import.

© Copyright IBM Corp. 2009, 2024 12-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

importvg and existing file systems (1 of 2)

/dev/lv10: /home/sarah /dev/lv23: /home/peter


/dev/lv11: /dev/lv24:
/home/michael /home/michael

/dev/loglv00: log device /dev/loglv01: log device

# importvg -y myvg hdisk3

Warning: mount point /home/michael already


exists in /etc/filesystems

# umount /home/michael
# mount –o log=/dev/loglv01 /dev/lv24 /home/michael

LVM metadata © Copyright IBM Corporation 2024

Figure 12-13. importvg and existing file systems (1 of 2)

Using umount and mount


If a file system (for example /home/michael) exists on a system, you run into problems when you
mount the file system that was imported.
One method to get around this problem is to:
1. Unmount the file system that exists on the system. For example, /home/michael from
datavg.
2. Mount the imported file system. You must specify the:
▪ Log device (-o log=/dev/lvlog01). If using inline logs with JFS2 user, -o log=INLINE.
▪ Logical volume name (/dev/lv24)
▪ Mount point (/home/michael)
If the file system type is jfs2, you must specify the type as well (-V jfs2). You can get this
information by running the command: getlvcb lv24 -AT
Another method is to add a stanza to the /etc/filesystems file.
See how to add a stanza to the /etc/filesystems file.

© Copyright IBM Corp. 2009, 2024 12-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

importvg and existing file systems (2 of 2)

# vi /etc/filesystems /dev/lv10: /home/sarah


/dev/lv11: /home/michael
/home/michael:
dev = /dev/lv11 /dev/loglv00: log device
vfs = jfs2
log = /dev/loglv00
mount = false datavg
options = rw
account = false

/home/michael_mercury:
dev = /dev/lv24
vfs = jfs2 /dev/lv23: /home/peter
log = /dev/loglv01 /dev/lv24: /home/michael
mount = false
options = rw /dev/loglv01: log device
account = false
hdisk3 (myvg)
# mount /home/michael
# mount /home/michael_mercury

Note: Mount point must exist

LVM metadata © Copyright IBM Corporation 2024

Figure 12-14. importvg and existing file systems (2 of 2)

Create a stanza in /etc/filesystems


If you need both file systems (the imported and the one that exists) mounted at the same time,
you must create a new stanza in /etc/filesystems. In the example, a second stanza is created for
the imported logical volume, /home/michael_mercury. The fields in the new stanza are:
• dev specifies the logical volume, in the example /dev/lv24.
• vfs specifies the file system type, in the example a JFS2 file system.
• log specifies the JFS2 log device for the file system.
• mount specifies whether this file system should be mounted by default. The value false
specifies the file system is not mounted during boot. The value true indicates that a file
system should be mounted during the boot process.
• options specifies that this file system should be mounted with read and write access.
• account specifies whether the accounting system processes the file system. A value of false
indicates no accounting.
Before mounting the file system /home/michael_mercury, the corresponding mount point must
be created.
To discover the information that is contained in the newly imported volume group, use the
standard LVM tools. To see the logical volume names:
# lsvg -l myvg
To see details of the logical volumes:
# lslv lvname

© Copyright IBM Corp. 2009, 2024 12-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
These commands help creating the new stanza in /etc/filesystems.
Since metadata is maintained on both the disk control blocks (such as the VGDA) and in the ODM,
how are these kept synchronized and is it possible for them to have problems being kept up to
date? Let us look at this issue.

© Copyright IBM Corp. 2009, 2024 12-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

How LVM interacts with the ODM and the VGDA


importvg
ODM
VGDA and
LVCB
Change, using Match IDs by /etc/filesystems
low-level name
commands

mkvg
extendvg
mklv Update
crfs
chfs exportvg
rmlv
reducevg

...
LVM metadata © Copyright IBM Corporation 2024

Figure 12-15. How LVM interacts with the ODM and the VGDA

High-level commands
Most of the LVM commands that are used when working with volume groups, physical volumes, or
logical volumes are high-level commands. These high-level commands (like mkvg, extendvg,
mklv, and others that are listed on the visual) are implemented as executable code or shell scripts
and use names to reference a certain LVM object. The ODM is consulted to match a name, for
example, rootvg or hdisk0, to an identifier.

Interaction with disk control blocks and the ODM


The high-level commands call intermediate or low-level commands that query or change the disk
control blocks VGDA or LVCB. Additionally, the ODM must be updated; for example, to add a new
logical volume. The high-level commands contain signal handlers to clean up the configuration if
the program is stopped abnormally. If a system crashes, or if high-level commands end by kill -9,
the system can end up in a situation where the VGDA/LVCB and the ODM are not in sync. The
same situation can occur when low-level commands are used incorrectly.

The importvg and exportvg commands


The visual shows two important commands that are explained in detail later. The command
importvg imports a complete, new volume group based on a VGDA and LVCB on a disk. The
command exportvg removes a complete volume group from the ODM.

© Copyright IBM Corp. 2009, 2024 12-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
VGDA and LVCB corruption
The focus in this course is on situations where the ODM is corrupted and you assume that the LVM
control data (for example, the VGDA or the LVCB) is correct. If an attempted execution of LVM
commands (for example: lsvg, varyonvg, reducevg) results in a failure with a core dump that
might be an indication that the LVM control data on one of the disks is corrupted. In this situation,
do not attempt to resync the ODM by using the procedures that are covered. In most cases, you
need to recover from a volume group backup. If recovery from backup is not a viable option, it is
suggested that you work with AIX Support in dealing with the problem. Attempting to use the
procedures that are covered in this unit do not solve the problem. Even worse, the corruption
might be propagated to other disks in the volume group, thus making the situation even worse.
How do the LVM-related device ODM objects look? This information is important because you
need to repair ODM entries in the lab exercises.
You start with the entries that store information about physical volumes.

© Copyright IBM Corp. 2009, 2024 12-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-16. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 12-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

ODM-related LVM problems


2.

VGDA High-level commands ODM


LVCB
1. - Signal handler
- Lock

What can cause problems?


• kill -9, shutdown, system crash
• Improper use of low-level commands
• Hardware changes without or with wrong software actions
• Full root file system

LVM metadata © Copyright IBM Corporation 2024

Figure 12-17. ODM-related LVM problems

Normal functioning of high-level commands


As already mentioned, most of the time administrators use high-level commands to create or
update volume groups or logical volumes. These commands use signal handlers to set up a proper
cleanup in case of an interruption. Additionally, LVM commands use a locking mechanism to block
other commands while a change is in progress.

Causes of problems
The signal handlers that are used by high-level LVM commands do not work with a kill -9, a
system shutdown, or a system crash. You might end up in a situation where the VGDA is, but the
change was not stored in the ODM. Problems might also occur because of the improper use of
low-level commands or hardware changes. Another common problem is ODM corruption when
doing LVM operations when the root file system (which contains /etc/objrepos) is full. Always
check the root file system free space before attempting LVM recovery operations.
Let’s identify ways that ODM problems can be fixed.

© Copyright IBM Corp. 2009, 2024 12-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Fixing ODM problems (1 of 2)

• If the ODM problem is not in the rootvg, for example in volume group
homevg, do the following:

# varyoffvg homevg

# exportvg homevg Remove complete volume


group from the ODM.
# importvg -y homevg hdiskX

Import volume group and


create new ODM objects.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-18. Fixing ODM problems (1 of 2)

Determining which volume group has the problem


If you detect ODM problems, you must determine whether the volume group with the problem is
the rootvg or not. Because the rootvg cannot be varied off, the procedure that is given here
applies only to non-rootvg volume groups.

Steps in ODM repair procedure (for problem not in rootvg)


1. In the first step, you vary off the volume group, which requires that all file systems be
unmounted first. To vary off a volume group, use the varyoffvg command.
2. In the next step, you export the volume group by using the exportvg command. This
command removes the complete volume group from the ODM. The exportvg command does
not touch the VGDA and LVCB.
3. In the last step, you import the volume group by using the importvg command. Specify the
volume group name with option -y. Otherwise, AIX creates a new volume group name.
You need to specify only one intact physical volume of the volume group that you import. The
importvg command reads the VGDA and LVCB on that disk and creates new ODM objects.
This procedure does not allow the data to be used while repairing the corruption, even if the file
systems are mounted and are accessible despite the problem. The logical volumes must be
closed to vary the volume group offline.
Let’s discuss how to fix ODM problems in rootvg.

© Copyright IBM Corp. 2009, 2024 12-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Fixing ODM problems (2 of 2)


• If the ODM problem is in the rootvg, try using the rvgrecover procedure:
PV=hdisk0
VG=rootvg
cp /etc/objrepos/CuAt /etc/objrepos/CuAt.$$
cp /etc/objrepos/CuDep /etc/objrepos/CuDep.$$
cp /etc/objrepos/CuDv /etc/objrepos/CuDv.$$
cp /etc/objrepos/CuDvDr /etc/objrepos/CuDvDr.$$

lqueryvg -Lp $PV | awk '{print $2}' | while read LVname;


do
odmdelete -q "name=$LVname" -o CuAt
odmdelete -q "name=$LVname" -o CuDv
odmdelete -q "value3=$LVname" -o CuDvDr
Done
odmdelete -q "name=$VG" -o CuAt • Uses odmdelete
odmdelete -q "parent=$VG" -o CuDv to export rootvg
odmdelete -q "name=$VG" -o CuDv
odmdelete -q "name=$VG" -o CuDep
odmdelete -q "dependency=$VG" -o CuDep • Uses importvg to
odmdelete -q "value1=10" -o CuDvDr import rootvg
odmdelete -q "value3=$VG" -o CuDvDr

importvg -y $VG $PV # ignore lvaryoffvg errors


varyonvg $VG

LVM metadata © Copyright IBM Corporation 2024

Figure 12-19. Fixing ODM problems (2 of 2)

Problems in rootvg
For ODM problems in rootvg, finding a solution is more difficult because rootvg cannot be varied
off or exported. However, it might be possible to fix the problem by using one of the techniques
that are described next.
The rvgrecover procedure
If you detect ODM problems in rootvg, you can try running a procedure that is called rvgrecover.
You might want to code this procedure in a script (shown on the visual) in /bin and make it
executable. The rvgrecover procedure removes all ODM entries that belong to your rootvg by
using odmdelete, which is the same way exportvg works. After deleting all ODM objects from
rootvg, it imports the rootvg by reading the VGDA and LVCB from the boot disk. The result is that
there are new ODM objects for your rootvg.
RAM disk maintenance mode
With the rootvg, the corruption problem might prevent a normal boot to multiuser mode. Thus,
you might need to handle this situation in RAM Disk Maintenance Mode (boot into Maintenance
mode from the CD/DVD or NIM). Before attempting this procedure, you should make sure that you
have a current mksysb backup.
Use the steps in the following table to recover the rootvg volume group after booting to
maintenance mode and mounting the file systems. These steps are similar to the steps in the
rvgrecover script that is shown on the visual.

© Copyright IBM Corp. 2009, 2024 12-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
Step 1. Delete all of the ODM information about logical volumes. Get the list of logical volumes
from the VGDA of the physical volume.
# lqueryvg -p hdisk0 -L | awk '{print $2}' \
| while read LVname; do
> odmdelete -q “name=$LVname” -o CuAt
> odmdelete -q “name=$LVname” -o CuDv
> odmdelete -q “value3=$LVname” -o CuDvDr
> done
Step 2. Delete the volume group information from ODM.
# odmdelete -q “name=rootvg” -o CuAt
# odmdelete -q “parent=rootvg” -o CuDv
# odmdelete -q “name=rootvg” -o CuDv
# odmdelete -q “name=rootvg” -o CuDep
# odmdelete -q “dependency=rootvg” -o CuDep
# odmdelete -q “value1=10” -o CuDvDr
# odmdelete -q “value3=rootvg” -o CuDvDr
Step 3. Add the volume group that is associated with the physical volume back to the ODM.
# importvg -y rootvg hdisk0
Step 4. Re-create the device configuration database in the ODM from the information on the
physical volume.
# varyonvg -f rootvg
This procedure assumes that hdisk0 is part of rootvg.
In CuDvDr:
• value1 = major number
• value2 = minor number
• value3 = object name for major/minor number
rootvg always has value1 = 10.
The steps can also be used to recover other volume groups by substituting the appropriate
physical volume and volume group information. It is suggested that the steps in this example are
put into a script.

© Copyright IBM Corp. 2009, 2024 12-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Intermediate level ODM commands


• High-level LVM commands might not be a viable option
ƒ ODM corruption prevents high-level commands from running
ƒ varyoffvg and exportvg disrupts availability
• redefinevg –d <hdisk#> <vgname>
ƒ Identifies and reenters physical volume data for the volume group in the ODM
ƒ Checks for inconsistencies between LVM data areas and ODM
ƒ Recovers some, but not all of the logical volume data
• synclvodm <vgname>
ƒ Synchronizes the VGDA, LVCB, ODM, and special device files
ƒ Volume group must be active
ƒ First run the redefinevg command if ODM does not have the minimum required information about
the volume group

LVM metadata © Copyright IBM Corporation 2024

Figure 12-20. Intermediate level ODM commands

Overview
There are situations where you are unable to run the exportvg or importvg commands because
they depend on finding a minimal level of information in the ODM. Even if these high-level LVM
commands can be run, they require that the volume group is offline, which would be disruptive. In
these situations, it is useful to know some intermediate level LVM commands. These commands
are primarily intended to be used by high-level ODM commands, but they can be useful in solving
tough problems.

The synclvodm command


Syntax: synclvodm <VG> [<LV> ...]
Use of the synclvodm command is yet another way that you might be able to fix ODM problems in
rootvg. If, for some reason, the ODM is not consistent with on-disk information, the synclvodm
command can be used to resynchronize the database. It synchronizes or rebuilds the LVCB, the
ODM, and the VGDAs. The volume group must be active for the resynchronization to occur. If
logical volume names are specified, only the information that is related to those logical volumes is
updated.
The synclvodm command, by itself, can do a fairly complete job of resynchronizing the ODM with
the LVM data areas on the disk. It will also synchronize the information between the LVM data
areas. As such, it can worsen a situation where only one disk in the volume group contains
corrupted data areas. The command can be restricted to synchronizing only specific logical
volumes. Otherwise, it synchronizes all logical volumes. The synclvodm command depends upon
a minimal amount of information in the ODM; most importantly, the ODM needs to know the
volume group name plus the physical volume and logical volume memberships.

© Copyright IBM Corp. 2009, 2024 12-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty
The redefinevg command
The redefinevg command redefines the set of physical volumes of the volume group in the device
configuration database. If inconsistencies occur between the physical volume information in the
ODM and the on-disk metadata, the redefinevg command determines which physical volumes
belong to the specified volume group and reenters this information in the ODM. The redefinevg
command checks for inconsistencies by reading the reserved areas of all the configured physical
volumes that are attached to the system.
It is sometimes necessary to run the redefinevg command to obtain the minimum information
about the volume group. It creates new ODM objects for the provided volume group name and it
uses the LVM data areas in the specified disk to obtain the correct LVM information. The
redefinevg command is not designed to fully rebuild all of the logical volume information. Thus,
after running the redefinevg command, it is often necessary to run the synclvodm command to
obtain the rest of the logical volume information.
These commands can be run with the volume group online. The ODM corruption might prevent
any attempt to vary the volume group offline.

Using chdev for the PVID


The chdev command accepts an attribute of pvid=clear (to delete the PVID) and pvid=yes (to
create a PVID). While clearing and re-creating a PVID can be useful in some circumstances, it is
generally recommended that any problem in the ODM is resolved by setting its value to match
what is stored on the disk. For example, the exportvg and importvg commands might be used. If
there is no PVID set, either on the disk or in the ODM, then the PVID is normally established when
that disk becomes a member of a volume group (mkvg, extendvg).
Time for some review questions.

© Copyright IBM Corp. 2009, 2024 12-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Review questions
1. True or false: All LVM information is stored in the ODM.

2. True or false: You detect that a physical volume, hdisk1, that is contained in your rootvg is
missing in the ODM. This problem can be fixed by exporting and importing rootvg.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-21. Review questions

© Copyright IBM Corp. 2009, 2024 12-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Review answers
1. True or false: All LVM information is stored in the ODM.
The answer is false: Information is also stored in other AIX files and in disk control blocks (like the
VGDA and LVCB).
2. True or false: You detect that a physical volume, hdisk1, that is contained in your rootvg is
missing in the ODM. This problem can be fixed by exporting and importing rootvg.
The answer is false: Use the rvgrecover procedure instead. This script creates a complete set of new
rootvg ODM entries.

LVM metadata © Copyright IBM Corporation 2024

Figure 12-22. Review answers

© Copyright IBM Corp. 2009, 2024 12-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Exercise

LVM metadata issues

LVM metadata © Copyright IBM Corporation 2024

Figure 12-23. Exercise

© Copyright IBM Corp. 2009, 2024 12-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 12. LVM metadata

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Explain where LVM metadata information is stored.
ƒ Use importvg and exportvg to manage LVM metadata.
ƒ Solve ODM-related LVM problems.

© Copyright IBM Corporation 2024

Figure 12-24. Unit summary

The LVM information is held in a number of different places on the disk, including the ODM and the
VGDA. ODM-related problems might be solved by:
• exportvg and importvg (non-rootvg volume groups).
• rvgrecover (rootvg).
• LVM intermediate commands.
• Manually fixing by using ODM commands.

© Copyright IBM Corp. 2009, 2024 12-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Unit 13.Disk management procedures


Estimated time
00:25 Topic 1
00:50 Topic 2

Overview
This unit describes different disk management procedures.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Object data manager
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-object-data-manager
AIX Version 7.3 Command Reference
https://www.ibm.com/docs/en/aix/7.3?topic=commands
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
IBM Support Steps of replacing a bad disk from a mirrored AIX® Volume Group
https://www.ibm.com/support/pages/steps-replacing-bad-disk-mirrored-aix%C2%AE-volume-g
roup
IBM Support Removing and Replacing a Fixed Disk
https://www.ibm.com/support/pages/removing-and-replacing-fixed-disk
IBM Support Replacing a failed physical volume in a mirrored volume group
https://www.ibm.com/docs/en/aix/7.3?topic=clvm-replacing-failed-physical-volume-in-mirrore
d-volume-group
IBM Redbooks:
SG24-5432, AIX Logical Volume Manager: from A to Z: Introduction and Concepts
https://www.redbooks.ibm.com/abstracts/sg245432.html
SG24-5433, AIX Logical Volume Manager: from A to Z: Troubleshooting and Commands
https://www.redbooks.ibm.com/abstracts/sg245433.html

© Copyright IBM Corp. 2009, 2024 13-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Manage volume group quorum issues
ƒ Explain the physical volume states that are used by the LVM
ƒ Replace a disk under different circumstances
ƒ Recover from a total volume group failure

© Copyright IBM Corporation 2024

Figure 13-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 13-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Topic 1 objectives
• Manage volume group quorum issues
• Explain the physical volume states that are used by the LVM
• Replace a disk under different circumstances
• Recover from a total volume group failure

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 13-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Mirroring

hdisk0 Logical partitions

hdisk1

Mirrored logical volume


hdisk2

LP: PP1: PP2: PP3:


VGSA 5 hdisk0, 5 hdisk1, 8
hdisk2, 9

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-3. Mirroring

Using mirroring to increase availability


The visual shows a mirrored logical volume, where each logical partition is mirrored to three
physical partitions. In this example, each of the physical partitions that are related to a given
logical partition is on a separate physical volume. More than three copies are not possible. If one
of the disks fails, there are at least two copies of the data available. That means mirroring is used
to increase the availability of a system or a logical volume.

Role of VGSA
The information about the mirrored partitions is stored in the VGSA, which is contained on each
disk. In the example that is shown on the visual, logical partition 5 points to physical partition 5 on
hdisk0, physical partition 8 on hdisk1, and physical partition 9 on hdisk2.
Let’s discuss stale partitions.

© Copyright IBM Corp. 2009, 2024 13-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Stale partitions

hdisk0

Mirrored
hdisk1 logical
volume

hdisk2 Stale partition

After the repair of hdisk2:


• varyonvg VGName (calls syncvg -v VGName)
• Only stale partitions are updated
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-4. Stale partitions

How data becomes stale


If a disk that contains a mirrored logical volume (such as hdisk2 in the visual) fails, the data on the
failed disk becomes stale (not current, not up-to-date).

How state information is kept


State information (active or stale) is kept for each physical partition. A physical volume is shown
as stale (which can be seen with the command lsvg VGName), provided it has one stale partition.

Updating stale partitions


If a disk with stale partitions is repaired (for example, after a power failure), you should run the
varyonvg command, which starts the syncvg command to synchronize the stale partitions. The
syncvg command is started as a background job that updates all stale partitions from the volume
group.
Always use the varyonvg command to update stale partitions. After a power failure, a disk forgets
its reservation. The syncvg command cannot reestablish the reservation, whereas varyonvg does
before calling syncvg. The term reservation means that a disk is reserved for one system. The disk
driver puts the disk in a state where you can work with the disk and at the same time the control
LED of the disk turns on. The varyonvg command works if the volume group is already varied on or
if the volume group is the rootvg.
You may recall that stale partitions can occur as a stage in the creation of mirroring. Note that
stale partitions can also happen as a result of disk failure. After a disk is recovered, the syncvg
command needs to be run to resynchronize the copies. Note that using varyonvg is better than

© Copyright IBM Corp. 2009, 2024 13-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
using syncvg directly. The varyonvg command works if the volume group is already varied on and
if the volume group is the rootvg.
Let’s see how mirrored logical volumes can be created.

© Copyright IBM Corp. 2009, 2024 13-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Mirroring rootvg

hd9var mirrorvg hd9var


hd8 hd8
hd5
...
hd5
...

hd1 hd1

hdisk0 hdisk1

1. bootinfo –B hdisk1 4. bosboot –a


2. extendvg 5. bootlist
3. mirrorvg -m 6. bootinfo -b

• Make a copy of all rootvg logical volumes using


mirrorvg and place copies on the second disk.
• Execute bosboot and change your bootlist.
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-5. Mirroring rootvg

Reason to mirror rootvg


What is the reason to mirror the rootvg?
If your rootvg is on one disk, you get a single point of failure; which means, if this disk fails, your
LPAR is no longer available. If you mirror rootvg to a second (or third) disk, and one disk fails, you
still have another disk that contains the mirrored rootvg. You increase the availability of your
system.
NOTE: This is more important for AIX systems using non-SAN storage. If your AIX system is using
internal drives, inside your Power server, then it is recommended to mirror rootvg to protect it
from a physical disk failure inside the system. This approach is not typically needed for AIX
systems that boot from SAN disk, as the SAN storage subsystems typically provide a high level of
redundancy and availability, thus invalidating the need to mirror rootvg at the AIX OS level.

Procedure for mirroring rootvg


The following steps show how to mirror the rootvg.
1. Select a disk for the mirror copies. It needs to be large enough to hold these copies, plus
enough room to handle future growth.
# getconf DISK_SIZE /dev/hdisk1
Check that the disk is bootable, since it holds a boot logical volume.
# bootinfo -B hdisk1
Any returned value other than a value of 1, indicates that the disk is not bootable.

© Copyright IBM Corp. 2009, 2024 13-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
2. If the disk is not part of the rootvg, add the new disk to the volume group (for example,
hdisk1):
# extendvg [ -f ] rootvg hdisk1
3. Use the mirrorvg command to mirror all of the logical volumes in the rootvg to the new disk.
The mirrorvg command, by default, disables quorum and mirrors the existing logical volumes
in the specified volume group. Changes to the volume group quorum attribute are effective
immediately without having to vary off and then vary on the volume group. By default, it will
also synchronize the copies; though, you might suppress synchronization by using the -s flag.
You should use the exact mapping option (-m) to ensure that the mirror copy of the boot
logical volume (hd5) is allocated contiguous physical partitions. To mirror rootvg, use the
command:
# mirrorvg -m rootvg hdisk1
Restrictions:
▪ You cannot use the mirrorvg command on a snapshot volume group.
▪ You cannot use the mirrorvg command on a volume group that has an active firmware
assisted dump logical volume.
▪ You cannot use the mirrorvg command if ALL of the following conditions exist:
- The target system is a logical partition (LPAR).
- A copy of the boot logical volume (by default, hd5) is on the failed physical volume.
- The replacement physical volume's adapter was dynamically configured into the LPAR
since the last cold start.
An alternative to running mirrorvg is to separately run the component tasks. If you use one mirror
disk, be sure that a quorum is not required for vary on:
# chvg -Qn rootvg
Add the mirrors for all rootvg logical volumes:
# mklvcopy hd1 2 hdisk1 
# mklvcopy hd2 2 hdisk1 
# mklvcopy hd3 2 hdisk1 
# mklvcopy hd4 2 hdisk1 
# mklvcopy hd5 2 hdisk1 
# mklvcopy hd6 2 hdisk1 
# mklvcopy hd8 2 hdisk1 
# mklvcopy hd9var 2 hdisk1
# mklvcopy hd10opt 2 hdisk1
# mklvcopy hd11admin 2 hdisk1
If you have other logical volumes in your rootvg, be sure to create copies for them as well. Now,
synchronize the new copies that you created:
# syncvg -v rootvg
1. To be able to boot from the different disks, run bosboot:
# bosboot -a

© Copyright IBM Corp. 2009, 2024 13-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
As hd5 is mirrored, there is no need to do it for each disk.
2. Update the bootlist. In a disk failure, you must be able to boot from different disks.
# bootlist -m normal hdisk1 hdisk0
# bootlist -m service hdisk1 hdisk0
3. Check that the system boots from the first boot disk.
# bootinfo –b
Mirroring of the paging space and dump logical volumes
When mirroring rootvg, hd6 should be mirrored because the paging space availability is critical to
keeping the system online. hd6 serves both as paging space and as the default dump device.
Mirroring the dump logical volume is supported but is not recommended, due to the resulting
performance impact when creating the dump and some surmountable but irritating complications
in reading the dump. Because of this recommendation, the mirrorvg command does not mirror
the dump logical volume if a separate logical volume for the dump exists. You should define a
secondary dump device on a different disk than the primary dump device, in case the disk with the
dump logical volume is unavailable. It is good to have a separate logical volume for the dump,
instead of using the paging space logical volume. By having a separate dump logical volume, it
separates the dump logical volume issues from the paging space issues.
Regarding mirroring during mksysb backups and restores, the official advisory recommendation is
that the mirroring of the rootvg is broken. Be certain that the remaining disk is the same disk as
the last disk used to boot (bootinfo -b).
Let’s see another way to mirror the rootvg.

© Copyright IBM Corp. 2009, 2024 13-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

VGDA count

• Two-disk volume group


Loss of PV1: Only 33% VGDAs available
(No quorum)

Loss of PV2: 66% of VGDAs available


PV1 PV2 (Quorum)

• Three-disk volume group


Loss of 1 PV: 66% of VGDAs still available
(Quorum)

PV1 PV2 PV3

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-6. VGDA count

Reservation of space for VGDAs


Each disk that is contained in a volume group contains at least one VGDA. The LVM always
reserves space for two VGDAs on each disk.

Volume groups that have two disks


If a volume group consists of two disks, one disk contains two VGDAs, the other disk contains only
one (as shown on the visual). If the disk with the two VGDAs fails, you have only 33% of VGDAs
available, that means you have less than 50% of VGDAs. In this case, the quorum, which means
that more than 50% of VGDAs must be available, is not fulfilled.
Volume groups that have more than two disks
If a volume group consists of more than two disks, each disk contains one VGDA. If one disk fails
in a volume group with three disks, you still have 66% of VGDAs available and the quorum is
fulfilled.
Let’s discuss what happens if a quorum is not available.

© Copyright IBM Corp. 2009, 2024 13-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Quorum not available

datavg

Two VGDAs One VGDA

hdisk1 hdisk2

If hdisk1 fails, datavg has no quorum

# varyonvg datavg Closed during operation:


• No more access to logical volumes
FAILS • LVM_SA_QUORCLOSE in error log

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-7. Quorum not available

Introduction
What happens if quorum checking is enabled for a volume group and a quorum is not available?
Consider the following example (illustrated in the visual and discussed in the following
paragraphs): In a two-disk volume group datavg, the disk hdisk1 is not available due to a
hardware defect. hdisk1 is the disk that contains the two VGDAs; that means the volume group
does not have a quorum of VGDAs.

Result if volume group not varied on


If the volume group is not varied on and the administrator tries to vary on datavg, the varyonvg
command fails.

Volume group that is already varied on


If the volume group is already varied on when quorum is lost, the LVM deactivates the volume
group. There is no access to any logical volume that is part of this volume group. The system
sometimes shows strange behavior. This situation is posted to the error log, which shows an error
entry LVM_SA_QUORCLOSE. After losing the quorum, the volume group might still be listed as active
(as seen with the lsvg -o command). However, all application data access and LVM functions
requiring data access to the volume group fails. The volume group is dropped from the active list
as soon as the last logical volume is closed. If you use the commands, fuser -k /dev/LVname or
umount /dev/LVname, no data is written to the disk.
Let’s discuss how to set up nonquorum volume groups.

© Copyright IBM Corp. 2009, 2024 13-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Nonquorum volume groups


• With single mirroring, always disable the quorum:
ƒ chvg -Qn datavg
• Additional considerations for rootvg:
ƒ chvg -Qn rootvg
ƒ bosboot -ad /dev/hdiskX
• Turning off the quorum checking:
ƒ Requires 100% VGDAs for normal varyonvg
ƒ Allows the volume group to stay active if quorum is lost

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-8. Nonquorum volume groups

Loss of quorum in a nonquorum volume group


When a nonquorum volume group loses its quorum it is not deactivated, it is active until it loses all
of its physical volumes.

Recommendations when using single mirroring


When working with single mirroring, always disable quorum checking with the command: chvg
-Qn (and VGname as the argument). In AIX 6 and later, the change in quorum checking is effective
immediately. In older versions of AIX, you need to vary off and vary on the volume group for the
change to take effect. The mirrorvg command now automatically disables quorum checking for a
mirrored volume group.

Recommendations for rootvg


When turning off the quorum checking for rootvg, you must do a bosboot (or a savebase), to
reflect the change in the ODM in the boot logical volume. In versions of AIX before AIX 6, you need
to then reboot the machine to have the change take effect. It occurs at varyonvg.

Varying on a nonquorum volume group


It is important that you know that turning off the quorum checking does not allow a varyonvg
without a quorum. It just prevents the closing of an active volume group when losing its quorum.
What can you do if a varyonvg fails?

© Copyright IBM Corp. 2009, 2024 13-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Forced vary on (varyonvg -f)


datavg

Two VGDAs One VGDA

hdisk1 hdisk2

# varyonvg datavg Fails (even when quorum is disabled)


Check the reason for the failure (cable, adapter, power)
before doing the following:
# varyonvg -f datavg
Failure accessing hdisk1.
Set PV STATE to removed.
Volume group datavg is varied on.

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-9. Forced vary on (varyonvg -f)

When normal vary on might fail


If the quorum of VGDAs is not available during vary on, the varyonvg command fails, even when
quorum is disabled. In fact, when quorum is disabled, the varyonvg command requires that 100%
of the VGDAs be available instead of 51%.

Doing a forced vary on


Before doing a forced vary on (varyonvg –f), always check the reason of the failure. If the
physical volume appears to be permanently damaged, use a forced varyonvg. All physical
volumes that are missing during the forced vary on are changed to the removed physical volume
state. The removed state means that all the VGDA and VGSA copies are removed from these
physical volumes. When finished, these physical volumes no longer take part in quorum checking,
nor do they become active within the volume group until you return them to the volume group.

Change in VGDA distribution


In the example on the visual, the active disk hdisk2 becomes the disk with the two VGDAs. The
number of VGDAs does not change, even if the failed disk can be brought back.

Quorum checking on
With quorum checking on, you always need > 50% of the VGDAs available (except to vary on
rootvg).

© Copyright IBM Corp. 2009, 2024 13-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
Quorum checking off
With quorum checking off, you must distinguish between an already active volume group and
varying on a volume group. An active volume group is kept open provided there is at least one
VGDA available.
Set MISSINGPV_VARYON=true in /etc/environment if a volume group needs to be varied on with
missing disks at boot time. When using varyonvg -f or if MISSINGPV_VARYON=true, you take full
responsibility for the volume group integrity.
Let’s discuss what’s meant by physical volume state.

© Copyright IBM Corp. 2009, 2024 13-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Topic 1 objectives
• Manage volume group quorum issues
• Explain the physical volume states that are used by the LVM
• Replace a disk under different circumstances
• Recover from a total volume group failure

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-10. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 13-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Physical volume states


varyonvg VGName
active

missing missing

varyonvg -f VGName
Hardware
repair
removed
Hardware repair
followed by:
varyonvg VGName

chpv -v a hdiskX
removed
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-11. Physical volume states

Introduction
This page introduces physical volume states (not device states). Physical volume states can be
displayed with lsvg -p VGName.

Active state
If a disk can be accessed when a volume group is varied on with the command, varyonvg, it gets a
physical volume state of active.

Missing state
If a disk cannot be accessed during a varyonvg, but quorum is available, the failing disk gets a
physical volume state missing. If the disk can be repaired, for example, after a power failure, you
must run a varyonvg VGName to bring the disk into the active state again. Any stale partitions are
synchronized.

Removed state
If a disk cannot be accessed during a varyonvg and the quorum of disks is not available, you can
run the command, varyonvg -f VGName, and force the volume group online. The failing disk gets a
physical volume state of removed, and it is not used for quorum checks any longer.

© Copyright IBM Corp. 2009, 2024 13-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
Recovery after repair
If you are able to repair the disk (for example, after a power failure), running a varyonvg alone
does not bring the disk back into the active state. It maintains the removed state. At this stage,
you must announce the fact that the failure is over by using the following command: # chpv -va
hdiskX . This command defines the disk hdiskX as active. You must do a varyonvg VGName
afterward to synchronize any stale partitions.

The chpv -r command


The opposite of chpv -va is chpv -vr, which brings the disk into the removed state. This
command works only when all logical volumes are closed on the disk that is defined as removed.
Additionally, chpv -vr does not work if the quorum is lost after removing the disk.
Let’s examine different techniques for handling disk replacement.

© Copyright IBM Corp. 2009, 2024 13-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Topic 1 objectives
• Manage volume group quorum issues
• Explain the physical volume states that are used by the LVM
• Replace a disk under different circumstances
• Recover from a total volume group failure

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-12. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 13-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Disk replacement: Starting point

A disk must be replaced...

Yes
Disk mirrored? Procedure 1

No
Yes
Disk still working? Procedure 2

No

Volume group No
Procedure 3
lost?

Yes
Procedure 4 Procedure 5
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-13. Disk replacement: Starting point

Reasons to replace a disk


Many reasons might require the replacement of a disk, for example:
• Disk is too small.
• Disk is too slow.
• Disk produces many DISK_ERR4 error log entries.

Flowchart
Before starting the disk replacement, always follow the flowchart that is shown in the visual. This
flowchart helps you whenever you must replace a disk.
1. If the disk that must be replaced is mirrored onto another disk, follow procedure 1.
2. If a disk is not mirrored, but still works, follow procedure 2.
3. If you are sure that a disk failed and you are not able to repair the disk:
▪ If the volume group can be varied on (normal or forced), use procedure 3.
▪ If the volume group is lost after the disk failure, that means the volume group might not be
varied on (either normal or forced).
- If the volume group is rootvg, follow procedure 4.
- If the volume group is not rootvg, follow procedure 5.

© Copyright IBM Corp. 2009, 2024 13-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
The flowchart in the visual is a method to offer disk replacement procedures for many types of
disk failures. It is not guaranteed that 100% of all disk failures are covered. A good way to
distinguish between the various procedures is to focus on where you recover the data:
1. Procedure 1 - Synchronize from a remaining good mirror copy
2. Procedure 2 - Migrate the data off the suspect disk to the new disk before removing the
suspect disk
3. Procedure 3 - Recover the data from the file system backups (or logical volume backup that is
provided by the using application)
4. Procedure 4 - Recover by using the mksysb backup of the rootvg
5. Procedure 5 - Recover by using the savevg backup for the non-rootvg
Let’s start with procedure 1

© Copyright IBM Corp. 2009, 2024 13-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 1 (1 of 4): Disk mirrored


• The replacepv command simplifies procedure 1.
• Use of replacepv has restrictions:
ƒ Not rootvg
ƒ Snapshot volume group mechanism not being used
ƒ Replacement physical volume at least as large as failed physical volume
ƒ Both physical volumes can be on system at the same time
• Otherwise, use a variation without the replacepv command.

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-14. Procedure 1 (1 of 4): Disk mirrored

When to use this procedure


Use procedure 1 when the disk that must be replaced is mirrored.

Disk state
This procedure requires that the disk state of the failed disk is either missing or removed. Use the
command, lspv hdiskX, to check the state of your physical volume. If the disk is still in the active
state, you cannot remove any copies or logical volumes from the failing disk. In this case, one way
to bring the disk into a removed or missing state is to run the reducevg -d command or to do a
varyoffvg and a varyonvg on the volume group by rebooting the system.

Alternative approaches
The two main alternatives for this procedure are to use the replacepv command or to not use that
command. The replacepv command greatly simplifies the procedure. The restrictions are:
• The volume group cannot be rootvg.
• The snapshot volume group mechanism must not be in use.
• The replacement physical volume must be at least as large as failed physical volume.
• Both physical volumes can be on the system at the same time. In other words, you cannot
remove the failed disk and then place the new disk in the same position.
Let’s look at the use of the replacepv command.

© Copyright IBM Corp. 2009, 2024 13-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 1 (2 of 4): Disk mirrored with replacepv

1. Provide a replacement disk.


2. If a new disk, discover and configure:
# cfgmgr
Mirrored
Mirrored
Disk discovered as: hdiskY
3. Run replacepv:
# replacepv hdiskX hdiskY
4. Remove the failed disk from the ODM:
# rmdev -l hdiskX -d

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-15. Procedure 1 (2 of 4): Disk mirrored with replacepv

The replacepv command greatly simplifies the procedure.


1. Provide a replacement disk. It can be an unused disk, already known to AIX. Otherwise, you
need to provide a new disk. There are many ways to provide a disk that is new to AIX:
▪ Directly allocate a PCI storage adapter to the LPAR. If the adapter does not have an
available PCI, it needs to be provided through a hot add (if a local disk) or by zoning a LUN
(if it is a Fibre Channel adapter).
▪ Use PowerVM to provision a virtual SCSI disk.
2. Discover the new disk by running the cfgmgr command.
3. Run the replacepv to allocate physical partitions on the replacement disk for the problem
disk. Effectively the new disk replaces the failing disk in the mirroring configuration. In the
example, hdiskX is the failing disk.
4. Remove the failing disk.
What if you cannot use the replacepv command?

© Copyright IBM Corp. 2009, 2024 13-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 1 (3 of 4): Disk mirrored without replacepv


1. Remove all copies from the disk:
# unmirrorvg vg_name hdiskX
2. Remove the disk from the volume group:
# reducevg vg_name hdiskX
3. Remove the disk from the ODM:
Mirrored
Mirrored
# rmdev -l hdiskX -d
4. Provide a replacement disk.
If a new disk, discover and configure:
# cfgmgr
5. Add the new disk to the volume group:
# extendvg vg_name hdiskY
6. Create new copies:
# mirrorvg vg_name hdiskY

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-16. Procedure 1 (3 of 4): Disk mirrored without replacepv

The goal of each disk replacement (without replacepv) is to remove all logical volumes from a
disk.
1. Remove all logical volume copies from the disk. Use either the SMIT fastpath smit
unmirrorvg or the unmirrorvg command as shown in the visual. These commands unmirror
each logical volume that is mirrored on the disk. If you have more unmirrored logical volumes
on the disk, you must either move them to another disk (migratepv), or remove them if the
disk cannot be accessed (rmlv).
2. If the disk is empty, remove the disk from the volume group. Use SMIT fastpath smit
reducevg or the reducevg command.
3. After the disk is removed from the volume group, you can remove it from the ODM. Use the
rmdev command as shown in the visual.
4. Use a hot-swap procedure to replace the failed or failing disk. (In older machines, disk
replacement would effectively require the system to be shut down for the procedure). Run
cfgmgr to discover and configure the new disk.
5. Add the new disk to the volume group. Use either the SMIT fastpath smit extendvg or the
extendvg command.
6. Finally, create new copies for each logical volume on the new disk. Use either the SMIT
fastpath smit mirrorvg or the mirrorvg command. If synchronization was suppressed during
mirroring, then remember to eventually synchronize the volume group (or each logical
volume), with the syncvg command.
When you read the student notes, you might think that removing a logical volume from a disk that
fails is not possible. The important thing is: it is possible, but it requires the disk to be either in a

© Copyright IBM Corp. 2009, 2024 13-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
missing or removed state. If the disk is active, you cannot unmount a file system or remove a
logical volume from the failing disk.
Now the problem is: how do you bring a disk into the missing or removed state? The answer is that
you must do a reducevg -d or to force a new varyonvg, either in a normal or a forced mode.
Because you cannot do a varyoffvg when file systems are mounted (and you cannot unmount
them from the failing disk), the only way to recover from this bad situation is to reboot your
system. The reboot might cause other problems if the failing disk is in rootvg and the quorum is
not disabled in a two-disk volume group.
Next, we will describe more considerations for when the volume group is the rootvg.

© Copyright IBM Corp. 2009, 2024 13-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 1 (4 of 4): Special steps for rootvg


• Before the reducevg step:
1. Remove the failed disk from the bootlist:
# bootlist –m normal hdisk1

2. Ensure primary dump logical volume is on the good disk:


# mklv -t sysdump -y dump rootvg 64 hdisk0
# sysdumpdev –P –p /dev/dump

• mirrorvg step and after:


1. Exact mapping for mirrorvg:
# mirrorvg –m rootvg hdiskX

2. Rebuild the boot image:


# bosboot –a

3. Add the new disk to the boot list:


# bootlist –m normal hdisk1 hdiskX

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-17. Procedure 1 (4 of 4): Special steps for rootvg

Special steps for rootvg


The rootvg has special considerations because it contains the boot logical volume and the dump
device. The new disk must replace the old disk in the bootlist. The bootlist needs to be rebuilt to
include the replacement disk instead of the bad disk. The main reason for exact mirroring is to be
sure that the boot logical volume has contiguous allocations. If a dedicated dump device is being
used, it is common for it to not be mirrored. If the dump logical volume is on the failing disk, then
it should be redefined on the good disk instead.
Let’s look at procedure 2.

© Copyright IBM Corp. 2009, 2024 13-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 2 (1 of 2): Disk still working

1. Connect the new disk to the system.


Volume group
Volume group
2. Add new disk to volume group:
# extendvg vg_name hdiskY
hdiskY
hdiskY
3. Migrate old disk to new disk: (*)
# migratepv hdiskX hdiskY

4. Remove old disk from volume group:


# reducevg vg_name hdiskX

5. Remove old disk from ODM: (*) : Is the disk in rootvg?


See next visual for further considerations.
# rmdev -l hdiskX -d

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-18. Procedure 2 (1 of 2): Disk still working

When to use this procedure


Procedure 2 applies to a disk replacement where the disk is unmirrored but might be accessed.
If the disk that must be replaced is in rootvg, follow the instructions on the next visual.

The goal and how to do it


The goal is the same as always. Before you can replace a disk, you must remove everything from
the disk.
1. Shut down your system if you need to physically attach a new disk to the system. Boot the
system so that cfgmgr configures the new disk.
2. Add the new disk to the volume group. Use either the SMIT fastpath smit extendvg or the
extendvg command.
3. Before running the next step, it is necessary to distinguish between the rootvg and a
non-rootvg volume group.
▪ If the disk that is replaced is in rootvg, execute the steps that are shown on the next visual
Procedure 2 (2 of 2): Special Steps for rootvg.
▪ If the disk that is replaced is not in rootvg, use the migratepv command: # migratepv
hdisk_old hdisk_new
This command moves all logical volumes from one disk to another. You can do the
migratepv during normal system activity. The command migratepv requires that the disks
are in the same volume group.

© Copyright IBM Corp. 2009, 2024 13-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
4. If the old disk was migrated, remove it from the volume group. Use either the SMIT fastpath
smit reducevg or the reducevg command.
5. If you need to remove the disk from the system, remove it from the ODM with the rmdev
command as shown. Finally, remove the physical disk from the system.
Note that step 3 is different for rootvg.
Let’s describe the special considerations for rootvg.

© Copyright IBM Corp. 2009, 2024 13-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 2 (2 of 2): Special steps for rootvg


rootvg 1…
hdiskX 2…
hdiskY
3.Disk contains hd5?
# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
1. Connect new disk to system. # chpv -c hdiskX
# bootlist -m normal hdiskY
2. Add new disk to volume
group. Migrate old disk to new disk:
# migratepv hdiskX hdiskY
3.

4. Remove old disk from


volume group. 4…

5. Remove old disk from ODM. 5…

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-19. Procedure 2 (2 of 2): Special steps for rootvg

Extra steps for rootvg


Procedure 2 requires some additional steps if the disk that must be replaced is in rootvg.
1. Connect the new disk to the system as described in procedure 2.
2. Add the new disk to the volume group. Use smit extendvg or the extendvg command.
3. This step requires special considerations for rootvg:
▪ Check whether your disk contains the boot logical volume. The default location for the
boot logical volume is /dev/hd5.
Use the command, lspv -l, to check the logical volumes on the disk that must be
replaced.
If the disk contains the boot logical volume, migrate the logical volume to the new disk
and update the boot logical volume on the new disk. To avoid a potential boot from the old
disk, clear the old boot record by using the chpv -c command. Then, change your bootlist:
# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
# chpv -c hdiskX
# bootlist -m normal hdiskY
If the disk contains the primary dump device, you must deactivate the dump before
migrating the corresponding logical volume: # sysdumpdev -p /dev/sysdumpnull
▪ Migrate the complete old disk to the new one: # migratepv hdiskX hdiskY
If the primary dump device is not active, you must activate it: # sysdumpdev -p /dev/hdX

© Copyright IBM Corp. 2009, 2024 13-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
4. After the disk is migrated, remove it from the rootvg volume group, with this command: #
reducevg rootvg hdiskX
5. If the disk must be removed from the system, remove it from the ODM (use the rmdev
command), shut down your AIX, and remove the disk from the system afterward. Command: #
rmdev -l hdiskX –d
Next, we will describe procedure 3.

© Copyright IBM Corp. 2009, 2024 13-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 3: Disk in missing or removed state


9. Restore file systems from backup:
1. Identify all logical volumes and file systems on failing disk:
# restore -rvqf /dev/rmt0
# lspv -l hdiskY
2. Unmount all file systems on failing disk:

# umount /dev/lv_name Volume group


3. Remove all file systems from failing disk:

# rmfs filesystem
4. Remove all logical volumes from failing disk:
hdiskX hdiskY
# rmlv logical-volume
5. Remove disk from volume group:

# reducevg vg_name hdiskY


6. Remove disk from system:
# lspv hdiskY
# rmdev -l hdiskY -d
...
7. Add new disk to volume group: PV STATE: removed
# extendvg vg_name hdiskZ
8. Re-create all logical volumes and file systems on new disk: # lspv hdiskY
...
# mklv -y lv_name PV STATE: missing
# smit crfs

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-20. Procedure 3: Disk in missing or removed state

When to use this procedure


Procedure 3 applies to a disk replacement where a disk might not be accessed but the volume
group is intact. The failing disk is either in a state (not device state) of missing (normal varyonvg
worked) or removed (forced varyonvg was necessary to bring the volume group online). If the
failing disk is in an active state (this state is not a device state), this procedure does not work. In
this case, one way to bring the disk into a removed or missing state is to run the reducevg -d
command or to do a varyoffvg and a varyonvg on the volume group by rebooting the system. The
reboot is necessary because you cannot vary off a volume group with open logical volumes.
Because the failing disk is active, there is no way to unmount file systems.

Procedure steps
If the failing disk is in a missing or removed state, start the procedure:
1. Identify all logical volumes and file systems on the failing disk. Use commands like lspv, lslv,
or lsfs to provide this information. These commands work on a failing disk.
2. If there are mounted file systems on logical volumes on the failing disk, you must unmount
them. Use the umount command.
3. Remove all file systems from the failing disk with smit rmfs or the rmfs command. If you
remove a file system, the corresponding logical volume and stanza in /etc/filesystems is
removed as well.
4. Remove the remaining logical volumes (the logical volumes that are not associated with a file
system) from the failing disk with smit rmlv or the rmlv command.

© Copyright IBM Corp. 2009, 2024 13-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
5. Remove the disk from the volume group, with the reducevg command or the SMIT fastpath
smit reducevg.
6. Remove the disk from the ODM and from the system with the rmdev command.
7. Add the new disk to the system and extend your volume group. Use the SMIT fastpath smit
extendvg or the extendvg command.
8. Re-create all logical volumes and file systems that were removed due to the disk failure. Use
smit mklv, smit crfs, or the commands directly.
9. Due to the total disk failure, you lost all data on the disk. This data must be restored, either by
the restore command or any other tool you use to restore data (for example, IBM Storage
Protect) from a previous backup.
This procedure requires the volume group to be brought online, either by a varyonvg or a
varyonvg -f. If it is forced, the failed disk is in a removed state. Use lspv to analyze physical
volume states. If it is a normal varyonvg, the disk is in a missing state.
Removing logical volumes is possible on a disk that might not be accessed.
Let’s describe procedure 4.

© Copyright IBM Corp. 2009, 2024 13-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Topic 1 objectives
• Manage volume group quorum issues
• Explain the physical volume states that are used by the LVM
• Replace a disk under different circumstances
• Recover from a total volume group failure

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-21. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 13-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 4: Total rootvg failure


rootvg
1. Replace bad disk.
hdiskX
2. Boot in maintenance mode.
3. Restore from a mksysb image.
rootvg
4. Import each volume group into the
new ODM (importvg) if needed.
hdiskX hdiskY

datavg
Contains OS
logical
hdiskZ volumes
mksysb

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-22. Procedure 4: Total rootvg failure

When to use this procedure


Procedure 4 applies to a total rootvg failure. This situation might come up when your rootvg
consists of one disk that fails. Or, your rootvg is installed on two disks and the disk fails that
contains operating system logical volumes (for example, /dev/hd4).

Procedure steps
Follow these steps:
1. Replace the bad disk
2. Boot your system in maintenance mode
3. Restore your system from a mksysb. If any rootvg file systems were not mounted when the
mksysb was made, those file systems are not included on the backup image. You need to
create and restore those file systems as a separate step.
4. Import any user volume groups after restoring the mksysb. For example: # importvg -y
datavg hdisk9
Only one disk from the volume group (in the example hdisk9), needs to be selected.
Let’s describe procedure 5.

© Copyright IBM Corp. 2009, 2024 13-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Procedure 5: Total non-rootvg failure


datavg
1. Export the volume group from the system:
# exportvg vg_name
2. Check /etc/filesystems. hdiskX

3. Remove bad disk from ODM and the system:


# rmdev -l hdiskX -d

4. Connect the new disk.


Tape
5. If volume group backup is available (savevg):
# restvg -f /dev/rmt0 hdiskY

6. If no volume group backup is available, re-create:


- Volume group (mkvg). hdiskY
- Logical volumes and file systems (mklv, crfs).
7. Restore data from a backup:
# restore -rqvf /dev/rmt0
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-23. Procedure 5: Total non-rootvg failure

When to use this procedure


Procedure 5 applies to a total failure of a non-rootvg volume group. This situation might come up
if your volume group consists of only one disk that fails. Before starting this procedure, make sure
that the problem is not just a temporary disk failure (for example, a power failure).

Procedure steps
Follow these steps:
1. To fix this problem, export the volume group from the system. Use the command exportvg as
shown. During the export of the volume group, all ODM objects that are related to the volume
group is deleted.
2. Check your /etc/filesystems. There should be no references to logical volumes or file systems
from the exported volume group.
3. Remove the bad disk from the ODM (use rmdev as shown). Shut down your system and remove
the physical disk from the system.
4. Connect the new drive and boot the system. The cfgmgr configures the new disk.
5. If you have a volume group backup available (created by the savevg command), you can
restore the complete volume group with the restvg command (or the SMIT fastpath smit
restvg). All logical volumes and file systems are recovered. If you have more than one disk
that should be used during restvg, you must specify these disks: # restvg -f /dev/rmt0
hdiskY hdiskZ
The savevg and restvg commands will be discussed in a future unit.

© Copyright IBM Corp. 2009, 2024 13-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty
6. If you have no volume group backup available, you must re-create everything that was part of
the volume group. Re-create:
▪ The volume group with mkvg or smit mkvg
▪ All logical volumes with mklv or smit mklv
▪ All file systems with crfs or smit crfs
7. Finally, restore the lost data from backups, for example with the restore command or any
other tool you use to restore data in your environment.
Let’s look at some common disk replacement failures.

© Copyright IBM Corp. 2009, 2024 13-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

ODM errors from LVM commands


# lsvg -p datavg
unable to find device id ...734...
ODM failure in device configuration database

1. Typing error in the command?


Analyze failure
2. Analyze the ID of the device: Which
physical volume or logical volume
causes problems?

ODM problem in No
rootvg? Export and import
volume group
Yes

rvgrecover

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-24. ODM errors from LVM commands

ODM failure
After an incorrect disk replacement, you might detect ODM failures. For example, when running
the command lsvg -p datavg, a typical error message might be: unable to find device id
00837734 in device configuration database. In this case, a device might not be found in the
ODM. Analyze the failure before trying to fix it, check the command that you typed in. Maybe it
just contains a typing error. Find out what device corresponds to the ID that is shown in the error
message.

Fix the ODM problem


Two ways to fix an ODM problem:
• If the ODM problem is related to the rootvg, run the rvgrecover procedure.
• If the ODM problem is not related to the rootvg, export the volume group with the exportvg
command and import it again with the importvg command.
Let’s look at an example of a procedural error that would cause an ODM problem.

© Copyright IBM Corp. 2009, 2024 13-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Removal of disk without reducevg (1 of 2)

VGDA: physical: ODM: CuAt:


...221... hdisk4 pvid= …221…
...555... hdisk5 pvid= …555…
datavg pv= …221…
datavg pv= …555…
# rmdev –l hdisk5 -d
VGDA: physical: ODM: CuAt:
...221... hdisk4 pvid= …221…
...555... object deleted
datavg pv= …221…
datavg pv= …555…

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-25. Removal of disk without reducevg (1 of 2)

The problem
A frequent error occurs when the administrator removes a disk from the ODM (by running rmdev).
Then, physically removes the disk from the system, without first running the reducevg command
to remove volume group references to that disk (in the VGDA and in the ODM). The VGDA stores
information about all physical volumes of the volume group. ODM disk references include the
physical volume attributes for the volume group. Throughout this course, the physical volume ID
(PVID) is abbreviated in the visuals for simplicity. The physical volume ID is really 32 characters.
The result of this mistake is that the volume group cannot be varied on. If you try to use reducevg
after the fact, it fails, since the command requires that the volume group is active.
It is not possible to remove a disk from the ODM if it has open logical volumes. If any process is
using a logical volume from a disk, you cannot remove the disk with rmdev.
Let’s examine the fix for this error.

© Copyright IBM Corp. 2009, 2024 13-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Removal of disk without reducevg (2 of 2)


• Repair the ODM enough to varyonvg
ƒ Two options to repair the ODM:
í Use ODM commands (such as odmdelete)
í Use exportvg and importvg (using hdisk4)
• # varyonvg datavg
í Succeeds but reports errors due to VGDA reference to PVID
ƒ # lsvg –l datavg also complains:
í Unable to find device id …555…
í …555… missing
• Use reducevg to remove disk reference from VGDA
ƒ # reducevg datavg hdisk5
í Fails: unable to find physical volume hdisk5
ƒ # reducevg datavg …555…
í Succeeds
Disk management procedures © Copyright IBM Corporation 2024

Figure 13-26. Removal of disk without reducevg (2 of 2)

The fix
Before fixing the problem, be sure that you have the PVID for the removed disk. The problem can
be fixed by running the reducevg command, but the volume group needs to be active. The
varyonvg command does not work if volume group has a PVID value that cannot be resolved to a
disk. You might use the odmdelete command to remove the bad PVID attribute object, but this
action is not as simple as it sounds and a mistake might make matter worse. An easier way to
clean up the bad ODM reference is to export the volume group and then import the volume group
by using the VGDA on the remaining disk. After the volume group is active, you can then use the
reducevg command to properly remove the bad PVID reference from the VGDA. Instead of
specifying the disk name, the PVID of the removed disk is specified. If you did not earlier record
the PVID, then you need to obtain it from the VGDA itself. To obtain the PVID of the removed disk
from the VGDA, use the command: # lqueryvg -p hdisk4 -At (Use any disk from the volume
group.)
You need to compare this output with the lsvg -p datavg output to identify which PVID is for the
missing disk.
Now, it’s time for some review questions.

© Copyright IBM Corp. 2009, 2024 13-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Review questions
1. Although everything seems to be working fine, you detect error log entries for disk hdisk0 in
your rootvg. The disk is not mirrored to another disk. You decide to replace this disk. Which
procedure would you use to migrate this disk?

2. You detect an unrecoverable disk failure in volume group datavg. This volume group consists
of two disks that are completely mirrored. Because of the disk failure you are not able to vary
on datavg. How do you recover from this situation?

3. After disk replacement, you recognize that a disk has been removed from the system but not
from the volume group. How do you fix this problem?

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-27. Review questions

© Copyright IBM Corp. 2009, 2024 13-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Review answers
1. Although everything seems to be working fine, you detect error log entries for disk hdisk0 in
your rootvg. The disk is not mirrored to another disk. You decide to replace this disk. Which
procedure would you use to migrate this disk?
The answer is Procedure 2: Disk still working. There are some additional steps necessary for hd5 and
the primary dump device hd6.
2. You detect an unrecoverable disk failure in volume group datavg. This volume group consists
of two disks that are completely mirrored. Because of the disk failure you are not able to vary
on datavg. How do you recover from this situation?
The answer is forced varyon: varyonvg -f datavg. Use Procedure 1 for mirrored disks.
3. After disk replacement, you recognize that a disk has been removed from the system but not
from the volume group. How do you fix this problem?
The answer is repair the ODM, for example through exportvg and importvg. Execute reducevg using
the PVID instead of disk name.

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-28. Review answers

© Copyright IBM Corp. 2009, 2024 13-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Exercise

Disk Management Procedures

Disk management procedures © Copyright IBM Corporation 2024

Figure 13-29. Exercise

© Copyright IBM Corp. 2009, 2024 13-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 13. Disk management procedures

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Manage volume group quorum issues
ƒ Explain the physical volume states that are used by the LVM
ƒ Replace a disk under different circumstances
ƒ Recover from a total volume group failure

© Copyright IBM Corporation 2024

Figure 13-30. Unit summary

Different procedures are available that can be used to fix disk problems under any circumstance:
Procedure 1: Mirrored disk
Procedure 2: Disk still working (rootvg specials)
Procedure 3: Total disk failure
Procedure 4: Total rootvg failure
Procedure 5: Total non-rootvg failure
The exportvg and importvg commands can be used to easily transfer volume groups between
systems.

© Copyright IBM Corp. 2009, 2024 13-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Unit 14.Backup and restore


Estimated time
01:00

Overview
This unit covers how to back up and restore volume groups and file systems using the facilities
that are built into the AIX operating system.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Operating system management:
https://www.ibm.com/docs/en/aix/7.3?topic=operating-system-management

© Copyright IBM Corp. 2009, 2024 14-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Backup the rootvg volume group using the mksysb utility
• Explain how to restore the operating system using a mksysb image
• Explain the role of the image.data and bosinst.data files
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

© Copyright IBM Corporation 2024

Figure 14-1. Unit objectives

Let us start by introducing ideas of backup.

© Copyright IBM Corp. 2009, 2024 14-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Topic 1 objectives
• Backup the rootvg volume group using the mksysb utility. Explain the role of the image.data
and bosinst.data files
• Explain how to restore the operating system using a mksysb image
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

Backup and restore © Copyright IBM Corporation 2024

Figure 14-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 14-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Backup introduction
• Why back up?
ƒ Data is very important; expensive to re-create
ƒ Hardware failure
ƒ Accidental deletion
ƒ Damage due to software installation or hardware repair
ƒ Create a system image for installation cloning
ƒ Long-term archive
ƒ Disaster recovery
• Types of backup:
ƒ Volume group
Generally handled by
í mksysb utility which records an image backup of the operating system enterprise backup
mgmt solutions, for
í savevg utility which performs a full backup of a user-created VG example IBM Storage
Protect
ƒ Full -Backs up all specified data
ƒ Incremental - Records changes since previous backups

Backup and restore © Copyright IBM Corporation 2024

Figure 14-3. Backup introduction

Why back up your data?


The data on a computer is usually far more important and expensive to replace than the machine
itself. Data loss can happen in many ways. The most common causes are hardware failure and
accidental deletion. AIX provides several ways in which we can back up and restore data.
• Volume group backup: AIX provides a mksysb utility that creates a back up image of the
operating system (that is, the root volume group) and the savevg utility to backup
user-defined volume groups. It is important that regular mksysb backups are created as they
allow us to reinstall a system to its original state if it has been corrupted. If you create the
backup on external media, for example tape, the media is bootable and includes the
installation programs that are needed to install from the backup.
• Full backup: A full backup (sometimes referred to as level 0 backup) backs up all files and
directories in the specified location. AIX provides the backup command and several standard
UNIX utilities for performing a full backup such as tar, cpio, and pax.
• Incremental backup: An incremental backup, backs up all the files that have changed since
the last full or incremental backup. The backup command on AIX is capable of providing this
functionality.
AIX (and UNIX) systems are often deployed in high performance, fault tolerant, 24x7 mission
critical environments. As a result of this, often enterprise backup solutions are deployed, like IBM
Storage Protect (formally know as IBM Spectrum Protect and Tivoli Storage Manager (TSM). This
is an enterprise backup and recovery solution that is designed to provide centralized, automated
data protection that can help reduce the risks that are associated with data loss while also helping
to reduce complexity, manage costs, and address compliance with regulatory data retention
requirements. This and other enterprise backup/recovery solutions are outside the scope of this
class.

© Copyright IBM Corp. 2009, 2024 14-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

System image backup


• Backs up only rootvg using the mksysb command.
• Unmounted file systems are not backed up.
• If device selected is tape, bootable tape is created in backup format.
• Can be completed over a network to a NIM server.
• Provides facilities for a non-interactive installation.
• Saves system-created paging space definitions.
• Saves LV policies and file system attributes.
• There should be minimal user and application activity.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-4. System image backup

The mksysb utility provides the following functions:


• Saves the definition of the paging space
• Provides a non-interactive installation that gives information that is required at installation
time through a data file
• Saves the inter-disk and intra-disk policies for the logical volumes
• Saves map files for logical volumes, if requested by the user
• Provides the ability to shrink the file system and logical volume in a volume group at system
installation or mksysb recovery time
• Saves the file system characteristics
• Allows the user to restore single or multiple files from a system image
• Create a consistent mksysb backup (of rootvg) using snapshots
The volume group image is saved in backup format.
System backup or clone?
If the mksysb command is used for to backup the source system, it is considered a system backup.
However, if the intent of the backup is to provide a customized system for use on other machines,
the mksysb is considered a clone. Cloning means preserving either all or some of a system's
customized information for use on a different machine. During installation, the default option is
Enable System Backups to install any system = Yes. This means that mksysb files are not
system-specific. Otherwise, if the mksysb by itself, is used to clone a machine or LPAR that is not a
hardware clone, it might not work, as it cannot provide support for hardware devices unique to the
new machine or LPAR. For example, loading a mksysb image that is made from a physical machine
will not install correctly on a virtual LPAR because they use different AIX file sets. However, this is

© Copyright IBM Corp. 2009, 2024 14-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
an easy problem to resolve. In addition to the mksysb, you also need to boot using the AIX
installation media to provide the file sets needed by the other machine or LPAR. If using a NIM
server, a bosinst.data file must be defined with the option INSTALL_DEVICES_AND_UPDATES =
yes and the lppsource that is allocated to the client machine, must also have all the possible
device support.
Non-interactive installation
If a system backup is being made to install another system or to reinstall the existing system, a
customer can predefine installation information so questions at installation time are already
answered. This keeps user interaction at the target node to a minimum. The system backup and
BOS installation interact through several files. The mksysb saves the data, which is used by the
installation, through taking a snapshot of the current system, and its customized state.
System backup components
The components that are provided as part of the system backup utility, are packaged in the
bos.sysmgt.sysbr package.
Note that unmounted file systems are ignored during backup.
Let us see how we can create an mksysb.

© Copyright IBM Corp. 2009, 2024 14-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Creating a mksysb image


# mksysb –i /backups/my_mksysb Syntax:
or mksysb flags [device | file]
# smit mksysb
Back Up This System to Tape/File or UDFS capable media

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
WARNING: Execution of the mksysb command will
result in the loss of all material
previously stored on the selected
output medium. This command backs
up only rootvg volume group.

* Backup DEVICE or FILE [/backups/my_mksysb] +/ Back up to a file or


Create MAP files? no + tape.
Create backup using snapshots? no +
EXCLUDE files? no +
Exclude WPAR file systems? no +
Location of File System Exclusion List [] /
List files as they are backed up? no +
Verify readability if tape device? no +
Generate new /image.data file? yes +
EXPAND /tmp if needed? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
Number of BLOCKS to write in a single output [] #
(Leave blank to use a system default)
Location of existing mksysb image [] /
File system to use for temporary work space [] /
(If blank, /tmp will be used.)
Back up encrypted files? yes +
Back up DMAPI filesystem files? yes +
Build new alt_disk_install boot_image? no +

Backup and restore © Copyright IBM Corporation 2024

Figure 14-5. Creating a mksysb image

Introduction
The SMIT screen that is shown in the visual, Back Up This System to Tape/File or UDFS capable
media, performs a mksysb operation and backs up only mounted file systems in rootvg.
You can use the mksysb command, SMIT (smit mksysb) or the Network Installation Manager
(NIM) to create a mksysb image of your operating system.
The mksysb -i flag generates the /image.data file. The /image.data file contains details about
volume groups, logical volumes, file systems, paging space, and physical volumes. This
information is included in the backup for future use by the installation process.
Create MAP files?
This option generates a layout mapping of the logical-to-physical partitions for each logical
volume in the volume group. This mapping is used to allocate the same logical-to-physical
partition mapping when the image is restored.
Create backup using snapshots?
When yes is selected, external JFS2 snapshots are used for creating a volume group backup.
Snapshots allow for a point-in-time image of a JFS2 file system and thus, do not require a system
to be put into a temporarily inactive state. The size of the snapshot is 2% - 15% of the size of the
file system. The snapshot logical volumes are removed when backup is complete. However,
snapshots are not removed if a file system already has other snapshots. Additionally, if a file
system has internal snapshots, external snapshots cannot be created and thus, snapshots are not
used for creating the backup of the file system. This options does not affect any JFS file systems
that are present in the volume group that is being backed up. These file systems are backed up in
the same manner as done previously. This applies only to JFS2 file systems.

© Copyright IBM Corp. 2009, 2024 14-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
EXCLUDE files?
This option excludes the files and directories that are listed in the /etc/exclude.rootvg file from
the system image backup.
Exclude WPAR file systems?
Excludes WPAR file systems from the system backup.
List files as they are backed up?
Change the default to see each file that is listed as it is backed up. Otherwise, you see a
percentage-completed progress message while the backup is created.
Verify readability if tape device?
Verifies the file header of each file on the backup tape, and reports any read errors as they occur.
Generate new /image.data file?
If you have already generated a new /image.data file and don't want a new file created, change
the default to no. The default value is yes (-i flag) on the command line.
EXPAND /tmp if needed?
Choose yes if the /tmp file system can automatically expand if necessary, during the backup.
Disable software packing of backup?
The default is no, which means the files are packed before they are archived to tape. Files that
cannot be compressed are placed in the archive as is. Restoring the archive automatically
unpacks the files that are packed by this option. If the tape drive you are using provides packing or
compression, set this field to yes.
Backup extended attributes?
By default, the mksysb, savevg, and backup utilities save any extended attributes. If you plan to
restore to a back-level system, which does not understand the format with extended attributes,
then this option allows you to override that default behavior.
Number of BLOCKS to write in a single output
This specifies the number of 512 bytes to write in a single output operation, referred to as the
block size. If a number is not specified, the backup command uses a default value appropriate for
the physical device selected. Larger values result in larger physical transfers to tape devices. The
block size must be a multiple of the physical block size of the device being used.
Location of existing mksysb image
Specifies the full path name to the location of a previously created mksysb image that can be used
to create a bootable tape backup.
File system to be used for temporary workspace
Specifies the full path name to the location of a directory or file system to be used as temporary
space to create a bootable tape backup. The file system that is used must have at least 100 MB of
available free disk space for the creation of the bootable image. If this field is left blank, the /tmp
file system is used.
Back up encrypted files?

© Copyright IBM Corp. 2009, 2024 14-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
Specifies whether encrypted files should be backed up. AIX 6.1 introduces the ability to encrypt
files on a per file basis without the need of third-party tools.
Back up DMAPI file system files?
Specifies whether DMAPI file system files are to be backed up.
Build new alt_disk_install boot_image?
Specifies whether the /usr/lpp/bos.alt_disk_install/boot_images/bosboot.disk.chrp boot
image can be replaced with a new boot image when you create the mksysb image. This file is the
boot image that is used in the new rootvg. This file is a part of bos.alt_disk_install.boot_images
fileset. If the bosboot.disk.chrp image is not found in the mksysb image, alt_disk_mksysb uses
the /usr/lpp/bos.alt_disk_install/boot_images/bosboot.disk.chrp image in the current rootvg.
If you have ifixes or other software installed that affect the kernel, select 'yes' for the option
"Build new alt_disk_install boot_image?". The bosboot.disk.chrp image is rebuilt to match the
boot image of the system. You must ensure that bos.alt_disk_install.boot_images be installed
on the system prior to creating the system backup.
Note that the mksysb backup file as shown in the example should not be in rootvg. The best
method to use is NFS over the network to a NIM server.
Creating a consistent mksysb backup (of rootvg) using snapshots
Technology Level 3, Service Pack 1 for AIX 7.1 introduced a new feature for the mksysb utility. This
new feature makes it possible to create consistent mksysb backups of your AIX systems using file
system snapshot technology. This feature was also available with Technology Level 9 for AIX 6.1.
Previously, when taking a mksysb image of an AIX system, the administrator would often see
messages stating the files that were meant to be backed up were now missing (usually transient
temporary files) or occasionally there would be issues backing up files that were currently “in
use”. Often the administrator would need to quiesce the system in order to take a “clean” backup
of the system. And, depending on the size of the system, the time required to perform the backup
(with the system offline) was significant.
A solution was required to provide the administrator with the ability to create a volume group
backup without having to quiesce the system (or volume group). This would allow the backup to
complete (without missing any files) and provide a consistent and functionally stable backup. This
challenge is easily answered using the file system snapshot technology already built-in to AIX.
JFS2 has the ability to create snapshots of a mounted JFS2 file system. This creates a consistent
(block-level) image of the file system at a point in time.
The mksysb command has been enhanced to call the snapshot command to create snapshots of
the JFS2 file systems (in rootvg) and then use the snapshots to create a mksysb backup. To
enable the snapshot feature, use the new –T flag with the mksysb command. Not surprisingly, a
few other AIX ‘backup related’ commands have also benefited from this new feature. The savevg,
savewpar, mkcd and mkdvd commands have all been enhanced to accept the new –T flag to enable
file system snapshots.
The mksysb snapshot feature creates an external snapshot of each of the mounted JFS2 file
systems in the root volume group. This requires additional free space in the volume group to
create the external logical volumes for each snapshot file system. When the backup is complete,
the snapshots are deleted.

© Copyright IBM Corp. 2009, 2024 14-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
Note: snapshots are only available for JFS2 file systems. JFS file systems in a volume group will
be backed up using traditional methods.
Below is an example of using the –T flag with the mksysb command. After issuing the command
we soon see the message “Creating snapshots”.
# mksysb -TiX /backupFS/snapshot_mksysb
Creating information file (/image.data) for rootvg.
Creating snapshots.
.
Creating list of files to back up.
Backing up 43833 files....
43833 of 43833 files (100%)
0512-038 mksysb: Backup Completed Successfully.
While the mksysb command is running, we can observe the snapshots in rootvg, using the
snapshot command:
# snapshot -q /
Snapshots for /
Current Location 512-blocks Free Time
* /dev/fslv01 32768 6912 Tue Aug 29 03:26:54 EDT 2023
The lsvg -l rootvg command also shows the temporary logical volumes used for the the
snapshots.
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 3 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 11 11 1 open/syncd /
hd2 jfs2 121 121 1 open/syncd /usr
hd9var jfs2 20 20 1 open/syncd /var
hd3 jfs2 8 8 1 open/syncd /tmp
hd1 jfs2 2 2 1 open/syncd /home
hd10opt jfs2 2 2 1 open/syncd /opt
hd11admin jfs2 8 8 1 open/syncd /admin
lg_dumplv sysdump 64 64 1 open/syncd N/A
livedump jfs2 16 16 1 open/syncd
/var/adm/ras/livedump
fslv01 jfs2 1 1 1 open/syncd N/A
fslv02 jfs2 1 1 1 open/syncd N/A
fslv03 jfs2 1 1 1 open/syncd N/A
fslv04 jfs2 1 1 1 open/syncd N/A
fslv05 jfs2 2 2 1 open/syncd N/A
fslv06 jfs2 15 15 1 open/syncd N/A
fslv07 jfs2 1 1 1 open/syncd N/A
fslv08 jfs2 1 1 1 open/syncd N/A

© Copyright IBM Corp. 2009, 2024 14-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
The lsvg command output shows multiple new logical volumes with names that start with the fslv
prefix. These are the snapshot logical volumes. The new logical volumes have a state of
open/syncd. The df command will show additional file systems mounted at locations starting
with /admin.
# df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 360448 259480 29% 2599 9% /
/dev/hd2 3964928 806336 80% 39440 30% /usr
/dev/hd9var 655360 460320 30% 634 2% /var
/dev/hd3 262144 259272 2% 43 1% /tmp
/dev/hd1 65536 64832 2% 5 1% /home
/dev/hd11admin 262144 261384 1% 6 1% /admin
/proc - - - - - /proc
/dev/hd10opt 65536 29040 56% 194 6% /opt
/dev/livedump 524288 523552 1% 4 1% /var/adm/ras/livedump
/dev/fslv00 16777216 14292864 15% 5 1% /backupFS
/dev/fslv01 32768 6656 80% - - /admin/mksysb.6357382
/dev/fslv02 32768 32000 3% - - /admin/mksysb.6357382/admin
/dev/fslv03 32768 32000 3% - - /admin/mksysb.6357382/home
/dev/fslv04 32768 32000 3% - - /admin/mksysb.6357382/opt
/dev/fslv05 65536 64768 2% - - /admin/mksysb.6357382/tmp
/dev/fslv06 491520 484608 2% - - /admin/mksysb.6357382/usr
/dev/fslv07 32768 31744 4% - - /admin/mksysb.6357382/var
/dev/fslv08 32768 32000 3% - -
/admin/mksysb.6357382/var/adm/ras/livedump
When the mksysb process completes, all of the snapshot logical volume, whose names start with
fslv, are removed. And all snapshots are removed.
# snapshot -q /
/ has no snapshots.
Let us explain more about the image.data file.

© Copyright IBM Corp. 2009, 2024 14-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

image.data file
• Contains information describing the image installed during the BOS installation process
• Large file arranged in stanza format
• Not recommended that the user modify the file, apart from the SHRINK field
• Can be created during a mksysb operation or by calling the mkszfile command
image_data: ils_data:
IMAGE_TYPE= bff LANG= en_US
DATE_TIME= Tue Oct 24 19:48:01 EDT 2017
UNAME_INFO= AIX moe1 2 7 00F96D534C00 vg_data:
PRODUCT_TAPE= no VGNAME= rootvg
USERVG_LIST= vg00 PPSIZE= 32
PLATFORM= chrp VARYON= yes
OSLEVEL= 7.2.1.0 VG_SOURCE_DISK_LIST= hdisk0
OSLEVEL_R= 7200–01 QUORUM= 2
OSLEVEL_S= 7200–01–01–1642 ENH_CONC_CAPABLE= no
CPU_ID= 00F96D534C00 CONC_AUTO= no
LPAR_ID= 3 BIGVG= no
TFACTOR= 1
logical_volume_policy:
SHRINK= no source_disk_data:
EXACT_FIT= no PVID= pvid–value
PHYSICAL_LOCATION= location

Backup and restore © Copyright IBM Corporation 2024

Figure 14-6. image.data file

The image.data file contains information describing the image installed during the BOS
installation process. This information includes the sizes, names, maps, and mount points of
logical volumes and file systems in the rootvg volume group. The mkszfile command generates
the image.data file. It is not recommended that the user modify the file. Changing the value of
one field without correctly modifying any related fields, can result in a failed installation and a
corrupted backup image. The only exception to this recommendation is the SHRINK field, which
the user may modify to instruct the BOS installation routines to create the file systems as
specified in the image.data file, or to create the file systems only as large as is required to contain
all the data in the file system.
The BOS installation process also takes input from the image.data file regarding defaults for the
partition being installed. Any default values in the image.data file will override values obtained
when the BOS installation queries the hardware topology and existing rootvg volume group. The
image.data file resides in the root (/) directory.

© Copyright IBM Corp. 2009, 2024 14-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

bosinst.data file
• Defines defaults for variables controlling an installation
• Can be used to create non-prompted installations
• Key options below, for a full description see: /usr/lpp/bosinst/bosinst.template.README
control_flow: ALL_DEVICES_KERNELS = yes
CONSOLE = Default GRAPHICS_BUNDLE =no
INSTALL_METHOD = overwrite SYSTEM_MGMT_CLIENT_BUNDLE =
INSTALL_EDITION = standard FIREFOX_BUNDLE =
PROMPT = no KERBEROS_5_BUNDLE = no
EXISTING_SYSTEM_OVERWRITE = yes SERVER_BUNDLE = no
INSTALL_X_IF_ADAPTER = yes ALT_DISK_INSTALL_BUNDLE = no
RUN_STARTUP = no ...
RM_INST_ROOTS = no locale:
ERROR_EXIT = BOSINST_LANG = en_US
CUSTOMIZATION_FILE = CULTURAL_CONVENTION = en_GB
TCB = no MESSAGES = en_US
INSTALL_TYPE = KEYBOARD = en_US
BUNDLES =
SWITCH_TO_PRODUCT_TAPE = target_disk_data:
RECOVER_DEVICES = Default PVID = 000cd211a2f3a00d
BOSINST_DEBUG = no PHYSICAL_LOCATION = location code
ACCEPT_LICENSES = yes CONNECTION = connection info
ACCEPT_SWMA = LOCATION =
DESKTOP = NONE SIZE_MB = disk size
INSTALL_DEVICES_AND_UPDATES = yes HDISKNAME = hdisk0
IMPORT_USER_VGS =

Backup and restore © Copyright IBM Corporation 2024

Figure 14-7. bosinst.data file

The /bosinst.data file enables the administrator to specify the requirements at the target
partition and how the user interacts with the target partition. It provides flexibility by allowing
unattended installations. The system backup utilities simply copy the /bosinst.data into the
second file on the mksysb tape. If this file is not in the root directory, the
/usr/lpp/bosinst/bosinst.template is copied to the /bosinst.data.
/bosinst.data file
This file enables the administrator to specify the requirements at the target system and how the
user interacts with the target system. It provides flexibility by allowing unattended installations.
The system backup utilities simply copy the /bosinst.data into the second file on the mksysb tape.
If this file is not in the root directory, the /usr/lpp/bosinst/bosinst.template is copied to the
/bosinst.data.
Key fields (highlight in the visual):
• PROMPT: determines whether the installation is to be prompted (yes) or non-prompted (no).
• INSTALL_DEVICES_AND_UPDATES: When installing a mksysb image to a system with a
different hardware configuration, boot from product media to get any missing device drivers
installed. In addition, if the product media is a later level of AIX than the mksysb, software in
the mksysb image is updated. To prevent either of these additional installations from
occurring, set this field to no. The default is yes.
• INSTALL_METHOD: Specifies a method of installation: migrate, preserve, erase_only, or
overwrite.
• ALL_DEVICES_KERNELS: Specifies whether to install all device and kernel file sets The
choices are yes and no. If you select no, your system is installed with the devices and kernel

© Copyright IBM Corp. 2009, 2024 14-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
specific to your system configuration. If you select yes, when you create a system backup of
your system, you can use that system backup to install any system.
• TARGET DISK STANZA: determines where to create the root volume group.
• LOCALE STANZA: determines:
▪ The language to use during installation
▪ Primary cultural convention to use after reboot
▪ Primary message catalogs to use after reboot
▪ Keyboard map to use after reboot
Note: The CREATE_JFS2_FS field is obsolete starting with AIX 7.2.
Now let us see the format of a mksysb tape.

© Copyright IBM Corp. 2009, 2024 14-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

mksysb tape image format


Blocksize = Blocksize = Blocksize = Tape drive
512 512 512 blocksize

BOS boot mkinsttape dummy rootvg


image image backup image
.toc
1st Section 2nd Section 3rd Section 4th Section
0 1 2 3

Kernel ./image.data Dummy TOC Back up


device drivers ./bosinst.data by name
./tapeblksz

• To list files in the backup image on a mksysb:


ƒ lsmksysb –f /dev/rmt0

• To restore individual files from the mksysb:


ƒ restorevgfiles –f /dev/rmt0 /etc/inittab
Backup and restore © Copyright IBM Corporation 2024

Figure 14-8. mksysb tape image format

This visual shows the tape layout of a mksysb image.


Using a tape device to create a mksysb backup is very uncommon nowadays but the information
is shown here to give students an understanding of the traditional composition of a mksysb
backup image.
There are four images on the mksysb tape:
• The bosboot image contains a copy of the kernel and specific device drivers, allowing you to
boot from this tape.
• The mkinsttape image contains files to be loaded into the RAM file system when booting in
maintenance mode.
• The dummy TOC image contains a single file containing the words “dummy toc”. This image is
used to make the mksysb tape contain the same number of images as a BOS install tape.
• The last image is the rootvg data image. This image contains a copy of rootvg (but only the JFS
and JFS2 file systems that were mounted at the time of the backup). This data is saved using
the backup command.
To list files in the backup image on a mksysb:
# lsmksysb –f /dev/rmt0
To restore individual files from the mksysb:
# restorevgfiles –f /dev/rmt0 /etc/inittab
BOS boot image
The BOS boot image contains a copy of the system's kernel and device drivers that are needed to
boot from the tape.

© Copyright IBM Corp. 2009, 2024 14-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
mkinsttape image
The mkinsttape image contains the following files:
• ./image.data holds the information that is needed to re-create the root volume group and its
logical volumes and file systems.
• ./bosinst.data contains the customizable installation procedures and dictates how the BOS
installation program behaves. This file allows for the non-interactive installations.
• ./tapeblksz contains the block size setting of the tape drive that is used during the backup.
This applies to the files in the fourth section.
Dummy TOC
The dummy TOC is used to make mksysb tapes have the same number of files as the BOS
installation tapes.
rootvg backup image
The rootvg backup image contains all the data from the backup. This data is saved by using the
backup command that is discussed shortly.
• Listing and extracting files in a tape mksysb image
The easiest way to list files or to restore individual files from any media (tape or optical) is to
use the generic list and restore commands:
▪ # lsmksysb -f <device>, where <device> might be /dev/rmt0 or /dev/cd0.
▪ # restorevgfiles -f <device> <file name>,
- <device> might be /dev/rmt0 or /dev/cd0.
- <file> can be one of more files such as /etc/inittab.
For tape specific restores, a combination of tape control and AIX file system restore
commands can be used:
▪ # tctl -f /dev/rmt0 rewind
▪ # tctl -f /dev/rmt0.1 fsf 3
▪ # restore -Tvf /dev/rmt0
OR
▪ # restore -Tv –s4 -f /dev/rmt0
The tctl command can be used to rewind and fast forward the tape to the start of the
fourth section (third tape mark). Then, the restore command, as shown in the example
can be used to extract (-x) or list (-T) files on the tape. Alternatively, if the tape is already
rewound, then the restore command can be used directly to extract files from the fourth
section (-s4).
For further information regarding tape manipulation, see the tctl man page.
This information is important to know when you want to restore one file from the tape image
rather than the whole image. If the tape is positioned to the fourth file (rootvg data), files can be
retrieved by using restore. The sections are officially referred to as files. Section was used to
avoid any ambiguity.

© Copyright IBM Corp. 2009, 2024 14-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Topic 1 objectives
• Backup the rootvg volume group using the mksysb utility. Explain the role of the image.data
and bosinst.data files
• Explain how to restore the operating system using a mksysb image
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

Backup and restore © Copyright IBM Corporation 2024

Figure 14-9. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 14-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Restoring a mksysb from a tape device (1 of 2)


• Using the SMS menus, boot the system from either the installation media or the device the
mksysb is on
• Restore the mksysb image from the device, for example tape /dev/rmt0.
Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.
1 Start Install Now With Default Settings
2 Change/Show Installation Settings and Install
>>> 3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)

1 Access A Root Volume Group


2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
>>> 6 Install from a System Backup

Tape Drive Path Name


>>> 1 tape/scsi/4mm/2GB /dev/rmt0

Backup and restore © Copyright IBM Corporation 2024

Figure 14-10. Restoring a mksysb from a tape device (1 of 2)

To restore a mksysb image from tape, boot the partition into SMS just as if you were performing
an installation. You can either boot from installation media or the mksysb tape, if it is bootable.
When you are booting from installation media, be sure the version of the installation media is the
same as the version of AIX contained on the mksysb tape.
The steps in the visual will be seen if you are booting from installation media.
You will be prompted to define the console and select a language for installation. Once you have
answered those questions, the Installation and Maintenance menu is presented.
Be sure to put the mksysb tape in the tape drive before answering the last question.
The menu options you are presented may vary based on make and model number of your
hardware, firmware level, and AIX version.

© Copyright IBM Corp. 2009, 2024 14-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Restoring a mksysb from a tape device (2 of 2)


Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

1 Start Install Now With Default Settings


>>> 2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery
4 Make Additional Disks Available
5 Select Storage Adapters

System Backup Installation and Settings

Either type 0 and press Enter to install with the current settings, or type the
number of the setting you want to change and press Enter.

Setting: Current Choice(s):

1 Disk(s) where you want to install ...... hdisk0


Use Maps............................. No
2 Shrink File Systems..................... No
3 Import User Volume Groups............... Yes
4 Recover Devices......................... Yes

>>> 0 Install with the settings listed above

Backup and restore © Copyright IBM Corporation 2024

Figure 14-11. Restoring a mksysb from a tape device (2 of 2)

The visual shows the rest of the steps involved in completing the mksysb image. It is a good idea
to check your installation settings to make sure they are correct for the type of installation you are
performing.
If you are booting from the device with the mksysb on it (rather than installation media), you will
not see the screens on the previous visual. Instead, you will only go through the screens on this
visual.
Changing installation settings
From the Installation and Maintenance menu, select option 2, Change/Show Installation
Settings and Install. (Not all menu options are shown, due to format space limitations). The
options from the System Backup and Installation and Settings menu are:
1 Disk where you want to install
▪ Select disks where you want to install.
Use Maps
▪ The option Use Maps lets you choose whether to use the map files created (if you created
any) during the backup process of the mksysb tape. The default is no. If the selected disks
do not have map files, then this option would not be available.
2 Shrink Filesystems
▪ The option Shrink Filesystems installs the file systems using the minimum required
space. The default is no. If yes, all file systems in rootvg are shrunk. So remember after
the restore, evaluate the current file system sizes. You might need to increase their sizes.
0 Install with the settings listed above

© Copyright IBM Corp. 2009, 2024 14-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
▪ At the end, select option 0, which installs by using the settings that are selected. Your
mksysb image is restored.
The system then reboots.
Additional options that you might see are:
Import User Volume Groups
▪ You have the option to have user volume groups that are imported after the installation
completes. The default is yes.
Recover devices
▪ BOS installation program attempts to re-create the devices the same way they were on the
machine the mksysb was created on. This is normal procedure for regular mksysb
restores on the same system. However, for cloning (installing the mksysb image on
another system), you might not want these devices configured this way, especially for
network configuration. The default is yes.
Let us look at restoring a mksysb from a NIM server you boot the machine from.

© Copyright IBM Corp. 2009, 2024 14-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Restoring a mksysb from a NIM server (1 of 2)


• Restore a mksysb image from a NIM Server using the SMS menus:
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
Select Device Type
3. I/O Device Information
1. Tape
4. Select Console
Multiboot 2. CD/DVD
5. Select Boot Options
1. Select Install/Boot Device 3. Hard Drive
2. Configure Boot Device Order 4. Network
3. Multiboot Startup <OFF> 5. List all Devices
4. SAN Zoning Support

Select Device
Device Current Device
Number Position Name
1. 1 Interpartition Logical LAN
( loc=U8286.41A.216D53V–V3–C2–T1 )
2. – SCSI 29 GB Harddisk, part=2 (AIX 7.2.0)
( loc=U8286.41A.216D53V–V3–C111–T1–L8100000000000000 )

Select Task
Interpartition Logical LAN
( loc=U8286.41A.216D53V–V3–C2–T1 )

1. Information
2. Normal Mode Boot
3. Service Mode Boot

Backup and restore © Copyright IBM Corporation 2024

Figure 14-12. Restoring a mksysb from a NIM server (1 of 2)

First, the resources (mksysb image, bosinst.data, SPOT, etc...) have to be allocated to the client
on the NIM server and the NIM server must have a bosinst operation defined and available for
your client machine.
Next, if the client is not set up as a NIM client, you will need to activate the client into SMS mode
and select option 2, Setup Remote IPL. This option allows you to define the network parameters
of the NIM server and client. Once the IPL details have been entered, press Esc until you return to
the main menu.

© Copyright IBM Corp. 2009, 2024 14-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Restoring a mksysb from NIM server (2 of 2)


• Client issues a bootp request to the NIM server and downloads the boot image via tftp:

TFTP BOOT –––––––––––––––––––––––––––––––––––––––––––––––––––


Server IP.....................10.40.224.22
Client IP.....................10.40.226.171
Gateway IP....................10.40.227.254
Subnet Mask...................255.255.252.0
( 1 ) Filename................./tftpboot/moe1.lvc.edu.ihost.com
TFTP Retries..................5
Block Size....................512
FINAL PACKET COUNT = 51201
FINAL FILE SIZE = 26214400 BYTES

Installing Base Operating System

Please wait...

Approximate Elapsed time


% tasks complete (in minutes)

3 0 Making logical volumes

Backup and restore © Copyright IBM Corporation 2024

Figure 14-13. Restoring a mksysb from NIM server (2 of 2)

The visual shows the rest of the steps involved in completing the mksysb restore from a NIM
server.
This example assumes that the NIM server was configured to provide a bosint.data file with
PROMPT=NO and all the necessary information provided, Otherwise, the system console would
need to be used to walk through the Install and Maintenance panels shown on the previous
visuals.
Let us see how we back up other volume groups.

© Copyright IBM Corp. 2009, 2024 14-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Topic 1 objectives
• Backup the rootvg volume group using the mksysb utility. Explain the role of the image.data
and bosinst.data files
• Explain how to restore the operating system using a mksysb image
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

Backup and restore © Copyright IBM Corporation 2024

Figure 14-14. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 14-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Creating a backup of a user defined volume group


# savevg –f /tmp/datavg_bk_svg –i datavg
OR Syntax
savevg –f device –i VGname
# smit vgbackup
Back Up a Volume Group

Move cursor to desired item and press Enter.

Back Up a Volume Group to Tape/File or UDFS capable media


Back Up a Volume Group to CD
Back Up a Volume Group to DVD

Back Up a Volume Group to Tape/File or UDFS capable media

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]

WARNING: Execution of the savevg command will


result in the loss of all material
previously stored on the selected
output medium.

* Backup DEVICE or FILE [ ] +/


* VOLUME GROUP to back up [ ] +
...

Backup and restore © Copyright IBM Corporation 2024

Figure 14-15. Creating a backup of a user defined volume group

To back up a user defined (non-rootvg) volume group, use the savevg command or SMIT (smit
vgbackup). The parameters are virtually identical to creating a mksysb image.
The savevg command finds and backs up all files belonging to file systems of a specified volume
group. The volume group must be varied-on, and the file systems must be mounted. The savevg
command uses the data file created by the mkvgdata command. This data file can either be a
/image.data file or a /tmp/vgdata/<vgname>/<vgname>.data file.
The /tmp/vgdata/<vgname>/<vgname>.data file contains information about a user defined
volume group. The <vgname> variable reflects the name of the volume group. The savevg
command uses this file to create a backup image that can be used by the restvg command to
remake the user volume group.

© Copyright IBM Corp. 2009, 2024 14-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Restoring a backup of a user defined volume group


• Prior to restoring the volume group:
ƒ Unmount all file systems which are part of that volume group
ƒ Varyoff the volume group
• # restvg –q –f /tmp/datavg_bk_svg Syntax
restvg –f device [hdisk(s)]
• OR
Remake a Volume Group
• # smit restvg * Restore DEVICE or FILE [] +/
SHRINK the filesystems? no +
Recreate logical volumes and filesystems only? no +
PHYSICAL VOLUME names [] +
(Leave blank to use the PHYSICAL VOLUMES listed
in the vgname.data file in the backup image)
Use existing MAP files? yes +
Physical partition SIZE in megabytes [] +#
(Leave blank to have the SIZE determined
based on disk size)
Number of BLOCKS to read in a single input [] #
(Leave blank to use a system default)
Alternate vg.data file [] /
(Leave blank to use vg.data stored in
backup image)
Backup and restore © Copyright IBM Corporation 2024

Figure 14-16. Restoring a backup of a user defined volume group

The restvg command or the smit restvg fast path can be used to restore a user defined
(non-rootvg) volume group.

© Copyright IBM Corp. 2009, 2024 14-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Topic 1 objectives
• Backup the rootvg volume group using the mksysb utility. Explain the role of the image.data
and bosinst.data files
• Explain how to restore the operating system using a mksysb image
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

Backup and restore © Copyright IBM Corporation 2024

Figure 14-17. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 14-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Traditional UNIX and AIX backup commands


• AIX
ƒ backup and restore
• Other popular backup, restore commands across UNIX platforms:
ƒ tar
ƒ cpio
ƒ pax
ƒ dd
• Compression utilities
ƒ compress, restore using uncompress or zcat
ƒ gzip, restore using gunzip
ƒ pigz*
ƒ xgzip*
• JFS2 snapshot

Backup and restore © Copyright IBM Corporation 2024

Figure 14-18. Traditional UNIX and AIX backup commands

The visual shows traditional commands for backup, restore, and compression in UNIX and AIX
operating systems.
This slide is here to allow the course to acknowledge that there are other ways to manage AIX
backups besides using the commands that are covered in this course. Point out that we are not
teaching the traditional UNIX utilities, since we are focusing on those utilities that are unique to
AIX.
*IBM POWER9 and Power10 servers come with a GZIP based hardware accelerator that is
supported by AIX 7.2 and 7.3. The pigz and xgzip commands can leverage this capability using
the zlibNX library to accelerate file compression and decompression. The topic of GZIP
acceleration is beyond the scope of this course, however, students can refer to the following links
for more information:
https://community.ibm.com/community/user/power/blogs/brian-veale1/2022/03/14/gzip-acceler
ation-with-aix-on-power-systems
https://www.ibm.com/support/pages/using-power9%E2%84%A2-nx-gzip-accelerator-aix
Many facilities manage their backup by using TSM (or other enterprise backup solutions) rather
than using the AIX supplied commands or the traditional UNIX utilities directly.
Let us start with the use of file and file system level backups.

© Copyright IBM Corp. 2009, 2024 14-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Backup and restore by filename


• Filenames are read from standard input.
• Backup examples using absolute paths:
# cat listfile
/home/aix/file1
/home/aix/file2
/home/aix/file3
# backup –iqvf /dev/rmt0 < listfile

# find /home/aix | backup –iqvf /dev/rmt0

• Backup example using relative a path:


# cd /home/aix
# find . | backup –iqvf /backup/aix.backup

• Listing contents and restore examples:


# restore –Tvf /backup/aix.backup
# restore –xvf /backup/aix.backup
# restore –xvf /tmp/aix.backup ./file1

Backup and restore © Copyright IBM Corporation 2024

Figure 14-19. Backup and restore by filename

The backup command is a useful command for making backups of AIX files and directories. The
backup command supports two different methods:
• Backup by filename
• Backup by inode
When performing a backup by filename, the files must be in a mounted file system to be backed
up. Backup by inode backs up file systems when they are unmounted.
Relative versus full filenames will impact the location of files on recovery!
The restore command extracts files from archives that are created with the backup command.

© Copyright IBM Corp. 2009, 2024 14-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Backup and restore by inode


• Backing up a file system by inode allows full and incremental backups.
• Syntax: backup –u –level [–f device] file_system
• Full backup: backs up all files in the file system (level 0)
• Incremental backup: backs up only files created or modified since the last back back up (level
1–9)
• The –u flag:
ƒ Provides a method to maintain a hierarchy of incremental backups
ƒ Updates the /etc/dumpdates file with the raw device name of the file system and the time, date, and
level of the backup
• The restoresymtable file is created and used to aid in incremental restores.
• File system must be unmounted.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-20. Backup and restore by inode

Performing a backup by inode is useful for performing full (level 0) and incremental (level X, 1-9)
backups of a file system. Backup by inode should only be completed when the file system is
unmounted.
The command will complete if the file system is in use, but the following warning message is
displayed, backup: 0511-251 The file system is still mounted; data may not be
consistent.
When restoring file system archives, the restore command creates and uses a file named
restoresymtable. This file is created in the current directory. The file is necessary for the restore
command to do incremental file system restores. Do not remove the restoresymtable file if you
intend to perform incremental file system backups and restores.

© Copyright IBM Corp. 2009, 2024 14-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Backup and restore by inode example

# umount /userFS

# backup –u –0 –f /backupFS/userFS_L0.bk /userFS Sunday full backup

# backup –u –1 –f /backupFS/userFS_L1.bk /userFS Monday incremental

# backup –u –2 –f /backupFS/userFS_L2.bk /userFS Tuesday incremental


# cat /etc/dumpdates
/dev/rfslv00 0 Thu Oct 26 18:15:00 2017
/dev/rfslv00 1 Fri Oct 27 18:15:00 2017
/dev/rfslv00 2 Sat Oct 28 18:15:00 2017

# mount /userFS

# restore –rqvf /backupFS/userFS_L0.bk 1) Restore full backup

# restore –rqvf /backupFS/userFS_L1.bk 2) Restore level 1

# restore –rqvf /backupFS/userFS_L2.bk 3) Restore level 2

Backup and restore © Copyright IBM Corporation 2024

Figure 14-21. Backup and restore by inode example

In the example on the visual, the file system is unmounted before the backup is done.
On Sunday, a full (level 0) backup of the entire /userFS file system is taken. On Monday, an
incremental (level 1) backup is done. Any files that have been created or changed since the full
backup was done on Sunday are put in the level 1 backup. On Tuesday, another incremental (level
2) backup is done. Any files that have been created or changed since the last level backup (level 1)
will be included in the level 2 backup.
If the entire file system needs to be restored, the order of the restores is important. The level 0
backup needs to be done first, then the level 1 backup, then the level 2 backup.

© Copyright IBM Corp. 2009, 2024 14-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

tar command
• tar is derived from tape archive
ƒ Create a tar backup (-c)
# tar –cvf /dev/rmt0 /home
# tar -cvf /backup/home.tar /home
ƒ List files in a tar backup (-t)
# tar –tvf /dev/rmt0

ƒ Extract files from a tar backup (-x)


# tar –xvf /dev/rmt0

ƒ Copying directories and files using tar


# cd /data
# tar -cf - .| (cd /junk2 && tar xBpf -)

Backup and restore © Copyright IBM Corporation 2024

Figure 14-22. tar command

The tar command archives and restores files. tar is most commonly used in tandem with an
external compression utility, since it has no built-in data compression facilities.
Here is a list of the commonly used options:
• -c creates a tar backup.
• -x extracts (restores) one or more files from a tar file.
• -t reads the content of the tar file (verify the backup).
• -v verbose output, displays files as they are backed up and restored.
• -f identifies the file or device that is holding the tar image.
• -h follows symbolic links.
• -u appends files to an existing archive.
• -p preserves file permissions, ignoring the present umask value.
• -B forces a consistent blocking factor to help ensure that this copy is made correctly.
The final .tar file is usually called a tarball.
The next command is cpio.

© Copyright IBM Corp. 2009, 2024 14-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

cpio command
• cpio is derived from copy in and out.
ƒ Create a cpio backup (-o)

# find /home | cpio –ov > /backup/home.bk

ƒ List files in a cpio backup (-t)

# cpio -itv < /backup/home.bk

ƒ Extract files from a cpio backup (-i)

# cpio –idv < /backup/home.bk

ƒ Copy the contents of the current location to /mydir

# find . -depth | cpio -pd /mydir

Backup and restore © Copyright IBM Corporation 2024

Figure 14-23. cpio command

cpio copies file archives in from, or out to tape, disk, or another location on the
local machine.
Here is a list of the commonly used options:
• -o command reads file path names from standard input and copies these files to standard
output, along with path names and status information.
• -i command reads from standard input an archive file that is created by the cpio -o command
and copies from it the files with names that match the Pattern parameter.
• -p copies files to another directory on the same system.
• -d creates directories as needed.
• -v verbose (print files).
The next command is pax.

© Copyright IBM Corp. 2009, 2024 14-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

pax command
• tar and cpio syntax differ slightly between UNIX platforms.
ƒ IEEE addressed this problem with pax, meaning peace in Latin
ƒ Create a pax backup of /home (-w)

# pax -wf /backup/home_pax.ar /home

ƒ List files in a pax backup (-v)


# pax -v –f /backup/home_pax.ar

ƒ Extract files in a pax backup (-r)

# pax -rvf /backup/home_pax.ar

Backup and restore © Copyright IBM Corporation 2024

Figure 14-24. pax command

The pax command extracts, writes, and lists members of archive files; copies files and directory
hierarchies.
Rather than sort out the incompatible options that have crept up between tar and cpio, along
with their implementations across various versions of UNIX, the IEEE designed a new archive
utility. Pax means “peace” in Latin, so the utility is named to create peace between the tar and
cpio.
The next command is dd.

© Copyright IBM Corp. 2009, 2024 14-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

dd command
• The primary purpose of dd is the low-level copying and conversion of raw data.
ƒ Copy tape to tape. Tape1 block size=1KB. Tape2 block size=2KB.

# dd if=/dev/rmt0 ibs=1024 obs=2048 of=/dev/rmt1

ƒ Perform a raw data backup of /home to tape, then restore:

# tar -cvf - /home | dd obs=1024k of=/dev/rmt0


# tar -cvf - /home | ssh <system> dd obs=1024k of=/dev/rmt0
# dd if=/dev/rmt0 ibs=1024k | tar xvf - Writing to a tape
drive on a remote
machine.

ƒ Convert /etc/passwd from ASCII to EBCDIC:

# dd if=/etc/passwd of=/etc/passwd.ebcdic conv=ebcdic

Backup and restore © Copyright IBM Corporation 2024

Figure 14-25. dd command

The dd command reads in standard input or the specified input file, converts it, and then writes to
standard out or the named output.
The common options are:
• if= specifies the input file.
• of= specifies the output file.
• conv= designates the conversion to be done.
Copying specific blocks
The dd command is also useful when you need to copy specific blocks of data. For example, if a
file system’s superblock (stored in the first block of the file system) is corrupted, a copy is kept at
the 31st block. The dd command can copy that 31st block back to the first to repair the file
system. The command is:
# dd count=1 bs=4k skip=31 seek=1 if=/dev/hd4 of=/dev/hd4
The next command is compress.

© Copyright IBM Corp. 2009, 2024 14-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Compression commands (1 of 2)
• Archives that are created with backup utilities are usually compressed.
ƒ Reduce the size of the backup.
ƒ This can be done using a number of utilities, such as compress.
• Examples (using compress, uncompress, and zcat):

# compress -v /tmp/data.tar
/tmp/data.tar: Compression: 95.50% This file is replaced with
/tmp/data.tar.Z.

# uncompress /tmp/data.tar.Z
/tmp/data.tar.Z: This file is replaced with /tmp/data.tar.

zcat expands a
# zcat /tmp/data.tar.Z | tar -xvf - compressed file to
standard out.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-26. Compression commands (1 of 2)

Files that are archived are usually further compressed to reduce their size. compress, uncompress
and zcat commands are standard commands across UNIX platforms for compressing and
uncompressing files.
The next command is gzip.

© Copyright IBM Corp. 2009, 2024 14-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Compression commands (2 of 2)
• Examples (gzip and gunzip)
# gzip -v /tmp/data.tar
/tmp/data.tar: 97.7% -- replaced with
/tmp/data.tar.gz

# gunzip -v /tmp/data.tar.gz
/tmp/data.tar.gz: 97.7% -- replaced with
/tmp/data.tar
Creates a
compressed tarball
# tar -cvf - /data | gzip -c > data_tar.gz (.tar.gz) of the
/data directory.

Decompresses and
# gunzip -c data_tar.gz | tar xvf - extracts the
compressed tarball
(.tar.gz).

Backup and restore © Copyright IBM Corporation 2024

Figure 14-27. Compression commands (2 of 2)

gzip is a software application that is used for file compression. gzip is short for GNU zip. The
program is popular and is a free replacement for the compress program that was predominately
used in early UNIX systems.
Another popular and free compression utility is bzip2 that is based on a lossless data
compression algorithm. bzip2 compression is generally more effective than gzip. The usage of
bzip2 and bunzip2 (for decompression) is fairly similar to gzip and gunzip respectively.
More recent versions of AIX also include the gzip command for compressing and uncompressing
files. The rpm.rte fileset is installed by default on modern versions of AIX and it includes the gzip
utilities.
The gzip command creates the compressed file using the same file basename with a .gz
extension. It then deletes the original file. Users are encouraged to use gzip over compress, as
compress is significantly older and based on the LZW compression algorithm. gzip was written
more recently and is based on the DEFLATE algorithm. In general compress will run faster and use
less memory, but gzip will generally reach significantly higher levels of compression. There are
other tools that can be used to provide enhanced compression capabilities, which take advantage
of the IBM Power processor to achieve significantly greater compression results at great speed
(such pigz and xgzip), but they are beyond the scope of this course.
The next command is snapshot.

© Copyright IBM Corp. 2009, 2024 14-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Snapshot volume groups (1 of 2)


• All logical volumes must be mirrored on disks that contain only those mirrors.
ƒ Ensure that there are no stale copies.
• Use the splitvg command to split a mirrored copy into a snapshot volume group.
ƒ splitvg command uses the recreatevg command to create the split volume group.
ƒ The split copy becomes a new volume group, called a snapshot volume group, with its own VGname.
ƒ New logical volumes and mount points are created in the snapshot volume group.
ƒ The snapshot file systems are not automatically mounted.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-28. Snapshot volume groups (1 of 2)

Snapshot support for a mirrored volume group is provided to split a mirrored copy of a fully
mirrored volume group into a snapshot volume group.
Ensure that there are no stale copies in the original volume group. The splitvg command rejects
a situation where the only remaining non-stale copy is in disk to be split unless you use the force
(-f) option.
When the volume group is split, the original volume group does not use the disks that are now part
of the snapshot volume group.
The splitvg command uses the recreatevg command to implement the split. It creates a new
volume group with new file system and logical volume names.

© Copyright IBM Corp. 2009, 2024 14-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Snapshot volume groups (2 of 2)


• Physical partition changes, in both volume groups, are tracked.
ƒ Writes to a physical partition in the original volume group causes a corresponding physical partition in
the snapshot volume group to be marked stale.
ƒ Writes to a physical partition in the snapshot volume group causes that physical partition to be marked
stale.
• Use the joinvg command to rejoin the volume groups.
ƒ The stale physical partitions are resynchronized.
ƒ The user sees the same data in the rejoined volume group as was in the original volume group before
the rejoin.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-29. Snapshot volume groups (2 of 2)

Both volume groups track changes in physical partitions within the volume group. When the
snapshot volume group is rejoined with the original volume group, the synchronization needs to
occur on only the subset of physical partitions that were touched during the split period.
Physical partition changes in both volume groups are tracked. Writes to a physical partition in the
original volume group causes a corresponding physical partition in the snapshot volume group to
be marked stale. Writes to a physical partition in the snapshot volume group causes that physical
partition to be marked stale.
To rejoin the volume groups, use the joinvg command. The stale physical partitions are included
in the original mirroring and the stale copies are automatically resynchronized.
The user sees the same data in the rejoined volume group as was in the original volume group
before the volume group is rejoined. In other words, the third copy shows the data changes that
occurred in the original volume group during the period it was split off.

© Copyright IBM Corp. 2009, 2024 14-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Snapshot volume group commands

splitvg [ –y SnapVGname ] [–c copy] [–f] [–i] VGname


–y Specifies the name of the snapped volume group
–c Specifies which mirror to use (1, 2 or 3)
–f Forces the split even if there are stale partitions
–i Creates an independent volume group which cannot be rejoined
into the original

joinvg [–f] Vgname


–f Forces the join when disks in the snapshot volume group are
missing or removed

Backup and restore © Copyright IBM Corporation 2024

Figure 14-30. Snapshot volume group commands

The splitvg command splits a single mirror copy of a fully mirrored volume group into a snapshot
volume group. The original volume group stops does not use the disks that are now part of the
snapshot volume group. Both volume groups monitor the writes within the volume group so that
when the snapshot volume group is rejoined with the original volume group, consistent data is
maintained across the rejoined mirror copies.
The joinvg command joins a snapshot volume group that was created with the splitvg
command back into its original volume group. The snapshot volume group is deleted and the disks
that are reactivated in the original volume group. A background process resynchronizes any stale
partitions.

© Copyright IBM Corp. 2009, 2024 14-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Snapshot volume group example


• Example where the targeted file system to backup is /data in the datavg volume group:
ƒ # splitvg –y snapvg datavg
í The volume group datavg is split and the volume group snapvg is created. The mount point /fs/data
is created.
ƒ # backup –f /dev/rmt0 /fs/data
í An inode based backup of the unmounted file system /fs/data is created on tape.
ƒ # joinvg datavg
í snapvg is rejoined with the original volume group and synced in the background.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-31. Snapshot volume group example

The splitvg command creates a point in time separate snapshot volume group. The splitvg
command fails if any of the disks to be split are not active within the original volume group.
This volume group can be used to do the backup or other operations. In the example, the backup
command backs up one of the renamed file systems by inode (unmounted). You can also mount
the file system and backup by name instead.
Later, the joinvg command is used to rejoin the snapshot volume to the original volume group.
In the event of a system crash or loss of quorum while running this command, the joinvg
command must be run to rejoin the disks back to the original volume group.
You must have root authority to run these commands.

© Copyright IBM Corp. 2009, 2024 14-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot (1 of 2)
• A point-in-time image of a JFS2 file system:
ƒ The source file system is called the snapped file system (snappedFS).
ƒ Snapshot creation is quick and requires little space.
ƒ A single snappedFS can have multiple snapshots, each taken at a different point in time.
• Can be used to:
ƒ Restore files from a known point in time
ƒ Access files or directories as they were at the time of the snapshot
ƒ Back up a mounted snapshot to tape, DVD or a remote server

Backup and restore © Copyright IBM Corporation 2024

Figure 14-32. JFS2 snapshot (1 of 2)

A point-in-time image for a JFS2 file system is called a snapshot. The file system that is the source
of this point-in-time image is referred to as the snapped file system or snappedFS.
The snapshot view of the data remains static and retains the same security permissions that the
original snappedFS had when the snapshot was made. Also, a JFS2 snapshot can be created
without unmounting the file system, or quiescing the file system (though it is advisable for some
application to briefly quiesce during the snapshot). A snapshot can be used to access files or
directories as they existed when the snapshot was taken.

The snapshot can then be used to create a backup of the file system at the point in time that the
snapshot was taken. The snapshot also provides the capability to access files or directories as
they were at the time of the snapshot.

© Copyright IBM Corp. 2009, 2024 14-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot (2 of 2)
• Snapshot stays stable while snappedFS is changing.
• Using snapshot reduces application downtime:
ƒ Automatically freezes I/O while snapshot is created
ƒ If intolerant of fuzzy backups, briefly quiesce the application
• A snapshot typically requires 2% – 6% of snappedFS space.
• There are two options to allocate space for a snapshot:
ƒ External: allocate space in a separate logical volume
ƒ Internal: allocate space within snappedFS
• At snapshot creation, only snappedFS structure information is included.
• When a write or delete occurs in the snappedFS, the affected blocks are copied into existing
snapshots.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-33. JFS2 snapshot (2 of 2)

During creation of a snapshot, the snappedFS I/O is momentarily frozen, and all new writes are
blocked. This process ensures that the snapshot really is a consistent view of the file system at
the time of snapshot.
When a snapshot is initially created, only structure information is included. When a write or delete
occurs, then the affected blocks are copied into the snapshot file system.
Every read of the snapshot requires a lookup to determine whether the block needed should be
read from the snapshot or from the snappedFS. For instance, the block is read from the snapshot
file system if the block was changed since the snapshot took place. If the block is unchanged
since the snapshot, it is read from the snappedFS.
There are two types of JFS2 snapshots: internal and external. A JFS2 internal snapshot uses
space within the snappedFS. A JFS2 external snapshot is created in a separate logical volume
from the file system. The external snapshot can be mounted separately from the file system at its
own unique mount point. A file system can use either internal or external snapshots; it cannot mix
the different types.
Typically, a snapshot needs 2-6% of the space that is needed for the snappedFS. In the case of a
highly active snappedFS, this estimate can rise to 15%. This space is needed if a block in the
snappedFS is either written to or deleted. If this situation happens, the block is copied to the
snapshot. Therefore, any blocks that are associated with new files written after the snapshot was
taken are not copied to the snapshot, as they were not current at the time of the snapshot and not
relevant.
If the snapshot runs out of space, all snapshots that are associated with the snappedFS are
discarded and an entry is made in the AIX error log. If a snapshot file system fills up before a
backup is taken, the backup is not complete and must be rerun from a new snapshot. It might
need to be rerun with a larger size to allow for changes in the snappedFS.

© Copyright IBM Corp. 2009, 2024 14-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot mechanism (1 of 2)

snappedFS

inode1 inode2

snapshot

inode1 inode2

Initially, the snapshot only points to data extents in


snappedFS
Backup and restore © Copyright IBM Corporation 2024

Figure 14-34. JFS2 snapshot mechanism (1 of 2)

The diagram, at the top, shows two inodes anchoring file data blocks. The inode accesses the data
blocks through a binary tree structure.
The diagram, at the bottom, shows the structure that is initially created in a JFS2 snapshot. The
snapshot has the metadata, but all of the pointers refer to the snappedFS data blocks. Thus, the
snapshot requires little space. Initially, data that is retrieved from a mounted snapshot is identical
to the current data in the snappedFS.

© Copyright IBM Corp. 2009, 2024 14-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot mechanism (2 of 2)

snappedFS

inode1 inode2

snapshot

inode1 inode2

Original of modified data is copied to the snapshot

Backup and restore © Copyright IBM Corporation 2024

Figure 14-35. JFS2 snapshot mechanism (2 of 2)

The diagram, at the top, shows some of the data blocks were modified. Because the kernel file
system logic knows that there is a snapshot for this file system, it copies the original data blocks
to the snapshot before modifying (or deleting) those data blocks in the snappedFS.
The diagram at the bottom of the visual shows that the inode tree structure points to the copies of
the original data (now stored in the snapshot) rather than referring to the snappedFS data blocks.
This process ensures that access to the snapshot always returns the original data (from the time
the snapshot was created) for the snappedFS.

© Copyright IBM Corp. 2009, 2024 14-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot SMIT menu


# smit jfs2
Enhanced Journaled File Systems

Move cursor to desired item and press Enter.


...
List Snapshots for an Enhanced Journaled File System
Create Snapshot for an Enhanced Journaled File System
Mount Snapshot for an Enhanced Journaled File System
Remove Snapshot for an Enhanced Journaled File System
Unmount Snapshot for an Enhanced Journaled File System
Change Snapshot for an Enhanced Journaled File System
Rollback an Enhanced Journaled File System to a Snapshot

Backup and restore © Copyright IBM Corporation 2024

Figure 14-36. JFS2 snapshot SMIT menu

The various JFS2 snapshot operations can be done from SMIT. The SMIT JFS2 menu includes
many items that relate to JFS2 snapshots.
An example with only the menu items for snapshot is shown in the visual.

© Copyright IBM Corp. 2009, 2024 14-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Creating snapshots: External


• Creating an external snapshot for a JFS2 file system that is already mounted:
ƒ Using a new logical volume:
í # snapshot –o snapfrom=snappedFS –o size=Size
í or
í # smit crsnapj2
ƒ Using an existing logical volume:
í # snapshot –o snapfrom=snappedFS snapshotLV
í or
í # smit crsnapj2lv
• Creating an external snapshot as part of the mount option:
í # mount –o snapto=/snapshotLV snappedFS MountPoint

Backup and restore © Copyright IBM Corporation 2024

Figure 14-37. Creating snapshots: External

Creating an external snapshot on a new logical volume for a JFS2 file system that is already
mounted
When creating a new external snapshot, you must provide the size of the logical volume allocation
(unless using a pre-existing logical volume).
If you want to create a snapshot for a mounted JFS2 file system, you can use the following
method:
• To create a snapshot in a new logical volume, specifying the size:
# snapshot -o snapfrom=snappedFS -o size=Size
For example:
# snapshot -o snapfrom=/home/myfs -o size=16M
This command creates a 16 MB logical volume and create a snapshot for the /home/myfs file
system on the newly created logical volume.
Creating an external snapshot on an existing logical volume for a JFS2 file system that is
already mounted
If you want to control details of the logical volume that holds an external snapshot, you can use
the following method:
• To create a snapshot that uses an existing logical volume:
# snapshot -o snapfrom=snappedFS snapshotLV
For example:
# snapshot -o snapfrom=/home/myfs /dev/mysnaplv

© Copyright IBM Corp. 2009, 2024 14-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
This command creates a snapshot for the /home/myfs file system on the /dev/mysnaplv
logical volume, which exists.
Creating an external snapshot for a JFS2 file system that is not mounted
The mount option, -o snapto=/snapshotlv, can be used to create a snapshot for a JFS2 file
system that is not currently mounted:
# mount -o snapto=/snapshotLV snappedFS MountPoint
If the snapto value starts with a slash, then it is assumed to be a special device file for an existing
logical volume where the snapshot should be created. For example:
# mount -o snapto=/dev/mysnaplv /dev/fslv00 /home/myfs
This command mounts the file system that is contained on the /dev/fslv00 to the mount point of
/home/myfs and then proceeds to create a snapshot for the /home/myfs file system in the
logical volume /dev/mysnaplv.

© Copyright IBM Corp. 2009, 2024 14-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Creating snapshots: Internal


• Creating an internal snapshot for a JFS2 file system that is already mounted:
í # snapshot –o snapfrom=snappedFS –n snapshotName
í OR
í # smit crintsnapj2
• Creating an internal snapshot as part of the mount option:
í # mount –o snapto=snapshotLV snappedFS MountPoint
• Internal snapshot attribute must be set to yes on creation of the file system:
í # smit crfs
(in dialog panel: Allow Internal Snapshots[yes])
í OR
í # crfs –a isnapshot=yes

Backup and restore © Copyright IBM Corporation 2024

Figure 14-38. Creating snapshots: Internal

Creating an internal snapshot for a JFS2 file system that is already mounted
If you want to create an internal snapshot for a mounted JFS2 file system, you can use the
following method:
• To create an internal snapshot, specify a snapshot name:
# snapshot -o snapfrom=snappedFS -n snapshotname
For example:
# snapshot -o snapfrom=/home/myfs -n mysnap
This command creates a snapshot that is named mysnap that is internal to the snappedFS
/home/myfs.
Creating an internal snapshot for a JFS2 file system that is not mounted
The mount option, -o snapto=snapshotlv, can be used to create a snapshot for a JFS2 file system
that is not currently mounted:
# mount -o snapto=snapshotname snappedFS MountPoint
If the snapto value starts with a slash, then it is assumed to be a special device file for an existing
logical volume where the snapshot should be created. If the snapto value does not start with a
slash, then it is assumed to be the name of an internal snapshot to be created.
Internal JFS2 snapshot considerations:
• It is important to know that internal snapshots cannot be used unless the file system was
enabled to support them at file system creation. To enable the file system to support internal
snapshots (at creation time only):
# crfs –a isnapshot=yes ....

© Copyright IBM Corp. 2009, 2024 14-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty
• Internal snapshots are preserved when the logredo command runs on a JFS2 file system with
an internal snapshot.
• Internal snapshots are removed if the fsck command needs to modify a JFS2 file system to
repair it.
• If an internal snapshot runs out of space, or if a write to an internal snapshot fails, all internal
snapshots for that snappedFS are marked invalid. Further access to the internal snapshots
fails. These failures write an entry to the error log.
• Internal snapshots are not separately mountable.
• Internal snapshots are not compatible with AIX releases before AIX 6.1. A JFS2 file system
that is created to support internal snapshots cannot be modified on an earlier release of AIX.
• A JFS2 file system with internal snapshots cannot be defragmented.

© Copyright IBM Corp. 2009, 2024 14-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Listing snapshots
# smit lssnap (and select file system from list)
-OR-
# snapshot –q /home/myfs2

Snapshots for /home/myfs2


Current Name Time
mysnap Wed 19 Nov 08:44:33 2023
mysnap2 Fri 21 Nov 09:33:33 2023
* mysnap3 Mon 24 Nov 14:03:18 2023

# snapshot –q /home/myfs

Snapshots for /home/myfs


Current Location 512–blocks Free Time
* /dev/fslv06 262144 261376 Tue May 6 18:15:11 2023

Backup and restore © Copyright IBM Corporation 2024

Figure 14-39. Listing snapshots

The snapshot –q option can be used display the snapshots that are related to the specified file
system.
If the file system uses internal snapshots, then the report provides the snapshot names and
creation times. The * indicates the current snapshot.
# snapshot -q /home/myfs2
Snapshots for /home/myfs2
Current Name Time
mysnap Wed 19 Nov 08:44:33 2023
mysnap2 Fri 21 Nov 09:33:33 2023
* mysnap3 Mon 24 Nov 14:03:18 2023
If the file system uses external snapshots, then the report provides, for each snapshot, the logical
volume special device file, the snapshot size, how much space is free in the snapshot, and the
creation time.
# snapshot -q /home/myfs
Snapshots for /home/myfs
Current Location 512-blocks Free Time
* /dev/fslv06 262144 261376 Wed May 6 18:15:11 2023

© Copyright IBM Corp. 2009, 2024 14-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Using a JFS2 snapshot to recover


• Recover entire file system to point of snapshot creation:
ƒ # umount /home/myfs
ƒ # rollback /home/myfs /dev/mysnaplv (for external)
ƒ # rollback –n mysnap /home/myfs (for internal)
• Recover individual files from JFS2 snapshot image:
ƒ Mount the snapshot (if external):
í # mount –v jfs2 –o snapshot /dev/mysnaplv /mntsnapshot
ƒ Change to the directory that contains the snapshot:
í # cd /mntsnapshot
í # cd /home/mfs/.snapshot/mysnap (if internal)
ƒ Copy the accurate file to overwrite the corrupted one:
í # cp myfile /home/myfs (Copies only the file named myfile)

Backup and restore © Copyright IBM Corporation 2024

Figure 14-40. Using a JFS2 snapshot to recover

The rollback command is an interface to revert a JFS2 file system to a point-in-time snapshot.
The snappedFS parameter must be unmounted before the rollback command is run and remains
inaccessible during the command. Any snapshots that are taken after the specified snapshot
(snapshotObject for external or snapshotName for internal) are removed. The associated logical
volumes are also removed for external snapshots.

If you want to restore individual files back to their original state, then you can mount the snapshot
and then manually copy the files back over. If the snapshot is internal, then no mount is
necessary. Instead, you need to explicitly specify the path to the snapshot
(/snappedFS-mount-point/.snapshot/snapshot-name) on a change directory command.
As with any file copying, be careful about changing the nature of the file (for example, ownership,
permission, and sparseness). Using the backup and restore utilities to implement a copy of files
is often a safer technique.

© Copyright IBM Corp. 2009, 2024 14-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Using a JFS2 external snapshot to back up


• The JFS2 snapshot can be a stable source for backup to media.
• Mount the external snapshot and use relative path backup:
ƒ # mount –v jfs2 –o snapshot /dev/mysnaplv /mntsnapshot
ƒ # cd /mntsnapshot
ƒ # find . | backup –i –f /servermnt/backup
• To create snapshot and backup in one operation:
ƒ backsnap –m MountPoint –s Size BackupOptions snappedFS
ƒ Example:
ƒ # backsnap –m /mntsnapshot –s size=16M –i –f /dev/rmt0 /home/myfs

Backup and restore © Copyright IBM Corporation 2024

Figure 14-41. Using a JFS2 external snapshot to back up

Using an existing external snapshot to perform a backup


For an external snapshot, you first need to mount the snapshot. Then, specify the mount point in
your backup by name execution.
Creating an external snapshot and backup in one operation
The backsnap command provides an interface to create a snapshot for a JFS2 file system and
backs up the snapshot. The command syntax for an external snapshot is:
# backsnap -m MountPoint -s Size BackupOptions snappedFS
For example:
# backsnap -m /mntsnapshot -s size=16M -i -f /dev/rmt0 /home/myfs
This command creates a 16 MB logical volume and create a snapshot for the /home/myfs file
system on the newly created logical volume. It then mounts the snapshot logical volume on
/mntsnapshot. The remaining arguments are passed to the backup command. In this example, the
files and directories in the snapshot are backed up by name (-i) to /dev/rmt0.

© Copyright IBM Corp. 2009, 2024 14-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Using a JFS2 internal snapshot to back up


• Change directory to internal snapshot and use relative path backup:
ƒ # cd /home/myfs/.snapshot/mysnap
ƒ # find . | backup –i –f /servermnt/backup
• To create snapshot and backup in one operation:
ƒ backsnap –n snapshotname BackupOptions snappedFS
• Example:
ƒ # backsnap –n mysnap –s size=16M –i –f/dev/rmt0 /home/myfs

Backup and restore © Copyright IBM Corporation 2024

Figure 14-42. Using a JFS2 internal snapshot to back up

Using an existing internal snapshot to perform a backup


For an internal snapshot, you need to know only the hidden directory name for accessing the
snapshot. Then, specify that directory name in your backup by name execution.
Creating an internal snapshot and backup in one operation
The backsnap command provides an interface to create a snapshot for a JFS2 file system and
back up the snapshot. The command syntax for an internal snapshot is:
# backsnap -m MountPoint -s Size BackupOptions snappedFS
For example:
# backsnap -m /mntsnapshot -s size=16M -i -f/dev/rmt0 /home/myfs
This command creates a 16 MB logical volume and create a snapshot for the /home/myfs file
system on the newly created logical volume. It then mounts the snapshot logical volume on
/mntsnapshot. The remaining arguments are passed to the backup command. In this example,
the files and directories in the snapshot are backed up by name (-i) to /dev/rmt0.

© Copyright IBM Corp. 2009, 2024 14-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

JFS2 snapshot space management


• List snapshots for the snappedFS:
ƒ # snapshot –q snappedFS
• External snapshot:
ƒ The snapshot report identifies the size and amount of free space.
ƒ If the snapshot needs more space:
í # snapshot –o size=+1 snapshotLV

• Internal snapshot:
ƒ Shares logical volume with the snappedFS:
í # df –m snappedFS
ƒ If snappedFS is out of space, try to free up space – possibly delete old snapshots:
í # snapshot –d –n snapshot_name snappedFS

Backup and restore © Copyright IBM Corporation 2024

Figure 14-43. JFS2 snapshot space management

It is useful to be able to identify a situation where a snapshot is growing large. If a snapshot runs
out of space, then all snapshots are invalidated and become unusable. If dealing with an internal
snapshot, the snapshots can contribute to the entire file system running out of space.
To monitor an external snapshot, use the query option of the snapshot command. An alternative
would be to mount the snapshot and use the df command, but that is more complicated.
If an external snapshot needs more room, you can dynamically increase the size of the snapshot
logical volume by using the size option of the snapshot command.
For an internal snapshot, there is no mechanism for identifying the space usage of the snapshots.
Instead, you monitor the size of the snappedFS.
When a file system is running out of space, one way to free space is to delete old snapshots.
Keeping many generations of snapshots can be useful, but it can also be expensive in terms of
space usage.

© Copyright IBM Corp. 2009, 2024 14-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Backup best practices


• Perform regular backups
• Keep system and user data separate
• Verify your backups
ƒ Check the device(s)
ƒ Label devices
• Backup before major system changes
• Keep old backups
• Keep a copy of the backups securely offsite
• Test recovery procedures before you have to use them!
• Consider deploying an enterprise storage management solution using a product such as IBM
Storage Protect.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-44. Backup best practices

This visual covers some industry recognized best practices system administrators should follow
when working to protect critical data. All system administrators should have documented disaster
recovery procedures in place and those procedures should be tested. That includes verifying your
backups to ensure that the data was properly backed up and that you can recover it if data
recovery is required.

© Copyright IBM Corp. 2009, 2024 14-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Review questions (1 of 2)
1. True or False: Data that is important, changing and cannot be obtained elsewhere should
always be backed up.
2. Name three reasons for data loss:
_________________________________________________.

3. What AIX command provides the ability to do incremental backups of your system?

4. True or False: The mksysb command is only used to backup critical application data.

5. True or False: You are required to use third party backup tools if you intend to restore specific
files or directories.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-45. Review questions (1 of 2)

© Copyright IBM Corp. 2009, 2024 14-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Review answers (1 of 2)
1. True or False: Data that is important, changing and cannot be obtained elsewhere should
always be backed up.
The answer is true.
2. Name three reasons for data loss:
The answers are hardware failure, software corruption, user errors.
3. What AIX command provides the ability to do incremental backups of your system?
The answer is the backup command.
4. True or False: The mksysb command is only used to backup critical application data.
The answer is false. The mksysb command is used to backup the operating system.
5. True or False: You are required to use third party backup tools if you intend to restore specific
files or directories.
The answer is false.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-46. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 14-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Review questions (2 of 2)
6. True or False: The creation of a snapshot volume group marks all copies in the snapshot as
stale.
7. To access a copy of an active, mirrored volume group on the source system, use the
command:
a. joinvg
b. importvg
c. splitvg

Backup and restore © Copyright IBM Corporation 2024

Figure 14-47. Review questions (2 of 2)

© Copyright IBM Corp. 2009, 2024 14-58


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Review answers (2 of 2)
6. True or false: The creation of a snapshot volume group marks all copies in the snapshot as
stale.
The answer is false.
7. To access a copy of an active, mirrored volume group on the source system, use the
command:
a. joinvg
b. importvg
c. splitvg
The answer is splitvg.

Backup and restore © Copyright IBM Corporation 2024

Figure 14-48. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 14-59


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Exercise

Backup and Restore

Backup and restore © Copyright IBM Corporation 2024

Figure 14-49. Exercise

© Copyright IBM Corp. 2009, 2024 14-60


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 14. Backup and restore

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Backup the rootvg volume group using the mksysb utility
• Explain how to restore the operating system using a mksysb image
• Explain the role of the image.data and bosinst.data files
• Back up and restore a user defined volume group
• Backup and restore file systems, using various utilities

© Copyright IBM Corporation 2024

Figure 14-50. Unit summary

© Copyright IBM Corp. 2009, 2024 14-61


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Unit 15.Error monitoring


Estimated time
01:10

Overview
This unit focuses on an overview of the AIX Error Log facility.

How you will check your progress


• Review questions
• Lab exercise

References
Error-logging overview:
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-error-logging-overview

© Copyright IBM Corp. 2009, 2024 15-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Analyze error log entries
ƒ Identify and maintain the error logging components
ƒ Describe different error notification methods
ƒ Log system messages using the syslogd daemon
ƒ Describe resource monitoring with RMC

© Copyright IBM Corporation 2024

Figure 15-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 15-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Topic 1 objectives
• Analyze error log entries
• Identify and maintain the error logging components
• Describe different error notification methods
• Log system messages using the syslogd daemon
• Describe resource monitoring with RMC

Error monitoring © Copyright IBM Corporation 2024

Figure 15-2. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 15-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Error logging components

smit
diagnostics
e-mail
console errpt formatted
output
error notify
method
ODM
errlog
errnotify /var/adm/ras/errlog
error daemon

errclear
errstop /usr/lib/errdemon
errlogger
application
errlog() User
Kernel
/dev/error
errsave() (timestamp)
kernel module
Error monitoring © Copyright IBM Corporation 2024

Figure 15-3. Error logging components

Detection of an error
The error logging process begins when an operating system module detects an error. The
segment of code that detects errors then sends error information to either the errsave() kernel
service or the errlog() application subroutine, where the information is then written to the
/dev/error special file. This process then adds a time stamp to the collected data. The errdemon
daemon constantly checks the /dev/error file for new entries, and when new data is written, the
daemon conducts a series of operations.

Creation of error log entries


The errdemon daemon collects more data from other parts of the system before writing the
information to the error log. There is an Error Record Template (/var/adm/ras/errtmplt) which
identifies what information is needed. For example, if the error signifies a hardware-related
problem and hardware vital product data (VPD) exists, the daemon retrieves the VPD from the
ODM. When you use the errpt command (from the command-line or SMIT), the error log is
formatted according to the error template in the error record template and presented in a report.
Most entries in the error log are attributable to hardware and software problems, but
informational messages can also be logged, for example, by the system administrator, that uses
the errlogger command.

The errlogger command


The errlogger command allows the system administrator to record messages of up to 1024
bytes in the error log. Whenever you do a maintenance activity, such as clearing entries from the

© Copyright IBM Corp. 2009, 2024 15-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
error log, replacing hardware, or applying a software fix, it is a good idea to record this activity in
the system error log. The following example illustrates use of the errlogger command:
# errlogger system hard disk ’(hdisk0)’ replaced.
This message is listed as part of the error log.

The errclear command


You can selectively delete records from the log with the errclear command. The criteria is the
same as for selectively reporting entries with errpt.

The errnotify methods


Later this unit presents details on the option to define an errnotify method to be run anytime the
errdemon processes certain specified error records. The actions taken by the method program or
script might include such actions as sending email, writing to the console, or triggering
diagnostics. 

The diagram in the visual shows, from the bottom, when errlog() or errsave() detects an error
and an entry is made in /dev/error. Then, up to the point where a user can look at the records of
the error log either by going through SMIT or by running the errpt command. An optional flow is
shown in the upper left of the visual. An error record might be defined to trigger an automatic
action (called a method). This error notification mechanism is cover in more detail later in the unit.
Here is a list of error logging terms for reference:
• Error ID A 32-bit hexadecimal code that is used to identify a particular failure. Each error
record template has a unique error ID.
• Error label The mnemonic name for an error ID.
• Error log The file that stores instances of errors and failures that the system encounters.
• Error log entry A record in the system error log that describes a failure. Contains captured
failure data.
• Error record template A description of what is displayed when the error log is formatted for a
report, including information on the type and class of error, probable causes and
recommended actions. Collectively, the templates comprise the Error Record Template
Repository.
The errpt command can be run from the shell or SMIT to format records in the error log in to
readable reports. The ODM classes CuDv, CuAt, and CuVPD provide information for the detailed
error reporting.
Error log hardening
Under rare circumstances, such as powering off the system exactly while the errdemon is writing
into the error log, the error log might become corrupted. When the errdemon starts, it checks for
error log consistency. First, it makes a backup copy of the existing error log file to
/tmp/errlog.save, and then it corrects the error log file, while preserving consistent error log
entries. The AIX 5L Differences Guide Version 5.3 Edition Redbooks (SG24-7463-00) has more
information about error log hardening (also referred to as error log RAS).

© Copyright IBM Corp. 2009, 2024 15-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
SMIT can be used to generate an error report.

© Copyright IBM Corp. 2009, 2024 15-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Generating an error report using SMIT


# smit errpt

Generate an Error Report

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
CONCURRENT error reporting? no
Type of Report summary +
Error CLASSES (default is all) [] +
Error TYPES (default is all) [] +
Error LABELS (default is all) [] +
Error ID's (default is all) [] +
Resource CLASSES (default is all) []
Resource TYPES (default is all) []
Resource NAMES (default is all) []
SEQUENCE numbers (default is all) []
STARTING time interval []
ENDING time interval []
Show only Duplicated Errors [no]
Consolidate Duplicated Errors [no]
LOGFILE [/var/adm/ras/errlog]
TEMPLATE file [/var/adm/ras/errtmplt]
MESSAGE file []
FILENAME to send report to (default is stdout) []

Error monitoring © Copyright IBM Corporation 2024

Figure 15-4. Generating an error report using SMIT

Overview
The SMIT fastpath smit errpt takes you to the screen used to generate an error report. Any user
can use this screen. As shown on the visual, the screen includes a number of fields that can be
used for report specifications.

CONCURRENT error reporting?


Yes means you want errors that are displayed or printed as the errors are entered into the error
log (similar to tail -f).

Type of report
Summary, intermediate, and detailed reports are available. Detailed reports give comprehensive
information. Intermediate reports display most of the error information. Summary reports contain
concise descriptions of errors.

Error classes
Values are H (hardware), S (software), and O (operator messages that are created with
errlogger). You can specify more than one error class.

Error types
Valid error types include:
• PEND: The loss of availability of a device or component is imminent.

© Copyright IBM Corp. 2009, 2024 15-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• PERF: The performance of the device or component has degraded to below an acceptable
level.
• TEMP: Recovered from condition after several attempts.
• PERM: Unable to recover from error condition. Error types with this value are usually the most
severe errors and imply that you have a hardware or software defect. Error types other than
PERM usually do not indicate a defect, but they are recorded to analyze later by the diagnostic
programs.
• UNKN: Severity of the error cannot be determined.
• INFO: The error type is used to record informational entries

Error labels
An error label is the mnemonic name that is used for an error ID.

Error IDs
An error ID is a 32-bit hexadecimal code that is used to identify a particular failure.

Resource classes
Means device class for hardware errors (for example, disk).

Resource types
Indicates device type for hardware (for example, 355 MB).

Resource names
Provides common device name (for example hdisk0).

Starting and ending time interval


The format mmddhhmmyy can be used to select only errors from the log that have a time stamp
between the two values.

Show only duplicated errors


Yes reports only those errors that are exact duplicates of previous errors that are generated
during the interval of time specified. The default time interval is 100 milliseconds. This value can
be changed with the errdemon -t command. The default for the Show only Duplicated Errors
option is no.

Consolidate duplicated errors


Yes reports only the number of duplicate errors and time stamps of the first and last occurrence of
that error. The default for the Consolidate Duplicated Errors option is no.

© Copyright IBM Corp. 2009, 2024 15-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
File name to send reports to
The report can be sent to a file. The default is to send the report to stdout.
The Show only Duplicated Errors option in the Generate an Error Report screen was introduced
in AIX V5.1. Examples of duplicate errors might include external drive not ready or Ethernet card
unplugged.
Instead of using SMIT, you can also generate a report from the command-line.

© Copyright IBM Corp. 2009, 2024 15-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

The errpt command


• Summary report
ƒ # errpt
• Intermediate report
ƒ # errpt -A
• Detailed report
ƒ # errpt -a
• Summary report of all hardware errors
ƒ # errpt –d H
• Detailed report of all software errors
ƒ # errpt –a –d S
• Concurrent error logging ("Real-time" error logging)
ƒ # errpt –c > /dev/console

Error monitoring © Copyright IBM Corporation 2024

Figure 15-5. The errpt command

Types of reports available


The errpt command generates a report of logged errors. Three different layouts can be produced,
depending on the option that is used:
• A summary report gives an overview (default).
• An intermediate report displays only the values for the LABEL, Date/Time, Type, Resource
Name, Description, and Detailed Data fields. Use the option -A to specify an intermediate
report.
• A detailed report shows a detailed description of all the error entries. Use the option -a to
specify a detailed report.

The -d option
The -d option (flag) can be used to limit the report to a particular class of errors. Two examples
illustrating use of this flag are shown on the visual:
• The command errpt -d H specifies a summary report of all hardware (-d H) errors.
• The command errpt -a -d S specifies a detailed report (-a) of all software (-d S) errors.

Input file that is used


The errpt command queries the error log file to produce the error report. The default error log file
is /var/adm/ras/errlog.

© Copyright IBM Corp. 2009, 2024 15-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
The -c option
If you want to display the error entries concurrently, that is, at the time they are logged, you must
run errpt -c. In the example on the visual, direct the output to the system console.

The -D flag
Duplicate errors can be consolidated by using errpt -D. When used with the -a option, errpt -D
reports only the number of duplicate errors and the time stamp for the first and last occurrence of
the identical error.

The -P flag
Shows only errors that are duplicates of the previous error. The -P flag applies only to duplicate
errors generated by the error log device driver.
The errpt command has many options. Refer to your AIX Commands Reference (or the man page
for errpt) for a complete description.
Start with the summary report.

© Copyright IBM Corp. 2009, 2024 15-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

A summary report: errpt


# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION


DE84C4DB 0802155517 I O ConfigRM IBM.ConfigRM daemon has started.
A6DF45AA 0802155517 I O RMCdaemon The daemon is started.
69350832 0802155517 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 0802155517 T O errdemon ERROR LOGGING TURNED ON
192AC071 0802155317 T O errdemon ERROR LOGGING TURNED OFF
B6267342 0802154417 P H hdisk2 DISK OPERATION ERROR
B6267342 0802154317 P H hdisk2 DISK OPERATION ERROR
EAA3D429 0802154317 U S LVDD PHYSICAL PARTITION MARKED STALE
F7DDA124 0802154217 U H LVDD PHYSICAL VOLUME DECLARED MISSING
52715FA5 0802154217 U H LVDD FAILED TO WRITE VOLUME GROUP STATUS AREA
E86653C3 0802154217 P H LVDD I/O ERROR DETECTED BY LVM
B6267342 0802154217 P H hdisk2 DISK OPERATION ERROR

Error Type: Error Class:


• P: Permanent, • H: Hardware
Performance, or Pending • S: Software
• T: Temporary • O: Operator
• I: Informational • U: Undetermined
• U: Unknown
Error monitoring © Copyright IBM Corporation 2024

Figure 15-6. A summary report: errpt

Content of summary report


By default, the errpt command creates a summary report that gives an overview of the different
error entries. One line per error is fine to get a feel for what is there, but you need more details to
understand problems.

Need for detailed report


The example shows different hardware and software errors that occurred. To get more
information about these errors, you must create a detailed report.
The first field indicates the error ID, which is not unique to each instance of an error. It is unique
for a type of error.
The next field is the time field that is in the following format: mmddhhmmyy where mmddhhmmyy
is the month, day, hour, minute, and year (as previously discussed).
The third field specifies the type of error; possible values are defined at the bottom of the visual.
There is a problem with this field because of three possible values that begin with the letter P. As
this field is a one-letter field, you cannot tell exactly what type of an error you are dealing with
until you view the detailed report.
The next field defines the class; again the possible values are given at the bottom of the visual.
The last two fields give the resource name of the component that is causing the problem and also
a description of the error.
Next, a detailed report.

© Copyright IBM Corp. 2009, 2024 15-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

A detailed error report: errpt -a


LABEL: LVM_SA_PVMISS
IDENTIFIER: F7DDA124

Date/Time: Wed Aug 2 15:42:56 2017


Sequence Number: 75
Machine Id: 00F96D534C00
Node Id: sys8701_s2_client
Class: H
Type: UNKN
WPAR: Global
Resource Name: LVDD
Resource Class: NONE
Resource Type: NONE
Location:

Description
PHYSICAL VOLUME DECLARED MISSING

Probable Causes
POWER, DRIVE, ADAPTER, OR CABLE FAILURE

Detail Data
MAJOR/MINOR DEVICE NUMBER
8000 0012 0000 0001
SENSE DATA
00F9 6D53 0000 4C00 0000 015D A45F 7CD9 00F9 6D53 65EA DC02 0000 0000 0000 0000

Error monitoring © Copyright IBM Corporation 2024

Figure 15-7. A detailed error report: errpt -a

Content of detailed error report


As previously mentioned, detailed error reports are generated by running the errpt -a
command. The first half of the information that is displayed is obtained from the ODM (CuDv,
CuAt, CuVPD) and is useful because it shows clearly which part causes the error entry. The next
few fields explain probable reasons for the problem, and actions that you can take to correct the
problem.
The last field, SENSE DATA, is a detailed report about which part of the device is failing. For
example, with disks, it might display which sector on the disk is failing. IBM support might use this
information to analyze the problem.

Interpreting error classes and types


The values that are shown for error class and error type provide information that is useful in
understanding a particular problem:
• The combination of an error class value of H and an error type value of PERM indicates that the
system encountered a problem with a piece of hardware and might not recover from it.
• The combination of an error class value of H and an error type value of PEND indicates that a
piece of hardware might become unavailable soon due to the numerous errors detected by the
system.
• The combination of an error class value of S and an error type of PERM indicates that the
system encountered a problem with software and might not recover from it.

© Copyright IBM Corp. 2009, 2024 15-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• The combination of an error class value of S and an error type of TEMP indicates that the
system encountered a problem with software. After several attempts, the system was able to
recover from the problem.
• An error class value of O indicates that an informational message was logged.
• An error class value of U indicates that an error class might not be determined.

Link between error log and diagnostics


There is a link between the error log and diagnostics. Error reports include the diagnostic analysis
for errors that were analyzed. Diagnostics, and the diagnostic tool diag, are covered in a later unit.

Example of Detailed Error Report


LABEL: LVM_SA_PVMISS
IDENTIFIER: F7DDA124
LABEL: LVM_SA_PVMISS
IDENTIFIER: F7DDA124
Date/Time: Wed Aug 2 15:42:56 2017
Sequence Number: 75
Machine Id: 00F96D534C00
Node Id: sys8701_s2_client
Class: H
Type: UNKN
WPAR: Global
Resource Name: LVDD
Resource Class: NONE
Resource Type: NONE
Location:
Description
PHYSICAL VOLUME DECLARED MISSING
Probable Causes
POWER, DRIVE, ADAPTER, OR CABLE FAILURE
Detail Data
MAJOR/MINOR DEVICE NUMBER
8000 0012 0000 0001
SENSE DATA
00F9 6D53 0000 4C00 0000 015D A45F 7CD9 00F9 6D53 65EA DC02 0000 0000 0000 0000
Disk errors are frequently seen in the error log. There are many different types of disk errors.

© Copyright IBM Corp. 2009, 2024 15-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Types of disk errors


Error
Error Label Recommendations
Type
DISK_ERR1 P Failure of physical volume media
Action: Replace device as soon as possible
DISK_ERR2, P Device does not respond
DISK_ERR3 Action: Check power supply
DISK_ERR4 T Error that is caused by bad block or occurrence of
a recovered error
Rule of thumb: If disk produces more than one
DISK_ERR4 per week, replace the disk

SCSI_ERR* P SCSI communication problem Error types:


(SCSI_ERR10) Action: Check cable, SCSI addresses, terminator • P = Permanent
• T = Temporary

Error monitoring © Copyright IBM Corporation 2024

Figure 15-8. Types of disk errors

Common disk errors


The following list explains the most common disk errors you should know about:
• DISK_ERR1 is caused from wear and tear of the disk. Remove the disk as soon as possible
from the system and replace it with a new one. Follow the procedures that you learned earlier
in this course.
• DISK_ERR2 and DISK_ERR3 error entries usually caused by a loss of electrical power.
• DISK_ERR4 indicates bad blocks on the disk. Do not panic if you get a few entries in the log of
this type of an error. What you should be aware of is the number of DISK_ERR4 errors and their
frequency. The more you get, the closer you are getting to a disk failure. You want to prevent a
disk failure before it happens, so monitor the error log closely.
• Sometimes SCSI errors are logged, mostly with the LABEL SCSI_ERR10. They indicate that the
SCSI controller is not able to communicate with an attached device. In this case, check the
cable (and the cable length), the SCSI addresses, and the terminator.
DISK_ERR5 errors
An infrequent error is DISK_ERR5. It is the catch-all (that is, the problem does not match any of the
other DISK_ERRx symptoms). You need to investigate further by running the diagnostic programs
that can detect and produce more information about the problem.
DISK_ERR 1, DISK_ERR 2 and DISK_ERR 4 return sense data that the diagnostic programs
analyze to provide extra information regarding the nature of the error, and its severity.
DISK_ERR 4 is by far the most common error that is generated, and it is the least severe. It
indicates that a bad block was detected during a read or write request to the disk drive.
Bad block relocation and mirroring

© Copyright IBM Corp. 2009, 2024 15-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
When a disk drive is formatted for the first time, a portion of the drive (about 5% in the case of IBM
drives) is set aside for bad block relocation. The format itself also masks and readdresses existing
bad blocks so that the medium is clean and ready for use. However, during use any disk drive can
develop bad blocks that can be attributed to deterioration caused by the setting and resetting of
magnetic charges on the medium.
Bad blocks might be discovered during any read or write operation that trigger DISK_ERR 4. But,
they can be relocated only during a write operation.
At the software level, if your hardware does not support bad block relocation, you can set logical
volume bad block relocation. If a bad block is detected during a read or write operation, its
physical location is recorded in the logical volume device driver (LVDD) defects directory. This
directory is reviewed during each read or write request. Most hardware does support bad block
relocation and so the logical volume attribute is irrelevant.
Bad blocks are never a problem when mirrored logical volumes are used. Either a read or write
request is completed on the mirror copy that is undamaged, and the damaged block is always
relocated. When a read requests a damaged block, the logical volume manager converts the
request to a write request and relocates the block with values derived from the good copy. All this
relocation occurs without intervention or special configuration.
Important error entries the logical volume manager creates.

© Copyright IBM Corp. 2009, 2024 15-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

LVM error log entries

Class
Error Label and Recommendations
Type
LVM_BBEPOOL, S,P No more bad block relocation
LVM_BBERELMAX, Action: Replace disk as soon as
LVM_HWFAIL possible
Error Classes:
LVM_SA_STALEPP S,P Stale physical partition • H = Hardware
Action: Check disk, synchronize data • S = Software
(syncvg)
Error types:
LVM_SA_QUORCLOSE H,P Quorum lost, volume group closing • P = Permanent
Action: Check disk, consider working • T = Temporary
without quorum

Error monitoring © Copyright IBM Corporation 2024

Figure 15-9. LVM error log entries

Important LVM error codes


The visual shows some important LVM error codes that you should know. All of these errors are
permanent errors that cannot be recovered. Often these errors accompany hardware errors such
as those shown on the previous page.

Immediate response to errors


Errors, such as those shown on the visual, require your immediate intervention.

Categories of LVM error labels:


LVM_BBEPOOL, LVM_BBERELMAX, LVM_HWFAIL: No more bad block relocation
Action: Replace disk as soon as possible.
LVM_SA_STALEPP: Stale physical partition
Action: Check disk, synchronize data (syncvg).
LVM_SA_QUORCLOSE: Quorum lost, volume group closing
Action: Check disk, consider working without quorum.
How to maintain the error log.

© Copyright IBM Corp. 2009, 2024 15-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Topic 1 objectives
• Analyze error log entries
• Identify and maintain the error logging components
• Describe different error notification methods
• Log system messages using the syslogd daemon
• Describe resource monitoring with RMC

Error monitoring © Copyright IBM Corporation 2024

Figure 15-10. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 15-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Maintaining the error log


# smit errdemon
Change / Show Characteristics of the Error Log

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
LOGFILE [/var/adm/ras/errlog]
* Maximum LOGSIZE [1048576] #
Memory BUFFER SIZE [32768] #
...

# smit errclear
Clean the error log

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Remove entries older than this NUMBER OF DAYS [30] #
Error CLASSES (default is all) [] +
Error TYPES (default is all) [] +
...
Resource CLASSES (default is all) []
...
==> Use the errlogger command as a reminder <==
Error monitoring © Copyright IBM Corporation 2024

Figure 15-11. Maintaining the error log

Changing error log attributes


To change error log attributes like the error log filename, the internal memory buffer size, and the
error log file size, use the SMIT fastpath smit errdemon. The error log file is implemented as a
ring. When the file reaches its limit, the oldest entry is removed to allow adding a new one. The
command that SMIT runs is the errdemon command. See your AIX Commands Reference for a
listing of the different options.

Cleaning up error log entries


To clean up error log entries, use the SMIT fastpath smit errclear. For example, after removing
a bad disk that caused error logs entries, you should remove the corresponding error log entries
regarding the bad disk. The errclear command is part of the fileset bos.sysmgt.serv_aid.
Entries in /var/spool/cron/crontabs/root use errclear to remove software and hardware errors.
Software and operator errors are purged after 30 days, hardware errors are purged after 90 days.

Using errlogger to create reminders


Follow the suggestion at the bottom of the visual. Whenever an important system event takes
place, for example, the replacement of a disk, log this event with the errlogger command.

© Copyright IBM Corp. 2009, 2024 15-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
Full list of characteristics of the error log
The first SMIT screen that is shown in the visual is not the complete. The complete screen is:
LOGFILE [/var/adm/ras/errlog]
* Maximum LOGSIZE [1048576] #
Memory BUFFER SIZE [32768] #
Duplicate Error Detection [true] +
Duplicate Time Interval [10000] #
in milliseconds
Duplicate Error Maximum [1000] #
Restrict errpt to privileged users [disable] +
The Change / Show Characteristics of the Error Log screen also contains duplicate error options.
If Duplicate Error Detection is set to true, Duplicate Time Interval in milliseconds is used to set a
threshold during which identical error log entries are removed. The Duplicate error maximum sets
the point at which an identical error is considered a new error. For more information, see the AIX
Commands Reference entry for errdemon.
Restricted access to error reporting
Any user on the system can view the error report using errpt command, exposing internal system
errors to the all users. Securing the error report such that only privileged users can view. Starting
with AIX 7200-03-00 onwards a restriction can be enabled or disabled by which controls whether
or not all users can view the error log. A system administrator can either disable or enable this
restriction using /usr/lib/errdemon -R enable and /usr/lib/errdemon -R disable. This
restriction is disabled by default.
When the restriction is disabled, any user can view the system error report.
testuser @ spruce1$ errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
DE84C4DB 0711092118 I O ConfigRM IBM.ConfigRM daemon has started.
69350832 0711091818 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 0711091918 T O errdemon ERROR LOGGING TURNED ON
To enable the restriction.
# /usr/lib/errdemon -R enable
# /usr/lib/errdemon -l
Error Log Attributes
--------------------------------------------
Log File /var/adm/ras/errlog
Log Size 1048576 bytes
Memory Buffer Size 32768 bytes
Duplicate Removal true
Duplicate Interval 10000 milliseconds
Duplicate Error Maximum 1000
PureScale Logging off
PureScale Logstream CentralizedRAS/Errlog
Restrict errpt to privileged users enable

© Copyright IBM Corp. 2009, 2024 15-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
After enabling the restriction, non-authorized users who try to view the errpt will receive an error
message.
testuser @ spruce1$ errpt
errpt:
User does not has sufficient authorizations.
How to enable a user to view error report?
Make a privileged user by assigning RBAC authorization for aix.ras.error.errpt.
# mkrole authorizations="aix.ras.error.errpt" role_errpt
# chuser roles=role_errpt testuser
# setkst
Successfully updated the Kernel Authorization Table.
Successfully updated the Kernel Role Table.
Successfully updated the Kernel Command Table.
Successfully updated the Kernel Device Table.
Successfully updated the Kernel Object Domain Table.
Successfully updated the Kernel Domains Table.
Successfully updated the Kernel RBAC log level.
Now the normal user "testuser” can execute errpt.
testuser @ spruce1$ swrole role_errpt
testuser's Password:
testuser @ spruce1$ errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
DE84C4DB 0711092118 I O ConfigRM IBM.ConfigRM daemon has started.
69350832 0711091818 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 0711091918 T O errdemon ERROR LOGGING TURNED ON
What are the notification methods for reporting an error?

© Copyright IBM Corp. 2009, 2024 15-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Topic 1 objectives
• Analyze error log entries
• Identify and maintain the error logging components
• Describe different error notification methods
• Log system messages using the syslogd daemon
• Describe resource monitoring with RMC

Error monitoring © Copyright IBM Corporation 2024

Figure 15-12. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 15-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Error notification methods

ODM-Based:
/etc/objrepos/errnotify

Error notification

Concurrent error logging:


Self-made error
errpt -c > /dev/console notification

Error monitoring © Copyright IBM Corporation 2024

Figure 15-13. Error notification methods

What is error notification?


Implementing error notification means taking steps that cause the system to inform you
whenever an error is posted to the error log.

Ways to implement error notification


There are different ways to implement error notification:
• Concurrent error logging is the easiest way to implement error notification. If you run errpt
-c, each error is reported when it occurs. By redirecting the output to the console, an operator
is informed about each new error entry.
• Self-made error notification is also an easy way to implement error notification. You write a
shell procedure that regularly checks the error log.
• ODM-based error notification: The errdemon program uses the ODM class errnotify for error
notification. How to work with errnotify is discussed later in this topic.
Periodic Diagnostics: The diagnostics package (diag command) contains a periodic diagnostic
procedure (diagela). All members of the system group get a mail message whenever a hardware
error is posted to the log. Additionally, a message is sent to the system console. The diagela
program has disadvantages:
• Since it runs many times a day, the program might slow down your system.
• Only hardware errors are analyzed.
• Since AIX 5.2, diagela supports analyzing processor errors and no other hardware.

© Copyright IBM Corp. 2009, 2024 15-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• In POWER5 and later hardware, diagela does not support processor diagnostics. Instead, the
platform firmware (service processor) handles the diagnostics and reports hardware errors to
the managing HMC.
Let’s see an example of how you might implement self-made error notification.

© Copyright IBM Corp. 2009, 2024 15-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Self-made error notification


#!/usr/bin/ksh

errpt > /tmp/errlog.1

while true
do
sleep 60 # Let's sleep one minute

errpt > /tmp/errlog.2

# Compare the two files.


# If no difference, let's sleep again.
cmp -s /tmp/errlog.1 /tmp/errlog.2 && continue

# Files are different: Let's inform the operator:


print "Operator: Check error log" > /dev/console

errpt > /tmp/errlog.1

done

Error monitoring © Copyright IBM Corporation 2024

Figure 15-14. Self-made error notification

Implementing self-made error notification


It is easy to implement self-made error notification by using the errpt command. The sample
shell script on the visual shows how this error notification can be done.

Example on visual
The procedure on the visual shows an easy but effective way of implementing error notification.
• The first errpt command generates a file /tmp/errlog.1.
• The construct while true implements an infinite loop that never ends.
• In the loop, the first action is to sleep 1 minute.
• The second errpt command generates a second file /tmp/errlog.2.
• The two files are compared by using the command cmp -s (silent compare that means no
output is reported). If the files are not different, it jumps back to the beginning of the loop
(continue), and the process sleeps again.
• If there is a difference, a new error entry is posted to the error log. In this case, the operator is
informed that a new entry is in the error log. Instead of print you might use the mail command
to inform another person.
Look at how the errnotify ODM class can be used.

© Copyright IBM Corp. 2009, 2024 15-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

ODM-based error notification: errnotify

errnotify:
en_pid = 0
en_name = "sample"
en_persistenceflg = 1
en_label = ""
en_crcid = 0
en_class = "H"
en_type = "PERM"
en_alertflg = ""
en_resource = ""
en_rtype = ""
en_rclass = "disk"
en_method = "errpt -a -l $1 | mail -s DiskError root"

Error monitoring © Copyright IBM Corporation 2024

Figure 15-15. ODM-based error notification: errnotify

The error notification object class


The Error Notification object class specifies the conditions and actions to be taken when errors
are recorded in the system error log. The user specifies these conditions and actions in an Error
Notification object.
Each time an error is logged, the error notification daemon determines whether the error log entry
matches the selection criteria of any of the Error Notification objects. If matches exist, the
daemon runs the programmed action, also called a notify method, for each matched object.
The Error Notification object class is in the /etc/objrepos/errnotify file. Error Notification
objects are added to the object class by using ODM commands.

Example in visual
The example in the visual shows an object that creates a mail message to root whenever a disk
error is posted to the log.

List of descriptors
Here is a list of all descriptors for the errnotify object class:
• en_alertflg: Identifies whether the error is alertable. This descriptor is provided for use by
alert agents with network management applications. The values are TRUE (alertable) or
FALSE (not alertable).
• en_class: Identifies the class of error log entries to match. Valid values are H (hardware
errors), S (software errors), O (operator messages), and U (undetermined).

© Copyright IBM Corp. 2009, 2024 15-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• en_crcid: Specifies the error identifier that is associated with a particular error.
• en_dup: Identifies whether the kernel identified the error as a duplicate. TRUE indicates that
it is a duplicate error.
• en_err64: Identifies the environment of the error. TRUE indicates that the error is from a
64-bit environment.
• en_label: Specifies the label that is associated with a particular error identifier as defined in
the output of errpt -t (show templates).
• en_method: Specifies a user-programmable action, such as a shell script or a command string
to be run when an error matching the selection criteria of this Error Notification object is
logged. The error notification daemon uses the sh -c command to run the notify method.
The following keywords are passed to the method as arguments:
• $1: Sequence number from the error log entry
• $2: Error ID from the error log entry
• $3: Class from the error log entry
• $4: Type from the error log entry
• $5: Alert flags from the error log entry
• $6: Resource name from the error log entry
• $7: Resource type from the error log entry
• $8: Resource class from the error log entry
• $9: Error label from the error log entry
• en_name: Uniquely identifies the object
• en_persistenceflg: Designates whether the Error Notification object should be removed when
the system is restarted. 0 means removed at boot time; 1 means persists through boot.
• en_pid: Specifies a process ID for use in identifying the Error Notification object. Objects that
have a PID specified should have the en_persistenceflg descriptor set to 0.
• en_rclass: Identifies the class of the failing resource. For hardware errors, the resource class
is the device class (see PdDv). Not used for software errors.
• en_resource: Identifies the name of the failing resource. For hardware errors, the resource
name is the device name. Not used for software errors.
• en_rtype: Identifies the type of the failing resource. For hardware errors, the resource type is
the device type (see PdDv). Not used for software errors.
• en_symptom: Enables notification of an error that accompanies a symptom string when set to
TRUE.
• en_type: Identifies the severity of error log entries to match. Valid values are:
• INFO: Informational
• PEND: Impending loss of availability
• PERM: Permanent

© Copyright IBM Corp. 2009, 2024 15-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• PERF: Unacceptable performance degradation
• TEMP: Temporary
• UNKN: Unknown
• TRUE: Matches alertable errors
• FALSE: Matches non-alertable errors
• 0: Removes the Error Notification object at system restart
• non-zero: Retains the Error Notification object at system restart
Use odmadd and odmdelete to add and delete objects to and from errnotify.
Move on to a description of syslogd.

© Copyright IBM Corp. 2009, 2024 15-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Topic 1 objectives
• Analyze error log entries
• Identify and maintain the error logging components
• Describe different error notification methods
• Log system messages using the syslogd daemon
• Describe resource monitoring with RMC

Error monitoring © Copyright IBM Corporation 2024

Figure 15-16. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 15-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

syslogd daemon

/etc/syslog.conf:

daemon.debug /tmp/syslog.debug

/tmp/syslog.debug:

syslogd inetd[16634]: A connection requires tn service


inetd[16634]: Child process 17212 has ended

# stopsrc -s inetd
# startsrc -s inetd -a "-d" Provide debug
information

Error monitoring © Copyright IBM Corporation 2024

Figure 15-17. syslogd daemon

Function of syslogd
The syslogd daemon logs system messages from different software components (kernel, daemon
processes, system applications).

The /etc/syslog.conf configuration file


When started, the syslogd reads a configuration file /etc/syslog.conf. Whenever you change this
configuration file, you need to refresh the syslogd subsystem:
# refresh -s syslogd

Example on visual
The visual shows a configuration that is often used when a daemon process causes a problem.
The following line is placed in /etc/syslog.conf and indicates that facility daemon should be
monitored/controlled:
daemon.debug /tmp/syslog.debug
The line that is shown also specifies that all messages with the priority level debug and higher,
should be written to the file /tmp/syslog.debug. This file must exist.
The daemon process that causes problems (in the example the Inetd) is started with option -d to
provide debug information. The syslogd daemon collects the debug information and writes the
information to the log file /tmp/syslog.debug.
Let’s see some other syslogd configuration examples.

© Copyright IBM Corp. 2009, 2024 15-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

syslogd configuration examples


/etc/syslog.conf:
All security messages to the
auth.debug /dev/console system console

Collect all mail messages in


mail.debug /tmp/mail.debug /tmp/mail.debug

Collect all daemon messages


daemon.debug /tmp/daemon.debug in /tmp/daemon.debug

Send all messages, except


*.debug; mail.none @server mail messages, to host server

After changing /etc/syslog.conf:


# refresh -s syslogd

Error monitoring © Copyright IBM Corporation 2024

Figure 15-18. syslogd configuration examples

Examples in visual
The visual shows some examples of syslogd configuration entries that might be placed in
/etc/syslog.conf:
• The following line specifies that all security messages are directed to the system console:
auth.debug /dev/console
• The following line specifies that all mail messages are collected in the file /tmp/mail.debug:
mail.debug /tmp/mail.debug
• The following line specifies that all messages produced from daemon processes are collected
in the file /tmp/daemon.debug: daemon.debug /tmp/daemon.debug
• The following line specifies that all messages, except messages from the mail subsystem, are
sent to the syslogd daemon* on the host server: *.debug; mail.none @server
*If this example and the preceding example appear in the same /etc/syslog.conf file, messages
sent to /tmp/daemon.debug are also sent to the host server.

General format of /etc/syslog.conf entries


As you see, the general format for entries in /etc/syslog.conf is:
selector action
The selector field names a facility and a priority level. Separate facility names with a comma (,).
Separate the facility and priority level portions of the selector field with a period (.). Separate
multiple entries in the same selector field with a semicolon (;). To select all facilities, use an
asterisk (*).

© Copyright IBM Corp. 2009, 2024 15-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
The action field identifies a destination (file, host, or user) to receive the messages. If routed to a
remote host, the remote system handles the message as indicated in its own configuration file. To
display messages on a user's terminal, the destination field must contain the name of a valid,
logged-in system user. If you specify an asterisk (*) in the action field, a message is sent to all
logged-in users.

Facilities
Use the following system facility names in the selector field:
• kern Kernel
• user User level
• mail Mail subsystem
• daemon System daemons
• auth Security or authorization
• syslog syslogd messages
• lpr Line-printer subsystem
• news News subsystem
• uucp uucp subsystem
• * All facilities

Priority levels
Use the following levels in the selector field. Messages of the specified level and all levels above it
are sent as directed.
• emerg Specifies emergency messages. These messages are not distributed to all users.
• alert Specifies important messages such as serious hardware errors. These messages are
distributed to all users.
• crit Specifies critical messages, not classified as errors, such as improper login attempts.
These messages are sent to the system console.
• err Specifies messages that represent error conditions.
• warning Specifies messages for abnormal, but recoverable conditions.
• notice Specifies important informational messages.
• info Specifies information messages that are useful in analyzing the system.
• debug Specifies debugging messages. If you are interested in all messages of a certain
facility, use this level.
• none Excludes the selected facility.

© Copyright IBM Corp. 2009, 2024 15-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
Refreshing the syslogd subsystem
As previously mentioned, after changing /etc/syslog.conf, you must refresh the syslogd
subsystem to have the change take effect. Use the command:
# refresh -s syslogd
Let’s discuss how to redirect syslogd messages to the error log.

© Copyright IBM Corp. 2009, 2024 15-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Redirecting syslog messages to error log

/etc/syslog.conf:
Redirect all syslog
*.debug errlog
messages to error log

# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION


C6ACA566 0802163317 U S syslog MESSAGE REDIRECTED FROM SYSLOG
...

Error monitoring © Copyright IBM Corporation 2024

Figure 15-19. Redirecting syslog messages to error log

Consolidating error messages


Some applications use syslogd for logging errors and events. Some administrators find it
desirable to list all errors in one report.

Redirecting messages from syslogd to the error log


The visual shows how to redirect messages from syslogd to the error log. By setting the action
field to errlog, all messages are redirected to the AIX error log.
What about the other way round?

© Copyright IBM Corp. 2009, 2024 15-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Directing error log messages to syslogd


errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "logger Error Log: `errpt -l $1 | grep -v TIMESTAMP`"

errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "logger Error Log: $(errpt -l $1 | grep -v TIMESTAMP)"

Direct the last error entry (-l $1) to the syslogd


Do not show the error log header (grep -v) or (tail -1)

errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "errpt -l $1 | tail -1 | logger -t errpt -p
daemon.notice"

Error monitoring © Copyright IBM Corporation 2024

Figure 15-20. Directing error log messages to syslogd

Using the logger command


You can direct error log events to syslogd by using the logger command with the errnotify ODM
class.

Command substitution
You need to use command substitution (or pipes) before calling the logger command. The first
two examples on the visual illustrate the two ways to do command substitution in a Korn shell
environment:
• Using the Bourne/Korn shell ‘command‘ syntax (with backquotes), shown in the first example
on the visual
• Using the newer Korn shell specific $(command) syntax, shown in the second example on the
visual
Note that the visual just shows three ways to accomplish the same thing. The first two examples
use two different formats to invoke command substitution, which places the report text on the
line before execution of the logger command. The last example feeds the report text though a
pipe to the logger command.

© Copyright IBM Corp. 2009, 2024 15-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Topic 1 objectives
• Analyze error log entries
• Identify and maintain the error logging components
• Describe different error notification methods
• Log system messages using the syslogd daemon
• Describe resource monitoring with RMC

Error monitoring © Copyright IBM Corporation 2024

Figure 15-21. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 15-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Resource Monitoring and Control (RMC)


• What does RMC do?
ƒ Can be configured to monitor resources (disk space, CPU usage, processor status, application
processes, and so on) and perform an action in response to a defined condition
ƒ It is a no charge feature of AIX

Error monitoring © Copyright IBM Corporation 2024

Figure 15-22. Resource Monitoring and Control (RMC)

RMC and the resource managers enable you to monitor resources. RMC and the resource
managers together provide sophisticated monitoring and response capabilities that enable you to
detect, and in many cases correct, system resource problems such as a critical file system
becoming full. You are able to monitor virtually all aspects of your system resources and specify a
wide range of actions to take; from general notification or logging capabilities we provide to more
targeted recovery responses you define.
The resource monitoring and control (RMC) subsystem is a generalized framework for managing,
monitoring, and manipulating resources (physical or logical system entities). The resource
monitoring capability is largely provided by the event response resource manager (although you
are typically monitoring dynamic attribute values provided by the host resource manager, file
system resource manager, and sensor resource manager). The event response resource manager
provides a set of commands that enable you to monitor events of interest (called conditions) and
have the RMC system react in particular ways (called responses) if the event occurs.
A condition
A condition specifies the event that should trigger a response. It does this using an event
expression and, optionally, a rearm event expression.
A response
A response indicates one or more actions that the system can take when a condition event occurs.
A condition-response association
Before you can actually monitor a condition, you must link it with one or more responses. This is
called a condition-response association and is required for monitoring so that RMC knows how to
respond when the condition event occurs.
What to monitor

© Copyright IBM Corp. 2009, 2024 15-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
To get an idea of what you can monitor, look at the predefined conditions that RSCT provides. You
can list the predefined conditions using the lscondition command.
The term Resource Monitoring and Control (RMC) is used as part of one of the following terms to
explicitly refer to the function or the component, depending on the context:
• RSCT RMC - A subset function of Reliable Scalable Cluster Technology (RSCT) that is provided
by the components highlighted in the visual.
• RMC subsystem - A daemon (ctrmc) provided in AIX (since version 5.1) that provides services
to the other RSCT RMC components. It is shown as “RMC Daemon” in the visual.
AIX has more than 80 predefined conditions that can be activated for monitoring with just a few
commands from the command prompt. These conditions range from “/tmp space used” to
"Ethernet transmit overflow rate" and can be used as soon as AIX is installed and running.
The predefined conditions are ready to use and just need to be enabled or configured to match the
exact requirements of your systems. If predefined conditions do not satisfy your systems’
requirements, RMC allows you to create new conditions, responses, and actions to tailor the
system to respond when and how you require.
Technically, Resource Monitoring and Control (RMC) is a subset function of Reliable Scalable
Cluster Technology (RSCT). The visual shows an overview of the relationship between RMC
components and clients.
Common uses of RMC, you can configure RMC to automatically expand a file system if its usage
exceeds 95 percent. The flexibility of RMC enables you to configure response actions or scripts
that manage general system conditions with little or no involvement from the administrator.
You can easily create your own conditions and response. The following references can help you
learn more.
Monitoring specific filesystem usage using Resource Monitoring Control
https://www.ibm.com/support/pages/monitoring-specific-filesystem-usage-using-resource-monit
oring-control
IBM Redbooks publication SG24-6615-00: A Practical Guide for Resource Monitoring and
Control (RMC)
https://www.redbooks.ibm.com/abstracts/sg246615.html
The purpose of this course is not to describe the technical internal implementation specifics of
RMC (or RSCT); therefore, we will briefly explain the visual in the following list:
The RMC subsystem is the core of RSCT Resource Monitoring and Control. It is a generic
component that provides a scalable and reliable backbone to its clients with an interface to
resources. It has no knowledge of resource implementations, characteristics, or features. The
RMC subsystem therefore delegates to resource managers the actual execution of the actions the
clients ask to perform.
The RMC subsystem and RMC clients (for example the CLI) need not be in the same node. RMC
provides a distributed service to its clients. The RMC clients can connect to the RMC daemon
either locally
or remotely using the RMC API (Resource Monitoring and Control application user interface).

© Copyright IBM Corp. 2009, 2024 15-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
The RMC subsystem, and the Resource Managers it interacts with, need not be in the same node.
If they are on different nodes, the RMC subsystem will interact with the RMC subsystem located
locally on the same node as the resource managers, then the local RMC daemon will forward the
request between them.
Each resource manager is instantiated as one AIX process. To avoid the multiplication of
processes, a resource manager can handle several resource classes.
Many commands of the command line interface are Korn shell or Perl scripts.
RMC software packaging
The RMC components required for a stand-alone configuration are installed automatically upon
AIX installation by default; therefore, once AIX is installed, RMC will be active and ready to be
used. However, no resources will be monitored or controlled until you have configured the system
to do so. For systems that do not require cluster operation, no further filesets are required. The
following filesets are installed by default.
• rsct.core.rmc - RSCT Resource Monitoring and Control
• rsct.core.sr - RSCT Registry
• rsct.core.errm - RSCT Event Response Resource Manager
• rsct.core.auditrm - RSCT Audit Log Resource Manager
• rsct.core.fsrm - RSCT File System Resource Manager
• rsct.core.hostrm - RSCT Host Resource Manager
• rsct.core.utils - RSCT Utilities
• rsct.core.gui - RSCT Graphical User Interface
• rsct.core.sec - RSCT Security

© Copyright IBM Corp. 2009, 2024 15-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
For RMC monitoring the following filesets are required ; for example, from an AIX 7.3 system:
# lslpp -l rsct.core.rmc rsct.core.sr rsct.core.errm rsct.core.auditrm
rsct.core.fsrm rsct.core.hostrm rsct.core.utils rsct.core.gui rsct.core.sec
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
rsct.core.auditrm 3.3.1.0 COMMITTED RSCT Audit Log Resource
Manager
rsct.core.errm 3.3.1.0 COMMITTED RSCT Event Response Resource
Manager
rsct.core.fsrm 3.3.1.0 COMMITTED RSCT File System Resource
Manager
rsct.core.gui 3.3.1.0 COMMITTED RSCT Graphical User Interface
rsct.core.hostrm 3.3.1.0 COMMITTED RSCT Host Resource Manager
rsct.core.rmc 3.3.1.1 COMMITTED RSCT Resource Monitoring and
Control
rsct.core.sec 3.3.1.0 COMMITTED RSCT Security
rsct.core.sr 3.3.1.0 COMMITTED RSCT Registry
rsct.core.utils 3.3.1.1 COMMITTED RSCT Utilities
Path: /etc/objrepos
rsct.core.auditrm 3.3.1.0 COMMITTED RSCT Audit Log Resource
Manager
rsct.core.errm 3.3.1.0 COMMITTED RSCT Event Response Resource
Manager
rsct.core.fsrm 3.3.1.0 COMMITTED RSCT File System Resource
Manager
rsct.core.gui 3.3.1.0 COMMITTED RSCT Graphical User Interface
rsct.core.hostrm 3.3.1.0 COMMITTED RSCT Host Resource Manager
rsct.core.rmc 3.3.1.1 COMMITTED RSCT Resource Monitoring and
Control
rsct.core.sec 3.3.1.0 COMMITTED RSCT Security
rsct.core.sr 3.3.1.0 COMMITTED RSCT Registry
rsct.core.utils 3.3.1.1 COMMITTED RSCT Utilities
Let’s look at how we can use RMC to monitor an AIX systems filesystem space.

© Copyright IBM Corp. 2009, 2024 15-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Monitoring specific filesystem usage with RMC (1 of 3)


• List the available RMC conditions and search (grep) for the pre-defined condition for the /tmp
filesystem. For example:
ƒ # lscondition | grep tmp
"/tmp space used" "Not monitored"
• Create a condition response for the "/tmp space used” condition, with the "Critical
notifications” response.
ƒ # mkcondresp "/tmp space used" "Critical notifications"
• Start RMC monitoring the /tmp filesystem.
ƒ # startcondresp "/tmp space used" "Critical notifications"
• List the condition response again. Note that this time the state is Active.
# lscondresp
Displaying condition with response information:
Condition Response State
"/tmp space used" "Critical notifications" "Active"

Error monitoring © Copyright IBM Corporation 2024

Figure 15-23. Monitoring specific filesystem usage with RMC (1 of 3)

The full extent of the capabilities of RMC are beyond the scope of this class. However, we will
provide a simple (and popular) example that provides students a clear picture of how RMC can be
used to (quickly and easily) to monitor certain events on AIX.
Event Response resource manager (ERRM)
The Event Response resource manager plays the most important role to monitor systems using
RMC. It uses the terms, Action, Condition, Expression and Response.
The Event Response resource manager provides the system administrator with the ability to
define a set of conditions to monitor in the various nodes of the cluster, and to define actions to
take in response to these events. The conditions are applied to dynamic properties of any
resources of any resource manager in the cluster. The Event Response resource manager
provides a simple
automation mechanism for implementing event driven actions. Basically, you can do the
following:
• Define a condition that is composed of a resource property to be monitored and an expression
that is evaluated periodically.
• Define a response that is composed of zero or more actions that consists of a command to be
run and controls, such as to when and how the command is to be run.
Associates one or more responses with a condition and activates theassociation.
The Event Response resource manager provides you with a CLI. Because RMC comes with a
predefined set of conditions, actions, and responses, we recommend you start by combining
some of these into associations using the CLI.
File system resource manager

© Copyright IBM Corp. 2009, 2024 15-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
The File system resource manager manages only one resource class: the local file systems on the
cluster node. It can be used to list the file systems, get their status, and retrieve values like the
percentage of used space or inodes. The “/tmp space used” condition, which will monitor the disk
space used in /tmp, is shown below.
# lscondition "/tmp space used"
Displaying condition information:
condition 1:
Name = "/tmp space used"
MonitorStatus = "Not monitored"
ResourceClass = "IBM.FileSystem"
EventExpression = "PercentTotUsed > 90"
EventDescription = "An event will be generated when more than 90
percent of the total space in the /tmp directory is in use."
RearmExpression = "PercentTotUsed < 75"
RearmDescription = "The event will be rearmed when the percent
of the space used in the /tmp directory falls below 75 percent."
SelectionString = "Name == \"/tmp\""
Severity = "i"
NodeNames = {}
MgtScope = "l"
Toggle = "Yes"
EventBatchingInterval = 0
EventBatchingMaxEvents = 0
BatchedEventRetentionPeriod = 0
BatchedEventMaxTotalSize = 0
RecordAuditLog = "ALL"
Association between a condition with a response
Conditions and responses can exist without being used and with nothing related to each other.
Actions are part of responses and only defined to responses. Although it is possible that multiple
responses have an action using the same name, these actions do not refer to the same object. You
can associate a response with multiple actions. To start observing the monitored resource, a
condition must be associated with at least one response. You can associate a condition with
multiple responses. However, each pair of a condition and a response is considered a separate
association. Once associated, the condition and response should be activated (started).
The visual provides a brief summary of the steps required to enable monitoring the /tmp
filesystem usage using RMC. The steps are:
1. Display the details of the “/tmp space used” condition. Use this pre-defined condition to
monitor the disk space usage for /tmp. For example:
# lscondition "/tmp space used"
2. Display the details of the "Critical notifications” response. Use this response to alert the
administrator when the disk space usage breaches the pre-defined threshold.
# lsresponse "Critical notifications"

© Copyright IBM Corp. 2009, 2024 15-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
3. Create a condition response for the "/tmp space used” condition, with the "Critical
notifications” response.
# mkcondresp "/tmp space used" "Critical notifications"
4. Start RMC monitoring the /tmp filesystem.
# startcondresp "/tmp space used" "Critical notifications"
5. List the condition response again. Note that this time the state is Active.
# lscondresp
Displaying condition with response information:
Condition Response State
"/tmp space used" "Critical notifications" "Active"
If you need to disable RMC monitoring for /tmp, perform these steps:
1. Deactivate the condition response. Note that the state changes from Active to Not active.
# stopcondresp "/tmp space used" "Critical notifications"
# lscondresp
Displaying condition with response information:
Condition Response State
"/tmp space used" "Critical notifications" "Not active"
2. Remove the event, condition, and responses.
# rmcondresp "/tmp space used" "Critical notifications"
# lscondresp
lscondresp: 2618-188 No defined condition-response links were found.
3. Clear the RMC audit log. This will remove all records from the RMC audit log.
# rmaudrec -s "Time > 0"
# lsaudrec
Time Subsystem Category Description

© Copyright IBM Corp. 2009, 2024 15-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Monitoring specific filesystem usage with RMC (2 of 3)


• In the /tmp filesystem, create a file that consumes much of the disk space in the filesystem.
• After a few moments, a broadcast message will appear on screen.
• The message will state the condition for “/tmp space used” was found and an event is
logged.

# cd /tmp
# lmktemp junk 120M
junk
# df -m /tmp
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 128.00 6.61 95% 42 2% /tmp
#
Broadcast message from root@an14aix (tty) at 00:27:42 ...

Informational Event occurred for Condition /tmp space used on the resource
/tmp of the resource class IBM.FileSystem at Monday 04/29/24 00:27:42. The
resource was monitored on an14aix and resided on {an14aix}.
Error monitoring © Copyright IBM Corporation 2024

Figure 15-24. Monitoring specific filesystem usage with RMC (2 of 3)

Here we see that the event "/tmp space used" occurred, and a broadcast message is displayed
on screen (stdout). We can also use the lsevent command to view the event details, as follows:
# lsevent
Time = 04/29/24 00:23:42 201883
Category = Info
Description = Event : /tmp space used occurred at 04/29/24 00:23:42 201643 on /tmp
on an14aix.

© Copyright IBM Corp. 2009, 2024 15-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Monitoring specific filesystem usage with RMC (3 of 3)


• Email notification automatically sent to root’s mail.
# mail
Mail [5.2 UCB] [AIX 5.X] Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 root@an14aix Mon Apr 29 00:24 31/852 "/tmp space used"
?

Message 1:
From root@an14aix Mon Apr 29 00:24:42 2024
Date: Mon, 29 Apr 2024 00:24:42 -0400
From: root@an14aix
To: root@an14aix
Subject: /tmp space used

=====================================

Monday 04/29/24 00:23:42

Condition Name: /tmp space used


Severity: Informational
Event Type: Event
Expression: PercentTotUsed > 90

Resource Name: /tmp


Resource Class: IBM.FileSystem
Data Type: CT_INT32
Data Value: 95
Node Name: an14aix
Node NameList: {an14aix}
Resource Type: 0
=====================================

? exit
#
Error monitoring © Copyright IBM Corporation 2024

Figure 15-25. Monitoring specific filesystem usage with RMC (3 of 3)

© Copyright IBM Corp. 2009, 2024 15-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
An E-mail notification to root has been successfully sent using the predefined response,
"Critical notifications”.
# lsresponse "Critical notifications"
Displaying response information:
ResponseName = "Critical notifications"
Action = "Log critical event"
DaysOfWeek = 1-7
TimeOfDay = 0000-2400
ActionScript = "/opt/rsct/bin/logevent /tmp/criticalEvents"
ReturnCode = -1
CheckReturnCode = "n"
EventType = "b"
StandardOut = "n"
EnvironmentVars = ""
UndefRes = "n"
EventBatching = "n"
ResponseName = "Critical notifications"
Action = "E-mail root"
DaysOfWeek = 1-7
TimeOfDay = 0000-2400
ActionScript = "/opt/rsct/bin/notifyevent root"
ReturnCode = -1
CheckReturnCode = "n"
EventType = "b"
StandardOut = "n"
EnvironmentVars = ""
UndefRes = "n"
EventBatching = "n"
ResponseName = "Critical notifications"
Action = "Broadcast message"
DaysOfWeek = 1-7
TimeOfDay = 0000-2400
ActionScript = "/opt/rsct/bin/wallevent"
ReturnCode = -1
CheckReturnCode = "n"
EventType = "b"
StandardOut = "n"
EnvironmentVars = ""
UndefRes = "n"
EventBatching = "n"
An event is also recorded by the RMC Audit Log manager.
Audit Log resource manager
The Audit Log resource manager provides the other RMC subsystems with an extra logging facility,
in addition to the standard AIX errorlog and syslog. It can be seen as a means to trace the various
actions that were taken by the RSCT subsystem. Only two commands are offered to you by the
Audit Log resource manager:

© Copyright IBM Corp. 2009, 2024 15-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
• lsaudrec - Lists records in the audit log.
• rmaudrec - Deletes the specified records in the audit log.
# lsaudrec
Time Subsystem Category Description
04/29/24 00:04:42 ERRM Info Monitoring of condition /tmp space used is
started successfully.
04/29/24 00:23:42 ERRM Info Event : /tmp space used occurred at 04/29/24
00:23:42 201643 on /tmp on an14aix.
04/29/24 00:23:42 ERRM Info Event from /tmp space used that occurred at
04/29/24 00:23:42 201643 will cause /opt/rsct/bin/logevent /tmp/criticalEvents from
Critical notifications to be executed.
04/29/24 00:23:42 ERRM Info Event from /tmp space used that occurred at
04/29/24 00:23:42 201643 will cause /opt/rsct/bin/notifyevent root from Critical
notifications to be executed.
04/29/24 00:23:42 ERRM Info Event from /tmp space used that occurred at
04/29/24 00:23:42 201643 will cause /opt/rsct/bin/wallevent from Critical
notifications to be executed.
04/29/24 00:23:42 ERRM Info Event from /tmp space used that occurred at
04/29/24 00:23:42 201643 caused /opt/rsct/bin/wallevent from Critical notifications
to complete with a return code of 0.
04/29/24 00:23:42 ERRM Info Event from /tmp space used that
occurred at 04/29/24 00:23:42 201643 caused /opt/rsct/bin/logevent
/tmp/criticalEvents from Critical notifications to complete with a return
code of 0.
Note: There is no relationship between the RMC audit log function and the AIX security audit
function. The RMC audit log does not replace either the AIX errorlog or the syslog.

© Copyright IBM Corp. 2009, 2024 15-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

RMC rearm event


• Remove the junk file(s) from /tmp. Confirm that the %Used column (df) is now less than 90%.
• After a few moments, a broadcast message should appear on your screen.
• RMC is now monitoring the /tmp filesystem again and checking if its utilization threshold has
been breached.
# rm /tmp/junk
# df -m /tmp
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 128.00 126.61 2% 41 1% /tmp
Broadcast message from root@an14aix (tty) at 00:25:42 ...

Informational Rearm event occurred for Condition /tmp space used on the resource /tmp of the resource
class IBM.FileSystem at Monday 04/29/24 00:25:42. The resource was monitored on an14aix and resided on
{an14aix}.

• Rearm messages in RMC Audit Log.


# lsaudrec
...etc...
04/29/24 00:26:12 ERRM Info Rearm event from /tmp space used that occurred at 04/29/24 00:25:42
208411 caused /opt/rsct/bin/notifyevent root from Critical notifications to complete with a return code of
0.#
Error monitoring © Copyright IBM Corporation 2024

Figure 15-26. RMC rearm event

Rearm expression
An expression that determines when an rearm event occurs. For example, the rearm expression
“PercentTotUsed < 75” would cause a rearm event to occur if usage of a file system became less
than 75

© Copyright IBM Corp. 2009, 2024 15-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty
percent.
# lscondition "/tmp space used"
Displaying condition information:
condition 1:
Name = "/tmp space used"
MonitorStatus = "Not monitored"
ResourceClass = "IBM.FileSystem"
EventExpression = "PercentTotUsed > 90"
EventDescription = "An event will be generated when more than 90
percent of the total space in the /tmp directory is in use."
RearmExpression = "PercentTotUsed < 75"
RearmDescription = "The event will be rearmed when the percent
of the space used in the /tmp directory falls below 75 percent."
SelectionString = "Name == \"/tmp\""
Severity = "i"
NodeNames = {}
MgtScope = "l"
Toggle = "Yes"
EventBatchingInterval = 0
EventBatchingMaxEvents = 0
BatchedEventRetentionPeriod = 0
BatchedEventMaxTotalSize = 0
RecordAuditLog = "ALL"
Rearm event
When a rearm event expression is evaluated to be true, a rearm event is generated only when the
corresponding event has occurred already. At the time this occurs, RMC will execute responses
associated with the rearm event and RMC will consider the rearm event to be in a current (true)
state.
Time for review questions.

© Copyright IBM Corp. 2009, 2024 15-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Review questions
1. Which command generates error reports?

2. Which flag of this command is used to generate a detailed error report?

3. Which type of disk error indicates bad blocks?

4. What does the errlogger command do?

5. What does the following line in /etc/syslog.conf indicate?


*.debug errlog

Error monitoring © Copyright IBM Corporation 2024

Figure 15-27. Review questions

© Copyright IBM Corp. 2009, 2024 15-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Review answers
1. Which command generates error reports?
The answer is the errpt command.
2. Which flag of this command is used to generate a detailed error report?
The answer is errpt -a generates a detailed report.
3. Which type of disk error indicates bad blocks?
The answer is DISK_ERR4.
4. What does the errlogger command do?
The answer is it is used by root to add entries into the error log.
5. What does the following line in /etc/syslog.conf indicate?
*.debug errlog
The answer is all syslogd entries are directed to the errorlog.

Error monitoring © Copyright IBM Corporation 2024

Figure 15-28. Review answers

© Copyright IBM Corp. 2009, 2024 15-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Exercise

Error Monitoring

Error monitoring © Copyright IBM Corporation 2024

Figure 15-29. Exercise

© Copyright IBM Corp. 2009, 2024 15-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 15. Error monitoring

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Analyze error log entries
ƒ Identify and maintain the error logging components
ƒ Describe different error notification methods
ƒ Log system messages using the syslogd daemon
ƒ Describe resource monitoring with RMC

© Copyright IBM Corporation 2024

Figure 15-30. Unit summary

© Copyright IBM Corp. 2009, 2024 15-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Unit 16.System initialization: Accessing


a boot image
Estimated time
01:30

Overview
This unit describes the boot process up to the point of loading the boot logical volume. It
describes how the boot logical volume can be re-created if it is corrupted.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Device management
https://www.ibm.com/docs/en/aix/7.3?topic=device-management
AIX Version 7.3 Boot process
https://www.ibm.com/docs/en/aix/7.3?topic=startup-boot-process
AIX Version 7.3 RAM File system
https://www.ibm.com/docs/en/aix/7.3?topic=process-ram-file-system

© Copyright IBM Corp. 2009, 2024 16-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the boot process through to loading the boot logical volume
ƒ Describe the contents of the boot logical volume
ƒ Re-create the boot logical volume on a system that fails to boot
ƒ Adjust the bootlist for the wanted order of search

© Copyright IBM Corporation 2024

Figure 16-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 16-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Topic 1 objectives
• Describe the boot process through to loading the boot logical volume. Describe the contents of
the boot logical volume
• Adjust the bootlist for the wanted order of search
• Re-create the boot logical volume on a system that fails to boot

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-2. Topic 1 objectives

Let’s start with an overview about the AIX boot process.

© Copyright IBM Corp. 2009, 2024 16-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

How does a Power server or LPAR boot?

Possible failures

Check and initialize


Hardware error (only for
the hardware
POST physical server power-on)

Locate boot image using Unable to find any boot image


the boot list

Load and pass control to Boot image that is corrupted


boot image

Start AIX software


initialization

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-3. How does a Power server or LPAR boot?

Check and initialize hardware (POST)


After powering on a machine, the hardware is checked and initialized. This phase is called the
Power On Self-Test (POST). The goal of the POST is to verify the functions of the hardware.

Locate and load the boot image


After the POST is complete, a boot image is located from the bootlist and is loaded into memory.
During a normal boot, the location of the boot image is usually a disk. Besides disks, the boot
image can be loaded from tape, CD-ROM/DVD, or the network, which is typically the case when
booting into maintenance mode. If working with the Network Installation Manager (NIM), the boot
image is loaded over the network.
To use a different boot location, you must invoke the appropriate bootlist by pressing function
keys during the boot process. There is more information on bootlists, later in the unit.

Last steps
Passing control to the operating system means that the AIX kernel (which was loaded from the
boot image) takes over from the system firmware that was used to find and load the boot image.
The operating system is then responsible for completing the boot sequence. The components of
the boot image are discussed later in this unit. All devices are configured during the boot process.
The configuration is done in different phases of the boot by the cfgmgr utility. Towards the end of
the boot sequence, the init process is started and processes the /etc/inittab file.
Note that logical key switches are used to determine which bootlist is used. If you press F5 or
numeric 5, the system tries to boot from a default bootlist that contains the diskette,

© Copyright IBM Corp. 2009, 2024 16-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
CD-ROM/DVD, hard disk, and network. If it boots from the hard disk, it loads AIX diagnostics
rather than do a normal boot.
Let’s discuss ow the boot image is loaded from the boot logical volume when booting from disk.

© Copyright IBM Corp. 2009, 2024 16-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Loading of a boot image

Locate boot device using normal


boot list (NVRAM)

Load boot image into memory

aixmon_chrp
(boot loader program

Kernel initialization

Kernel executes
RAMFS /etc/init

Firmware
Boot (1) CDROM/DVD
devices RAM
(2) Disk Boot Logical Volume
(3) Network
(hd5)

hdisk0
Boot
controller

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-4. Loading of a boot image

Introduction
This visual shows how the boot logical volume is found during the AIX boot process. Machines use
one or more bootlists to identify a boot device. The bootlist is part of the firmware.

Bootstrap code
Power servers can manage several different operating systems. The hardware is not bound to the
software. System firmware reads the boot list to locate the boot device. The Open Firmware's load
method loads the AIX boot image. It reads the boot image as a whole from the boot device. Then,
the SOFTROS code (aixmon_chrp) processes the loaded boot image to uncompress and relocate
to a different region. The Open Firmware loads the boot image with the Partition Table Entries
(PTE) on the boot disk. The PTEs describe the location and size of the boot image on the disk.

Compression of boot image


To save disk space, the boot image is compressed on the disk. During the boot process, the boot
image is uncompressed and the AIX kernel gets boot control.
Note that many different error situations can come up. The bootlist might be incorrect, the disk
might be damaged, the boot record might be wrong and more. LED codes should help to analyze
the different errors.
Let’s see what parts belong to the boot logical volume.

© Copyright IBM Corp. 2009, 2024 16-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Boot disk and the boot logical volume


Boot disk

Boot Logical Volume (BLV - hd5)

Compressed Compressed
VGDA RAM file system Rest of the root disk
kernel
Boot record Base ODM (hd2, hd4, hd9var, and so forth)

SOFTROS
(aixmon_chrp)

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-5. Boot disk and the boot logical volume

Contents of the boot logical volume


The boot logical volume contains four components: The SOFTROS, compressed AIX kernel, a
mountable compressed RAM file system, and a reduced ODM.

Boot record
The boot block is not used to decide how to load the boot image. The load of the boot image is
based on the Partition Table Entry (PTE) table and ELF header of the boot image to decide how to
load the image into memory.

Boot logical volume


The Boot Logical Volume (BLV) is a logical volume on the boot disk, which contains the boot
image. The BLV is part of rootvg and has a logical volume type attribute of boot. The logical name
is typically hd5, but can be anything. The boot image includes:
• SOFTROS
• Compressed kernel
• Compressed RAM file system
• Base ODM

© Copyright IBM Corp. 2009, 2024 16-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
SOFTROS
The SOFTROS program, aixmon_chrp, processes the loaded boot image and uncompresses the
compressed kernel and compressed RAM file system. It then relocates the boot image to a
different region.

Kernel
The kernel initializes itself and then runs /etc/init in the RAM file system. The RAM file system
version of init is a specialized version (/usr/lib/boot/ssh on the boot disk root file system) and
is used in phases 1 and 2 of the AIX initialization process.
Note: The kernel that is loaded from the boot logical volume is never replaced during the boot
process; the same kernel is used in multiuser mode. If you need a new kernel, you must re-create
the boot logical volume with the new kernel.

RAM file system


The RAM file system is a reduced or miniature root file system that is loaded into memory and
used as if it were a disk-based file system. The RAM file system is used during phases 1 and 2 of
the AIX initialization. The contents of the RAM file system are slightly different depending on the
type of system boot:
Type of boot Contents of RAM file system
Boot from system hard diskPrograms and data necessary to access rootvg and start up the rest of
AIX.
Boot from the Installation CD or DVDPrograms and data necessary to install AIX or do software
maintenance.
Boot from Diagnostics CD or DVDPrograms and data necessary to run standalone diagnostics.

Base ODM
The boot logical volume contains a reduced copy of the ODM. During the boot process, many
devices are configured before hd4 is available. For these devices, the corresponding ODM files
must be stored in the boot logical volume.

Booting from other devices


It is also possible to boot from a CD, DVD, a tape, or the network. The focus in this lesson is
booting from a hard disk.
Before AIX V5.3 ML04, the boot record was a 512 byte block that contained the size and location
of the boot image. Open Firmware read the boot record to locate the boot logical volume.
Beginning with AIXV5.3 ML04, the boot block is not used to decide how to load the boot image.
The load of the boot image is based on the Partition Table Entry (PTE) table and ELF header of the
boot image to decide how to load the image into memory. ELF stands for Executable File Format.
Just like XCOFF, it is the format that is used for AIX binaries. Before AIX V5.3, the bootexpand

© Copyright IBM Corp. 2009, 2024 16-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
program uncompressed the kernel and RAM file system. It was part of the boot logical volume.
Beginning with AIX V5.3, SOFTROS (aixmon_chrp) does this function.
Starting with AIX 7.3, the minimum size of the boot logical volume (hd5) is 40 MB. The boot logical
volume on AIX 7.3 has increased to a 40MB minimum. This is really only a consideration for
administrators if they need to migrate their AIX systems to AIX 7.3. This may require hd5 to
increased to 2 LP/PPs, prior to migration. Previously hd5 was 24MB in size, on 7.2
(https://ibm.biz/BdfLht), that is, for example, on AIX 7.2 BLV hd5 is 1 PP (32MB), but in AIX 7.3
BLV hd5 is 2 PPs (64MB). Before migration run the pre-migration scripts. This checks the size of
hd5 is 40 MB. If it does not meet requirement, the script checks whether the required free
partitions are available. The partitions must be contiguous. Refer to the AIX 7.3 online
documentation for more information.
Note the term base ODM means that device support is available only for devices that are marked
as base devices in PdDv. The protofiles (in /usr/lib/boot and /usr/lib/boot/protoext) are used
by the bosboot command to determine which files should be put into the RAMFS image that is
included in the boot image.
Many system boot problems involve being unable to locate a good boot image. To fix these
problems, you often need to boot into special modes. What determines which boot device is
used?

© Copyright IBM Corp. 2009, 2024 16-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Topic 1 objectives
• Describe the boot process through to loading the boot logical volume. Describe the contents of
the boot logical volume
• Adjust the bootlist for the wanted order of search
• Re-create the boot logical volume on a system that fails to boot

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-6. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 16-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Working with bootlists


• Normal bootlist
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0 blv=hd5 pathid=0
hdisk1 blv=hd5 pathid=0

• Customized service bootlist (numeric 6 key)


# bootlist -m service -o
hdisk0 blv=hd5 pathid=0

• Default bootlist (numeric 5 key)


> Hard coded in firmware
cd0
hdisk0 blv=hd5
ent0

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-7. Working with bootlists

Introduction
You can use the command bootlist or diag from the command-line to change or display the
bootlists. You can also use the System Management Services (SMS) programs. SMS is covered
later in this unit.
bootlist command
The bootlist command is the easiest way to change the bootlist. The first example shows how to
change the bootlist for a normal boot. In this example, the system can be booted from either
hdisk0 or hdisk1. To query the bootlist, you can use the bootlist -o option. The blv=hd5 part of
the bootlist entry is to identify which boot logical volume to use on that listed disk. The second
example shows how to display the customizable service bootlist. With the bootlist command,
you can also specify the IP parameters to use when specifying a network adapter. For example:
# bootlist -m service ent0 gateway=192.168.1.1 bserver=192.168.10.3
client=192.168.1.57
Using the service bootlist in this way, you can boot to maintenance or diagnostic using a NIM
server without having to use SMS to specify the network adapter as the boot device.

Types of bootlists
The normal bootlist is used during a normal boot. The default bootlist (hardcoded in the firmware)
is used when numeric 5 is pressed during the boot sequence. Most machines, in addition to the
default bootlist and the customized normal bootlist, allow for a customized service bootlist. The
service bootlist is set by using mode service with the bootlist command. The service bootlist is
used when the numeric 6 key is pressed during boot. Here is a list that summarizes the boot
modes and the manual keys that are associated with them:

© Copyright IBM Corp. 2009, 2024 16-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
• Numeric 1: Start an SMS (System Management Services) mode boot.
• Numeric 5: Start a service mode boot that uses the default service bootlist. The default
service bootlist is: cd0, hdisk0 blv=hd5, ent0
• Numeric 6: Start a service mode boot that uses the customized service bootlist.
The bootlist command accepts one more mode called both. As you might suspect, the both mode
sets the service and normal bootlist as the same time to the same value.
Let’s review the bootlist command but look at an AIX 7 enhancement that helps you manage
multi-path I/O situations.

© Copyright IBM Corp. 2009, 2024 16-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

AIX 7: Bootlist pathid enhancements


• The bootlist command now allows specification of the pathid of a device when setting the
bootpath:
ƒ # bootlist -m normal hdisk0 blv=hd5 pathid=0
• The pathid argument can be repeated for multiple paths in the wanted order:
ƒ # bootlist -m normal hdisk0 blv=hd5 pathid=0 pathid=1
OR
ƒ # bootlist -m normal hdisk0 blv=hd5 pathid=0,1

• The bootlist command now shows the pathid with the device:
ƒ # bootlist -m normal –o
hdisk0 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=1

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-8. AIX 7: Bootlist pathid enhancements

The pathid option (to the bootlist command) gives you the ability to operate at a pathid level.
In the past, you had to selectively delete and reconfigure device paths to generate bootlists on
systems with MPIO disks. The operation can now be done with a single command.
There were situations where the bootlist was too long. When the bootlist specifies disks without
any pathid restriction, each path takes an entry in the bootlist. The bootlist has a limited capacity.
Exceeding the capacity can result in being unable to use a different disk. Use of the pathid
specification can avoid this type of problem. It is important to remember that ordering of paths
are maintained with the bootlist command. If you want the bootlist to be set to boot from paths
1, 0, and 2, use the pathid=1,0,2 argument.
In the past, the only information about a disk in the bootlist was the name of the disk. Then, with
the advent of multibos, you might have two boot logical volumes in the same rootvg, each at a
different fix pack level. As a result, the bootlist needs to identify both the disk name and the BLV
that should be used.
Disks that are defined in SAN-attached storage subsystems provide multiple paths to that boot
disk. To address this situation, AIX can now include the pathid as part of the information in the
bootlist. The examples that are shown assume that there is only one BLV on the specified boot
disk, which is indicated with blv=hd5. The first example shows setting the bootlist to a single disk
and restricting it to only one path. This method is useful when you need to restrict the number of
entries in the bootlist. By default, if the system administrator identifies only the logical name of
the disk in specifying the bootlist, the bootlist automatically includes one entry for each pathid.
There is a maximum size to a bootlist and having all possible paths can fill up the bootlist fairly
quickly.
The second example shows how the bootlist command can be used to specify multiple paths to
a boot disk. Notice that there are two different syntaxes's, both valid. The first syntax has the

© Copyright IBM Corp. 2009, 2024 16-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
pathid=# specified multiple times. The second syntax shows that you can specify the pathid
attribute a single time with the assignment of a comma-delimited list of pathids.
The order in which the pathids are specified determines the order in which these paths are tried
in accessing the boot image.
The last bullet illustrates how the bootlist display (-o for output) lists each unique combination
that is defined in the bootlist.
The SMS programs provide another method to set a bootlist. Let’s look at how to start SMS.

© Copyright IBM Corp. 2009, 2024 16-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Starting System Management Services


• During AIX partition activation
• Press numeric 1 or specify SMS on HMC activate
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

1 = SMS Menu 5 = Default Boot List


8 = Open Firmware Prompt 6 = Stored Boot List

Memory Keyboard Network SCSI


...

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-9. Starting System Management Services

Booting to SMS
If you cannot boot AIX because the bootlist needs correcting, then you need to use the System
Management Services (SMS) to modify the bootlist. The SMS programs are integrated into the
hardware (they are in NVRAM).
The visual shows how to start the System Management Services. During system boot, shortly
before the firmware looks for a boot image, it discovers some basic hardware on the system.
Then, the LED usually displays a value of E1F1. As the devices are discovered, either a text name
or graphic icon for the resource displays on the screen. The second device that is discovered is
usually the keyboard. When the keyboard is discovered, a unique double beep tone is usually
sounded. After the keyboard is discovered, the system is ready to accept input that overrides the
default behavior of conducting a normal boot. But after the last icon or name is displayed, the
system starts to use the bootlist to find the boot image and it is too late to change it. One of the
keyboard actions you can do during this brief period is to press the numeric 1 key to request the
system boot to SMS.

SMS on LPAR systems


From the HMC to start SMS by using the Advanced Settings -> Boot Mode -> System
Management Services option when activating your LPAR. Activate the partition by using the SMS
boot mode. Do this action by selecting your LPAR in the HMC UI, clicking on Action -> Activate
and then clicking Advanced Settings. In the Boot Mode drop down list, select SMS. The partition
stops at the SMS menu.
Let’s see how you change the bootlist in SMS.

© Copyright IBM Corp. 2009, 2024 16-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Working with bootlists in SMS (1 of 2)


System Management Services

Main Menu
Multiboot

1. Select Language
1. Select Install/Boot Device
2. Setup Remote IPL (Initial Program Load)
2. Configure Boot Device Order
3. Change SCSI Settings 3. Multiboot Startup <OFF>
4. Select Console

5. Select Boot Options ===> 2

===> 5

Select Device Type


Configure Boot Device Order 1. Tape
1. Select 1st Boot Device 2. CD/DVD
2. Select 2nd Boot Device 3. Hard Drive
3. Select 3rd Boot Device
4. Network
4. Select 4th Boot Device
5. Select 5th Boot Device 5. None
6. Display Current Setting 6. List All Devices
7. Restore Default Setting ===> 6
===> 1

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-10. Working with bootlists in SMS (1 of 2)

Working with the bootlist


The System Management Service Main Menu lists:
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
In the System Management Service menu, pick Select Boot Options to work with the bootlist.
The next screen is the Multiboot menu that lists:
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup <OFF>
4. SAN Zoning Support
With option 1, you select a specific device to boot from right now. With option 2, you can modify
the customized bootlists. Option 3 is a toggle that has the system stop at this Multiboot menu
every time it boots, or continue with the normal boot sequence.
The focus here is the second option, used to modify the customized bootlist. The Configure
Bootlist Device Order panel lists:
1. Select 1st Boot Device

© Copyright IBM Corp. 2009, 2024 16-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
2. Select 2nd Boot Device
3. Select 3rd Boot Device
4. Select 4th Boot Device
5. Select 5th Boot Device
6. Display Current Setting
1. Restore Default Setting
You can either list or modify the bootlist. You select which position in the bootlist you want to
modify and then it lists possible device type to obtain a list of device to select:
1. Tape
2. CD/DVD
3. Hard Drive
4. Network
5. None
2. List All Devices
Select the device type. If there are not many bootable devices, it is sometimes easier to use the
List All Devices option.
Finally, you would select a specific device to place in that position of the bootlist, as illustrated in
the next visual.
It is important to understand that when SMS is used to modify the bootlist, both the normal
bootlist and the service bootlist are modified. If you wanted them to be different, you need to
customize them later when you have a command prompt (such as in multiuser mode).
When you use SMS to change the bootlist, you are changing both the normal and service
customizable bootlists. After fixing the problem, you might want to use the bootlist command to
change them.
The following keys are used (follow with the HMC identifying text):
• F1 or numeric 1: Start System Management Services.
• F5 or numeric 5: Boot in diagnostic mode, use default bootlist.
• F6 or numeric 6: Boot in diagnostic mode, use nondefault bootlist.
The default bootlist is set to diskette, CD, internal disk, and any communication adapter.
To boot diagnostics from disk, do not insert a CD and request to use the default bootlist (press the
appropriate key (F5/numeric 5) or specify with HMC).
Boot versus Multiboot 
Under Select Boot Options, there is a Multiboot mode item. Multiboot Startup is a toggle that
turns multiboot mode either ON or OFF. If you turn it on, the system will boot to an SMS menu
every time you boot the system in normal mode. For example, you might have different versions of
AIX on different disks and want to specify which version to boot. If an SMS menu is displayed
when doing a normal boot, the Multiboot Startup toggle might be the reason.

© Copyright IBM Corp. 2009, 2024 16-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
After the category of boot device is selected, you need to select the device to use in the identified
position in the bootlist.

© Copyright IBM Corp. 2009, 2024 16-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Working with bootlists in SMS (2 of 2)


Select Device
Device Current Device
Number Position Name
1. - Interpartition Logical LAN
( loc=U8286.42A.2143F9V-V6-C2-T1 )
2. 1 SCSI 6143 MB Harddisk, part=2 (AIX 7.3.0)
( loc=U8286.42A.2143F9V-V6-C4-T1-L8100000000000000 )
3. - SCSI CD-ROM
( loc=U8286.42A.2143F9V-V6-C4-T1-L8200000000000000
Select Task )
4. None
===> 2 SCSI 6143 MB Harddisk, part=2 (AIX 7.3.0)
( loc=U8286.42A.2143F9V-V6-C4-T1-L8100000000000000 )

1. Information
2. Set Boot Sequence: Configure as 1st Boot Device
Current Boot Sequence
===> 2
1. SCSI 6143 MB Harddisk, part=2 (AIX 7.3.0)
( loc=U8286.42A.2143F9V-V6-C4-T1-
L8100000000000000 )
2. None
3. None
4. None
System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-11. Working with bootlists in SMS (2 of 2)

Selecting bootlist devices


You are presented with list of devices to select from. For example:
1. - Interpartition Logical LAN
( loc=U8286.42A.2143F9V-V6-C2-T1 )
2. 1 SCSI 6143 MB Harddisk, part=2 (AIX 7.3.0)
( loc=U8286.42A.2143F9V-V6-C4-T1-L8100000000000000 )
3. - SCSI CD-ROM
( loc=U8286.42A.2143F9V-V6-C4-T1-L8200000000000000 )
For each position in the bootlist, you can select a device. The location code that is provided with
each device in the list helps you to uniquely identify devices that otherwise might be confused.
Next, you are presented with a Select Task panel that provides the following options:
1. Information
2. Set Boot Sequence: Configure as 1st Boot Device
After you select a device, you need to set that selection.
You can repeat this action for each position in the bootlist. The other option is to clear a device by
specifying none as an option for that position.
Exiting out of SMS always triggers a boot attempt. If you did not specify a particular device for this
boot, it uses the bootlist set in SMS.
Let’s discuss how to handle a corruption of the boot logical volume.

© Copyright IBM Corp. 2009, 2024 16-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Boot device alternatives (1 of 2)


• Boot device is either:
ƒ First one found with a boot image in the bootlist.
ƒ Device specified in SMS Select Install/Boot Device.
• If the boot device is removable media (CD, DVD, tape):
ƒ Boots to the Install and Maintenance menu.
• If the boot device is a network adapter:
ƒ Boot result depends on NIM configuration for client machine:
í nim –o bos_inst Install and Maintenance menu
í nim –o maint_boot Maintenance menu
í nim –o diag Diagnostic menu

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-12. Boot device alternatives (1 of 2)

Boot alternatives
The device where the system boots is the first device that it finds in the designated bootlist.
Whenever the effective boot device is bootable media, such as a mksysb tape/CD/DVD or
installation media, the system will boot to the Installation and Maintenance menu.
If the booting device is a network adapter, the mode of boot depends on the configuration of the
NIM server that services the network boot request. If the NIM server is configured to support an
AIX installation or a mksysb recover, then the system will boot to Install and Maintenance. If the
NIM server is configured to serve out a maintenance image, then the system boots to a
Maintenance menu (a submenu of Installation and Maintenance). If the NIM server is
configured to serve out a diagnostic image, then boot to a diagnostic mode.
There are other ways to boot to a diagnostic utility. If the booting device is a CD/DVD with a
diagnostic CD/DVD in the drive, boot into that diagnostic utility. If a service mode boot is
requested and the booting device is a hard disk with a boot logical volume, then the system boots
into the diagnostic utilities.
The system can be signaled which bootlist to use during the boot process. The default is to use the
normal bootlist and boot in a normal mode. The bootlist can be changed during a window of
opportunity between when the system discovers the keyboard and before it commits to the
default boot mode. The signal can be generated from the system console (HMC virtual terminal) or
from a service processor attached workstation (such as an HMC).
The keyboard signal that is used can vary from firmware to firmware. But, the most common is a
numeric 5 to indicate that the firmware should use the service bootlist and a numeric 6 to indicate
that the firmware should use the customizable service bootlist. Either of these special keyboard

© Copyright IBM Corp. 2009, 2024 16-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
signals result in a service mode boot, which can cause a boot to diagnostic mode when booting off
a boot logical volume on your hard disk.
With an HMC, you can specify which signal to send as part of the LPAR activation. Even if you
forget to override the default boot mode (usually normal to multiuser), you can still use the virtual
console keyboard to override the action after the keyboard is discovered.
Let’s continue to look at the factors that affect boot behavior.

© Copyright IBM Corp. 2009, 2024 16-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Boot device alternatives (2 of 2)


• If the boot device is a disk:
ƒ Boot depends on use of service mode:
í Normal mode boot - Boot to multiuser
í Service mode boot - Diagnostic menu
í Two types of service mode boots:
Requesting default service bootlist (key 5)
Requesting customized service bootlist (key 6)

• HMC advanced boot options support all of the above.


ƒ Normal boot
ƒ Diagnostic with default bootlist
ƒ Diagnostic with stored bootlist

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-13. Boot device alternatives (2 of 2)

Booting off a disk with a boot logical volume (BLV)


When the boot device is a disk on your system, the disk must have a valid boot logical volume to
be successful. The result of the boot depends upon the mode of the boot. If booting in normal
mode, the system is booted up into multiuser mode (the default run level of the inittab). If doing a
service mode boot (that uses either default bootlist or the customizable service mode bootlist),
then the system runs a diagnostics program and present a diagnostics menu.
When using the HMC advanced activation options, you can set the mode of your boot and, if
service mode, which boots list to use: default or stored (customized service).
Let’s look at booting to maintenance mode.

© Copyright IBM Corp. 2009, 2024 16-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Accessing a system that will not boot


HMC
Advance Activate options: Boot the system from
Default bootlist • BOS CD/DVD
• Tape
• Network device (NIM)

Select maintenance mode

Maintenance

1. Access a Root Volume Group


2. Copy a System Dump to Media Perform corrective actions
3. Access Advanced Maintenance
4. Install from a System Recover data
Backup

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-14. Accessing a system that will not boot

Introduction
The visual shows an overview of how to access a system that will not boot normally. The
maintenance mode can be started from an AIX CD/DVD, an AIX bootable tape (like a mksysb), or
a network device that can access a NIM master. The devices that contain the boot media must be
stored in the bootlists.

Boot into maintenance mode


To boot into maintenance mode:
• AIX 5.3, AIX 6.1, AIX 7.1, AIX 7.2, AIX 7.3 systems support the bootlist command and booting
from a mksysb tape, but by default, the tape device is, not part of the boot sequence.
• If planning to boot off media in an LPAR environment, check that the device adapter slot is
allocated to the LPAR in question. If not, you might need to update the partition profile to
allocate that device. If the device is allocated to another LPAR, then you need to first
deallocate it from that other LPAR.Use a dynamic LPAR operation on the HMC to allocate that
slot.
• If using the default bootlist, the sequence is fixed and the CD/DVD drive is the first practical
device.
• If you are not using SMS for this boot and are using a tape drive or a network adapter as your
boot device, then you need to use one of the customizable bootlists. In this situation, it is
usually the service bootlist.
▪ Verify your bootlist, but do not forget that some machines do not have a service bootlist.
Check that your boot device is part of the bootlist:

© Copyright IBM Corp. 2009, 2024 16-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
○ # bootlist -m service -o
• If you want to boot from your internal tape device, you need to change the bootlist because
the tape device by default is not part of the bootlist. For example:
○ # bootlist -m service rmt0 hdisk0
• Whichever bootlist you are using, insert the boot media (either tape or CD/DVD) into the drive.
• Power on the system (or activate the LPAR). The system begins booting from the
installation media. After several minutes, c31 is displayed in the LED/LCD panel (or as the
reference code on the HMC display). c31 means that the software is prompting on the console
for input (normally to select the console device and then select the language). For an LPAR,
you need to have the virtual console started to interact with the prompts.
• Normally, you are prompted to select the console device and then select the language. After
making these selections, you see the Installation and Maintenance menu.
For partitioned systems with an HMC, you would normally use the HMC to access SMS and then
select the bootable device, which would bypass the use of a bootlist. You can also use a NIM
server to boot to maintenance. You would need to place your system’s network adapter in your
customized service bootlist before any other bootable devices. Or, use SMS to specifically request
boot over that adapter (the latter option is most common). Here is an example of setting the
service boot list: # bootlist -m service ent0 gateway=192.168.1.1
bserver=192.168.10.3 client=192.168.1.57
You would also need to set up the NIM server to provide a boot image for doing a maintenance
boot. For example, at the NIM server: # nim -o maint_boot -spot <spotname> <client
machine object name>

Use the correct installation media or SPOT


Be careful to use the correct AIX installation CD/DVD (or NIM spot, or mksysb tape) to boot your
machine. For example, you should not boot an AIX 7 installed machine with an AIX 6 installation
CD/DVD. You must match the version, release, and maintenance level. The same applies to the
NIM spot level when using a network boot with NIM as the server of the boot image. A common
error that you might experience, if there is a mismatch, is an infinite loop of /etc/getrootfs errors
when trying to access the rootvg in maintenance mode.
Typically what causes the system to boot into the Installation and Maintenance menu is because
the system booted from the installation media. It does not matter if the system is booted in
normal mode (that uses the normal bootlist) or service mode (that uses the default or
customizable service bootlists). It is only important to find bootable installation media (tape,
CD/DVD, or network server) in the bootlist before anything else (such as a BLV or a Diagnostic
CD/DVD). With some SMS facilities, you can specify a particular device to use and bypass the
bootlists entirely.
Let’s take a look at the maintenance mode menus that are available.

© Copyright IBM Corp. 2009, 2024 16-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Booting in maintenance mode


Welcome to Base Operating System
Define the Installation and Maintenance
System Console
Type the number of your choice and press Enter.
Choice is indicated by >>>.

1 Start Install Now with Default Settings


2 Change/Show Installation Settings and Install
>>> 3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)
5 Select Storage Adapters

>>> Choice [1]: 3

Maintenance

Type the number of your choice and press Enter.

>>> 1 Access a Root Volume Group


2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
5 Configure Network Disks (iSCSI)
6 Select Storage Adapters

>>> Choice [1]: 1

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-15. Booting in maintenance mode

First steps
When booting in maintenance mode, you first must identify the system console that is used. For
example, your virtual console (vty), graphic console (lft), or serial attached console (tty that is
attached to the S1 port). After selecting the console, the Installation and Maintenance menu is
shown:
1 Start Install Now with Default Settings
2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)
5 Select Storage Adapters
To work in maintenance mode, use selection 3 to start the Maintenance menu:
1 Access a Root Volume Group
2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
5 Configure Network Disks (iSCSI)
6 Install from a System Backup
In a network boot that uses NIM, the console goes straight to the maintenance menu. From this
point, access the rootvg to run any system recovery steps that might be necessary.

© Copyright IBM Corp. 2009, 2024 16-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
You might, optionally, provide a brief explanation of what other steps might be run in the
Maintenance menu. Copy a memory dump to a removable media like a tape, accessing an
advanced maintenance shell where no rootvg is available, restoring a mksysb tape.
Let’s describe how to access the rootvg.

© Copyright IBM Corp. 2009, 2024 16-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Working in maintenance mode


Access a Root Volume Group

Type the number for a volume group to display the logical volume
information
and press Enter.

1) Volume Group 00c35ba000004c00000001153ce1c4b0 contains these


disks:
hdisk1 70006 02-08-00 hdisk0 70006 02-08-00
Choice: 1

Volume Group Information

-----------------------------------------------------------------------------
Volume Group ID 00c35ba000004c00000001153ce1c4b0 includes the following
logical volumes:

hd5 hd6 hd8 hd4 hd2 hd9var


hd3 hd1 hd10opt
-----------------------------------------------------------------------------
Type the number of your choice and press Enter.
1) Access this Volume Group and start a shell
2) Access this Volume Group and start a shell before mounting filesystems
99) Previous Menu
Choice [99]: 1
System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-16. Working in maintenance mode

Select the correct volume group


When accessing the rootvg in maintenance mode, you need to select the volume group that is the
rootvg. The Access a Root Volume Group panel displays all detected volume groups and the
disks that comprise these volume groups. Only the volume group IDs are shown and not the
names of the volume groups. Check with your system documentation that you select the correct
disk. Do not rely too much on the physical volume name but instead rely more on the PVID, VGID,
or SCSI ID.
After selecting the volume group, it will show the list of logical volumes that are contained in the
volume group. Confirm that the rootvg is selected. Two selections are then offered:
• Access this Volume Group and start a shell.
• Access this Volume Group and start a shell before mounting file systems.

Access this volume group and start a shell


When you choose this selection, the rootvg is activated (with the varyonvg command), and all file
systems that belong to the rootvg are mounted. A shell is started which can be used to run any
system recovery steps. Typical scenarios where this selection must be chosen are:
• Changing a forgotten root password
• Re-creating the boot logical volume
• Changing a corrupted bootlist

© Copyright IBM Corp. 2009, 2024 16-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
Access this volume group and start a shell before mounting file systems
When you choose this selection, the rootvg is activated, but the file systems that belong to the
rootvg are not mounted. A typical scenario where this selection is chosen is when a corrupted file
system needs repair by the fsck command. Repairing a corrupted file system is only possible if
the file system is not mounted. Another scenario might be a corrupted hd8 transaction log. Any
changes that take place in the superblock or i-nodes are stored in the log logical volume. When
these changes are written to disk, the corresponding transaction logs are removed from the log
logical volume. The logform command reinitializes a corrupted transaction log, which is only
possible, when no file systems are mounted. After initializing the log device, you need to do a file
system repair for all file systems that use this transaction log. You must explicitly specify the file
system type: JFS or JFS2:
# logform -V jfs2 /dev/hd8
# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# exit
Keep in mind that US keyboard layout is used but you can use the retrieve function by using the
commands set -o emacs or set -o vi.
Let’s see where we can look to find information about boot errors.

© Copyright IBM Corp. 2009, 2024 16-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Topic 1 objectives
• Describe the boot process through to loading the boot logical volume. Describe the contents of
the boot logical volume
• Adjust the bootlist for the wanted order of search
• Re-create the boot logical volume on a system that fails to boot

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-17. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 16-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

How to fix a corrupted BLV

1 Boot to maintenance 2 Select volume group


mode from bootable that contains hd5.
media:
CD/DVD, tape, or NIM

Maintenance

1 Access a Root Volume Group

Rebuild # bosboot -ad /dev/hdisk0


3 # sync
BLV.
# sync
# reboot

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-18. How to fix a corrupted BLV

Maintenance mode
If the boot logical volume is corrupted (for example, bad blocks on a disk might cause a corrupted
BLV), the machine will not boot. To fix this situation, you must boot your machine in maintenance
mode, from a CD/DVD or tape. If NIM is set up for a machine, you can also boot the machine from
a NIM master in maintenance mode. NIM is a very common way to do special boots in a logical
partition environment.

Re-creating the boot logical volume


After booting from CD/DVD, tape or NIM an Installation and Maintenance menu is shown and
you can start the maintenance mode. After accessing the rootvg, you can repair the boot logical
volume with the bosboot command. You need to specify the corresponding disk device, for
example hdisk0:
# bosboot -ad /dev/hdisk0
# sync
# sync
# reboot
The sync commands flush any file data in memory cache to disk. While you would normally use a
shutdown command, in maintenance mode it is appropriate to use the reboot command.
The bosboot command requires that the boot logical volume (hd5) exists and is valid. The boot
logical volume might be deleted by mistake or the LVCB of the boot logical volume might be
damaged. If you need to re-create the BLV from scratch, the following steps should be followed:
1. Boot your machine in maintenance mode (from CD/DVD or tape (numeric 5) or use (numeric 1)
to access the Systems Management Services (SMS) to select boot device).

© Copyright IBM Corp. 2009, 2024 16-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty
2. Remove the old hd5 logical volume, if it exists.
# rmlv hd5
3. Clear the boot record at the beginning of the disk.
# chpv -c hdisk0
4. Create an hd5 logical volume: one physical partition in size, must be in rootvg and outer edge
as intrapolicy. Specify boot as logical volume type.
# mklv -y hd5 -t boot -a e rootvg 1
5. Run the bosboot command as described on the visual.
# bosboot -ad /dev/hdisk0
6. Check the actual bootlist.
# bootlist -m normal –o
7. Write data immediately to disk.
# sync
# sync
8. Reboot the system.

# reboot
By using the internal command ipl_varyon -i, you can check the state of the boot record.
Be careful to use the correct AIX installation CD/DVD to boot your machine. Consider installing the
AIX base media and then applying patches to the OS. The patches change both kernel routines
AND libc. These patches invalidate the use of the installation CD/DVDs to boot the system into
maintenance mode and access the disks. The reason is because when you boot, you use the /unix
and libraries from the CD/DVD. Since they all match, this situation should not be an issue. As you
activate the rootvg, the root (/) file system from the CD/DVD is overlaid with the root (/) file
system from the disks. Now, any references to /unix are resolved to the DISK! If this /unix does
not match what you booted from on the CD/DVD, bad things can happen. The same applies for
libraries that are referenced.
Time for review questions.

© Copyright IBM Corp. 2009, 2024 16-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Review questions (1 of 2)
1. True or false: You must have AIX loaded on your system to use the System Management
Services programs.

2. Your AIX system is powered off. AIX is installed on hdisk1 but the bootlist is set to boot from
hdisk0. How can you fix the problem and make the machine boot from hdisk1?

3. Your machine is booted and is at the # prompt. What is the command that displays the normal
bootlist?

4. Your machine is booted and is at the # prompt. How might you change the normal bootlist?

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-19. Review questions (1 of 2)

© Copyright IBM Corp. 2009, 2024 16-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Review answers (1 of 2)
1. True or false: You must have AIX loaded on your system to use the System Management
Services programs.
The answer is false: SMS is part of the Power server built-in firmware.
2. Your AIX system is powered off. AIX is installed on hdisk1 but the bootlist is set to boot from
hdisk0. How can you fix the problem and make the machine boot from hdisk1?
The answer is you need to boot the SMS programs and set the new boot list to include hdisk1.
3. Your machine is booted and is at the # prompt. What is the command that displays the normal
bootlist?
The answer is # bootlist -m normal –o.
4. Your machine is booted and is at the # prompt. How might you change the normal bootlist?
The answer is # bootlist -m normal device1 device2.

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-20. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 16-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Review questions (2 of 2)
5. What command is used to build a new boot image and write it to the boot logical volume?

6. What script controls the boot sequence?

7. True or false: During the AIX boot process, the AIX kernel is loaded from the root file system.

8. How do you boot an AIX machine into maintenance mode?

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-21. Review questions (2 of 2)

© Copyright IBM Corp. 2009, 2024 16-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Review answers (2 of 2)
5. What command is used to build a new boot image and write it to the boot logical volume?
The answer is bosboot -ad /dev/hdiskx.

6. What script controls the boot sequence?


The answer is rc.boot.

7. True or false: During the AIX boot process, the AIX kernel is loaded from the root file system.
The answer is false: the AIX kernel is loaded from hd5.

8. How do you boot an AIX machine into maintenance mode?


The answer is you need to boot from an AIX DVD, mksysb, or NIM server.

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-22. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 16-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Exercise

System initialization: Accessing a boot image

System initialization: Accessing a boot image © Copyright IBM Corporation 2024

Figure 16-23. Exercise

© Copyright IBM Corp. 2009, 2024 16-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 16. System initialization: Accessing a boot image

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the boot process through to loading the boot logical volume
ƒ Describe the contents of the boot logical volume
ƒ Re-create the boot logical volume on a system that fails to boot
ƒ Adjust the bootlist for the wanted order of search

© Copyright IBM Corporation 2024

Figure 16-24. Unit summary

© Copyright IBM Corp. 2009, 2024 16-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Unit 17.System initialization: rc.boot and


inittab
Estimated time
01:25

Overview
This unit describes the final stages of the boot process and outlines how devices are configured
for the system. Common boot errors are described and how they can be analyzed to fix boot
problem.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Booting the system
https://www.ibm.com/docs/en/aix/7.3?topic=boot-booting-system
AIX Version 7.3 Processing the system boot
https://www.ibm.com/docs/en/aix/7.3?topic=process-processing-system-boot
AIX Version 7.3 Boot problem diagnostics
https://www.ibm.com/docs/en/aix/7.3?topic=startup-boot-problem-diagnostics
AIX Version 7.3 inittab
https://www.ibm.com/docs/en/aix/7.3?topic=files-inittab-file

© Copyright IBM Corp. 2009, 2024 17-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Identify the steps in system initialization from loading the boot image to
boot completion
ƒ Analyze and solve boot problems

© Copyright IBM Corporation 2024

Figure 17-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 17-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Topic 1 objectives
• Identify the steps in system initialization from loading the boot image to boot completion
• Analyze and solve boot problems

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-2. Topic 1 objectives

There are many reasons for boot failures. The hardware might be damaged or due to user errors,
the operating system might not be able to complete the boot process. A good knowledge of the
AIX boot process is a prerequisite for all AIX system administrators.
Let’s start with an overview of the AIX boot process.

© Copyright IBM Corp. 2009, 2024 17-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

System software initialization overview

Load kernel and pass control

/
Restore RAM file system from
boot image etc dev mnt usr

Start init process Configure base


rc.boot 1 devices
(from RAMFS)

rc.boot 2 Activate rootvg

Configure remaining
Start "real" init process rc.boot 3 devices
(from rootvg)

/etc/inittab
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-3. System software initialization overview

Boot sequence
The visual shows the boot sequence after loading the AIX kernel from the boot image. The AIX
kernel gets control and executes the following steps:
1. The kernel restores a RAM file system into memory by using information that is provided in the
boot image. At this stage, the rootvg is not available, so the kernel needs to work with
commands provided in the RAM file system. You can consider this RAM file system as a small
AIX operating system.
2. The kernel starts the init process that was provided in the RAM file system (not from the root
file system). This init process runs a boot script rc.boot.
3. rc.boot controls the boot process. In the first phase, (it is called by init with rc.boot 1), the
base devices are configured. In the second phase (rc.boot 2), the rootvg is activated (or varied
on).
4. After activating the rootvg at the end of rc.boot 2, the kernel mounts over the RAM file
system with the file systems from rootvg. The init from the root file system, hd4 replaces the
boot image in the kernel.
5. This init processes the /etc/inittab file. Out of this file, rc.boot is called a third time
(rc.boot 3) and all remaining devices are configured.
Keep in mind that at the beginning of the boot process, no rootvg is available. Before activating
the rootvg, all devices that are needed to vary on the rootvg must be configured.
Let us first look at what is stored in the boot logical volume (BLV).

© Copyright IBM Corp. 2009, 2024 17-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Contents of the boot logical volume (hd5)

AIX Kernel RAMFS Reduced ODM

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-4. Contents of the boot logical volume (hd5)

Contents of the BLV


• AIX kernel
The AIX kernel is the core of the operating system and provides basic services like process,
memory, and device management. The AIX kernel is always loaded from the boot logical
volume. There is a copy of the AIX kernel in the hd4 file system (under the name /unix), but
this program has no role in system initialization. Never remove /unix. Because it is used for
rebuilding the kernel in the boot logical volume.
• RAMFS
This RAMFS is a reduced or miniature root file system that is loaded into memory and used as
if it were a disk-based file system. The contents of the RAMFS are slightly different depending
on the type of system boot:
Type of bootContents of RAM file system
Boot from system hard diskPrograms and data necessary to access rootvg and bring up the
rest of AIX. When booted from in service mode, it will boot a diagnostics facility.
Boot from the Installation CD-ROMPrograms and data necessary to install AIX or perform
software maintenance.
Boot from Diagnostics CD-ROMPrograms and data necessary to run stand-alone diagnostics.
• Reduced ODM
The boot logical volume contains a reduced copy of the ODM. During the boot process, many
devices are configured before hd4 is available. For these devices, the corresponding ODM files
must be stored in the boot logical volume.

© Copyright IBM Corp. 2009, 2024 17-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
The term reduced ODM means that device support is available only for devices that are marked as
base devices in PdDv. The protofiles (in /usr/lib/boot and /usr/lib/boot/protoext) are used by the
bosboot command to determine which files should be put into the RAMFS image that is included
in the boot image.
Having built some basic concepts about the boot logical volume, let us look at how it is used to
boot AIX.

© Copyright IBM Corp. 2009, 2024 17-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot 1

Failure LED
Process 1 rootvg is not active
F05 init

c06
rc.boot 1
Boot image
ODM

restbase
548 510
RAM file system
ODM
cfgmgr -f

bootinfo -b Devices to activate rootvg


511 are configured!

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-5. rc.boot 1

rc.boot phase 1 actions


The init process started from the RAM file system, runs the boot script rc.boot 1. If init fails for
some reason (for example, a bad boot logical volume), c06 is shown on the LED display. The most
common defect in the boot logical volume is missing device drivers; this defect is solved by
rebuilding the boot image with the needed drive drivers included. The following steps are run
when rc.boot 1 is called:
1. The restbase command is called which copies the ODM from the boot image into the RAM file
system. After this step, an ODM is available in the RAM file system. The LED shows 510 (DEV
CFG 1 START) if restbase completes successfully; otherwise, LED 548 (RESTBASE FAILED) is
shown.
2. When restbase completes successfully, the configuration manager, cfgmgr, is run with the
option -f (first). cfgmgr reads the Config_Rules object class and runs all methods that are
stored under phase=1. Phase 1 configuration methods result in the configuration of base
devices into the system, so that the rootvg can be activated in the next rc.boot phase.
3. Base devices are all devices that are necessary to access the rootvg. If the rootvg is stored on
a hdisk0, all devices from the system board to the disk itself must be configured to be able to
access the rootvg.
4. At the end of rc.boot 1, the system determines the last boot device (used to establish the
/dev/ipldevice link) by calling bootinfo -b. The LED shows 511 (DEV CFG 1 END), followed by
553 (PHASE 1 COMPLETE).
Note: The LED values shown in the visual are sample LED values and can be different from
different architectures. Some LED values tend to be different on different machines. All values are
not shown here.

© Copyright IBM Corp. 2009, 2024 17-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
Remember the following important information:
1. When rc.boot 1 runs, there is no access to rootvg.
2. When rc.boot 1 is finished, all devices are configured to activate the rootvg in rc.boot 2.
Let’s examine what happens in rc.boot 2.

© Copyright IBM Corp. 2009, 2024 17-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot 2 (1 of 2)

Failure LED rc.boot 2


551

552 554 517 rootvg


ipl_varyon
hd4: hd2: hd9var:
hd6
555 / /usr /var
fsck -f /dev/hd4
mount /dev/hd4 / copycore
557
if dump,
fsck -f /dev/hd2 copy

518 517 mount /usr dev etc mnt usr var

fsck -f /dev/hd9var
517 mount /var /
518 copycore RAM file system
umount /var

556 swapon /dev/hd6

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-6. rc.boot 2 (1 of 2)

rc.boot phase 2 actions (part 1)


rc.boot is run for the second time and is passed the parameter 2. The LED shows 551
(VARYON_IPLDEV). The following steps take part in this boot phase:
1. The rootvg is varied on with a special version of the varyonvg command that is designed to
handle rootvg. If ipl_varyon completes successfully, 517 (MOUNT ROOT) is shown on the LED,
otherwise one of the following codes are shown, and the boot process stops:
▪ 552 (IPLVARYON ERROR)
▪ 554 (UNKNOWN BOOT DISK)
▪ 556 (LVM_QUERY ERROR)
2. fsck checks the root file system, hd4. The option -f means that the file system is checked only
if it was not unmounted cleanly during the last shutdown. This check improves the boot
performance. If the check fails, LED 555 (FSCK ERROR) is shown.
3. Afterward, /dev/hd4 is mounted directly onto the root (/) in the RAM file system. If the mount
fails, for example due to a corrupted JFS log, the LED 557 (ROOT MNT FAILED) is shown and the
boot process stops.
4. Next, /dev/hd2 is checked and mounted (again with option -f, it is checked only if the file
system wasn't unmounted cleanly). If the mount fails, LED 518 (/USR MOUNT FAILED) is
displayed and the boot stops.
5. Then, the /var file system is checked and mounted. This check is necessary at this stage
because the copycore command checks if a memory dump occurred. If a memory dump
exists in a paging space device, it is copied from the memory dump device, /dev/hd6, to the
copy directory that is by default the directory /var/adm/ras. /var is unmounted afterward. If
the /var mount fails, LED 518 (/VAR MOUNT FAILED) is displayed and the boot stops.

© Copyright IBM Corp. 2009, 2024 17-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
6. The primary paging space /dev/hd6 is made available.

Special root syntax in RAMFS


After the disk-based root file system is mounted over the RAMFS, the syntax that is used in
rc.boot to access the RAMFS files is different:
• RAMFS files are accessed by using a prefix of /../. For example, to access the fsck command
in the RAMFS (before the /usr file system is mounted), rc.boot uses /../usr/sbin/fsck.
• Disk-based files are accessed by using normal AIX file syntax. For example, to access the fsck
command on the disk (after the /usr file system is mounted) rc.boot uses /usr/sbin/fsck.

Note

This syntax works only during the boot process. If you boot from the CD/DVD into maintenance
mode and need to mount the root file system manually, you need to mount it over another
directory, such as /mnt. Otherwise, you are unable to access the RAMFS files.

There are two categories of status codes: SHOWLED codes and loopled codes. The SHOWLED
code is inside the graphic boxes and denotes the progress of the script. Seeing these codes
indicates that the specified operation is hung. The loopled codes are shown outside of the graphic
boxes and denote specific failures that stop the boot process. The text in capitals and in
parenthesis in the student notes is part of the LED message that you would see on the server
physical LED display. With a logically partitioned system, the HMC shows only the numeric code.
Beginning with AIX 5L V5.1, the rootvg file system is mounted directly over the root directory in
the RAMFS. This mount simplifies several steps during phase 2 and eliminates the need to
remount the rootvg file systems at the end of phase 2.
In many reference documents, LED 518 is defined as indicating that the /usr file system might not
mount by using the network. This definition is incorrect. LED 518 displays anytime /usr cannot be
mounted.
Let’s examine the second part of rc.boot 2.

© Copyright IBM Corp. 2009, 2024 17-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot 2 (2 of 2)

swapon /dev/hd6 rootvg

hd4: hd2: hd9var:


hd6
Copy RAM /dev files to disk: / /usr /var
mergedev

Copy RAM ODM files to disk:


cp /../etc/objrepos/Cu* dev etc
/etc/objrepos ODM

mount /var
dev etc mnt usr var
ODM
Copy boot messages to
alog /
RAM file system
Kernel removes RAMFS

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-7. rc.boot 2 (2 of 2)

rc.boot phase 2 actions (part 2)


After the paging space /dev/hd6 is available, the following tasks are run in rc.boot 2:
1. To understand this step, remember two things:
▪ /dev/hd4 is mounted onto root (/) in the RAM file system.
▪ In rc.boot 1, cfgmgr runs and all base devices are configured. This configuration data
writes into the ODM of the RAM file system.
- Now, mergedev is called and all /dev files from the RAM file system are copied to disk.
2. All customized ODM files from the RAM file system ODM are copied to disk as well. At this
stage, both ODMs (in hd5 and hd4) are in sync.
3. The /var file system (hd9var) is mounted.
4. All messages during the boot process are copied into a special file. You must use the alog
command to view this file: # alog -t boot -o
As no console is available at this stage all boot information is collected in this file.
When rc.boot 2 is finished, the /, /usr, and /var file systems in rootvg are active.

Final stage
At this stage, the AIX kernel removes the RAM file system (returns the memory to the free
memory pool) and starts the init process from the root (/) file system in rootvg.
Next, we’ll look at rc.boot 3.

© Copyright IBM Corp. 2009, 2024 17-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot 3 (1 of 2)

Process 1 /etc/inittab:
init /sbin/rc.boot 3 553

fsck -f /dev/hd3
Here, you work with mount /tmp 517 518
rootvg

syncvg rootvg &


517

Normal: cfgmgr -p2 Config_Rules /etc/objrepos:


Service: cfgmgr -p3 ODM
phase=2
phase=3
c31 cfgcon c32
rc.dt boot
c33 c34

savebase hd5:
ODM
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-8. rc.boot 3 (1 of 2)

rc.boot phase 3 actions (part 1)


If rc.boot phase 2 completes as indicated by LED 553 (BOOT PHASE 1 COMPLETE), you can
assume that rc.boot phase 3 started. At this boot stage, the /etc/init process is started. It
reads the /etc/inittab file and runs the commands line-by-line. It runs rc.boot for the third time,
passing the argument 3 that indicates the last boot phase.
rc.boot 3 Runs the following tasks:
1. The /tmp file system is checked and mounted.
2. The rootvg is synchronized by syncvg rootvg. If rootvg contains any stale partitions (for
example, a disk that is part of rootvg was not active), these partitions are updated and
synchronized. syncvg is started as a background job.
3. The configuration manager is called again. If the boot mode is normal, the cfgmgr is called
with option -p2 (phase 2). If the boot mode is service, the cfgmgr is called with option -p3
(phase 3).
4. The configuration manager reads the ODM class Config_Rules and runs either all methods for
phase=2 or phase=3. All remaining devices that are not base devices are configured in this
step.
5. cfgcon configures the console. The numbers c31, c32, c33, or c34 are displayed depending
on the type of console:
▪ c31: Console not yet configured. Provides instruction to select a console.
▪ c32: Console is a lft (graphic display) terminal.
▪ c33: Console is a tty.
▪ c34: Console is a file on the disk.

© Copyright IBM Corp. 2009, 2024 17-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
If CDE is specified in /etc/inittab, the CDE is started and you get a graphical boot on the
console.
6. To synchronize the ODM in the boot logical volume with the ODM from the root (/) file system,
savebase is called.
The savebase command is necessary to synchronize the ODMs from hd4 (rootvg ODM repository)
and hd5 (reduced ODM in the BLV).
Let’s look at the second part of rc.boot 3.

© Copyright IBM Corp. 2009, 2024 17-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot 3 (2 of 2)
/etc/objrepos:
savebase ODM

syncd 60
errdemon

hd5:
Turn off LEDs ODM

rm /etc/nologin
A device that was previously detected
could not be found. Run "diag -a".
chgstatus=3
in CuDv ? System initialization is completed.

Execute next line in


/etc/inittab
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-9. rc.boot 3 (2 of 2)

rc.boot phase 3 actions (part 2)


After the ODMs are synchronized again, the following steps take place:
1. The syncd daemon is started. All data that is written to disk is first stored in a cache in memory
before writing it to the disk. The syncd daemon writes the data from the cache every 60
seconds to the disk. Another daemon process, the errdemon daemon, is started. This process
allows errors that are triggered by applications or the kernel to be written to the error log.
2. The LED display is turned off.
3. If the file /etc/nologin exists, it is removed. If a system administrator creates this file, a login
to the AIX machine is not possible. During the boot process, /etc/nologin is removed.
4. If devices exist that are flagged as missing in CuDv (chgstatus=3), a message is displayed on
the console. For example, this message is displayed if external devices are not powered on
during system boot.
5. The last message, System initialization completed, is written to the console. rc.boot 3 is
finished. The init process runs the next command in /etc/inittab.
The /etc/nologin file is used to prevent logging in to a system. Just the existence of the file is
needed. If any text is placed in the file, this information is displayed when user attempts to log in.
Let’s now summarize the rc.boot script.

© Copyright IBM Corp. 2009, 2024 17-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

rc.boot summary

Phase
Command Executed From Primary Actions
Config_Rules
RAM • restbase
rc.boot 1 file system 1
(/dev/ram0) • cfgmgr -f

• ipl_varyon
RAM • Mount /, /usr, /var file systems
rc.boot 2 file system
(/dev/ram0) • mergedev
• Copy ODM files

• mount /tmp
• cfgmgr -p2 2=normal
rc.boot 3 rootvg or
cfgmgr -p3 3=service
• savebase

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-10. rc.boot summary

Summary
During rc.boot 1, all base devices are configured. This configuration is done by cfgmgr -f, which
runs all phase 1 methods from Config_Rules.
During rc.boot 2, the rootvg is varied on. All /dev files and the customized ODM files from the
RAM file system are merged to disk.
During rc.boot 3, cfgmgr -p configures all remaining devices. The configuration manager reads
the Config_Rules class and runs the corresponding methods. To synchronize the ODMs, savebase
is called that writes the ODM from the disk back to the boot logical volume.
Let us look at a common problem in rc.boot phase 2 - the failure to mount the file systems
because of corruption.

© Copyright IBM Corp. 2009, 2024 17-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Topic 1 objectives
• Identify the steps in system initialization from loading the boot image to boot completion
• Analyze and solve boot problems

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-11. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 17-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Fixing corrupted file systems and logs


• Boot to maintenance mode.
• Access rootvg without mounting file systems.
• Rebuild file system log and run fsck.

# logform -V jfs2 /dev/hd8


# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# fsck -y -V jfs2 /dev/hd11admin

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-12. Fixing corrupted file systems and logs

JFS log or JFS2 log corrupted?


To fix a corrupted JFS or JFS2 log, boot in maintenance mode and access the rootvg, but do not
mount the file systems. In the maintenance shell, run the logform command and do a file system
check for all file systems that use this JFS or JFS2 log. Keep in mind what file system type your
rootvg had: JFS or JFS2. JFS2 is the most common nowadays.
For JFS:
# logform -V jfs /dev/hd8 
# fsck -y -V jfs /dev/hd1 
# fsck -y -V jfs /dev/hd2 
# fsck -y -V jfs /dev/hd3 
# fsck -y -V jfs /dev/hd4 
# fsck -y -V jfs /dev/hd9var
# fsck -y -V jfs /dev/hd10opt
# fsck -y -V jfs /dev/hd11admin
# exit
For JFS2:
# logform -V jfs2 /dev/hd8 
# fsck -y -V jfs2 /dev/hd1 
# fsck -y -V jfs2 /dev/hd2 
# fsck -y -V jfs2 /dev/hd3 
# fsck -y -V jfs2 /dev/hd4 
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt

© Copyright IBM Corp. 2009, 2024 17-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
# fsck -y -V jfs2 /dev/hd11admin
# exit
The logform command initializes a new JFS transaction log and can result in loss of data because
JFS transactions can be destroyed. Your machine will boot after the JFS log is repaired. JFS log
corruption typically happens when the system crashes or is taken down in a hard manner by the
administrator. The JFS log recovery that is described does not ensure that disk updates in process
are completed. Determining what was processed and what needs reprocessing is the
responsibility of the applications by using their transaction logs and any checkpoint processing
that was completed.
Remember that a common cause of this type of corruption is the use of the HMC shutdown
immediate option for an LPAR with a running operating system. This action is the equivalent of
cutting power to a computer while the operating system is running, which does not allow for a
proper shutdown. An administrator should always use (when possible) the HMC OS shutdown
option or run the shutdown -rl now command from the AIX LPAR command-line.
A useful diagnostic tool for system boot problems can be the alog facility. Let us look at alog.

© Copyright IBM Corp. 2009, 2024 17-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

The alog command

User Boot NIM


Install
Applications Process Process

alog program

/var/adm/ras/bootlog
Use the /var/adm/ras/BosMenus.log
alog
command
/var/adm/ras/bosinst.log
to view /var/adm/ras/nimlog
To view the boot log: logs /var/adm/ras/conslog
# alog –o –t boot /var/adm/ras/errlog

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-13. The alog command

Overview
The alog command is a BOS feature that provides a general-purpose logging facility that can be
used by any application or user to manage a log. The alog command reads standard input, writes
the output to standard out, and copies it to a fixed size file at the same time.
The log file
The file is treated as a circular log. This means that when it is filled, new entries are written over
the oldest entries. Log files that are used by alog are specified on the command line or defined in
the alog configuration database that is maintained by the ODM. The system-supported log types
are boot, bosinst, nim, and console.
Use in boot process
Many system administrators start the boot process, and then go and get a cup of coffee.
Unfortunately, boot messages might appear on the screen, only to be scrolled and lost, never to
be seen by the user. In some instances, these messages might be important, particularly if the
system did not boot properly. Fortunately, alog is used by the rc.boot script and the
configuration manager during the boot process to log important events. To view the boot
information, the command alog –o -t boot might be used. If the machine does not boot, boot
the machine into maintenance mode and view the boot log contents.
Viewing logs with SMIT
You can also use SMIT to view the different system-supported logs. Use the following command:
# smit alog

© Copyright IBM Corp. 2009, 2024 17-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
Viewing and adjusting log size
To display the size of the log run:
# alog -t boot -L
If you want to increase the size of the boot log, for example to 256 KB, issue the following
command:
# print “Resizing boot log” | alog -C -t boot -s 262144
The alog log file is required to be a fixed-size log. The administrator can configure size through
SMIT. A mechanism must also be provided for viewing the log files. The alog program maintains a
header that is containing the size of the log file, and input and output pointers. However, the log
file data contains only the data piped to the program’s STDIN. The program does not write time
stamps to the log file. In addition, the alog program does not provide concurrency control.
Therefore, if multiple processes try to write to the same log at the same time, the contents of the
log file are unpredictable. The a in alog stands for AIX.
To record the current date and time in a log file that is named /tmp/mylog, enter:
# date | alog -f /tmp/mylog
alog -L can be used to see the list of alogs available on the system.
Let us see an example on how alog is used in creating boot log.

© Copyright IBM Corp. 2009, 2024 17-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

cfgmgr output in the boot log using alog

# alog -t boot -o
----------------
attempting to configure device 'proc8'
Time: 0 LEDS: 0x811
invoking /usr/lib/methods/cfgproc_chrp -2 -l proc8
Number of running methods: 4
----------------
attempting to configure device 'pci7'
Time: 0 LEDS: 0x2022
invoking /usr/lib/methods/cfgbus_pcic -2 -l pci7
Number of running methods: 5
----------------
attempting to configure device 'vio0'
Time: 0 LEDS: 0x25b6
invoking /usr/lib/methods/cfgbus_vdevice -2 -l vio0
Number of running methods: 6
----------------
Completed method for: mem0, Elapsed time = 0
return code = 0
****************** no stdout ***********

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-14. cfgmgr output in the boot log using alog

The boot log


Because no console is available during the boot phase, the boot messages are collected in a
special file, which, by default, is /var/adm/ras/bootlog. As shown in the visual, you must use the

© Copyright IBM Corp. 2009, 2024 17-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
alog command to view the contents of this file. To view the boot log, run the command as shown,
or use the smit alog fastpath. Here is an example command and output:
# alog -t boot -o
-------------------------------------------------------
attempting to configure device 'sys0'
invoking /usr/lib/methods/cfgsys_rspc -l sys0
return code = 0
******* stdout *******
bus0
******* no stderr *****
-------------------------------------------------------
attempting to configure device 'bus0'
invoking /usr/lib/methods/cfgbus_pci bus0
return code = 0
******** stdout *******
bus1, scsi0
****** no stderr ******
-------------------------------------------------------
attempting to configure device 'bus1'
invoking /usr/lib/methods/cfgbus_isa bus1
return code = 0
******** stdout ******
fda0, ppa0, sa0, sioka0, kbd0
****** no stderr *****
If you have boot problems, it is always a good idea to check the boot alog file for potential boot
error messages. All output from cfgmgr is shown in the boot log with other information that is
produced in the rc.boot script.
To display the size of the boot log run:
# alog -t boot –L
#file:size:verbosity
/var/adm/ras/bootlog:131072:1
The default boot log file size is 128 KB. If you want to increase the size of the boot log, for
example to 256 KB, run the following command:
# print “Resizing boot log” | alog -C -t boot -s 262144
The alog is circular; meaning the oldest information is automatically overwritten by the newest
information.
Let’s review the /etc/inittab file.

© Copyright IBM Corp. 2009, 2024 17-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

/etc/inittab file
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console #
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunab
securityboot:2:bootwait:/etc/rc.security.boot > /dev/console 2>&1
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
rcemgr:23456789:once:/usr/sbin/emgr -B > /dev/null 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # ru
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
mkcifs_fs:2:wait:/etc/mkcifs_fs > /dev/console 2>&1
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1 # pb cleanup
cons:0123456789:respawn:/usr/sbin/getty /dev/console
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability

• Do not use an editor to change /etc/inittab


• Use mkitab, chitab, rmitab instead
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-15. /etc/inittab file

Purpose of /etc/inittab
The /etc/inittab file supplies information for the init process. Note how the rc.boot script is
run out of the inittab file to configure all remaining devices in the boot process.

Modifying /etc/inittab
Do not use an editor to change the /etc/inittab file. One small mistake in /etc/inittab, and your
machine will not boot. Instead, use the commands mkitab, chitab, and rmitab to edit
/etc/inittab. The advantage of these commands is that they always guarantee a non-corrupted
/etc/inittab file. If your machine stops booting with an LED 553, this code indicates a bad
/etc/inittab file in most cases.
Consider the following examples:
• To add a line to /etc/inittab, use the mkitab command. For example:
# mkitab "myid:2:once:/usr/local/bin/errlog.check"
• To change /etc/inittab so that init ignores the line tty1, use the chitab command:
# chitab "tty1:2:off:/usr/sbin/getty /dev/tty1"
• To remove the line tty1 from /etc/inittab, use the rmitab command. For example:
# rmitab tty1

© Copyright IBM Corp. 2009, 2024 17-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
Viewing /etc/inittab
The lsitab command can be used to view the /etc/inittab file. For example:
# lsitab uprintfd
uprintfd:23456789:respawn:/usr/sbin/uprintfd
If you issue lsitab -a, the complete /etc/inittab file is shown.
telinit and run levels
Use the telinit command to signal the init daemon:
• To tell the init daemon to re-read the /etc/inittab use:
# telinit q
• To tell the init daemon to reset the environment to match a different (or same) run level, use:
# telinit n (Where n is the wanted run level.)
• To query what the current run level is use:
# who -r

© Copyright IBM Corp. 2009, 2024 17-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
Example inittab:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | /usr/bin/alog -tboot > /dev/console #
Power Failure Detection
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
securityboot:2:bootwait:/etc/rc.security.boot > /dev/console 2>&1
rc:23456789:wait:/etc/rc 2>&1 | /usr/bin/alog -tboot > /dev/console # Multi-User
checks
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
aso:23456789:once:/usr/bin/startsrc -s aso
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
nimsh:2:wait:/usr/bin/startsrc -g nimclient >/dev/console 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | /usr/bin/alog -tboot > /dev/console
# run /etc/firstboot
cron:23456789:respawn:/usr/sbin/cron
clusterconf:23456789:once:/usr/sbin/clusterconf
nimclient:2:once:/usr/sbin/nimclient -S running > /dev/console 2>&1 # inform nim
we're running
piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1 # pb cleanup
cons:0123456789:respawn:/usr/sbin/getty /dev/console
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
trustedboot:2:wait:/etc/rc.trustedboot > /dev/console 2>&1 # Get trusted log and
start TCSD
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
rcwpars:2:once:/etc/rc.wpars > /dev/console 2>&1 # Corrals autostart
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
pfcdaemon:2:once:/usr/bin/startsrc -s pfcdaemon > /dev/null 2>&1
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
artex:2:wait:/usr/sbin/artexset -q -c -R
/etc/security/artex/config/master_profile.xml > /dev/console 2>&1
rcvnet:23456789:wait:/etc/rc.vnet> /dev/console 2>&1 # Start lldp/ecpvdp daemons
perfstat:2:once:/usr/lib/perf/libperfstat_updt_dictionary >/dev/console 2>&1
mbuf_resize:23456789:once:/usr/sbin/tunrestore -D 2>&1 >/dev/console # LMT buffer
resize
ha_star:h2:once:/etc/rc.ha_star >/dev/console 2>&1

© Copyright IBM Corp. 2009, 2024 17-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /var/ct/ctrmc-inittab.err 2>&1
xmdaily:2:once:/usr/bin/topasrec -L -s 300 -R 1 -r 6 -o /var/perf/daily/
-ypersistent=1 2>&1 >/dev/null #Start local binary recording
clcomd:23456789:once:/usr/bin/startsrc -s clcomd
Note that rc.boot is executed out of /etc/inittab. It is risky to edit the /etc/inittab file manually
by hand. An incorrect entry could cause a system to fail booting. Use the tools available to avoid
mistakes.
Note that LED 553 typically indicates a corrupted /etc/inittab file. The students will see this
problem in the lab exercise.
The mkitab, chitab, and rmitab commands provide automatic syntax checking. The line must
match the proper format for /etc/inittab.
There is a -i option with mkitab to insert the new line anywhere in the /etc/inittab file. Without
the -i, the line is appended to the end of the file.
Let’s review some common boot problems.

© Copyright IBM Corp. 2009, 2024 17-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Boot problem management


Symptoms Possible causes User action
or LED code
AA060011 Bad bootlist Boot SMS, update bootlist.
message: Damaged BLV Boot to maintenance, Access the rootvg.
Can’t find OS Re-create the BLV:
Image # bosboot -ad /dev/hdiskx

551, 555, 557 File system or log corrupted Rebuild journal log and fsck the file systems.
rootvg locked (only if 551) Unlock rootvg (chvg –u rootvg)
552, 554, 556 File system superblock Rebuild journal log and fsck the file systems
corrupted Or recover superblock from secondary
Reduced ODM corrupted If that fails, recover from mksysb

553 Corrupt /etc/inittab Access the rootvg. Check /etc/inittab (empty,


/etc/environment missing or corrupt?). Check /etc/environment

523 - 534 ODM files missing ODM files are missing or inaccessible.
Restore missing files from a system backup

518, 517 Failed or hung file system Check /etc/filesystem.


mount ( /usr, /var, /tmp) Check network (if remote mount), file systems
(fsck) and hardware.
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-16. Boot problem management

Introduction
The visual shows some common boot errors that might happen during the AIX software boot
process.

Bootlist wrong?
If the bootlist is wrong, the system cannot boot. This problem is easy to fix. Boot in SMS and select
the correct boot device. Keep in mind that only hard disks with boot records are shown as
selectable boot devices.

/etc/inittab corrupted? /etc/environment corrupted?


An LED of 553 usually indicates a corrupted /etc/inittab file, but in some cases a bad
/etc/environment might also lead to a 553 LED. To fix this problem, boot in maintenance mode
and check both files. Consider using a mksysb to retrieve these files from a backup tape.

Boot logical volume or boot record corrupted?


The next thing to try if your machine does not boot, is to check the boot logical volume. To fix a
corrupted boot logical volume, boot in maintenance mode and use the bosboot command:
# bosboot -ad /dev/hdisk0

© Copyright IBM Corp. 2009, 2024 17-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
JFS log or JFS2 log corrupted?
To fix a corrupted JFS or JFS2 log, boot in maintenance mode and access the rootvg, but do not
mount the file systems. In the maintenance shell, run the logform command and do a file system
check for all file systems that use this JFS or JFS2 log. Keep in mind what file system type your
rootvg had: JFS or JFS2. The logform command initializes a new JFS transaction log and might
result in loss of data because JFS transactions might be destroyed. Your machine will boot after
the JFS log is repaired.

Superblock corrupted?
Another thing that you can try is to check the superblocks of your rootvg file systems. If you boot
in maintenance mode and you get error messages like Not an AIX file system or 0506-334 Not
a recognized file system type, it is probably due to a corrupted superblock in the file system.
Each file system has two super blocks. Running fsck should automatically recover the primary
superblock by copying from the backup superblock. The following steps are provided in case you
need to do this recovery manually.
For JFS, the primary superblock is in logical block 1 and a copy is in logical block 31. To manually
copy the superblock from block 31 to block 1 for the root file system (in this example), run the
following command:
# dd count=1 bs=4k skip=31 seek=1 if=/dev/hd4 of=/dev/hd4
For JFS2, the locations are different. To manually recover the primary superblock from the backup
superblock for the root file system (in this example), run the following command:
# dd count=1 bs=4k skip=15 seek=8 if=/dev/hd4 of=/dev/hd4

rootvg locked?
Many LVM commands place a lock into the ODM to prevent other commands from working at the
same time. If a lock remains in the ODM due to a crash of a command, it might lead to a hanging
system. To unlock the rootvg, boot in maintenance mode and access the rootvg with file systems.
Run the following command to unlock the rootvg:
# chvg -u rootvg

ODM files missing?


If you see LED codes in the range 523 - 534, ODM files are missing on your machine. Use a
mksysb tape of the system to restore the missing files.

Mount of /usr or /var failed?


An LED of 518 indicates that the mount of the /usr or /var file system failed. If /usr is mounted
from a network, check the network connection. If /usr or /var are locally mounted, use fsck to
check the consistency of the file systems. If fsck does not help, check the hardware by running
diagnostics from the Diagnostics CD.
Students will experience 553 and 557 errors as are part of the lab exercise.

© Copyright IBM Corp. 2009, 2024 17-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
Note: A boot LED of AA060011 can also be due to disk reservations issues. Please the following link
for steps to diagnose and resolving this type of problem,
https://www.ibm.com/support/pages/boot-led-aa060011-due-disk-reservations.
Let’s review the /etc/inittab file format.

© Copyright IBM Corp. 2009, 2024 17-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Let's review: /etc/inittab file


init:2:initdefault:

brc::sysinit:/sbin/rc.boot 3

rc:2:wait:/etc/rc

fbcheck:2:wait:/usr/sbin/fbcheck

srcmstr:2:respawn:/usr/sbin/srcmstr

cron:2:respawn:/usr/sbin/cron

rctcpip:2:wait:/etc/rc.tcpip
rcnfs:2:wait::/etc/rc.nfs

qdaemon:2:wait:/usr/bin/startsrc -sqdaemon

tty0:2:off:/usr/sbin/getty /dev/tty1

myid:2:once:/usr/local/bin/errlog.check

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-17. Let's review: /etc/inittab file

Questions
Answer the following questions as they relate to the /etc/inittab file shown in the visual:
1. Which process does the init process start only one time?
The init process does not wait for the initialization of this process.
2. Which process is involved in print activities on an AIX system?
3. Which line does the init process ignore?
4. Which line determines that multiuser mode is the initial run level of the system?
5. Where is the System Resource Controller started?
6. Which line controls network processes?
7. Which component allows the execution of programs at a certain date or time?
8. Which line runs /etc/firstboot, if it exists?
9. Which line is run in all run levels?
10. Which line takes care of varying on the volume groups, activating paging spaces, and mounting
file systems that are activated during boot?

© Copyright IBM Corp. 2009, 2024 17-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Let’s review solution: /etc/inittab file


init:2:initdefault: Determine initial run-level

brc::sysinit:/sbin/rc.boot 3 Startup last boot phase

rc:2:wait:/etc/rc Multiuser initialization

fbcheck:2:wait:/usr/sbin/fbcheck Execute /etc/firstboot, if it exists

srcmstr:2:respawn:/usr/sbin/srcmstr Start the System Resource Controller

cron:2:respawn:/usr/sbin/cron Start the cron daemon

rctcpip:2:wait:/etc/rc.tcpip Startup communication daemon processes


rcnfs:2:wait::/etc/rc.nfs (nfsd, biod, and so forth)

qdaemon:2:wait:/usr/bin/startsrc -sqdaemon Startup spooling subsystem

tty0:2:off:/usr/sbin/getty /dev/tty1 Line is ignored by init

myid:2:once:/usr/local/bin/errlog.check Process started only one time

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-18. Let’s review solution: /etc/inittab file

Answers
1. The myid line is started only one time. The action once indicates the init process to start the
process and not to wait for its initialization. When the process ends, it is not restarted.
2. The qdaemon line. The qdaemon controls the queuing subsystem in AIX. It manages jobs in
queues and their assignment to the different queues in the system.
3. init ignores the tty0 line. The action off tells the init process to ignore this line. But: If you
change the action to off and you run the command, telinit q, the init process sends a
SIGTERM signal to the process. After 20 seconds if the process still exists, init sends a
SIGKILL signal to it.
4. The init line determines initial run level. The init command uses this entry to determine
which run level to enter initially. Run level 2 means multiuser. 1, s, m, and M mean single-user
or often called maintenance mode. brc is run at all run levels.
5. The srcmstr line starts the System Resource Controller.
6. The rctcpip line starts the communication daemon processes (inetd, named, and so forth).
a. The rcnfs line starts the NFS daemon processes (nfsd, biod, and so forth). TCP/IP and
NFS daemons are started in these scripts. Typical examples are inetd (which controls all
socket-based communication), biod (for the NFS client) or nfsd (for the NFS server)
process.
7. The cron line starts the cron daemon. The cron daemon runs shell commands at specified
dates and times. Use the crontab command to administer cron processes.
8. The fbcheck line runs /etc/firstboot, if it exists. This process runs a script /etc/firstboot,
if it exists. This script is used after the installation of an AIX system to start any customization

© Copyright IBM Corp. 2009, 2024 17-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty
steps after the reboot of the system. The program install_assist is an example of such a
program that is started after the installation.
9. Startup last boot phase. This process starts rc.boot 3 that is responsible for the final
configuration of all devices on a system. This script is run in all run levels and before the
console is configured (sysinit).
10. The rc line activates volume groups, paging spaces, and file systems during boot. Vary on all
automatic volume groups. Activate all automatic paging spaces. Mount all file systems marked
mount=true in /etc/filesystems.
Time for review questions.

© Copyright IBM Corp. 2009, 2024 17-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Review questions
1. From where is rc.boot 3 run?

2. Your system stops booting with LED 557. In which rc.boot phase does the system stop?

3. What are some reasons for this problem (LED 557)?

4. What is the likely cause if your system stops booting with LED 553?

5. What does the line init:2:initdefault: in /etc/inittab mean?

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-19. Review questions

© Copyright IBM Corp. 2009, 2024 17-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Review answers
1. From where is rc.boot 3 run?
The answer is from the /etc/inittab file in rootvg.
2. Your system stops booting with LED 557. In which rc.boot phase does the system stop?
The answer is rc.boot 2.
3. What are some reasons for this problem (LED 557)?
The answer is corrupted JFS log or damaged file system.
4. What is the likely cause if your system stops booting with LED 553?
The answer is there is a problem with processing /etc/inittab.
5. What does the line init:2:initdefault: in /etc/inittab mean?
The answer is this line is used by the init process to determine the initial run level (2=multiuser).

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-20. Review answers

© Copyright IBM Corp. 2009, 2024 17-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Exercise

System initialization: rc.boot and inittab

System initialization: rc.boot and inittab © Copyright IBM Corporation 2024

Figure 17-21. Exercise

© Copyright IBM Corp. 2009, 2024 17-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 17. System initialization: rc.boot and inittab

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Identify the steps in system initialization from loading the boot image to
boot completion
ƒ Analyze and solve boot problems

© Copyright IBM Corporation 2024

Figure 17-22. Unit summary

Highlights
• After the boot image is loaded into RAM, the rc.boot script is run three times to configure the
system.
• During rc.boot 1, devices to vary on the rootvg are configured.
• During rc.boot 2, the rootvg is varied on.
• In rc.boot 3, the remaining devices are configured.
• The init process initiates processes that are defined in the /etc/inittab file.

© Copyright IBM Corp. 2009, 2024 17-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Unit 18.The AIX system dump facility


Estimated time
00:35

Overview
This unit explains how to maintain the AIX system dump facility and how to obtain a system
dump.

How you will check your progress


• Review questions
• Exercise

References
AIX Version 7.3 System Dump Facility
https://www.ibm.com/docs/en/aix/7.3?topic=facilities-system-dump-facility

© Copyright IBM Corp. 2009, 2024 18-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Explain what is meant by a system dump
ƒ Determine and change the primary and secondary dump devices
ƒ Create a system dump

© Copyright IBM Corporation 2024

Figure 18-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 18-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Topic 1 objectives
• Explain what is meant by a system dump
• Determine and change the primary and secondary dump devices
• Create a system dump

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-2. Topic 1 objectives

Importance of this unit


If an AIX kernel crashes, routines that are used to create a system dump are started. This dump
can be used to analyze the cause of the system crash. As an administrator, you need to know
what a dump is, how the AIX dump facility is maintained, and how a dump can be obtained. You
also need to know how to use the snap command to package the dump before sending it to IBM.
The purpose of this unit is to show the students how to maintain/configure the system dump
facility and obtain a system dump. We are not learning how to analyze a dump in this course.
Let us start with an overview of the different types of dumps.

© Copyright IBM Corp. 2009, 2024 18-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

System dumps
• What is a system dump?
• What is a system dump used for?

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-3. System dumps

What is a system dump?


A system dump is a snapshot of the operating system state at the time of a crash or a manually
initiated dump. When a manually initiated or unexpected system halt occurs, the system dump
facility automatically copies selected areas of kernel data to the primary (or secondary) dump
device. These areas include kernel memory and other areas that are registered in a structure that
is called the master dump table by kernel modules or kernel extensions.

What is a system dump used for?


The system dump facility provides a mechanism to capture sufficient information about the AIX
kernel for later expert analysis. After the preserved image is written to disk, the system is booted
back into production. The dump is then typically submitted to IBM for analysis.
Let us look at the different types of dumps that are available in AIX.

© Copyright IBM Corp. 2009, 2024 18-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Types of dumps
• Firmware assisted (fw-assist):
ƒ POWER firmware generates dump in parallel with AIX halt process
ƒ Defaults to same scope of memory as traditional
ƒ Can request a full system dump
ƒ Default dump type in AIX V7.1 and later*
• Traditional:
ƒ AIX generates dump before halt
• Live dump facility:
ƒ Selective dump of registered components without need for a system restart
ƒ Can be initiated by software or by operator
ƒ Controlled by livedumpstart and dumpctrl
ƒ Written to a file system rather than a dump device

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-4. Types of dumps

Firmware assisted dumps (fw-assist)*


With AIX 6.1 (or later) and POWER6 (or later) hardware, you can configure the dump facility to
have the firmware of the hardware platform handle the dump generation. The main advantage to
this is that the operating system can start its reboot while the firmware handles the dumping of
the memory contents. AIX 7.1 (and later) defaults to using fw-assist if the hardware is capable. In
its default mode, it captures the same scope of memory as a traditional dump, but it can be
configured for a full memory dump. If for some reason (such as memory restrictions), a configured
or requested firmware assisted dump is not possible, then the traditional dump facility is started.
More details on the configuration and initiation of firmware assisted dumps are covered later in
the context of the sysdumpdev and sysdumpstart commands.
Note: Firmware assisted dump (fw-assist) is the default configuration for all AIX 7.1, 7.2, 7.3 and
higher systems, running on all modern Power servers.
Traditional dumps
Traditionally, AIX alone handled system dump generation and the only way to get a dump was to
halt the system either due to a crash or through operator request. In a logical partition, it dumps
only the memory that is allocated to that partition.
Live dump facility
AIX 6.1 also introduced a new live dump capability. If a system component is designed to use this
facility, a restricted scope dump of the related memory can be captured without the need to halt
the system. If an individual component is having problems (such as being hung), a livedumpstart
command can be run to dump the needed diagnostic information. The management of live dumps
(such as enabling a component or controlling the dump directory) is handled with the dumpctrl
command. The use and management of live dumps require a knowledge of system components

© Copyright IBM Corp. 2009, 2024 18-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
that is beyond the scope of this class. Use these commands only under the direction of the AIX
support personnel.
Note: *Firmware assisted (fw-assisted) dump is now the default dump type in AIX V7.1 and later,
when the hardware platform supports firmware assisted dump (POWER6 and later).
The way a system administrator works with a firmware assisted dump is the same as procedure as
when they work with a traditional dump.
Let us look at what happens when a dump is created, such as during a system crash, with
traditional dumps.

© Copyright IBM Corp. 2009, 2024 18-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

When a dump occurs – Traditional dump

AIX Kernel CRASH!!!

hd6
/dev/hd6
Primary (paging) dump device

Next boot:
Copy dump into...

/var/adm/ras/vmcore.0 Copy directory


The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-5. When a dump occurs – Traditional dump

Primary dump device


For systems configured for traditional dumps, if an AIX kernel crash (system-initiated or
user-initiated) occurs, kernel data is written to the primary dump device, which is, /dev/hd6, the
primary paging device, immediately (before the system reboots). Note that, after a kernel crash,
AIX might need to be rebooted. (If the autorestart system attribute is set to TRUE, the default
setting, the system automatically reboots after a crash.)
The copy directory
For systems configured for traditional dumps, during the next boot, the dump is copied
(remember: rc.boot 2) into a dump directory; the default is /var/adm/ras. The dump file name is
vmcore.x, where x indicates the number of the dump (for example, 0 indicates the first dump).
Let us look at what happens when a dump is created, such as during a system crash, with
firmware assisted dumps.

© Copyright IBM Corp. 2009, 2024 18-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

When a dump occurs – Firmware assisted dump

AIX Kernel CRASH!!!

hd6
/dev/lg_dumplv
Primary (dedicated) dump device:
Firmware assisted dump is written while the
LPAR is restarting

After system restart:


Run savecore to access dump
The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-6. When a dump occurs – Firmware assisted dump

For systems configured for firmware assisted dumps, if an AIX kernel crash (system-initiated or
user-initiated) occurs, kernel data is written to the primary dump device, which is,
/dev/lg_dumplv, while the server is booting.
After the system has restarted, run the savecore command to save the dump for analysis.
We are not learning how to analyze a dump in this course. However, to appreciate how IBM
support can use this information to diagnose why a system crashed, an example is shown here for
demonstration purposes. First, the administrator must collect the dump information so that it can
sent to IBM support for examination. The snap command collects the dump information and other
system configuration information. The resulting snap file is then sent to IBM support for analysis.
The IBM support team can then extract the system dump details and start their diagnosis. In this
way the dump is essentially transferred to another (external) AIX system for review. It’s also
possible to extract and examine the dump on the system where the crash occurred. However,
once the data is extracted and uncompressed, the process for analyzing the dump is similar
whether it is performed on the originating system or on another AIX system.
For example, on a (firmware assisted dump) system that recently crashed and produced a valid
system dump, you would run the savecore command to save the dump to a local directory first. In
the example below the savecore command saves the dump to the current directory (note the
period indicating the current directory):
# savecore .
Make sure there is enough free space in the file system you copy the dump to. If enough disk
space is not available, the extraction will fail, and an error message will be displayed. Free up (or
add) space and try again. The savecore command will copy the system dump file, along with a
copy of the AIX kernel that was running at the time of the dump (crash), to the current directory.
The savecore command will copy the dump to the current directory, with the name vmcore.0.BZ.

© Copyright IBM Corp. 2009, 2024 18-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
Where the .0 indicates it is the first dump on the system and the BZ stands for bzip, the dump
utilities' compression method. Next, uncompress the dump using the dmpuncompress command:
# dmpuncompress vmcore.0.BZ
After decompression, the dmpuncompress command will have saved a copy of the dump,
vmcore.0, and the associated AIX kernel, vmunix.0 (from the time of the crash) in the current
directory. Dumps, as well as the kernel files, are appended with a sequence of numerals indicating
the order in which they were created; if dmpuncompress finds a dump already created with the .0
append, it will label successive dumps .1, .2, .3, and so on.
Finally, format the dump before performing analysis:
# /usr/lib/ras/dmprtns/dmpfmt -c vmcore.0
Reading a Dump
AIX has a special tool for reading system dumps, the kernel debugger tool (kdb). The kdb tool is
beyond the scope of this course, but students will have the opportunity to try it in the lab
exercises. To read the contents of the dump and its corresponding kernel file, run the kdb
command with the vmcore and vmunix files, like so:
# kdb vmcore.0 vmunix.0
AIX minidump
Starting with AIX 5.3 TL3 a new feature was added that is useful if an instance of AIX has crashed
and no crash dump has been generated. It is also useful in situations where an instance is
unstable and can only be accessed in maintenance mode. As part of the RAS (Reliability,
Accessibility, and Serviceability) effort in AIX, a new error log entry of type MINIDUMP_LOG was
created and placed in the error template. When errpt -a is run against /var/adm/ras/errlog you
will see this label followed by a series of hex digits. This output is not useful in examining the
minidump. To examine a minidump you need to have access to a copy of the errlog on the
affected server. You will also need access to the mdmprpt command.
Using this crash stack IBM support personnel can then search through the database to find what
the fault may mean. The RAS effort mentioned in the introduction is part of an ongoing effort by
AIX to increase stability and to make more information available for troubleshooting when a
problem occurs. The ability to look at minidump data has helped solve many issues that would
otherwise go unresolved.
Limitations of minidumps
A minidump is of limited or no use in situations where a server has hung. In this situation we can
use mdmprpt to see what was running on each cpu. Practically speaking a full dump is usually
needed to determine how and why a server has hung.
Refer to “How to examine a minidump in AIX”,
https://www.ibm.com/support/pages/how-examine-minidump-aix and “Investigating AIX
system crashes with minidump”, https://ibm.biz/BdmrPx.
Let us find out what controls the dump process and how you can configure the dump options.

© Copyright IBM Corp. 2009, 2024 18-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Topic 1 objectives
• Explain what is meant by a system dump
• Determine and change the primary and secondary dump devices
• Create a system dump

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-7. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 18-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

The sysdumpdev command


# sysdumpdev -l List the current dump
primary /dev/lg_dumplv
settings
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump fw-assisted
full memory dump disallow
enable NX GZIP TRUE
Deactivate primary dump
# sysdumpdev -p /dev/sysdumpnull
device (temporary)
# sysdumpdev -P -s /dev/ded_dumplv
# sysdumpdev -L
Change secondary dump device
Device name: /dev/lg_dumplv (permanent)
Major device number: 10 Display information about last dump
Minor device number: 2
Size: 9507840 bytes
Date/Time: Wed Apr 11 20:41:56 EST 2024
Dump status: 0

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-8. The sysdumpdev command

Primary and secondary dump devices


There are two system dump devices:
• Primary: Usually used when you want to save the dump data
• Secondary: Can be used to save the dump data, if the primary is unavailable, or to discard
dump data (by using /dev/sysdumpnull)
Use the sysdumpdev command or SMIT to query or change the primary and secondary dump
devices. Make sure that you know your system and know what your primary and secondary dump
devices are set to. Your dump device can be a portable medium, such as a tape drive, although
this is very uncommon on modern AIX servers. For firmware assisted dump configurations (the
default), AIX uses /dev/lg_dumplv (a dedicated LV) as the default primary dump device. For
traditional dump configurations, AIX uses /dev/hd6 (paging) as the default primary dump device.
SMIT can be used to set these values, rather than running the sysdumpdev command. Use the
SMIT fast path smit dump.
Flags for sysdumpdev command
Flags for the sysdumpdev command include the following:
• -l: Lists current values of dump-related settings.
• -e: Estimates the size of a dump.
• -p: Specifies primary dump device.
• -s: Specifies secondary dump device.
• -P: Makes change of primary or secondary dump device permanent.

© Copyright IBM Corp. 2009, 2024 18-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
• -d directory: Specifies the directory that the dump is copied to at system boot. If the copy fails
at boot time, the -d flag indicates that the system dump should be ignored (force copy flag =
FALSE). Applies to traditional dump configuration.
• -D directory: Specifies the directory that the dump is copied to at system boot. If the copy
fails at boot time, by using the -D flag allows you to copy the dump to external media (force
copy flag = TRUE). Applies to traditional dump configuration.
• -K: If your machine has a key mode switch, the reset button or the dump key sequences force
a dump with the key in the normal position, or on a machine without a key mode switch. Note:
On a machine without a key mode switch, a dump cannot be forced with the key sequence
without this value set.
• -f { disallow | allow | require }: Specifies whether the firmware assisted full memory system
dump is allowed, required, or not allowed. The -f has the following variables:
- The disallow variable specifies that the full memory system dump mode is not
allowed (it is the selective memory mode).
- The allow variable specifies that the full memory system dump mode is allowed but is
performed only when operating system cannot properly handle the dump request.
- The require variable specifies that the full memory system dump mode is allowed and
is always performed.
• -t { traditional | fw-assisted }: Specifies the type of dump to perform. The -t flag has the
following variables:
- The traditional variable specifies to perform traditional system dump. In this dump
type, the dump data is saved before system restart.
- The fw-assisted variable specifies to perform firmware assisted system dump. In this
dump type, the dump data is saved in parallel with the system reboot.
- You can use the firmware assisted system dump only on PHYP platforms with various
restrictions on memory size. When the fw-assisted system dump type is not allowed
at configuration time, or is not enforced at dump request time, a traditional system
dump is performed. In addition, because the scratch area is only reserved at
initialization, a configuration change from traditional system dump to firmware
assisted system dump is not effective before the system is rebooted.
• -z: Writes to standard output the string containing the size of the dump in bytes and the name
of the dump device, if a new dump is present. 

Dump status values


Status values, as reported by sysdumpdev -L, correspond to dump LED codes as follows:
• 0 = 0c0: Dump completed successfully
• -1 = 0c8: No primary dump device defined
• -2 = 0c4: Dump device too small
• -3 = 0c5: Dump crashed or did not start
• -4 = 0c1: I/O error

© Copyright IBM Corp. 2009, 2024 18-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Note

If the value of Dump status is -3, size usually shows as 0, even if some data was written.

Examples on visual
The examples on the visual illustrate use of several of the sysdumpdev flags discussed in the
preceding material.
Dump information in the error log
System dumps are usually recorded in the error log with the DUMP_STATS label. Here the Detail
Data section contains the information that is normally given by the sysdumpdev -L command: the
major device number, minor device number, size of the dump in bytes, time at which the dump
occurred, dump type, that is, primary or secondary, and the dump status code.

© Copyright IBM Corp. 2009, 2024 18-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
For example:
# errpt | grep DUMP
67145A39 0528053424 U S SYSDUMP SYSTEM DUMP
# errpt -aN SYSDUMP
---------------------------------------------------------------------------
LABEL: DUMP_STATS
IDENTIFIER: 67145A39
Date/Time: Tue May 28 05:34:50 EDT 2024
Sequence Number: 126
Machine Id: 00F9C1944C00
Node Id: sys8671_lpar3
Class: S
Type: UNKN
WPAR: Global
Resource Name: SYSDUMP
Description
SYSTEM DUMP
Probable Causes
UNEXPECTED SYSTEM HALT
User Causes
SYSTEM DUMP REQUESTED BY USER
Recommended Actions
PERFORM PROBLEM DETERMINATION PROCEDURES
Failure Causes
UNEXPECTED SYSTEM HALT
Recommended Actions
PERFORM PROBLEM DETERMINATION PROCEDURES
Detail Data
DUMP DEVICE
/dev/dumplv
DUMP SIZE
60440064
TIME
Tue May 28 05:33:09 2024
DUMP TYPE (1 = PRIMARY, 2 = SECONDARY)
1
DUMP STATUS
0
ERROR CODE
0000 0000 0000 0000
DUMP INTEGRITY
Compressed dump - Run "/usr/lib/ras/dmprtns/dmpfmt" with -c flag
on dump after uncompressing.
FILE NAME
PROCESSOR ID
0
---------------------------------------------------------------------------

© Copyright IBM Corp. 2009, 2024 18-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
DVD support for system dumps
Although very uncommon on modern Power servers, AIX can send the system dump to DVD
media. The DVD device might be used as a primary or secondary dump device. In order to get this
functionality the target DVD device should be DVD-RAM or writable DVD. Remember to insert an
empty writable DVD in the drive when using the sysdumpdev command, or when you require the
dump to be copied to the DVD at boot time after a crash. If the DVD media is not present, the
commands give error messages or does not recognize the device as suitable for system dump
copy.
Verbose flag for sysdumpdev
Following a system crash, there exist scenarios where a system dump might crash or fail without 1
byte of data that is written out to the dump device, for example, power off or disk errors. For cases
where a failed dump does not include the dump minimal table, it is useful to save some trace back
information in the NVRAM. Starting with AIX 5L V5.3, the dump procedure is enhanced to use the
NVRAM to store minimal dump information. In the case where the dump fails, we can use the
sysdumpdev -vL command (-v is the verbose flag) to check the reason for the failure.
System-initiated dumps
If a system dump is initiated through a kernel panic, the LED code that is displayed is 0c9 while
the dump is in progress, and then either an 888 or a steady 0c0.
User-initiated dumps
For user-initiated system dumps to the primary dump device, the LED codes should indicate 0cb
for a short period, followed by 0c0 upon completion.
Other common LED codes
Other common codes include the following:
• 0c0: Indicates that the dump completed successfully.
• 0c1: Indicates that an I/O occurred during the dump.
• 0c2: A user-requested dump is not finished. Wait at least 1 minute for the dump to complete
and for the operator panel display value to change.
• 0c4: Indicates that the dump device is too small. Indicates that the dump routine ran out of
space on the specified device. It might still be possible to examine and use the data on the
dump device, but this tells you that you should increase the size of your dump device.
• 0c5: Indicates a dump internal error.
• 0c8: Indicates that the dump was disabled. In this case, no dump device was designated in
the system configuration object for dump devices. The sysdumpstart command halts, and the
system continues running. You did not define a primary or secondary dump device. The
system dump option is not available. Enter the sysdumpdev command to configure the dump
device.
• 0c9: A dump started by the system did not complete. Wait at least 1 minute for the dump to
complete and for the operator panel display value to change. If the operator panel display
value changes, find the new value on the list. If the value does not change, then the dump did
not complete because of an unexpected error.

© Copyright IBM Corp. 2009, 2024 18-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
• 0ca: A firmware assisted system dump is not finished yet. System startup resumes after the
dump completes.
• 0cb: A firmware assisted selective (default) memory dump is started. Wait at least 10 minutes
for the dump to complete and for the operator-panel display value to change. If the
operator-panel display value changes, find the new value on the list. If the value does not
change, the dump did not complete because of an unexpected error.
• 0cc: Indicates that the system switched to the secondary dump device after attempting a
dump to the primary device. An error occurred dumping to the primary device; the dump has
switched over to the secondary device. Wait at least 1 minute for the dump to complete and
for the three-digit display value to change. If the three-digit display value changes, find the
new value on this list. If the value does not change, then the dump did not complete because
of an unexpected error.
When you install the operating system, the dump device is automatically configured for you. By
default the primary device is /dev/lg_dumplv, which is a dedicated logical volume, and the
secondary device is /dev/sysdumpnull. For traditional dump systems, by default the primary
device is /dev/hd6, which is a paging logical volume, and the secondary device is
/dev/sysdumpnull. By default, if a crash occurs, the dump is written to the dedicated dump
device while the system (LPAR) is restarting, and it is stored in the logical volume for later
extraction. You will look at this in detail later in this unit.
For traditional dump systems, if a dump occurs to the paging device, the system automatically
copies the dump when the system is rebooted. By default, the dump gets copied to the
/var/adm/ras directory (for traditional dumps only).
The recommended size for the dump device is at least a quarter of the size of real memory. In
problems arise where the current dump device does not meet this recommendation, it is
advisable to create a temporary dump logical volume of the size that is required and manually
re-create the environment in which a previous dump occurred. If the dump device is not large
enough, the system produces a partial dump only. It is possible, but unlikely, that IBM support
can determine the cause of the crash from a partial dump. The -e flag can be used as a starting
point to determine how big the dump device should be.
Question: What is the advantage of having two dump areas?

Answer: For a backup device, in case the primary dump device is unavailable for some reason.
Let us find out how to configure the dump type, using the -t flag.

© Copyright IBM Corp. 2009, 2024 18-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Configuring the dump type


• The –t flag of sysdumpdev specifies the type of dump.
ƒ Allowable values are fw-assisted or traditional
ƒ Firmware assisted dump the default on AIX 7.1 or newer when running on POWER6 or newer
hardware.
• When changing from traditional to fw-assisted a reboot is required.
ƒ Not required when changing from fw-assisted to traditional
• The -f flag of sysdumpdev specifies the mode of firmware assisted dump.
ƒ Allowable values are:
í disallow - Full memory dump is not permitted (that is, a selective copy is performed). The default
í allow - Full memory dump is only performed if the OS cannot handle the dump request
í required - Full memory dump will always be performed

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-9. Configuring the dump type

Dump type
The dump type is selected by using the -t flag of the sysdumpdev command. Allowable values are
fw-assisted and traditional. When changing from traditional to fw-assisted, a reboot is
required for the change to take place. The reboot is required because the firmware assisted dump
facility must reserve an area of memory for use in communication between PHYP and SoftROS
during system reboot when a firmware assisted dump is in progress. Changing from fw-assisted
to traditional does not require a reboot, as the existing reserved memory can be released.

Firmware assisted dump modes


The mode of firmware assisted dump is selected by using the -f flag of the sysdumpdev
command. Allowable values are disallow, allowed, and required:
• The disallow value specifies that the full memory system dump mode is not allowed, in other
words, the firmware assisted dump uses the selective memory mode. This is the default
mode.
• The allow value specifies that the full memory system dump mode is allowed but is done only
when the operating system cannot properly handle the dump request.
• The require value specifies that the full memory system dump mode is allowed and is always
done.
Note that changing from traditional to fw-assisted requires a reboot, since memory must be
reserved at boot time for PHYP to pass information to SoftROS in the event of a firmware assisted
dump.

© Copyright IBM Corp. 2009, 2024 18-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
Note, that if you monitor the LPAR virtual console during the dump process, you will observe the
following message on the boot screen, indicating that a firmware-assisted dump is taking place:
-------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 09:29:21 05/17/2024
The current time and date: 10:46:59 05/17/2024
processor count: 2; memory size: 2048MB; kernel size: 58065879
boot device: /vdevice/v-scsi@30000014/disk@8100000000000000:2
SoftROS: Firmware-Assisted System Dump in progress...
Firmware-Assisted System Dump completed in SoftROS
-------------------------------------------------------------------
IBM support recommends always using the firmware assisted type for several reasons. The
advantage of firmware assisted dump is that the dump is written during system reboot, after
device discovery, while the traditional type is written immediately while the server goes down
(server crash). If there is a problem accessing the dump device the system dump fails. This is why
fw-assisted is now the default, and recommended, dump type on all modern AIX systems. Keep
in mind the fw-assisted type prerequisites for the dump device are:
• Must be in rootvg
• Should not be mirrored or stripped
• Cannot be the paging space
• Recommended size is sysdumpdev -e + 10%

© Copyright IBM Corp. 2009, 2024 18-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Dedicated dump device (1 of 2)


• Servers with real memory > 4 GB have a dedicated dump device that is created at installation
time (for traditional dump systems).

System memory size Dump device size


4 GB to, but not including, 12 GB* 1 GB
12 GB to, but not including, 24 GB 2 GB
24 GB to, but not including, 48 GB 3 GB
48 GB and up 4 GB

• For systems configured to use firmware assisted dumps (the default) a dedicated dump
device is (always) created automatically at installation time.
• *Refer to the notes for considerations when using the default firmware assisted dump type.

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-10. Dedicated dump device (1 of 2)

Creation of dedicated dump device


In a traditional dump environment, servers with more than 4 GB of real memory have a dedicated
dump device that is created at installation time. This dedicated dump device is automatically
created; no user intervention is required. As indicated on the visual, the size of the dump device
that is created depends in the system memory size:
• Up to 12 GB of real memory - 1 GB dump device*
• Up to 24 GB - 2 GB
• Up to 48 GB - 3 GB dump device
• 48 GB and above - 4 GB dump device
Default name of dedicated dump device
The default name of the dump device logical volume is lg_dumplv. For systems configured to use
firmware assisted dumps (the default), a dedicated dump device is (always) created
automatically at installation time.
To create your own dedicated dump device
To create a dedicated dump logical volume, simply define the raw logical volume and use the
sysdumpdev command (or equivalent SMIT panel) to identify it as your dump device. The new
logical volume and dump configuration is included in the next system backup.
Defining a dedicated dump device in a bosinst.data file
If you want to install systems with large dump devices automatically defined (regardless of the
memory size), you can specify this in the bosinst.data file. The bosinst.data file contains stanzas
that direct the actions of the Base Operating System (BOS) installation program. After an initial

© Copyright IBM Corp. 2009, 2024 18-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
installation, you can change many aspects of the default behavior of the BOS installation program
by editing the bosinst.data file and by using it with your installation media.
The large_dumplv stanza
The optional large_dumplv stanza in bosinst.data can be used to specify characteristics to be
used if a dedicated dump device is created. A dedicated dump device is only created for systems
with 4 GB or more of memory. The following characteristics can be specified in the large_dumplv
stanza:
• DUMPDEVICE: Specifies the name of the dedicated dump device.
• SIZEGB: Specifies the size of the dedicated dump device in gigabytes.
If the stanza is not present, the dedicated dump device is created (always for firmware assist
systems or as required for traditional dump systems), by using the default values previously
discussed. Here are some example lines from a bosinst.data file:
...
control_flow:
CONSOLE = /dev/vty0
...
large_dumplv:
DUMPDEVICE = /dev/lg_dumplv
SIZEGB = 1
Note that the size of the dedicated dump device depends on the amount of physical memory on
this system and note the default name of the dedicated dump device. A dedicated dump device is
created for systems with more than 4 GB of main memory* (traditional dump) and always created
for systems using the default firmware assisted dump type.
*Note: You cannot set a paging space as the dump device when firmware assisted system
dump is configured.
Consider the following points when you configure a dump device whilst using the firmware
assisted dump type (which is the default dump type with AIX 7.1 and higher, on modern Power
servers):
1. If the default paging device hd6 (paging space) is used as the dump device the firmware
assisted dump option doesn't work. A traditional system dump is triggered instead.
2. If your system has less than 4 GB of memory, the default dump device is the /dev/hd6 logical
volume, which is a paging logical volume. However, if the configuration is for a firmware
assisted system dump (the default) you cannot configure the /dev/hd6 logical volume as the
dump device. A dedicated logical volume must be configured to use the firmware assisted
dump.
3. If a dump occurs to paging space (for traditional system dumps only), the system
automatically copies the dump when the system is rebooted. By default, the dump is copied to
the /var/adm/ras directory in the root volume group.
Point two from this list is important. It means that if your system is using firmware assisted
dumps (which is the default setting on modern Power servers), then even if your system (AIX
LPAR) is configured with less than 4 GB of memory, a dedicated dump must be used and that one
will be configured automatically during the installation of the AIX operating system (the device
will be named lg_dumplv). For example, if your AIX 7.3 LPAR is configured with 2 GB of memory,

© Copyright IBM Corp. 2009, 2024 18-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
during the installation of AIX, a 1 GB dedicated dump device, lg_dumplv, will be created in
rootvg:
# oslevel -s
7300-01-01-2246
# lsvg -l rootvg | grep dumplv
lg_dumplv sysdump 32 32 1 open/syncd N/A
# lsvg rootvg | grep SIZE
VG STATE: active PP SIZE: 32 megabyte(s)
# bc
32*32
1024
# sysdumpdev -l
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump fw-assisted
full memory dump disallow
enable NX GZIP TRUE
On an AIX system configured for firmware assisted dumps, if you examine the
/var/adm/ras/bosinstlog (alog) file, you'll notice messages (during the AIX installation process)
stating the following:
# alog -of /var/adm/ras/bosinstlog | grep -Ei 'firmware|primary'
Cannot set a paging space as the dump device when firmware assisted system dump is
configured.
...
primary /dev/lg_dumplv
Post install, if you try to set hd6 (paging) as the primary dump device on a system configured for
firmware assisted dumps, an error message is displayed:
# sysdumpdev -P -p /dev/hd6
Cannot set a paging space as the dump device when firmware assisted system dump is
configured.
Refer to the following link for details on best practices when configuring dump device using the
firmware assisted dump type: https://www.ibm.com/support/pages/node/6327193
If the dump logical volume was defaulted to the paging space during installation, or if you would
prefer to configure your own dedicated dump device after installation, then you would manually
configure one. Let us look at how this is done.

© Copyright IBM Corp. 2009, 2024 18-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Dedicated dump device (2 of 2)


• Creating a dedicated dump device after installation:
ƒ Define a rootvg logical volume of type sysdump:
í # mklv –y ded_dumplv –t sysdump rootvg 64
ƒ Change the primary dump device to be the new logical volume:
í # sysdumpdev –P -p /dev/ded_dumplv
ƒ Validate that your new device is now the primary dump device:
í # sysdumpdev –l

• Note: Use of an LVM mirrored dedicated dump LV is supported, but not recommended due to
performance issues.

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-11. Dedicated dump device (2 of 2)

A dedicated dump device, in most cases by default, will be automatically configured during the
installation of AIX. This is typically sufficient for most AIX systems. However, administrators may
prefer to create their own dump logical volume, with a different name or size, for example. The
method for using a dedicated dump logical volume is to manually configure it after system
installation. The procedure that is shown in the visual is fairly straightforward. The main concern is
the usual one of needing the allocation to be large enough to handle the dump.
A common question concerns the use of the mirrorvg command. If you are at a currently
supported release of AIX (with current maintenance) dumping to an LVM mirrored logical volume
is supported, but the dump processing takes much longer when using LVM mirroring. It is
recommended that you do not mirror the dump LV, due to the resulting performance impact when
creating the dump and some complications in reading the dump. The mirrorvg command does
not mirror a dump LV in the rootvg (unless it is the paging space, for traditional dump systems).
It is good to have a separate LV for the dump, instead of using the paging space LV. It is also the
default configuration for all AIX 7.1 or higher systems, on modern Power servers, using the
firmware assisted dump type. By having a separate dump LV, it separates the dump LV issues
from the paging space issues.
If the mirroring of the dump LV is not recommended, then how should we protect against the
scenario of the disk holding the dump LV being unavailable at the time of the dump? The
recommendation would be to define a secondary dump device on a different disk than the primary
dump device if this is needed.
It can be a problem if you have a system, that is configured to use a dump device, that does not
exist or is too small.
Let us look at a utility that helps to identify any potential problems in creating a dump, before we
are faced with a dump situation.

© Copyright IBM Corp. 2009, 2024 18-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

dumpcheck utility
• The /usr/lib/ras/dumpcheck utility does the following when enabled:
ƒ Estimate the dump or compressed dump size using sysdumpdev -e
ƒ Find dump logical volumes and copy directory using sysdumpdev -l
ƒ Estimate the primary and secondary dump device sizes
ƒ Estimate the copy directory free space (for traditional dump configuration)
ƒ Report any problems in the error log file
• Use sysdumpdev separately to report estimated dump size:
ƒ # sysdumpdev –e
0453-041 estimated dump size in bytes: 52428800

Use this information to size the /var file system.

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-12. dumpcheck utility

Function of the dumpcheck utility


The /usr/lib/ras/dumpcheck utility is used to check the disk resources that are used by the
system dump facility. The command logs an error if either the largest dump device is too small to
receive the dump, or there is insufficient space in the copy directory (for systems configured for
traditional dumps) when the dump device is a paging space. If the dump device is a paging space,
dumpcheck verifies whether the free space in the copy directory is large enough to copy the dump.
If the dump device is a logical volume (which is the default configuration), dumpcheck verifies that
it is large enough to contain a dump. If the dump device is a tape (very unlikely nowadays),
dumpcheck exits without message. Any time a problem is found, dumpcheck logs an entry in the
error log by default. If the -p flag is present, dumpcheck displays a message to stdout.
Example of dumpcheck use
The following example illustrates use of the dumpcheck utility and shows sample output from this
command, when the dedicated dump device is too small:
# /usr/lib/ras/dumpcheck -p
The largest dump device is too small.
Largest dump device
lg_dumplv
Largest dump device size in kb
1048576
Current estimated dump size in kb
1091256
Since the -p flag was used in this example, the output from dumpcheck was written to stdout. If
the dump device is not large enough, increase the size of the logical volume (lg_dumplv) and
re-run the dumpcheck command until it is successful. In the example the current dump device

© Copyright IBM Corp. 2009, 2024 18-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
size is 1048576 kb (1048 MB) and the estimated dump size is 1091256 kb (1091 MB). There is a
43 MB shortfall (1091-1048 = 43 MB). In this example you should increase (extend) the size of
the dump logical volume by 3 PPs (were the rootvg PP size is 16 MB, 3 * 16 = 48MB). For example:
# extendlv lg_dumplv 3
# /usr/lib/ras/dumpcheck –p
#
The following example illustrates use of the dumpcheck utility and shows sample output from this
command, when the copy directory is too small:
# /usr/lib/ras/dumpcheck -p
File system name
/var/adm/ras
Current free space in kb
117824
Current estimated dump size in kb
161996
In the output above, there is not enough free space in the file system containing the copy
directory to accommodate the dump. This is from a system configured to use traditional dumps
and a paging dump device, such as /dev/hd6.
Enabling and disabling dumpcheck
In order to be effective, the dumpcheck utility must be enabled to run from root’s crontab file. This
is the default. Verify that dumpcheck is enabled by using the following command:
# crontab -l | grep dumpcheck
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
By default, it is set to run at 3 PM each afternoon.
Enable the dumpcheck utility by using the -t flag. This creates an entry in the root crontab if none
exists. In this example, we set the dumpcheck utility to run at 2 PM.:
# /usr/lib/ras/dumpcheck -t “0 14 * * *”
For best results, set dumpcheck to run when the system is heavily loaded. This setting identifies
the maximum size that the dump takes. As previously mentioned, the time is set for 3 PM by
default. If you use the -p flag in the crontab entry, root is sent a mail message with the standard
output of the dumpcheck command.
Sizing the /var file system
For systems configured to use traditional dumps and a paging dump device, such as /dev/hd6,
you should size the /var file system so that there is enough free space to hold the dump
information should your machine ever crash.
Estimating the space that is needed to hold a system dump
The sysdumpdev -e command provides an estimate of the amount of disk space that is needed for
system dump information. The size of the dump device (and of the copy directory for traditional
dumps) that you require are directly related to the amount of RAM on your machine. The more
RAM on the machine, the more space that is needed on the disk. Machines with 16 GB of RAM
might need 2 GB of dump space.

© Copyright IBM Corp. 2009, 2024 18-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
Dump compression
Starting with AIX 6.1, dumps are always compressed; thus the -C and -c flags to control
compression are no longer valid options of the sysdumpdev command.
Note that (by default) any problems that are found by dumpcheck are written to the error log. So, it
is important to check the error log. For example, if the dump device is too small, an error is
reported in the AIX error report (errpt).
LABEL: DMPCHK_TOOSMALL
IDENTIFIER: E87EF1BE
Date/Time: Mon Apr 15 15:00:00 CDT 2024
Sequence Number: 514
Machine Id: 00F9C18F4C00
Node Id: quark
Class: O
Type: PEND
WPAR: Global
Resource Name: dumpcheck
Description
The largest dump device is too small.
Probable Causes
Neither dump device is large enough to accommodate a system dump at this time.
Recommended Actions
Increase the size of one or both dump devices.
Detail Data
Largest dump device
lg_dumplv
Largest dump device size in kb
1048576
Current estimated dump size in kb
1148252
The command sysdumpdev -e estimates the dump size. It is just an estimate. To be safe, the disk
space should be larger than the estimate. Also, if the system dumped in the past, looking at the
size of the past dump can provide more guidance on sizing the dump device. This can be seen by
using the command sysdumpdev -L (mentioned earlier in the unit).
Key points are:
• If a paging device (like hd6) is used for dumps, it must be part of rootvg.
• The primary dump device must always be in the rootvg.
• The secondary dump device can be outside rootvg unless it is not a paging device.
• AIX allows a DVD device to be used as a primary or secondary dump device.
There are several ways in which a system dump can be initiated. Let us examine these options.

© Copyright IBM Corp. 2009, 2024 18-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Topic 1 objectives
• Explain what is meant by a system dump
• Determine and change the primary and secondary dump devices
• Create a system dump

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-13. Topic 1 objectives

© Copyright IBM Corp. 2009, 2024 18-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Methods of starting a dump


• Automatic invocation of dump routines by system
• Using the sysdumpstart command or SMIT
ƒ Option: -p (send to primary dump device)
ƒ Option: -s (send to secondary dump device)
ƒ Option: -t (use traditional dump)
ƒ Option: -f (select scope of dump)
• Using the Hardware Management Console (HMC)*
ƒ Restart LPAR with the Dump option

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-14. Methods of starting a dump

Ways to obtain a system dump


The system can automatically initiate a system dump. In addition, there are several ways for a
user to start a system dump. The most appropriate method to use depends on the condition of the
system.
Automatic invocation of dump routines
If there is a kernel panic, the system automatically dumps the contents of real memory to the
primary dump device.
Using the sysdumpstart command or SMIT
One method a superuser can use to start a dump is to run the sysdumpstart command or start it
through SMIT (fast path smit dump).
The -p flag of sysdumpstart is used to specify a dump to the primary dump device.
The -s flag of sysdumpstart is used to specify a dump to the secondary dump device.
The -t flag of sysdumpstart is used to change the default type from fw_assist to traditional.
The -f flag of sysdumpstart is used to change the scope of the dump (interacts with the
configuration set up with sysdumpdev):
• Disallow: Do not allow a full memory dump.
• Require: Require a full memory dump.
*Using the Hardware Management Console (HMC)
In an LPAR environment, a dump can be initiated from the Hardware Management Console (HMC)
by choosing Dump from the Restart option (accessed by selecting the LPAR then Actions and
Restart). The Dump option is the equivalent of pressing the physical Reset button on a non-LPAR

© Copyright IBM Corp. 2009, 2024 18-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
system. The partition initiates a system dump to the primary dump device if configured to do that.
Otherwise, the partition reboots. In modern, virtualised AIX environments, this is the most
common method used for initiating a dump.
Obtaining a useful system dump
Bear in mind that if your system is still operational, a dump that is taken at this time does not help
in problem determination. A relevant dump is one taken at the time of the system halt (crash).
A user-initiated dump is different from a dump that is initiated by an unexpected system halt
because the user can designate which dump device to use. When the system halts unexpectedly,
a system dump is initiated automatically to the primary dump device.
Here is some additional information about some of the methods that are listed in the visual.
Command Line 
This method uses the sysdumpstart command. However, this command is only available if you
install the Software Service Aids (bos.sysmgt.serv_aid) package. You must have root authority to
run this command. First, you might want to check the current settings of your system dump
devices by using the sysdumpdev -l command. Then, initiate the dump with sysdumpstart -p
(for the primary device) or -s (for the secondary device).
Discussed below are some other legacy methods for starting a dump. Generally, these are not
appropriate for modern Power servers.

Using a special key sequence


• If the system halted, but the keyboard still accepts input, a dump to the primary dump device
can be forced by pressing the <Ctrl-Alt-NUMPAD1> key sequence on the Low Function
Terminal (LFT) graphics console keyboard. (The key combination <Ctrl-Alt-NUMPAD2> on the
LFT can be used to initiate a system dump to the secondary dump device.) This method can be
used only when your machine's mode switch (if your machine has such a switch) is set to the
Service position or the Always Allow System Dump option is set to true. The Always Allow
System Dump option can be set to true by using SMIT or by using sysdumpdev -K.
Using the remote reboot facility
• The remote reboot facility can also be used to obtain a system dump. This requires a legacy
TTY terminal/native system port connected to the Power server. A special string could be sent
to the port to initiate a reboot. It is not used in modern, virtualised environments.
Using special key sequence
• If you have an LFT, you can initiate a dump either to the primary or the secondary device by
using one of the key sequences specified. The NUMPAD, which is referred to in the student
notes, is the set of number keys on the right-hand side of the keyboard.
Let us discuss the remote reboot facility and other methods in a little more detail.

© Copyright IBM Corp. 2009, 2024 18-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Generating dumps with SMIT


# smit dump
System Dump
Move cursor to desired item and press Enter
Show Current Dump Devices
Show Information About the Previous System Dump
Show Estimated Dump Size
Change the Type of Dump
Change the Full Memory Dump Mode
Change the Primary Dump Device
Change the Secondary Dump Device
Change the Directory to which Dump is Copied on Boot
Start a Dump to the Primary Dump Device
Start a Traditional System Dump to the Secondary Dump Device
Copy a System Dump from a Dump Device to a File
Always ALLOW System Dump
Check Dump Resources Utility
Change/Show Global System Dump Properties
Change/Show Dump Attributes for a Component
Change Dump Attributes for multiple Components
Enable/Disable NX GZIP compression

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-15. Generating dumps with SMIT

Using the SMIT dump interface


You can use the SMIT dump interface to work with the dump facility.

The SMIT dump menu


You can use the SMIT dump interface to work with the dump facility.
# smit dump
Show Current Dump Devices
Show Information About the Previous System Dump
Show Estimated Dump Size
Change the Type of Dump
Change the Full Memory Dump Mode
Change the Primary Dump Device
Change the Secondary Dump Device
Change the Directory to which Dump is Copied on Boot
Start a Dump to the Primary Dump Device
Start a Traditional System Dump to the Secondary Dump Device
Copy a System Dump from a Dump Device to a File
Always ALLOW System Dump
Check Dump Resources Utility
Change/Show Global System Dump Properties
Change/Show Dump Attributes for a Component
Change Dump Attributes for multiple Components
Enable/Disable NX GZIP compression

© Copyright IBM Corp. 2009, 2024 18-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
The menu items that show or change the dump information use the sysdumpdev command.
Modern Power servers (LPARs) should always allow a system dump. Historically, MCA machines
could put the physical key in the service mode to achieve this action. This setting was created
specifically for PCI machines.
AIX Dump Exploitation of Power HW GZIP
In the SMIT dump menu, you may have noticed the “Enable/Disable NX GZIP compression”
item. The AIX system dump facility has been enhanced to improve performance using
hardware-accelerated compression on IBM POWER9 and Power10 systems. The AIX Firmware
Assisted Dump (FWAD) can now be compressed using the on-chip (POWER9 and later) Nest
Accelerator (NX) GZIP compression accelerator. This is available with AIX 7.3 TL1. This feature is
enabled by default when your logical partition (LPAR) is configured to run in POWER9 or Power10
mode (i.e. running in “POWER9” or “Power10” processor compatibility mode). In this mode, the
LPAR has access to the NX GZIP accelerator.
By using this hardware capability, the time required to compress an AIX system dump image can
be reduced significantly. The overall time require to capture an AIX system dump remains
unchanged, but the dump compression time is improved. This type of dump is only supported with
firmware assisted dump (FWAD) and not traditional AIX dump.
root@aix73 / # oslevel -s
7300-01-01-2246
root@aix73 / # sysdumpdev
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump fw-assisted
full memory dump disallow
enable NX GZIP TRUE
AIX 7.3 sysdumpdev command
The AIX sysdumpdev command includes two new options for enabling and disabling NX GZIP
dump compression. The -n flag disables the feature, while the -N flag enables NX GZIP
compression.
• -n: Disables the Nest Accelerators (NX) GZIP dump compression. The system dump is
compressed without using the NX GZIP.
• -N: Enables the Nest Accelerators (NX) GZIP accelerated dump compression. NX GZIP dump
compression is only applicable to firmware assisted type system dumps.
You can confirm if your LPAR is running in the correct mode using nxstat -S. Use this command
to check for the availability of the NX GZIP accelerator. Refer to the nxstat command for more

© Copyright IBM Corp. 2009, 2024 18-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
information. For example, below, we observe that the accelerator is available, confirming that our
LPAR is running in the correct processor mode.
# nxstat -S
nx_accel_mask = 1
GZIP accelerator available
In the next example, we notice that the accelerator is not available, confirming that our LPAR is
not running in the correct processor mode. In this instance, NX GZIP-capable AIX system dumps
would not be possible.
# nxstat -S
nx_accel_mask = 0
** No accelerators available **
** Accelerators are not available for partitions in POWER9_base mode
Let us take a closer look at how to initiate a dump from the HMC.

© Copyright IBM Corp. 2009, 2024 18-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Generating dumps with HMC

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-16. Generating dumps with HMC

If using an HMC to manage the LPAR, you can use the HMC UI (or the chsysstate command) to
trigger a dump of the operating system.
In the UI you would select the LPAR and then Actions and Restart. The resulting window is shown
in the visual. Clicking the Dump button selects an operation to signal the system to effectively
signal a reset to initiate a dump.
Let us next look at how you retrieve a dump from your system.

© Copyright IBM Corp. 2009, 2024 18-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Copying a system dump

Is hd6 being
yes rc.boot 2
used as the
dump LV?

no (the default) Is there


fw-assisted yes sufficient space
in /var to copy
Use savecore dump to?

no
Dump copied
Display the copy
dump to tape
forced copy flag
Menu = TRUE
/var/adm/ras Traditional dump only
copy directory
Boot continues
The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-17. Copying a system dump

Copying a dump to /var


After a crash, if the progress code displays 0c0, then you know that a dump occurred and that it
completed successfully. At this point, the system is rebooted, unless you set the autorestart
system attribute to false.
When using a dedicated dump logical volume (the default) the dump remains in the dump LV and
is not automatically copied anywhere at reboot. The savecore command can then be used to copy
the dump at a later convenient time.
For traditional dumps, when using paging space (hd6) as the dump logical volume, the rc.boot
script attempts to copy the dump to a directory specified by copy directory (sysdumpdev).
Sufficient space in /var
For traditional dumps only, if there is enough space to copy the dump from the paging space to the
/var/adm/ras directory, then it is copied directly.
Insufficient space in /var/adm/ras
However, at bootup, for traditional dumps, if the system determines that there is not enough
space to copy the dump to /var, the /sbin/rc.boot script (which is run at bootup) calls the
/lib/boot/srvboot script. This script in turn calls on the copydumpmenu command, which is

© Copyright IBM Corp. 2009, 2024 18-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
responsible for displaying the following menu that might be used to copy the dump to removable
media:
Copy a System Dump to Removable Media

The system dump is 583973 bytes and will be copied from /dev/hd6
to media inserted into the device from the list below.

Please make sure that you have sufficient blank, formatted media
before proceeding.

Step One: Insert blank media into the chosen drive.


Step Two: Type the number for that device and press Enter.

Device type Path Name

>>> 1 tape/scsi/8mm /dev/rmt0


2 Diskette Drive /dev/fd0

88 Help?
99 Exit

>>> Choice [1]


The copy dump menu will be displayed only for traditional dump systems, if the sysdumpdev
attribute of forced copy flag has a value of TRUE.
Most of what is shown in the visual (and discussed above) applies to traditional dumps only. On
modern Power servers, the dump is written to the dedicated dump device as part of the firmware
assisted dump process. When the system reboots, administrators can access the dump using the
savecore command.
The copy directory is not applicable if you use a dedicated dump device (the default with
firmware assisted dumps).
The forced copy flag is not applicable if you use a dedicated dump device (the default with
firmware assisted dumps). This flag is only used if the dump device is set to paging space hd6
(traditional dump).
While we do not teach dump analysis in this course, it is useful to know how to contact AIX
Support and provide them with the dump for analysis.

© Copyright IBM Corp. 2009, 2024 18-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Working with AIX support


• Have needed information ready:
ƒ Name, phone #, customer #,
ƒ Machine type model and serial #,
ƒ AIX version, release, technology level, and service pack
ƒ Problem description, including error codes
ƒ Severity level: Critical, significant impact, some impact, minimal
• 1-800-IBM-SERV (1-800-426-7378)
• Level 1 collects information and assign case number (e.g. TS123456789)
• Route to level 2 responsible for the product
• You might be asked to collect additional information to upload
ƒ This information is likely a snap with any system dump included
• They might ask you to update to a specific TL or SP:
ƒ APAR for your problem already addressed
ƒ Need to have a standard environment for them to investigate
The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-18. Working with AIX support

If you believe that your problem is the result of a system defect, you can call IBM AIX Support to
request assistance. But before you call 1-800-IBM-SERV, it is a good idea to have certain
information ready. They verify your name against a list of names that are associated with your
customer number, and validate that your customer number has support for the product in
question. They also need to know some details about the hardware and software environment in
which the problem is occurring - such as your MTMS (machine type, model, serial), your AIX
oslevel, and the level of any other relevant software. Of course, you need to explain your problem,
providing as much detail as possible, especially any error messages or codes.
You will be asked by the level 1 personnel the priority of your problem.
• Severity level 1 (critical) indicates that the function does not work, your business is severely
impacted, there is no work-around, and that there needs an immediate solution. For severity
level 1, you are expected to be available 24 hours and 7 days a week until the problem is
resolved.
• Severity level 2 (significant impact) indicates that the function is usable but is limited in a
way that your business is significantly impacted.
• Severity level 3 (some impact) indicates that the program is usable with less significant
features (not critical to operations) unavailable.
• Severity level 4 (minimal impact) indicates that the problem causes little impact on
operations, or a reasonable circumvention to the problem was implemented.
Level 1 assigns you a case number (TSXXXXXXXXX, formerly known as a PMR number) for
tracking purposes. Each time, in the future, when you call about this problem, you should have the
TS number at hand.

© Copyright IBM Corp. 2009, 2024 18-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
Once the basic information is collected, you are passed to level 2 personnel for the product area
for which you are having a problem. They will work with you in investigating the nature and cause
of your problem. They will search the support database to see whether it is a known problem that
is either already being worked on or has a solution that is already developed. In many cases, they
will request that you update to a specific technology level and service pack that already includes
the fix.
If they do not have a fix, they might still ask you to update your system and determine whether the
problem still exists. If the problem still exists, they now have a known software environment to
work with. At this point, they will often ask for a complete set of information from your system to
be collected and uploaded to their server to support their investigation. The basic tool for
collecting your system information is the snap command.
Uploading data to AIX support
AIX Support provides a secure site for receiving your (snap) testcase data. The site is called
Enhanced Customer Data Repository (ECuRep).
ECuRep supports several methods for sending data to IBM. The file size of your data largely
determines the methods available for use. You are required to use encrypted data transmission
methods. Beside HTTPS uploads, only FTPS (FTP over TLS) and SFTP (FTP over SSH) are
supported for manual uploads. All servers enforce authentication. For Web access, you need to
authenticate with your IBMid . For FTPS and SFTP servers, you need to create an IBM Support File
Transfer ID. The IBM Support File Transfer ID is valid until revoked. The password part of it is only
displayed at creation time. If you are loosing this password, you need to delete the ID and create a
new one.
Depending on your location, you can use a different site for uploading data to support. For
example, to upload data via the Americas testcase site, use this link
https://testcase.boulder.ibm.com/.
Alternatively, you can use the generic link to ECuRep for HTTPS uploads. For example, to upload
your snap data via HTTPS, use the following link:
https://www.secure.ecurep.ibm.com/app/upload_sf
Refer to the following link for details on the ECuRep sites and supported transfer protocols:
https://www.ibm.com/support/pages/enhanced-customer-data-repository-ecurep-send-data
Once you log in to the server, change directory to /toibm/aix. Be sure to transfer the file as binary
to avoid an undesirable attempt by SFTP to convert the contents of the file. Then, just put your file
on the server and notify your support contact that the data is there.
Previously, anonymous authentication was allowed to the IBM support testcase servers. From 31
August 2022, "Anonymous" authentication was no longer accepted on the upload or download of
data to the Testcase and ECuRep FTP servers. An IBM Support File Transfer ID is required to
upload and download data with the "toibm" and "fromibm" directories.
Since AIX Support is likely to ask for it, let’s briefly look at the snap command.

© Copyright IBM Corp. 2009, 2024 18-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Capturing system data with snap command


• snap –a
• Gathers all system configuration information
• Is useful in identifying and resolving system problems
• Includes any dump that you collected
• Writes output to multiple files under /tmp/ibmsupt
• snap –c archives data collection into single pax file:
• /tmp/ibmsupt/snap.pax.gz
• Rename to TS#########.snap.pax.gz
• Large snaps can be split into a series of smaller files:
• # snap –a -c –O <size of files>
• # snapsplit –s <size of files> -f <large snap file>

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-19. Capturing system data with snap command

Overview of the snap command


The snap command is used to gather system configuration information useful in identifying and
resolving system problems. It includes any dump that you collected. The snap command is also
used to compress the snap information gathered into a pax file. Then, the file can be written to a
device such as tape or DVD, or transmitted to a remote system. Refer to the man page for snap or
the corresponding entry in the AIX Commands Reference manual for detailed information about
the snap command and its various flags.
Packaging system information by using the snap command
First, run snap -a command to gather all system configuration information. The output of this
command is written to the /tmp/ibmsupt directory.
# snap –a
Next, you should place any additional testcase data that you feel might be helpful in resolving the
problem being investigated into the /tmp/ibmsupt/other subdirectory or into the
/tmp/ibmsupt/testcase subdirectory. This additional information is then included (together with
the information gathered directly by snap) in the compressed pax file that is created in the next
step in this command sequence. Then, the -c flag of the snap command should be used to create
a (gzip) compressed pax file containing all files in the /tmp/ibmsupt directory. The output file
that is created by this command is /tmp/ibmsupt/snap.pax.gz.
# snap –c
Next, the /tmp/ibmsupt/snap.pax.gz output file should be renamed by using the mv command to
indicate the TS case number, that is associated with the data in the file. For example, if the TS
number is 123456789, the file should be renamed TS123456789.snap.pax.gz.
# mv /tmp/ibmsupt/snap.pax.gz TS123456789.snap.pax.gz

© Copyright IBM Corp. 2009, 2024 18-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty
And upload to ECuRep.
Selected flags for snap command
Some useful flags for the snap command are the following:
• -a: Copies all system configuration information to /tmp/ibmsupt directory.
• -c: Creates a compressed pax image (snap.pax.gz) of all files in the /tmp/ibmsupt directory
or other named output directory.
• -f: Gathers file system information.
• -g: Gathers general information.
• -k: Gathers kernel information.
• -D: Gathers dump and /unix.
• -t: Creates tcpip.snap file; gathers TCP/IP information.
Extending snap to run external scripts
Scripts that the snap command is to run can be specified in three different ways:
• Specifying the name of a script in the /usr/lib/ras/snapscripts directory that snap should call.
• Specifying the all keyword, which indicates that snap should call all scripts in the
/usr/lib/ras/snapscripts directory.
• Specifying the name of a file that contains the list of scripts (one per line) that snap should call.
The syntax file:<name of file containing list of scripts> is used in this case.
The snapsplit command
The snapsplit command is used to split a snap output file into smaller files. This command is
useful for dealing with large snap files. It breaks down the file into files of a specific size that are
multiples of 1 megabyte. Furthermore, it combines these files into the original file when called
with the -u option. Refer to the man page for snapsplit (or the corresponding entry in the AIX
Commands Reference manual) for additional information regarding this command.
Splitting the snap output file from the snap command
The option -O <megabytes> enables you to split the snap output file. The snap command calls the
snapsplit command. You can use the flag as follows to split the large snap output into smaller 4
MB files.
# snap -a -c -O 4
Note that AIX Support is able to walk you through the snap creation process if there is an issue
about how it is handled. Students will explore creating a snap in the lab exercise.
Time for review questions.

© Copyright IBM Corp. 2009, 2024 18-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Review questions
1. Your system is configured for firmware assisted dumps. What is the default primary dump
device after AIX installation?

2. What command can be used to initiate a system dump?

3. True or false: Firmware assisted (fw-assisted) dump is the default dump type starting with
AIX 7.1 and higher, on modern Power servers?

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-20. Review questions

© Copyright IBM Corp. 2009, 2024 18-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Review answers
1. Your system is configured for firmware assisted dumps. What is the default
primary dump device after AIX installation?
The answer is the default primary dump device is /dev/lg_dumplv.

2. What command can be used to initiate a system dump?


The answer is sysdumpstart.

3. True or false: Firmware assisted (fw-assisted) dump is the default dump type
starting with AIX 7.1 and higher, on modern Power servers?
The answer is true.

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-21. Review answers

© Copyright IBM Corp. 2009, 2024 18-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Exercise

System Dump

The AIX system dump facility © Copyright IBM Corporation 2024

Figure 18-22. Exercise

© Copyright IBM Corp. 2009, 2024 18-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 18. The AIX system dump facility

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Explain what is meant by a system dump
ƒ Determine and change the primary and secondary dump devices
ƒ Create a system dump

© Copyright IBM Corporation 2024

Figure 18-23. Unit summary

© Copyright IBM Corp. 2009, 2024 18-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Unit 19.Install and cloning techniques


Estimated time
00:25 Topic 1
00:25 Topic 2

Overview
This unit describes techniques for installing and cloning AIX. These procedures can help to reduce
the size of a maintenance window. Specific techniques are taught for installing system updates
while cloning the rootvg.

How you will check your progress


• Review questions
• Lab exercise

References
AIX Version 7.3 Cloning a rootvg using alternate disk installation
https://www.ibm.com/docs/en/aix/7.3?topic=aix-cloning-rootvg-using-alternate-disk-installation
AIX Version 7.3 Using the multibos utility
https://www.ibm.com/docs/en/aix/7.3?topic=system-using-multibos-utility
AIX Version 7.3 Live Update
https://www.ibm.com/docs/en/aix/7.3?topic=updates-live-update
SG24-7910 AIX Version 7.1 Differences Guide (Redbooks)
https://www.redbooks.ibm.com/abstracts/sg247910.html
Get Started with the AIX Toolbox for Open Source Software
https://www.ibm.com/support/pages/node/6585774
DNF is now available on AIX Toolbox
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2021/05/28/dnf-is-no
w-available-on-aix-toolbox
Creating local repo with DNF and AIX Toolbox Media Image
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/09/creating-l
ocal-repo-with-dnf-and-aix-toolbox-media
Live Update restrictions
https://www.ibm.com/docs/en/aix/7.3?topic=planning-restrictions

© Copyright IBM Corp. 2009, 2024 19-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Use alternate disk installation techniques to update AIX
ƒ Explore AIX Live Update and geninstall command
ƒ Use multibos to update AIX
ƒ Create ’cloud ready’ images of AIX

© Copyright IBM Corporation 2024

Figure 19-1. Unit objectives

© Copyright IBM Corp. 2009, 2024 19-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Topic 1 objectives
• Install a mksysb onto an alternate disk.
• Clone an existing rootvg to an alternate disk.
• Remove an alternate disk.
• Live update with interim fixes, service packs, and technology levels.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-2. Topic 1 objectives

Let’s start topic 1. In this topic we will cover the following:


• Install a mksysb onto an alternate disk
• Clone an existing rootvg to an alternate disk
• Remove an alternate disk
• Create ISO and OVA (portable/cloud) mksysb images
• Live update with interim fixes, service packs, and technology levels

© Copyright IBM Corp. 2009, 2024 19-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Alternate disk installation

# smit alt_install

# smit alt_mksysb # smit alt_clone


-OR- -OR-
# alt_disk_mksysb # alt_disk_copy

Installing a mksysb on Cloning the running


another disk. rootvg to another disk.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-3. Alternate disk installation

© Copyright IBM Corp. 2009, 2024 19-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Alternate mksysb disk installation (1 of 2)

hdisk0
rootvg (AIX 7.2)

AIX 7.3 hdisk1


mksysb

# alt_disk_mksysb –m /export/73mksysb –d hdisk1

Example installs an AIX 7.3 mksysb on hdisk1.


• Bootlist is set to alternate disk (hdisk1).
• Changing the bootlist allows you to boot different AIX levels
(hdisk0 boots AIX 7.2, hdisk1 boots AIX 7.3).
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-4. Alternate mksysb disk installation (1 of 2)

Introduction
An alternate mksysb installation involves installing a mksysb image that was created from another
system onto an alternate disk of the target system.

Example
In the example, an AIX 7.3 mksysb tape image is installed on an alternate disk, hdisk1 by running
the following command:
# alt_disk_mksysb -m /export/73mksysb -d hdisk1
The system now contains two rootvgs on different disks. In the example, one rootvg has an AIX
6.1 (hdisk0), one has an AIX 7.1 (hdisk1).

Which disk does the system use to boot?


The alt_disk_mksysb command changes the bootlist by default. During the next reboot, the
system will boot from the new rootvg. If you do not want to change the bootlist, use the option -B
of alt_disk_mksysb.
By changing the bootlist, you determine which AIX version you want to boot.

Filesets within the mksysb being installed


The mksysb image that is used for the installation must be created on a system that has either:
• The same hardware configuration as the target system.

© Copyright IBM Corp. 2009, 2024 19-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
• All the device and kernel support that is installed for a different machine type or platform. In
this case, the following filesets must be contained in the mksysb:
▪ devices.*
▪ bos.mp
▪ bos.up
▪ bos.64bit 

alt_disk_mksysb options
The alt_disk_mksysb command has the following options:
• -m device
• -d target-disks
• -B (Do not change the bootlist).
• -i image.data
• -s script
• -R resolv.conf
• -p platform
• -L mksysb_level
• -n (Remain a NIM client.)
• -P phase
• -c console
• -r (Reboot after installation).
• -k (Keep mksysb device customization).
• -y (Import non-rootvg volume groups).
Next, we will introduce the SMIT interface.

© Copyright IBM Corp. 2009, 2024 19-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Alternate mksysb disk installation (2 of 2)


# smit alt_mksysb
Install mksysb on an Alternate Disk

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* Target Disk(s) to install [hdisk1] +
* Device or image name [/export/73mksysb] +
Phase to execute all +
image.data file [] /
Customization script [] /
Set bootlist to boot from this disk
on next reboot? yes +
Reboot when complete? no +
Verbose output? no +
Debug output? no +
resolv.conf file [] /
Use system alt_disk_install boot image? no +
Instead of the boot image from the mksysb.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-5. Alternate mksysb disk installation (2 of 2)

SMIT panel example


The alternate disk installation function can also be run from the smit dialog panel.
When you run smit alt_mksysb, you get the SMIT menu shown on the visual.
The installation on the alternate disk is broken into three phases:
1. Phase 1 creates the altinst_rootvg volume group, the alt_logical volumes, the /alt_inst file
systems and restores the mksysb data.
2. Phase 2 runs any specified customization script and copies a resolv.conf file, if specified.
3. Phase 3 unmounts the /alt_inst file systems, renames the file systems and logical volumes
and varies off the altinst_rootvg. It sets the bootlist and reboots, if specified.
Each phase can be run separately. Phase 3 must be run to get a usable rootvg volume group.
Use system alt_disk_install boot image, instead of the boot image from the mksysb?
When you install a mksysb with the alt_disk_mksysb command and the
bos.alt_disk_install.boot_images fileset was installed on the mksysb source system, the
bosboot.disk.chrp boot image from that fileset is used as the boot image for the new
altinst_rootvg. Unless you chose to build a new boot image when creating the mksysb (-C flag),
this boot image may not be appropriate if there are ifixes that affect the kernel on the source
system. The -C flag overrides the usage of that boot image and allows you to create a custom boot
image in the current rootvg of the system, on which the alt_disk_mksysb is executed. Save the
original /usr/lpp/bos.alt_disk_install/boot_images/bosboot.disk.chrp file, and copy the new
custom boot image to that location. The new boot mage is then used in the altinst_rootvg. For
more information, see the the alt_disk_mksysb man page for more information.
Let’s describe alternate disk rootvg cloning.

© Copyright IBM Corp. 2009, 2024 19-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Alternate disk rootvg cloning (1 of 2)

hdisk0
rootvg (AIX 7.3 TL1)

Clone

hdisk1
AIX 7.3 TL2 rootvg (AIX 7.3 TL2)

# alt_disk_copy -b update_all -l /mnt/TLupdate -d hdisk1

• Example creates a copy of the current rootvg on hdisk1


• Installs a technology level on the clone (AIX7.3 TL2)
• Changing the bootlist allows you to boot different AIX levels
(hdisk0 boots AIX 7.3 TL1, hdisk1 boots AIX 7.3 TL2)

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-6. Alternate disk rootvg cloning (1 of 2)

Benefits of cloning rootvg


Cloning the rootvg to an alternate disk can have many advantages. One advantage is having an
online backup available if a disk fails. Another benefit of rootvg cloning is in applying new
maintenance levels or updates. A copy of the rootvg is made to an alternate disk (in the example
hdisk1) followed by the installation of a technology level on that copy. The active system runs
uninterrupted during this time. When the system is rebooted, it will boot from the newly updated
rootvg for testing. If the technology level causes problems, the old rootvg can be used by
resetting the bootlist and rebooting.

Example
In the example, alt_disk_copy -b update_all -l /mnt/TLupdate -d hdisk1, rootvg that is on
hdisk0, is cloned to the alternate disk hdisk1. Additionally, a new technology level is applied to
the cloned version of AIX.
The alt_disk_copy options are (see man page):
• -b bundle name
• -f APAR_list file
• -F list_of_APARs
• -l path to location of installp images
• -w list_of_filesets_to_install
• -d target disks
• -B (Do not change bootlist).

© Copyright IBM Corp. 2009, 2024 19-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
• -r (Reboot after cloning).
• -s script
• -P phases
• -R resolv.conf
• -W filesets
Let’s review the SMIT fastpath.

© Copyright IBM Corp. 2009, 2024 19-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Alternate disk rootvg cloning (2 of 2)


# smit alt_clone
Clone the rootvg to an Alternate Disk
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Target Disk(s) to install [hdisk1] +
Phase to execute all +
image.data file [] /
Exclude list [] /
Bundle to install [update_all] +
-OR-
Fileset(s) to install []
Fix bundle to install []
-OR-
Fixes to install []
Directory or Device with images [/mnt/TLupdate]
(required if filesets, bundles or fixes used)
installp Flags
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
ACCEPT new license agreements? no +
Customization script [] /
Set bootlist to boot from this disk
on next reboot? yes +
Reboot when complete? no +
Verbose output? no +
Debug output? no +

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-7. Alternate disk rootvg cloning (2 of 2)

Example with SMIT


The SMIT fastpath for alternate disk rootvg cloning is smit alt_clone.
The target disk in the example is hdisk1 that means the rootvg is copied to that disk. If you
specify a bundle, a fileset or a fix, then the installation or the update takes place on the clone, not
in the original rootvg.
By default, the bootlist is set to the new disk. Changing the bootlist lets you boot from the original
rootvg or the cloned rootvg.
Let us see how to remove an alternate disk installation.

© Copyright IBM Corp. 2009, 2024 19-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Removing an alternate disk installation

Original hdisk0
rootvg (AIX 7.3 TL1)

# bootlist -m normal hdisk0 hdisk1


# shutdown -Fr
Clone
# lsvg rootvg (AIX 7.3 TL2)
rootvg
altinst_rootvg
# alt_rootvg_op -X

• alt_rootvg_op -X removes the


# bootlist -m normal hdisk1 ODM definition from the ODM.
# shutdown -Fr
# lsvg • DO NOT USE exportvg to
rootvg remove the alternate volume
old_rootvg group!
# alt_rootvg_op –X old_rootvg
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-8. Removing an alternate disk installation

Removing the alternate rootvg


If you created an alternate rootvg with alt_disk_mksysb or alt_disk_copy, but no longer want
to use it, first boot your system from the original disk (in the example, hdisk0) and then use
alt_rootvg_op.
When running lsvg to list the volume groups in the system, the alternate rootvg is shown with the
name altinst_rootvg.
To remove the alternate rootvg, DO NOT USE the exportvg command! Run the command:
# alt_rootvg_op -X
This command removes the altinst_rootvg definition from the ODM database. If exportvg runs by
accident, you must re-create the /etc/filesystems file before rebooting the system. The system
will not boot without a correct /etc/filesystems.

Removing the original rootvg


If you created an alternate rootvg with alt_disk_mksysb or alt_disk_copy, and no longer want
to use the original disk, first boot your system from the cloned disk and then use the
alt_rootvg_op command to remove it. When running lsvg to list the volume groups in the
system, the alternate rootvg is shown with the name old_rootvg. To remove the original rootvg,
do not use the exportvg command. Run the command:
# alt_rootvg_op -X old_rootvg
This command removes the old_rootvg definition from the ODM database. If exportvg runs by
accident, you must re-create the /etc/filesystems file before rebooting the system. The system
will not boot without a correct /etc/filesystems.

© Copyright IBM Corp. 2009, 2024 19-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
To use the alternate disk capabilities with a migration installation, you need to use NIM.

© Copyright IBM Corp. 2009, 2024 19-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

NIM alternate disk migration


• alt_disk_copy does not support migrating to a new version or release of AIX.
• nimadm uses a NIM server to migrate to an alternate disk.

hdisk0
rootvg
(AIX 7.2)

Clone
NIM server NIM client:
hdisk1
lpar1
rootvg
AIX 7.3 (AIX 7.3)

# nimadm -c lpar1 -s spot1 -l lpp1 -d hdisk1 -Y

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-9. NIM alternate disk migration

What is nimadm?
The nimadm command (Network Install Manager Alternate Disk Migration) creates a copy of
rootvg to a free disk (or disks) and simultaneously migrates it to a new version or release level of
AIX. The nimadm command uses NIM resources to perform this function.

Advantages of nimadm
There are several advantages to using the nimadm command over a conventional migration:
• Reduced downtime. The migration is done while the system is up and functioning normally.
There is no requirement to boot from installation media, and most of processing occurs on the
NIM master.
• The nimadm command facilitates quick recovery in the event of migration failure. Since the
nimadm command uses alt_disk_copy to create a copy of rootvg, all changes are done to the
copy (altinst_rootvg). In the event of serious migration installation failure, the failed migration
is cleaned up and there is no need for the administrator to take further action. In the event of a
problem with the new (migrated) level of AIX, the system can be quickly returned to the
pre-migration operating system by booting from the original disk.
• The nimadm command allows a high degree of flexibility and customization in the migration
process. This process is done with the use of optional NIM customization resources:
image_data, bosinst_data, exclude_files, pre-migration script, installp_bundle, and
post-migration script.
It is important to note that an alternate disk migration cannot be done without using NIM. Details
of using NIM to do an alternate disk migration are not covered in this course. The intent is only to

© Copyright IBM Corp. 2009, 2024 19-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
make the students aware of this NIM capability. Students can refer to the full NIM training course,
AN22G AIX Network Installation Management Concepts and Configuration.
Let us see the Live Update feature in AIX 7.2.1 and later.

© Copyright IBM Corp. 2009, 2024 19-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

AIX Live Update


• AIX 7.2 TL0 introduced support for Live Update (LU).
ƒ This eliminates the workload downtime that is normally associated with installing operating system
fixes.
ƒ AIX 7.2 TL0 supports live update only for interim fixes.
• AIX 7.2 TL1 with SP1 introduces support for installing future service packs and technology
levels by using Live Update.
• Live Update is based on a combination of existing AIX technologies.
ƒ Alternate disk install, WPAR migration, and Live Partition Mobility
• The partition on which the Live Update operation is performed must meet certain configuration
requirements.
ƒ Similar to Live Partition Mobility requirements
• Live Update moves the AIX workload into a new partition.
ƒ The new LPAR is called the surrogate, and it uses a different LPAR ID than the original LPAR, since they
both must exist concurrently.
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-10. AIX Live Update

Starting with AIX Version 7.2, AIX operating system provides the AIX Live Update function which
eliminates downtime associated with patching the operating system.
This new feature allows workloads to remain active during a Live Update operation and the
operating system can use the interim fix immediately without needing to restart the entire system.
In the first release of this feature in AIX 7.2 TL0, Live Update allows customers to install interim
fixes (ifixes) only. With AIX 7.2 TL1, it is now possible to use this function to install AIX Service
Packs (SPs) and Technology Levels (TLs) without a reboot.

The Live Update function is based on a number of existing AIX technologies, such as alternate disk
install, Workload partition (WPAR) migration, and Live Partition Mobility (LPM). The AIX LPAR on
which the Live Update operation is performed must meet certain configuration requirements.
Many of these are the same as the requirements for LPM (Live Partition Mobility).
Live Update introduces some new terminology to AIX. The operation in essence creates a new
LPAR with the same configuration as the original LPAR, and then moves the running workload into
this new LPAR. The term “surrogate” is used to refer to the new LPAR that is created during the
Live Update operation.
When the Live Update operation is complete, the workload will be running in a partition with the
same LPAR name as the original partition, however the LPAR ID will be different. This is because
both the original and surrogate LPARs must exist concurrently during the Live Update operation.

© Copyright IBM Corp. 2009, 2024 19-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

AIX Live Update and applications


• Live Update is intended for applying fixes that contain changes to the kernel and kernel
extensions, without having to reboot.
• Applications that require a library fix must be stopped and restarted after the Live Update
operation is complete.
• AIX 7.2 TL1 adds the –u flag to the genld command.
ƒ Displays a list of processes that are using the old versions of shared objects that were updated by a
Live Update operation
ƒ When used along with the –l flag, also lists the shared objects that were changed, for example:
# genld –lu
Proc_pid: 5505340 Proc_name: netscanner
d28b8100 1eea06 /usr/lib/libdns.a[shr.o]

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-11. AIX Live Update and applications

Live Update is intended for applying fixes that contain changes to the kernel and kernel
extensions, without having to reboot. Fixes can contain other files, such as commands and
libraries, and Live Update does not change the way in which these fixes are applied. The workload
migration methods employed by Live Update mean that a user process that uses a set of shared
libraries will end up running on the new LPAR using the same versions of the libraries, even if
some or all of them have been replaced as part of the fixes that have been applied during the Live
Update operation.
Applications that require to make use of a fixed version of any shared object or additional
command must be stopped and then restarted once the Live Update operation has completed.
AIX 7.2 TL1 enhances the genld command with the addition of the –u flag to display a list of
processes that are using shared objects that have been updated by a Live Update operation. When
the genld command is invoked with both the –l and –u flags, it displays a list of processes along
with details of the particular shared object they are using that have been updated. This provides
the administrator with a method to identify the processes that they may wish to stop and restart.

© Copyright IBM Corp. 2009, 2024 19-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update requirements (1 of 2)


• POWER7 or newer processor-based server with PowerVM managed by HMC V8 R8.4.0 or later
• Minimum firmware levels apply for POWER7 and POWER7+ hardware.
• All POWER8 and later firmware levels are supported.
• Two VIOS partitions, both running 2.2.3.50 or later
• Managed system has available CPU and memory resources to create a surrogate LPAR with
the same configuration as the original.
• All I/O must be virtualized – no physical I/O devices.
• LPAR is configured with dedicated memory.
• Partition profile must have a minimum memory setting greater than or equal to 2 GB, which is the
minimum value required to boot AIX 7.2.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-12. Live Update requirements (1 of 2)

The system running the AIX 7.2 (or later) partition on which the Live Update operation will be
performed must meet minimum firmware level requirements. All POWER8 and newer system
firmware levels are supported. The minimum levels for POWER7 and POWER7+ processor-based
system firmware releases are as follows:
• AX730_066
• AX740_043
• AX770_063
• AX773_056
• AX780_056
The firmware image name prefix for POWER7 and POWER7+ systems is AL for low-end system,
AM for mid-range systems, and AH for high-end systems.
When using the AX730_66 or AX740_043 levels, PowerVC is unable to seamlessly manage the
updated LPAR.
The visual lists other requirements that must be met in order to perform Live Update operations.
Refer to the product documentation for the latest requirements.

© Copyright IBM Corp. 2009, 2024 19-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update requirements (2 of 2)


• No open console window
• Virtual Trusted Platform Module and Trusted Execution are not enabled.
• LPAR has no active WPARs.
• LPAR can be dynamically reconfigured with an extra virtual Ethernet adapter.
ƒ Requires an active RMC connection with the HMC, and one available virtual I/O slot

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-13. Live Update requirements (2 of 2)

AIX 7.2 TL0 does not support Live Update when the LPAR has any type of remote restart capability
enabled. With AIX 7.2 TL1, Live Update is now supported when the LPAR has the simplified
remote restart capability enabled. The visual lists other requirements that must be met in order to
perform Live Update operations. Refer to the product documentation for the latest requirements.
AIX 7.3 introduced an enhancement to Live Update that allows you to save and restore all AIX
tunable parameter values after the next boot and next Live Update operations. Reference:
https://www.ibm.com/docs/en/aix/7.3?topic=interface-global-manipulation-tuning-parameters
Most of the *o tunables commands, e.g., no, have added or modified a -K option to save the next
Live Update and next boot tunables.
-L also displays a new LVUP column that shows the next Live Update value for schedo, vmo,
no, lvmo, asoo, etc.
-K Sets the tunable parameter value in both /etc/tunables/nextboot and
/etc/tunables/nextliveupdate files. The -K flag can be used only with the -r flag.

© Copyright IBM Corp. 2009, 2024 19-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
When you specify the -K flag with the -r and -d (or -D) flags, the tunable parameter value is set to
its default value in the /etc/tunables/nextboot and /etc/tunables/nextliveupdate files to be
used during the next boot or Live Update operations. Example:
# no -LK tcp_inpcb_hashtab_siz
----------------------------------------------------------------------------------
-----------
NAME CUR DEF BOOT LVUP MIN MAX UNIT TYPE
DEPENDENCIES
----------------------------------------------------------------------------------
-----------
tcp_inpcb_hashtab_siz 24499 24499 24509 24499 1 999999 numeric
R
----------------------------------------------------------------------------------
-----------
The example below demonstrates how we can change the tcp_inpcb_hashtab_siz tunable to
24509 (next prime larger than default 24499) during the next live update. This is a restricted
tunable, so we run the following command:
# no -rK -o tcp_inpcb_hashtab_siz=24509
Setting tcp_inpcb_hashtab_siz to 24509 in nextboot file
Warning: changes will take effect only at next reboot
Setting tcp_inpcb_hashtab_siz to 24509 in nextliveupdate file
Warning: changes will take effect at next reboot or live update operation
# no -LK tcp_inpcb_hashtab_siz
----------------------------------------------------------------------------------
-----------
NAME CUR DEF BOOT LVUP MIN MAX UNIT TYPE
DEPENDENCIES
----------------------------------------------------------------------------------
-----------
tcp_inpcb_hashtab_siz 24499 24499 24509 24509 1 999999 numeric
R
----------------------------------------------------------------------------------
-----------
# cat /etc/tunables/nextliveupdate
no:
tcp_inpcb_hashtab_siz = "24509"

© Copyright IBM Corp. 2009, 2024 19-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update storage restrictions (1 of 2)


• The LPAR can use only virtual SCSI and virtual Fibre Channel disks.
• All disks are configured for MPIO through two VIOS partitions.
• Virtual SCSI server adapters are configured for the specific client adapter.
ƒ That is, the "Any client can connect" option cannot be used.
• Any virtual SCSI disks use only physical volumes or SSP LUs as backing storage.
ƒ Logical volume-backed and file-backed targets are not supported, since they cannot be accessed by
using MPIO across two VIOS partitions.
• Any virtual FC LUNs are zoned for both WWPNs on the client adapter.
• At least 100 MB free space in the / and /var file systems, and at least 250 KB free space in
/home.
• The LPAR needs extra disks for use during the operation.
ƒ Two separate copies of rootvg are created during the operation.
ƒ Extra disks are required when the LPAR is configured with non-rootvg paging space or dump devices.
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-14. Live Update storage restrictions (1 of 2)

The visual lists some of the requirements and limitations related to the storage configuration used
by the LPAR on which Live Update operations will be performed. Refer to the product
documentation for the latest requirements.

© Copyright IBM Corp. 2009, 2024 19-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update storage restrictions (2 of 2)


• Only JFS2 or NFS file systems can be in use by the client.
• No mounted virtual optical devices
• No tape drives*
• No existing alternate rootvg
• If the rootvg volume group is mirrored, there can be no more than two copies of every logical
volume.
• No stale logical volumes in rootvg
• The boot list must be set to the boot logical volume in the current rootvg.
• The default names must be used for the required operating system logical volumes (used for
the /, /var, /opt, and /usr file systems, and the boot logical volume).
• Refer to the online documentation for a complete list of restrictions.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-15. Live Update storage restrictions (2 of 2)

The visual lists some of the requirements and limitations related to the storage configuration used
by the LPAR on which Live Update operations will be performed. Refer to the product
documentation for the latest requirements.
*In AIX 7.2 with Technology Level 4, and earlier, the Live Update operation is not supported on a
physical tape device, virtual tape device, and virtual optical device. These devices must be
removed before you perform the Live Update operation. In IBM AIX 7.2 with Technology Level 5,
or later, the Live Update operation supports only N_Port ID Virtualization (NPIV) virtual tape
devices that are used by the storage agent in IBM Spectrum Protect Version 8.1.11, or later, for
LAN-free data transfer, and the AIX Enhanced device driver (Atape device driver). Before you
perform the Live Update operation, ensure that no backup operation is in progress and that the
storage agent is stopped.
Reference: https://www.ibm.com/docs/en/aix/7.3?topic=planning-restrictions

© Copyright IBM Corp. 2009, 2024 19-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

AIX software requirements


• The bos.liveupdate.rte fileset must be installed to initiate Live Update operations.
ƒ Installed automatically during a default overwrite install of AIX 7.2 or higher.
ƒ Might not be installed automatically during a customized or migration install
• Corequisite filesets
ƒ artex.base.rte AIX Runtime Expert
ƒ artex.base.samples AIX Runtime Expert sample profiles
ƒ bos.alt_disk_install.boot_images Alternate Disk Installation Disk Boot Images
ƒ bos.alt_disk_install.rte Alternate Disk Installation Runtime
ƒ bos.sysmgt.hmc HMC Client Runtime
ƒ rsct.basic.rte RSCT Basic Function
ƒ rsct.compat.clients.rte RSCT Event Management Client Function
• Not all corequisite filesets might be installed automatically.
ƒ Depends on AIX installation method and level of base install media

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-16. AIX software requirements

The LPAR on which Live Update operations will be performed must have certain filesets installed.
If the LPAR was installed by performing a new and complete overwrite install of AIX 7.2 using the
default options, then all of the required filesets will be installed. If the LPAR was installed using
non-default options, or a migration or preservation installation was performed, then the required
filesets might not be installed.
The bos.liveupdate.rte fileset lists other filesets as corequisites. However, depending on the
level of base install media being used (AIX 7.2 TL0 or AIX 7.2 TL1) some required corequisites
may not be listed.
The visual lists the additional filesets required to be installed for Live Update to function correctly.
If the AIX instance was not installed by performing a new and complete overwrite install of AIX
7.2 or 7.3 using the default options, then you should check that all of these filesets are installed.

© Copyright IBM Corp. 2009, 2024 19-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

HMC token
• The Live Update operation is initiated and driven from the AIX LPAR.
• The LPAR must have an authentication token for the HMC controlling the managed system on
which it is running.
• The token must be created by using the hmcauth command on the LPAR before the Live
Update operation is started*.
ƒ The command prompts for the HMC hostname or IP address, the HMC user ID, and the user password.
ƒ The specified HMC user ID must have permission to create and modify LPARs.
ƒ The hmcclientliveupdate HMC task role has all the required privileges.
ƒ The token is stored only in kernel memory, and is not persistent across reboots.
• The Live Update configuration file specifies the HMC and user ID that is used to perform the
operation.
ƒ This information must match the values that are used to create the HMC token.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-17. HMC token

The Live Update operation is initiated and driven from the AIX LPAR itself. The LPAR must have an
authentication token that allows it to get the HMC for the managed system to perform certain
operations on its behalf, such as create a new LPAR. The authentication token is created on the
LPAR using the hmcauth command, which is supplied as part of the bos.sysmgt.hmc fileset. The
command can be invoked with no arguments, in which case it will prompt for the required
information. The required information is the HMC hostname or IP address, along with the HMC
user ID and password that will be used. The HMC user ID must have certain permissions. The
hmcclientliveupdate HMC task role has all the privileges that are required for the Live Update
operation. If a user is defined on the HMC with this role, the authentication can be done with this
user ID rather than the hscroot user. Once generated, the token is stored in kernel memory, and is
not persistent across operating system reboots.
The configuration file used to perform the Live Update operation supplies the HMC hostname and
user ID that will be used to perform the operation. This information must match the values used to
create the HMC token.
*Note, Live Update also supports PowerVC managed LPARs. You can authenticate with the
PowerVC by using the pvcauth command or by defining a PowerVC object through NIM. Requires
the installation of the bos.sysmgt.pvc fileset on the AIX LPAR.

© Copyright IBM Corp. 2009, 2024 19-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update configuration file


• The /var/adm/ras/liveupdate/lvupdate.data file provides information about the
extra disks and the HMC that will be used.
ƒ Create the file by copying the supplied template from
/var/adm/liveupdate/lvupdate.template.
• Example:

general:
kext_check =
disks:
nhdisk = hdisk1
mhdisk = hdisk2
tohdisk = hdisk3
tshdisk = hdisk4
hmc:
lpar_id = 5
management_console = hmc4.austin.ibm.com
user = hscroot

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-18. Live Update configuration file

The Live Update operation expects to be provided with multiple pieces of information in the
/var/adm/ras/liveupdate/lvupdate.data configuration file. An example of the file is shown on
the visual.
The kext_check value controls whether or not the Live Update operation will check that all
loaded kernel extensions are compatible with Live Update. The value defaults to yes if not set in
the file.
The disks stanza provides information about the additional sets of disks that will be used during
the Live Update operation.
The nhdisk field is a comma separated list of hdisk devices that are used to create a copy of the
rootvg volume group. This copy of rootvg will be updated with the interim fix, and used to boot the
surrogate LPAR. The total capacity of the disks needs to match the capacity of the required file
systems (/, /var, /opt, /usr, and /tmp) from the original rootvg.
The mhdisk field is a comma separated list of hdisk devices that are used to create a second copy
of the rootvg volume group. This copy of rootvg will be used to continue running the original LPAR
after the disks used for the original rootvg are being accessed by the surrogate LPAR.
The tohdisk field is a comma separated list of hdisk devices that are used for temporary storage
on the original LPAR. For AIX 7.2 TL0, the capacity needs to match the total capacity of paging
space logical volumes on non-rootvg volume groups, and any dump devices defined for the
original partition, including those in the rootvg volume group. For AIX 7.2 TL1 and above, the
capacity needs to match the total capacity of any non-rootvg paging space logical volumes and
non-rootvg dump devices.
The tshdisk field is a comma separated list of hdisk devices that are used for temporary storage
on the surrogate LPAR. For AIX 7.2 TL0, the capacity needs to match the total capacity of paging
space logical volumes on non-rootvg volume groups, and any dump devices defined for the

© Copyright IBM Corp. 2009, 2024 19-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
original partition, including those in the rootvg volume group. For AIX 7.2 TL1 and above, the
capacity needs to match the total capacity of any non-rootvg paging space logical volumes and
non-rootvg dump devices.
The lpar_id field of the hmc stanza contains the preferred LPAR ID that will be used for the
surrogate LPAR. If this value is already in use, then the surrogate will use the first available value.
The remainder of the hmc stanza lists the HMC information that will be used during the Live
Update operation. This must match the values used to generate the HMC authentication token.

© Copyright IBM Corp. 2009, 2024 19-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The geninstall command


• Live Update operations are initiated by the geninstall command.
ƒ The command syntax depends on the type of fixes that are being installed:
í To install an interim fix that is located in the /tmp/fixes directory:
ƒ # geninstall –k –d /tmp/fixes IZ12345.170122.epkg.Z
í To install all the updates and interim fixes that are located in the /tmp/fixes directory:
ƒ # geninstall –k –d /tmp/fixes all
í To install all the updates, but not interim fixes, that are located in the /tmp/fixes directory:
ƒ # geninstall –k –d /tmp/fixes update_all
í Use the –p flag to start the command in preview mode, for example:
ƒ # geninstall –p –k –d /tmp/fixes all
• The geninstall command can also be initiated through SMIT fast path lu_update_all, or
navigating the menus by selecting: Software Installation and Maintenance > Install and
Update Software > Update Installed Software to Latest Level (Live Update).

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-19. The geninstall command

The geninstall –k command is used to perform a Live Update operation. The –d flag is used to
specify the directory that contains the fixes that are to be installed by the operation. When
installing only an interim fix, the fix file names are specified on the command line. When installing
a service pack or technology level, the keyword all will install all the updates and interim fixes
located in the specified directory. If the keyword update_all is used, the updates will be
installed but not any interim fixes.
The command also supports use of the –p flag to perform a preview operation. The preview
checks that the LPAR configuration meets the requirements for performing a Live Update
operation. It also generates an estimate of the amount of time it will take to perform the
operation. This includes the overall time to perform the update as well as an estimate of the
blackout time, when the workload might be unresponsive.
Live Update operations can also be performed using SMIT.

© Copyright IBM Corp. 2009, 2024 19-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Performing the Live Update operation


• Generate the required HMC token by using the hmcauth command.
• Run the Live Update operation in preview mode to ensure that all requirements are met.
• Before installing a technology level or service pack, create a new mksysb image.
í Fixes for a TL or SP are committed on the original LPAR before the Live Update process clones the
rootvg.
• Run the Live Update operation.
• If a TL or SP was installed, then when the operation completes run genld –lu to list
application processes that are using old versions of shared objects that were updated.
í Optionally, stop and restart application processes that desire to use the updated shared objects.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-20. Performing the Live Update operation

The visual lists the recommended sequence of steps to perform a Live Update operation.

© Copyright IBM Corp. 2009, 2024 19-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 1

HMC

CEC

Original LPAR
lpar name = orgname

VIOS
Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC

Original
rootvg
VIOS
New rootvg
(Alt-disk-install)
vSCSI/vFC

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-21. Live Update interim fix example: Phase 1

The next sequence of visuals shows a simplified representation of the different phases involved in
performing a Live Update operation to install an interim fix. In this example, the LPAR is running
AIX 7.3 TL1 and does not have any non-rootvg volume group paging space logical volumes or
dump devices.
Phase 1 consists of cloning the original rootvg and then installing the interim fix using the normal
alt-disk-copy and update process. This is transparent to the administrator. The new rootvg is then
customized with the live update environment. This cloned and updated rootvg will be used to boot
the surrogate LPAR that is created.

© Copyright IBM Corp. 2009, 2024 19-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 2

HMC

CEC Workload continues to run

Original LPAR Surrogate LPAR


lpar name = orgname_lku0 lpar name = orgname

VIOS
Virt. ent Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC vSCSI/vFC

Original
rootvg
VIOS
New rootvg
(Alt-disk-install)

vSCSI/vFC

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-22. Live Update interim fix example: Phase 2

Phase 2 of the process performs the following steps:


• Removes one path to the disks in the original LPAR.
• The original LPAR is renamed by adding the suffix _lku0.
• The surrogate LPAR is created using the original LPAR name and the LPAR ID specified in the
lvupdate.data configuration file. If the specified LPAR ID is not available, then the first
available ID will be used.
The surrogate has the same CPU and memory configuration as the original LPAR. The surrogate is
configured to use the storage paths that have been removed from the original LPAR. This involves
reconfiguring the virtual SCSI and virtual Fibre Channel server adapters in one of the VIOS
partitions.
At this point the surrogate LPAR is booted using the new rootvg.

© Copyright IBM Corp. 2009, 2024 19-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 3

HMC

CEC Workload continues to run

Original LPAR Surrogate LPAR


lpar name = orgname_lku0 lpar name = orgname

Virt. ent Virt. ent

VIOS
Virt. ent Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC vSCSI/vFC

Original
rootvg VIOS
mirror Original New rootvg
rootvg (Alt-disk-install)

vSCSI/vFC

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-23. Live Update interim fix example: Phase 3

The next phase of the process mirrors the rootvg in the original LPAR (the mirror will be split later
in the overall process). A private VLAN connection is created between the original and surrogate
LPARs. The connection uses an available VLAN ID.

© Copyright IBM Corp. 2009, 2024 19-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 4

HMC

CEC Workload continues to run

Original LPAR Surrogate LPAR


lpar name = orgname_lku0 lpar name = orgname

Virt. ent Virt. ent

VIOS
Virt. ent Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC vSCSI/vFC

Original
rootvg VIOS
mirror Original New rootvg
rootvg (Alt-disk-install)

vSCSI/vFC

Conditioning of new rootvg


Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-24. Live Update interim fix example: Phase 4

The next part of the process performs conditioning on the surrogate LPAR. This includes ensuring
that the surrogate uses the same device names and numbers as the original LPAR. The private
VLAN between original and surrogate LPARs is configured with IPv6 addresses. The example
ifconfig output below is from the original LPAR with a temporary interface en1 configured for the
duration of the live update operation:
# ifconfig -a
en0:
flags=1e084863,81cc0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64B
IT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
inet 10.8.12.16 netmask 0xffffff00 broadcast 10.8.12.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en1:
flags=1e084863,181cc0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64
BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
inet6 fe80::eceb:78ff:fe35:9f03/64
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0:
flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LAR
GESEND,CHAIN>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1%1/128
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
# entstat -d en1 | grep -i vlan
Invalid VLAN ID Packets: 0
Port VLAN ID: 4094
VLAN Tag IDs: None

© Copyright IBM Corp. 2009, 2024 19-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
This connection is going to be used for transferring the process memory information. The original
LPAR retains its regular IP configuration, since the workload is still running. The conditioning also
includes preparing a scratch file system on the current boot rootvg of the surrogate that will be
used by the chrooted environment that will eventually be running.

© Copyright IBM Corp. 2009, 2024 19-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 5

HMC

CEC Workload continues to run

Original LPAR Live Migration Surrogate LPAR


lpar name = orgname_lku0 lpar name = orgname

Virt. ent Virt. ent

VIOS
Virt. ent Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC vSCSI/vFC

Original
rootvg VIOS
mirror Original New rootvg
rootvg (Alt-disk-install)

vSCSI/vFC

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-25. Live Update interim fix example: Phase 5

The next part of the process performs a minimal WPAR style checkpoint of the processes running
on the original LPAR (designated processes are not check-pointed). The application process
memory is then moved asynchronously to the surrogate LPAR over the private VLAN connection.

© Copyright IBM Corp. 2009, 2024 19-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Blackout period

HMC

CEC Workload paused

Original LPAR Live Migration Surrogate LPAR


lpar name = orgname_lku0 lpar name = orgname

Virt. ent Virt. ent

VIOS
Virt. ent Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC vSCSI/vFC

Original
rootvg VIOS
mirror Original New rootvg
rootvg (Alt-disk-install)

vSCSI/vFC

Prepared for rollback Interim fix installed


Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-26. Live Update interim fix example: Blackout period

When sufficient application memory has been transferred to the surrogate, the workload will be
paused on the original LPAR, and the blackout period will begin.
The duration of the blackout period depends on a number of different factors. On the original
LPAR, the mirrored rootvg is synchronized, and the disks for the primary mirror copy are split off
and then imported in a chrooted environment on the surrogate. The surrogate is already running,
it previously was booted from the new rootvg that already contains the interim fix information.
The original rootvg (now varied on and mounted in a chrooted environment on the surrogate) is
updated with the interim fix. When the update is complete, no reboot is required, since the
running kernel memory image already contains the fix. The boot list on the surrogate is then
configured to refer to the boot image contained on the original rootvg.
Application process memory continues to be transferred from the original LPAR over the private
VLAN. For alt-disk-install compatibility, the mirror of the original rootvg currently being used on
the original LPAR is prepared in case it needs to be used on the surrogate to roll back the
installation of the interim fix.
During the blackout period, the original IP address of the original LPAR is configured on the
surrogate, and then the transferred processes are restarted. The restarted processes have the
same process and thread IDs when running on the surrogate as they did on the original LPAR.

© Copyright IBM Corp. 2009, 2024 19-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Live Update interim fix example: Phase 6

HMC

CEC Workload is restarted

Surrogate LPAR
lpar name = orgname

VIOS
Virt. ent
SEA

vSCSI/vFC
vSCSI/vFC

Original
VIOS rootvg
Original mirror New rootvg
rootvg (Alt-disk-install)

vSCSI/vFC

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-27. Live Update interim fix example: Phase 6

The last phase of the process shuts down and removes the original LPAR. This makes the CPU and
memory resources it was using available for use by other partitions. It also reconfigures the
surrogate to have multiple paths to the disks once more. In the surrogate, the virtual Ethernet
adapter that was used for the private VLAN to the original LPAR is removed.
From the disk perspective, the new rootvg that was used to boot the surrogate is unavailable for
reuse at this time. This is because it supplied the kernel image that is running in memory to host
the chrooted environment that is using the file systems from the now updated original rootvg. The
new rootvg disk will only become available after the surrogate is rebooted, since this will cause
the partition to boot from and vary-on the updated original rootvg. The new rootvg disk would also
become available for use after another live update operation is performed on the partition.
However, a different disk will have to be supplied to provide the new rootvg that is created during
this subsequent live update.
The disk used for the mirror copy of the original rootvg is available for reuse once the live update
completes. Since the mirror copy of the original rootvg did not have the interim fix installed, the
partition can be booted from this disk if the administrator wants to roll back the installation of the
interim fix.

© Copyright IBM Corp. 2009, 2024 19-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Exercise

Install and cloning techniques (Part 1)

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-28. Exercise

© Copyright IBM Corp. 2009, 2024 19-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Topic 2 objectives
• Clone an active BOS to a standby BOS.
• Customize a standby BOS.
• Alternate booting between an active BOS and a standby BOS.
• Mount a standby BOS.
• Start a standby BOS shell.
• Create AIX “cloud ready” mksysb images

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-29. Topic 2 objectives

Look at what multibos is and what it provides.

© Copyright IBM Corp. 2009, 2024 19-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

multibos utility overview


• Two alternate AIX base operating systems (BOS) in a single rootvg
• Standby BOS created as a copy of active BOS
• Modify standby BOS without affecting active BOS:
í Apply maintenance to the standby BOS
í Mount and modify the standby BOS
í Start an interactive shell working in the standby
• Ability to copy or share logical volumes and file systems:
í /, /usr, /var and /opt are copied.
í Additional logical volumes could be copied using –L flag.
í Logical volumes not copied, are shared.
• Can alternate on reboot which BOS is active

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-30. multibos utility overview

The multibos utility was introduced in AIX 5.3 TL3 to provide the ability to maintain two separate,
bootable instances of the AIX OS within the same root volume group (rootvg). The second
instance of rootvg is known as a standby BOS and is an efficient tool for performing AIX
Technology Level (TL) and Service Pack (SP) updates.
The multibos utility lets you install, update and customize a standby instance of the AIX OS
without impacting the running and active production instance of the AIX OS. This is valuable in
environments with tight maintenance windows. Instead of requiring an outage window of several
hours to apply a new TL or SP, you’ll only need a small outage at a convenient time to reboot the
system.

© Copyright IBM Corp. 2009, 2024 19-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Active and standby BOS logical volumes

Active BOS
/
BLV jfslog (hd4)
(hd5) (hd8)

Standby BOS
home opt usr var tmp bos_inst (if mounted)
(hd1) (hd10opt) (hd2) (hd9var) (hd3) (bos_hd4)

opt usr var


(bos_hd10opt) (bos_hd2) (bos_hd9var)

BLV jfslog
(bos_hd5) (bos_hd8)
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-31. Active and standby BOS logical volumes

Standby BOS structure


The standby BOS needs to mimic the structure of the live BOS file system structure, but not to
replace the active file systems. To handle this requirement, multibos creates a logical volume to
match each of the BOS logical volumes, including not only the file systems, but also the JFSlogs
and the boot logical volume. The names are modified by adding a prefix of bos_ to the front of the
standard logical volume names. For the standby BOS file systems, the file system mount point is
changed to have a root path of /bos_inst/.
If you mount the standby BOS is mounted, then you use this modified path (beginning with
/bos_inst). If you use the chroot shell access or if you reboot to make the standby BOS the active
BOS, then the (formally standby BOS) file systems have a root path of /.
Next, look at how to create a standby BOS with the multibos command.

© Copyright IBM Corp. 2009, 2024 19-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – setup


• Identify free space in rootvg for a copy of each BOS logical volume:

# lsvg rootvg |grep FREE


MAX LVs: 256 FREE PPs: 511 (65408 megabytes)

• The total number of copied logical volumes cannot exceed 128.


• If all of the requirements can’t be met, then a traditional update should be performed.
• Document the system and perform a mksysb before performing any maintenance activity.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-32. The multibos utility – setup

Before attempting to run multibos, check that the prerequisites have been met.
First, the system must be running AIX 5.3 with TL3 or higher.
Next, ensure that there's enough free space in rootvg for a copy of each BOS logical volume. By
default, the BOS file systems in rootvg (/, /usr, /var, and /opt) and the boot logical volume are
copied.
Specific logical volumes can be copied by specifying the -L option.
All other file systems and logical volumes are shared between BOS instances.

© Copyright IBM Corp. 2009, 2024 19-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – operations


• You can perform the following operations with multibos:
• –a = Update_all
–N = Block bosboot
• –B = Bosboot operation
–n = Block cleanup
• –b = Install bundle file –p = Preview only
• –c = Customization operation –R = Remove operation
• –e = Exclude file –S = Shell operation
• –f = Fix List file –s = Setup operation
–t = Block bootlist change
• –i = image.data file
–u = Unmount operation
• –L = Additional LVs file
–X = Expand file systems as needed
• –l = Install device or directory –M = Mksysb setup operation
• –m = Mount operation

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-33. The multibos utility – operations

The visual above shows the various arguments to the multibos command.

© Copyright IBM Corp. 2009, 2024 19-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – preparation


• To perform an upgrade, for example, from AIX 7.3 system from base to SP2:
ƒ Verify the system has sufficient resources
ƒ Provide installation media source
ƒ Perform action
ƒ Validate operation
• Remove any previous standby BOS instance:
# multibos –R
Initializing multibos methods ...
...
Removing all standby BOS logical volumes ...
Removing standby BOS logical volume bos_hd5
...
Setting bootlist to logical volume hd5 on hdisk0.
ATTENTION: firmware recovery string for active BLV (hd5):
boot /vdevice/v–scsi@30000079/disk@8100000000000000:2
...
Log file is /etc/multibos/logs/op.alog
Return Status = SUCCESS
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-34. The multibos utility – preparation

The first step in any multibos operation, is to remove any previous standby BOS instances. There
can only be two concurrent instances of AIX within the same rootvg volume group. If a third
multibos operation is attempted, it will fail. multibos -R will remove any existing standby
instance.

© Copyright IBM Corp. 2009, 2024 19-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – preview operation and review logs


• Preview the operation first:
# multibos –Xsp
Initializing multibos methods ...
Initializing log /etc/multibos/logs/op.alog ...
Gathering system information ...
. . .
Log file is /etc/multibos/logs/op.alog
Return Status = SUCCESS

• Review the multibos log for any errors:


# alog –of /etc/multibos/logs/op.alog
. . .
Gathering system information ...
+––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
Preview
+––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
. . .
Log file is /etc/multibos/logs/op.alog
Return Status = SUCCESS
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-35. The multibos utility – preview operation and review logs

To perform a standby BOS setup operation preview, use the command multibos -Xsp.
The -X flag allows for automatic file system expansion if space is needed to perform tasks related
to multibos.
The -p flag gives a preview of the operation
The -s flag would create an instance of a standby BOS. This is the operation that you will preview.

© Copyright IBM Corp. 2009, 2024 19-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – create standby BOS


• Building takes several minutes and creates a new logical volumes and file systems for each
BOS copy:
# multibos –Xs
Initializing multibos methods ...
Initializing log /etc/multibos/logs/op.alog ...
...
Creating standby BOS logical volume bos_hd5
Creating standby BOS logical volume bos_hd4
Creating standby BOS logical volume bos_hd2
Creating standby BOS logical volume bos_hd9var
Creating standby BOS logical volume bos_hd10opt
...
Active boot logical volume is hd5.
Standby boot logical volume is bos_hd5.
Creating standby BOS boot image on boot logical volume bos_hd5
bosboot: Boot image is 53276 512 byte blocks.
...
Setting bootlist to logical volume bos_hd5 on hdisk0.
ATTENTION: firmware recovery string for standby BLV (bos_hd5):
boot /vdevice/v–scsi@30000079/disk@8100000000000000:4
ATTENTION: firmware recovery string for standby BLV (bos_hd5):
boot /vdevice/v–scsi@300000dd/disk@8100000000000000:4
ATTENTION: firmware recovery string for active BLV (hd5):
boot /vdevice/v–scsi@30000079/disk@8100000000000000:2
ATTENTION: firmware recovery string for standby BLV (hd5):
boot /vdevice/v–scsi@300000dd/disk@8100000000000000:2
...
Return Status = SUCCESS
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-36. The multibos utility – create standby BOS

After a successful preview, create the standby BOS instance.


The multibos -s flag creates an instance of a standby BOS. The -X flag will expand the file system
if needed. The process of creating a BOS copy will take several minutes.

© Copyright IBM Corp. 2009, 2024 19-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – verification


• Each new logical volume and file system is prefixed by bos_:
# lsvg –l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
. . .
bos_hd5 boot 1 1 1 closed/syncd N/A
bos_hd4 jfs2 11 11 1 closed/syncd /bos_inst
bos_hd2 jfs2 61 61 1 closed/syncd /bos_inst/usr
bos_hd9var jfs2 6 6 1 closed/syncd /bos_inst/var
bos_hd10opt jfs2 1 1 1 closed/syncd /bos_inst/opt

• Start a multibos shell and verify the standby BOS:


# multibos –S
...
Active boot logical volume is hd5.
Script started, file is /etc/multibos/logs/scriptlog.180202192713.txt
MULTIBOS> oslevel –s
7300-01-01-2246
MULTIBOS> exit
Script done, file is /etc/multibos/logs/scriptlog.180202192713.txt
...
Return Status = SUCCESS

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-37. The multibos utility – verification

Both BOS images are contained within rootvg. But now what we have, are additional logical
volumes with the prefix bos_. We have hd5 which is the boot logical volume but we also have
bos_hd5.
When multibos is run with the -S flag, it’s opening up a shell to the standby root operating system
and presents the MULTIBOS> prompt. It’s not pointing to the rootvg of the active AIX instance, but
to the standby AIX instance that's embedded into rootvg.

© Copyright IBM Corp. 2009, 2024 19-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – update AIX


• Perform update procedure:
ƒ Process requires access to lpp filesets
ƒ Should perform a preview operation to validate process

# multibos –Xacp –l /source_directory


Initializing multibos methods ...
Initializing log /etc/multibos/logs/op.alog ...
Gathering system information ...

+––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
Customization Operation
+––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
Verifying operation parameters
. . .
Unmounting /bos_inst/usr
Unmounting /bos_inst

Log file is /etc/multibos/logs/op.alog


Return Status = SUCCESS

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-38. The multibos utility – update AIX

The example on the visual is performing a preview operation. The next step would be to execute
the actual update to the standby instance by using the same command, but removing the -p flag.

© Copyright IBM Corp. 2009, 2024 19-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

The multibos utility – strategy and verification


• BOS may be upgraded during normal operations, then the system can be restarted during non-
peak time
• Verify the bootlist and ensure that the BLV is set to the standby BOS (bos_hd5):
# bootlist –m normal –ov
...
Path name: (/vdevice/v–scsi@30000079/disk@8100000000000000:4)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=bos_hd5 pathid=0
...
Path name: (/vdevice/v–scsi@30000079/disk@8100000000000000:2)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=hd5 pathid=0
...

• Check the correct BLV, compare the output from bootlist with Welcome to AIX banner:
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Welcome to AIX.
boot image timestamp: 00:03:44 02/03/2018
The current time and date: 00:50:54 02/03/2018
processor count: 1; memory size: 4096MB; kernel size: 38215646
boot device: /vdevice/v–scsi@30000079/disk@8100000000000000:4
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-39. The multibos utility – strategy and verification

Before rebooting, you want to verify the bootlist and be sure that the BLV is set to the standby BOS
(bos_hd5). This is shown in the example on the slide. The bootlist has two devices. The first is
hdisk0 with the BLV set to bos_hd5. The second is hdisk0 with the BLV set to hd5.
When booting a standby BOS instance you can check that the correct BLV is being used by
comparing the output from the bootlist command with the output from the Welcome to AIX
banner. It's a good idea to record the output from the bootlist command.
Once the system is booted, the boot logical volume used to boot can be displayed with:
# bootinfo -v
bos_hd5
The boot list can be set to boot from either hd5 or bos_hd5. Example:
# bootlist -m normal hdisk0 blv=hd5 pathid=0 hdisk0 blv=bos_hd5 pathid=0
# bootlist -om normal
hdisk0 blv=hd5 pathid=0
hdisk0 blv=bos_hd5 pathid=0

© Copyright IBM Corp. 2009, 2024 19-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
Additional information showing the Path name to each disk and the associated boot device (LV)
location can be displayed with the –v option.
# bootlist -m normal -o
hdisk0 blv=bos_hd5 pathid=0
hdisk0 blv=bos_hd5 pathid=1
hdisk0 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=1
# bootlist -m normal -o -v
'ibm,max-boot-devices' = 0x5
NVRAM variable: (boot-device=/vdevice/v-scsi@30000004/disk@8100000000000000:4
/vdevice/v-scsi@30000005/disk@8100000000000000:4
/vdevice/v-scsi@30000004/disk@8100000000000000:2
/vdevice/v-scsi@30000005/disk@8100000000000000:2)
Path name: (/vdevice/v-scsi@30000004/disk@8100000000000000:4)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=bos_hd5 pathid=0
Path name: (/vdevice/v-scsi@30000005/disk@8100000000000000:4)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=bos_hd5 pathid=1
Path name: (/vdevice/v-scsi@30000004/disk@8100000000000000:2)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=hd5 pathid=0
Path name: (/vdevice/v-scsi@30000005/disk@8100000000000000:2)
match_specific_info: ut=disk/vscsi/vdisk
hdisk0 blv=hd5 pathid=1

© Copyright IBM Corp. 2009, 2024 19-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

mksysb_iso utility overview


• Creates a system backup image (mksysb) from the root volume group (rootvg) a bootable ISO
9660 format media from a previously created system backup image (mksysb).
• The mksysb_iso command requires free disk space for its operation:
ƒ A temporary disk space for the system backup image (mksysb, see -M flag) unless an existing mksysb
image is specified (see -m flag)
ƒ The temporary disk space for the ISO filesystem (see -C flag)
ƒ The final output ISO image (see -O command)
• # mksysb_iso -O /backup/my-mksysb-iso
Making the CD or DVD image bootable...
...etc…
Creating temporary file system: /mksysb_iso/mksysb_image...
...etc...
The bootable ISO image is created successfully: /backups/my-mksysb-iso
• The ISO image could be used to install AIX from VIOS virtual media library
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-40. mksysb_iso utility overview

The mksysb_iso command creates a system backup image (mksysb) from the root volume group
(rootvg) a bootable ISO 9660 format media from a previously created system backup image
(mksysb).
If you do not specify any file systems or directories as command parameters, the mksysb_iso
command creates the necessary file systems. Except for the file system that is created for the ISO
image, the mksysb_iso command removes other file systems that are created while the
command is executed. The mksysb_iso command also checks the specified file systems for
adequate space and write access.
If you specify a previously created mksysb image with the -m flag, the version of the mksysb
image must match the version of the system where this command is executed. For instance, if you
are running this command on an AIX 7.3 system, the version of the specified mksysb image must
also be AIX 7.3.
Administrators can create an ISO image directly from their rootvg using mksysb_iso, as it
combines both the mksysb and mkcd/mkdvd tools and operations into a single command.
The ISO image is “portable”, in that you can use it to perform a client restoration/installation from
the VIOS media repository. For example,
https://www.ibm.com/support/pages/how-configure-vios-media-repositoryvirtual-media-library-e
x-aix-installrestore#2.

© Copyright IBM Corp. 2009, 2024 19-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

create_ova utility overview


• create_ova is available with AIX 7.2 (TL5) and AIX 7.3.
• Allow AIX admin to create an open virtual appliance (OVA) package of their systems rootvg.
• Captures a bootable (and portable) OVA image.
• This OVA package can be used with PowerVC or PowerVS (on IBM Cloud).
• # create_ova -o /data -d hdisk2 -i /export/AIX73-mksysb -t aix
Initializing resources ...
...etc...
Checking for resource group aix_20201007210902.ova.gz...
Checking /data space requirement...done
a ./aix_20201007210902.ovf 4 blocks
a ./aix_20201007210902.img 41943040 blocks
...etc...
Done verifying resources.
• Enhanced to support for HW GZIP. When available, on POWER9 and Power10 systems by
using the pigz utility.
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-41. create_ova utility overview

The create_ova command creates an open virtual appliance (OVA) package. An OVA package is
an archive file that can be deployed as a virtual machine.
This command can be used to create a single-volume raw disk image and to export contents of a
raw disk image to a compatible OVA package format. The OVA package can be imported into any
IBM Power Virtualization Center (PowerVC) environment that contains a supported storage
device. You can also import the OVA package into any cloud service that supports the Open
Virtualization Format (OVF) packaging standard. The imported OVA package can be deployed as a
virtual machine.
The create_ova command automatically installs the dependent software such as pipe viewer
(pv), rpm, and yum before it generates contents of the OVA package without user intervention. If
you cannot install or configure any OVA package, you must perform the recovery steps and retry
the installation until it is successful. For each user session, the results of the command execution
are saved in the /var/adm/ras/<create_ova.pid$$.log> log file.
This utility enables admins to capture a bootable OVA image of their AIX systems rootvg. These
images are "cloud ready" in that they are portable and can be moved to and imported on other
Power servers, either on-prem or in the cloud. The OVA package can then either be imported into
PowerVC for automated VM deployment or imported into the IBM Cloud for VM deployment with
IBM’s Power Virtual Server (PowerVS) capability. Refer to this article for examples on importing an
AIX OVA package into PowerVC and (IBM Cloud) PowerVS, https://ibm.biz/BdqwKA.
The create_ova command was enhanced to use the Nest Accelerator (NX) GZIP compression
accelerator, when available, on POWER9 and Power10 servers by using the pigz utility. This
performance enhancement helps to reduce the runtime of the OVA creation process. The pigz
tool is installed by default on AIX 7.3 (pigz.rte). Refer to the following link information on NX GZIP
Acceleration with AIX on Power servers

© Copyright IBM Corp. 2009, 2024 19-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty
https://community.ibm.com/community/user/power/blogs/brian-veale1/2022/03/14/gzip-acceler
ation-with-aix-on-power-systems.
Time for review questions.

© Copyright IBM Corp. 2009, 2024 19-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Review questions (1 of 2)
1. Name the two ways alternate disk installation can be used.

2. What are the advantages of alternate disk rootvg cloning?

3. Why should you not use exportvg with an alternate disk volume group?

4. True or false: With live update in AIX 7.2.1, a reboot is not required after applying fixes,
service packs, or technology levels.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-42. Review questions (1 of 2)

© Copyright IBM Corp. 2009, 2024 19-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Review answers (1 of 2)
1. Name the two ways alternate disk installation can be used.
The answer is installing a mksysb image on another disk and cloning the current running rootvg to an
alternate disk.

2. What are the advantages of alternate disk rootvg cloning?


The answer is creates an online backup and allows maintenance and updates to software on the
alternate disk which helps to minimize downtime.

3. Why should you not use exportvg with an alternate disk volume group?
The answer is this removes rootvg related entries from /etc/filesystems.

4. True or false: With live update in AIX 7.2.1, a reboot is not required after applying fixes,
service packs, or technology levels.
The answer is true.
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-43. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 19-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Review questions (2 of 2)
5. True or false: multibos provides for booting between alternate operating system
environments within a single rootvg.

6. True or false: A standby BOS can only be accessed by changing the bootlist and then
rebooting.

7. True or false: multibos requires cloning all of the logical volumes in the active rootvg.

8. True or false: The geninstall command can run the Live Update operation without applying
an update.

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-44. Review questions (2 of 2)

© Copyright IBM Corp. 2009, 2024 19-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Review answers (2 of 2)
5. True or false: multibos provides for booting between alternate operating system
environments within a single rootvg.
The answer is true.

6. True or false: A standby BOS can only be accessed by changing the bootlist and then
rebooting.
The answer is false.

7. True or false: multibos requires cloning all of the logical volumes in the active rootvg.
The answer is false.

8. True or false: The geninstall command can run the Live Update operation without applying
an update.
The answer is true.
Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-45. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 19-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Exercise

Install and cloning techniques (Part 2)

Install and cloning techniques © Copyright IBM Corporation 2024

Figure 19-46. Exercise

© Copyright IBM Corp. 2009, 2024 19-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Unit 19. Install and cloning techniques

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Use alternate disk installation techniques to update AIX
ƒ Explore AIX Live Update and geninstall command
ƒ Use multibos to update AIX
ƒ Create ’cloud ready’ images of AIX

© Copyright IBM Corporation 2024

Figure 19-47. Unit summary

© Copyright IBM Corp. 2009, 2024 19-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Appendix A. Survey of additional AIX


facilities
Estimated time
00:45

Overview
This unit covers AIX performance monitoring commands, UNIX scheduling abilities in AIX,
supported print subsystems and management commands, AIX paging space management, and
common UNIX security mechanisms in AIX.

References
Online AIX Version 7.3 Command Reference volumes 1-3
Online AIX Version 7.3 Operating System Guide
Online AIX Version 7.3 Device Management Guide
Online AIX Version 7.3 Installation Guide
Note: References listed as Online above are available at the following address:
https://www.ibm.com/docs/en/aix/7.3
SG24-5765 AIX 5L Differences Guide: V 5.2 Edition (Redbook)
SG24-7463 AIX 5L Differences Guide: V 5.3 Edition (Redbook)
SG24-7414 AIX 5L Differences Guide: V 5.3 Addendum (Redbook)
SG24-7559 IBM AIX Version 6.1 Differences Guide (Redbook)
SG24-7910 IBM AIX Version 7.1 Differences Guide (Redbook)

© Copyright IBM Corp. 2009, 2024 A-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Identify AIX supported performance monitoring commands
ƒ Identify standard UNIX scheduling abilities in AIX
ƒ Identify the print subsystems supported by AIX and describe the
common UNIX print management commands supported
ƒ Describe the AIX paging space management commands
ƒ Identify common UNIX security mechanisms used in AIX

© Copyright IBM Corporation 2024

Figure A-1. Unit objectives

Let us start with AIX performance commands.

© Copyright IBM Corp. 2009, 2024 A-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

AIX performance commands


• See AIX performance course (AN51G)

Statistics Traditional UNIX with AIX AIX unique


enhancements

I/O iostat filemon, fileplace

Memory vmstat svmon

Network netstat, entstat, nfsstat netpmon

Processor ps, sar tprof, curt, lparstat,


mpstat

All in one dynamic display topas, nmon*


(ascii)

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-2. AIX performance commands

Overview
AIX provides many of the same resource statistics commands as other varieties of UNIX, but IBM
has modified them to report on aspects of resource management that are unique to AIX. As a
result, there will be new report fields and new flags on the commands. Also, IBM has gone beyond
the standard set of AIX reporting tools to create additional commands which allow a closer look at
the details or dynamics of the resource usage. Many of these AIX tools are based upon the AIX
kernel tracing facility. The following descriptions are very basic and not intended to provide a
complete description of the abilities and use of the commands.
For a more thorough treatment, attend AIX Performance Management (AN51G).
I/O statistics
The iostat command provides a breakdown of I/O activity at both the disk level and the storage
adapter level. The fileplace command provides details on the placement of the data blocks for a
file and related statistics, this allowing analysis of file fragmentation. The filemon command
provides statistics of I/O traffic (aver, min, max, and sdev for block sizing and processing time) at
each layer of processing (filesystem, memory paging, LVM, and storage adapter).
Memory statistics
The vmstat command provides statistics on free list depth, page scanning and stealing, and
paging space paging. The svmon command provides a complete picture of memory usage right
down to a page by page listing of the virtual memory segments. It can provide reports ranking
processes by usage of real memory, pinned memory, or paging space.
Network statistics
The netstat command provides a variety of statistic reports at every layer of the network stack.
These layers include socket, transport (TCP, UDP), interface, IP, and adapter. The -v option of

© Copyright IBM Corp. 2009, 2024 A-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
netstat invokes the protocol specific statistics command for an adapter; for example entstat.
For example, this can be useful in identifying problems related to Ethernet collisions. The netpmon
report provides kernel trace based statistics of traffic at various layers, including a ranking of
processes based on % time spent in the kernel network service routines.
Processor statistics
The ps command (commonly invoked with the aux flags) can identify CPU intensive processes and
show other processor related statistics. The sar command provides a variety of reports including
processing mode (user, system, wait, idle) on a processor by processor basis, and interrupt
statistics. The kernel trace based tprof command is a better way to identify the current CPU
intensive processes and can profile down to the which routines are using the most cycles (without
instrumenting the programs). The kernel trace based curt command has similar abilities, but can
provides both more extensive statistics (for example: interrupts, error conditions, delay in returns
from routines) and a more complete analysis of any single process’s details.
The POWER server abilities to support simultaneous multi-threading and micro-partitioning of
processor capacity required modification of existing statistics reports and the creation of new
statistic reports. The processor mode statistic reports needed to be adjusted to show how much
of an LPAR’s entitled capacity was really being used. The new commands of lparstat and mpstat
are specifically designed to report on this environment, providing more detail - all the way down to
the Power Hypervisor interrupts and statistics on how successful the Power Hypervisor is in
maintaining processor affinity.
It is assumed that most students in this class are already familiar with UNIX performance
management. With this in mind, this visual shows that those skills are transferable to AIX. If a
student is not familiar with this topic, they are encouraged to attend a performance management
class, as AN14G is not intended to teach this skill. Even if a student has this background, they
need to realize that there will be AIX or POWER unique aspects that are supported by the AIX
command set. These differences will be seen in both new IBM commands and additional
capabilities in traditional UNIX commands. Again, students should attend additional training that
focuses on AIX and POWER performance to build a better understanding of AIX and POWER
system performance management issues.
*nmon is also available for Linux.
Let us next discuss print subsystems.

© Copyright IBM Corp. 2009, 2024 A-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Printing
• AIX supports two mutually exclusive subsystems:
ƒ System V print subsystem
ƒ AIX print (queuing) subsystem
• AIX print subsystem:
ƒ Easily defined and managed through SMIT (fastpath: spooler)
ƒ Local and remote printers
ƒ Manage print jobs using AIX, BSD or System V commands:
Job task AIX BSD System V
submit qprt lpr lp
list qchk lpq lpstat
cancel qcan lprm cancel
hold qhld
move qmov
change priority qpri
Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-3. Printing

Introduction
The classic AIX print subsystem was designed to combine the features of the System V and the
Berkeley Software Distribution (BSD) printing standards, along with some unique features found
only in AIX. However, these same features made the AIX print subsystem less compliant to widely
used standards. Starting with the development of AIX 5L, a more standard print subsystem was
needed. The System V print subsystem was chosen because of its wide use across many different
UNIX systems.
Either the AIX print subsystem or the System V subsystem can be active, but not both at once.
There are special filesets for System V support:
• bos.svprint.rte
• bos.svprint.fonts
• bos.svprint.hpnp
• bos.svprint.ps
• bos.terminfo.svprint.data
• bos.msg.en_US.svprint
Use SMIT or the switchprt -d command to display the active print subsystem.
Use SMIT or the switchprt -s subsystem-type command to switch subsystems.
System V print subsystem
System administrators with experience in other UNIX variants that use System V printing will find
it easy to manage printing under AIX’s System V print subsystem. There are many more printer
products supported under System V, than under the AIX print subsystem. This is because the

© Copyright IBM Corp. 2009, 2024 A-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
printer manufacturers only need provide interface shell scripts to support using their products
under System V printing. System V printing includes built-in capabilities for restricting user access
to certain printers or to restrict access while certain forms are loaded. This is important when
loading special forms (such as payroll checks) on special printers. There are also a large number
of filters available for converting various file formats to PostScript.
AIX print subsystem
The AIX print subsystem supports a wide variety of printers from many different manufacturers
(see the list of printer filesets in the AIX installation media). The filesets for the printers include
integration of support for that printer into the SMIT print definition and management panels. The
SMIT panels not only make it easy to define print queues for these printers (the printer and its
queues are created in a single step), but they also allow the printers to be customized using menu
selections (or command line options). In contrast, under System V printing customizing printers
often requires a knowledge of shell programming. The AIX print subsystem uses a generic
spooling subsystem which can be used to serialize other types of jobs beyond just printing.
AIX print subsystem support for print management commands
The AIX print subsystem supports using three varieties of print management commands: AIX,
BSD, and System V. This allows users and system administrators to use commands with which
they are already familiar, even when using the proprietary AIX print subsystem.
Another facility with which you should be familiar is cron for scheduling.

© Copyright IBM Corp. 2009, 2024 A-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Scheduling
• AIX supports scheduling with the cron daemon:
ƒ Regular recurring jobs through crontab
ƒ Queued jobs through the at and batch commands
ƒ Access controlled through cron.deny and cron.allow
• Queued job control
ƒ Supports both BSD and System V management commands

Queued job control BSD System V


List queued jobs atq at -r
Remove queued job atrm at -l

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-4. Scheduling

AIX scheduling
AIX uses traditional cron daemon scheduling. The cron daemon starts processes at specified
times. It can be used to run regularly scheduled jobs using files in the /var/spool/cron/crontabs
directory, or it can be used to schedule a command for one-time-only execution using the at
command. The crontab file for a user is updated through the crontab command.
cron.deny and cron.allow files
All users by default have the privilege to set up scheduled jobs to be monitored by cron. This is
because the file /var/adm/cron/cron.deny, which denies privileges to users, exists and is empty.
As the administrator, you can restrict access to cron by adding user names to this text file.
Another file that also restricts users’ privileges is /var/adm/cron/cron.allow. To use this file, you
should remove the cron.deny file and create the cron.allow file to list the users that are allowed
to use cron. If cron.allow exists and is empty, NO user is able to use cron, that includes root. If
both cron.allow and cron.deny exist, then cron.allow is the file that is used. If neither cron.allow
nor cron.deny exists, then only root can use cron.
Managing queued jobs
To list at jobs use the at -l command or the atq command. The root user can look at another
user's at jobs by using the command atq <user>. The listing provides the unique job identified
that is needed to cancel a specific job.
To cancel an at job use at -r or atrm followed by the job number. Use the command atrm -
(placing nothing after the - character) to cancel all of your jobs. The root user can cancel all jobs
for another user using atrm <user>.
For AIX cron the location of the files can differ but the function is basically the same as other UNIX
systems.

© Copyright IBM Corp. 2009, 2024 A-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
Let us next look at how AIX supports memory paging.

© Copyright IBM Corp. 2009, 2024 A-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Paging space
• Allows more virtual memory then real memory
• Page frames are stolen using LRU algorithm
• Paged out to disk; paged back in, on demand
• Default paging space is hd6; size defaults to 512 MB
• Paging space definitions are stored in /etc/swapspaces
• Running short on paging space will kill processes
• You can dynamically add or remove paging spaces
• You can dynamically increase or decrease the size of paging spaces

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-5. Paging space

AIX paging space


When the system runs low on free memory frames, memory is scanned to locate those memory
page frames that are least-recently used (LRU). When one is located (and the data it contains
cannot be moved to a permanent home in file system space), a 4 KB block or page of disk space is
allocated and the data from the page frame is moved to a special area on disk. This area on disk is
called paging space.
Default paging space (hd6)
Paging space is created during AIX installation using logical volume hd6. The initial hd6 paging
space size is determined according to the following standards:
• If RAM is greater than or equal to 256 MB, paging space is 512 MB
• If RAM is less than 256 MB, paging space is twice the size of RAM
• hd6 cannot be reduced to less than 64 MB
• Total paging space can use no more than 20% of total disk space
The /etc/swapspaces file
The file /etc/swapspaces contains a list of the paging space areas that are activated at system
startup.
Results of low paging space
If your system runs low on paging space, a message is sent to the console and sometimes to users
as well. At this point, the system is unable to start any new processes until some running
processes are terminated or release allocated memory. The messages will either state explicitly
that paging space (or swap space) is low or the message will state that there is a problem with
forking new processes. This situation should obviously be avoided. If the low paging space

© Copyright IBM Corp. 2009, 2024 A-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
worsens, the system will start killing processes to free up paging space. If there is no paging pace
left and a critical kernel component needs memory, the system can hang or crash.
Managing amount of paging space (dynamically)
If you display a high utilization of the available paging space, you can dynamically add additional
paging space volumes (additional logical volumes in addition to hd6) or you can dynamically
increase the size of existing paging space volumes.
When adding paging space volumes, it is recommended that they be spread across multiple disks
in the rootvg and that they be of the same size (this assumes that you are dealing with direct
attached disks rather than SAN storage).
If the problem is that you have too much paging space (not really a problem, unless you are short
on disk storage and need to free up space), you can dynamically reduce the paging space
allocation by either dynamically deleting a paging space volume (after dynamically inactivating) or
dynamically reducing the size of a paging space volume.
The most important rule is that you should never delete hd6. It is expected to be there in the logic
of the system boot routines.
Let us looks at the commands used in AIX to manage the paging spaces.

© Copyright IBM Corp. 2009, 2024 A-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Paging space details


• To monitor paging space utilization:
ƒ lsps –a or lsps -s
• To create an additional paging space:
ƒ mkps -s <#LPs> <vgname> <disk> or smit mkps
í Can also specify to activate (now or at system reboot)
• To activate a paging space
ƒ swapon <device file name>
• To deactivate a paging space
ƒ swapoff <device file name>
• To remove a paging space (must be inactive):
ƒ rmps <device file name> or smit mkps
• To increase the size of a paging space:
ƒ chps –s <#LPs> <paging space name> or smit chps
Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-6. Paging space details

The lsps command


The lsps command lists detailed information regarding the paging spaces on the system,
including whether they are in use at the time and, if so, what percentage of their total space is
allocated.
Another useful option available with the lsps command is the -s option, which specifies the
summary characteristics of all paging spaces. The information consists of the total size of the
paging spaces (in MBs) and the percentage of paging spaces currently used.
Using the mkps command
To add extra paging space volumes to the system, you can use SMIT (mkps fastpath) or the mkps
command. When using the mkps command, the syntax and options are:
•mkps [-a] [-n] [-t Type] -s NumLPs Vgname [Pvname]
• Vgname: The volume group within which to create the paging space
• Pvname: Specifies the physical volume of the volume group
• -s NumLPs: Sets the size of the new paging space in logical partitions
• -a: Activate the paging space at the next restart (adds it to /etc/swapspaces)
• -n: Activate the paging space immediately
• -t Type: Specifies the type of paging space (lv or nfs)
Activating a paging space volume
Inactive paging spaces can be activated dynamically once they have been defined. To do this
enter: swapon /dev/pagingnn

© Copyright IBM Corp. 2009, 2024 A-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Note

This operation is supported through SMIT as well, fastpath pgsp.

Deactivation of a paging space volume


Active paging spaces can be deactivated while the system is running using the swapoff command
or with the SMIT fastpath swapoff.
Removal of a paging space
In order to delete paging space, it must be inactive (that is, not used by the kernel). To remove a
paging space volume from the system, you can use SMIT (rmps fastpath) or the rmps command.
When using the rmps command, the syntax is: rmps PagingSpace
Changing the size of a paging space volume
The sizes of paging space volumes can be increased or decreased dynamically. In both cases, you
would either use SMIT (fastpath chps) or use the chps command. The chps command can also
specify the state of the paging space volume at the next reboot.
When using the chps command, the syntax is:
chps [ -s #LogicalPartitions | -d #LogicalPartitions ] [ -a { y | n } ] PagingSpace
Decrease the size of a paging space
•chps –d <#LPs> <paging space name>
or
•smit chps
The visual is mainly for reference. The rmps command requires that the specified paging space
volume be inactivated first, but the required swapoff command can be run dynamically (provided
that there is enough remaining paging space to handle the pages currently stored in paging
space). Note that most operations can be done dynamically.
Our final topic is a survey of AIX security and how it compares to traditional UNIX security.

© Copyright IBM Corp. 2009, 2024 A-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

AIX and traditional UNIX security


• Traditional authentication:
ƒ Users and groups (root superuser)
ƒ Password rules and expiration
ƒ Can centrally define using LDAP or NIS
• File access authorization:
ƒ File permission bits (including SUID, SGID, SVTX)
ƒ Commands: chmod, umask, chown, chgrp
ƒ Access control lists (ACLs in either EAv1 or EAv2)
ƒ Role-based Authorization (using enhanced RBAC)
• Supplemented by other AIX6 and AIX7 enhancements

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-7. AIX and traditional UNIX security

Traditional UNIX security


By default, AIX uses the traditional UNIX security mechanisms. Files have owners who control the
access permissions using permission bits for themselves (owner), for members of group
associated with the file, and for the rest of the world (other). The ownership, related group and
permission bits are controlled through traditional UNIX commands:
•chown
•chgrp
•chmod
•umask
User authentication
User authentication uses /etc/passwd and its shadow file /etc/security/passwd (where the
encrypted password is actually stored). The user attributes can define rules for passwords and
expiration limits (force them to periodically change the password). The authentication can be
directed to use a remote server, either NIS or LDAP. Also, alternate authentication methods can
be defined.
File permission bits
The file permission bits are fairly standard. Note that SVTX (sticky bit) has no effect on an ordinary
file. It only has an effect on the ability of users who are sharing a directory to delete files that they
do not own. Also, AIX does not support using SUID on executable scripts; it can only be used on
compiled object modules.
In AIX 6 and later, RBAC is enabled by default. Many commands which traditionally use SUID (to
enable ordinary users to take actions that would normally require root authority) have RBAC

© Copyright IBM Corp. 2009, 2024 A-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
privileges which are authorized for any user (no role assignments are needed). This means that
these commands will still work for ordinary users, even if the SUID bit is cleared. This is part of a
design which can allow you to eventually eliminate the use of root and rely solely on role-based
authorization.
Access control lists
AIX (as do other UNIX operating systems) supports i-node extensions which allow more flexible
control over file access. The most common use of i-node extensions is to list the exact
permissions for various users and groups. These are called Access Control Lists (ACLs).
Traditionally, AIX has used a format called Extended Attributes Version 1 (EAv1) to store ACLs. If
the system is acting as an NFS server using NFSv4 and its support for ACLs, then a different format
(EAv2) is required. Which extended attribute format is used is determined when creating the JFS2
file system.
Role-based access control
Another common UNIX feature these days is the ability to delegate authority by assigning roles,
rather than juggling various group memberships. AIX also has role-based access control. In AIX 6
and later, there is an enhanced RBAC which is tied to special command privileges. These
privileges effectively bypass the traditional permission bit file access control. Enhanced RBAC is
just one of the many security enhancements introduced in AIX6. The AIX6 security enhancements
are briefly discussed later in this unit.
Be aware that RBAC is not an AIX unique concept. Other UNIX operating systems have RBAC.
Examples are: Solaris, HP/UX, and Linux distributions which implement Security Enhanced Linux
(SELINUX) such as RedHat. The security documentation of some UNIX operating systems do not
even discuss delegation of administration through group membership and instead focus on the
RBAC implementation. So, while not traditional UNIX security, RBAC is certainly common in
current versions of the various varieties of UNIX.
If students wish to know more details on the AIX security enhancements, they should plan to
attend an AIX security course if they want to learn more about AIX security.
Let us see where AIX keeps its security logs and how they are accessed.

© Copyright IBM Corp. 2009, 2024 A-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Security logs

/var/adm/sulog Audit trail of su activity

/var/adm/wtmp Log of successful logins

/etc/utmp List of users currently


logged in

/etc/security/failedlogin Information on failed


login attempts

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-8. Security logs

The sulog file


The sulog file is an ASCII text file that can be viewed with more or pg. In the file, the following
information is recorded: date, time, terminal name and login name. The file also records whether
the login attempt was successful (and indicates a success by a + and a failed login by a -).
The utmp and wtmp files
The /etc/utmp file contains a record of users logged in to the system, and the /var/adm/wtmp
file contains connect-time accounting records. To obtain information from either file use the who
command with the file name. The who command normally examines the /etc/utmp file, but you
can specify either one of the files just mentioned as an argument to the command.
The last command
The last command can also be used to display, in reverse chronological order, all previous logins
and logoffs still recorded in the /var/adm/wtmp file. The /var/adm/wtmp file collects login and
logout records as these events occur and holds them until the records are processed by the
accounting commands.
For example:
• last root Displays all the recorded logins and logoffs by the user root
• last reboot Displays the time between reboots of the system
The utmpd daemon
AIX 5L V5.2 introduced a new daemon called utmpd to manage the entries in the /etc/utmp file.
This daemon monitors the validity of the user process entries at regular intervals, and removes
entries which do not correspond to any current processes. The default interval time would be 300
seconds. The syntax of the command is: /usr/sbin/utmpd [ Interval ]

© Copyright IBM Corp. 2009, 2024 A-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
To start utmpd from the /etc/inittab, add the following entry to the file:
utmpd:2:respawn:/usr/sbin/utmpd
The failedlogin file
The /etc/security/failedlogin file maintains a record of unsuccessful login attempts. The file can
be displayed using the who command with the file as an argument.
Once again, these logs are fairly standard in other UNIX operating systems. But they can have
different names, paths, or commands for viewing. For example, HP/UX uses the /var/adm/btmp
to log bad login attempts and uses the lastb command to view the file. In some UNIX operating
systems, a log file is used only if the administrator first creates the file (for example, Solaris with
failed login recording).
The intent is not to teach students how to use these files as much as it is making them aware that
AIX provides them, the path and names that AIX uses, and how an AIX system administrator
typically accesses them (such as the last or who commands).
In addition to the security logs, there are security configuration files that might be a little different
than what you might be used to in the UNIX system you came from. Let us take a looks at these.

© Copyright IBM Corp. 2009, 2024 A-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Login sequence and security files

getty process Spawned by inittab

Settings in
/etc/security/login.cfg
Login: userid and passwd

/etc/passwd
User verification check /etc/security/passwd

no
Login failed Valid?
yes
Log entry in: /etc/environment
/etc/security/failedlogin Set up the environment. /etc/security/limits
/etc/security/user

Display /etc/motd $HOME/.hushlogin

/etc/profile
Enter login shell $HOME/.profile
Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-9. Login sequence and security files

Overview
The AIX login processing and security configuration files are very similar to other UNIX systems. A
few notable differences might be the location of the password shadow file, the use of login.cfg,
and the use of /etc/environment.
/etc/passwd
The /etc/passwd file lists the valid users, and the user ID, primary group, home directory, and
default login shell for each of these users.
/etc/group
The /etc/group file lists the valid groups, their group IDs, and members.
The /etc/profile file
/etc/profile will be read and executed during every login. Like the /etc/environment file, this file
can be changed only by root. It is possible to selectively block the ability of a user to overrule the
setting of a variable.
The $HOME/.profile and $HOME/.kshrc files
$HOME/.profile and $HOME/.kshrc can be customized by the user. The user can, generally,
overwrite any variable set in /etc/environment and /etc/profile.
The /etc/environment file
/etc/environment is used to set variables. No commands should be placed in this file. Only root
can change this file. It effects the default environment of new processes including the initial login
shell of a user. It can be overruled by later customizations (for example /etc/profile or the user’s
shell customizations).

© Copyright IBM Corp. 2009, 2024 A-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
The /etc/security directory
The /etc/passwd and /etc/group files have global read access to all users. A number of other
files control the attributes of users. These files are in the /etc/security directory, which can only
be accessed by root or the security group.
/etc/security/passwd
/etc/security/passwd is the shadow file which contains the encrypted password and update
information for users. For example, this is where the ADMCHG flag is set when a user passwords
are reset, forcing the users to change the password the next time they login.
/etc/security/user
/etc/security/user contains extended user attributes, including local or remote login enablement
and password enforcement rules (length, mixture of letter and numbers, password reuse, and
more).
/etc/security/group
/etc/security/group contains extended group attributes. For example, it identifies a group owner
who can control the group membership. It can also identify this as being an administrative group
(members of the security group are blocked from administering this group).
/etc/security/limits
/etc/security/limits contains process resource limits for users.
/etc/security/login.cfg
/etc/security/login.cfg is a configuration file for the login program. This file contains security
enhancements that limit the logins on a port, for example, the number of login attempts and the
valid login programs (shells). It is mostly customized to design the login prompt herald which is
seen when users connect to the system.
Other UNIX operating systems either have the same files or something very close. The names can
differ. For example, Solaris uses /etc/shadow for its shadow file, rather than
/etc/security/passwd. We are not aware of an equivalent to /etc/environment in Solaris.
Let us survey what user attributes can be set or modified by looking at the configuration file where
they are stored.

© Copyright IBM Corp. 2009, 2024 A-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

/etc/security/user file
default: * default continued ...
admin = false histsize = 4
login = true minage = 4
su = true maxage = 13
daemon = true maxexpired = 4
rlogin = true minalpha = 2
sugroups = ALL minloweralpha = 1
admgroups = minupperalpha = 1
ttys = ALL minother = 0
auth1 = SYSTEM mindigit = 1
auth2 = NONE minspecialchar = 1
tpath = nosak minlen = 10
umask = 022 mindiff = 0
expires = 0 maxrepeats = 8
SYSTEM = "compat" dictionlist =
logintimes = pwdchecks =
pwdwarntime = 5 default_roles =
account_locked = false root:
loginretries = 0 admin = true
histexpire = 52 SYSTEM = "compat"
. . .

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-10. /etc/security/user file

User attributes
The user attributes are stored in /etc/security/user. The default stanza defines the attributes for
all users unless overridden for a particular user. If a user needs an override to a default attribute,
then a stanza with the name of the user is created with only those attributes which differ from the
default. The common way to manage the user specific overrides is to use the Change / Show
Characteristics of a User SMIT panel or, if there is a need to script the change, the chuser
command (rather than editing the file). The file is shown here as a concise way to survey the types
of attributes which can be controlled.
The new defaults for AIX 7.3 are shown and discussed here.
admin
Defines the administrative status of the user. Possible values: true or false.
login
Defines whether a user can login. Possible values: true or false.
su
Defines whether other users can switch to this user account. The su command supports this
attribute. Possible values: true or false.
daemon
Defines whether the user can execute programs using the system resource controller (SRC).
Possible values: true or false.
rlogin

© Copyright IBM Corp. 2009, 2024 A-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
Defines whether the user account can be accessed by remote logins. Commands rlogin and
telnet support this attribute. Possible values: true or false.
sugroups
Defines which groups can switch to this user account. Alternatively, you can explicitly deny groups
by preceding the group name with a ! character. Possible values: A list of valid groups separated
by commas, ALL or * .
admgroups
Lists the groups that a user administers. The value is a comma-separated list of valid group
names.
ttys
Defines which terminals can access the user account. Alternatively, you can explicitly deny
terminals by preceding the terminal name with the ! character. Possible values: List of device
paths separates by commas, ALL or * .
auth1
Defines the primary authentication method for a user. The commands login, telnet, rlogin and
su support these authentication methods.
auth2
Defines the secondary authentication methods for a user. It is not a requirement to pass this
method to login.
tpath
Defines the user's trusted path characteristics. Possible values: nosak, notsh, always or on. (For
more information refer to the on-line documentation).
umask
Defines the default umask for the user. Possible values: 3-digit octal value.
expires
Defines the expiration time for the user account. Possible values: a valid date in the form
MMDDHHMMYY or 0. If 0, the account does not expire. The 'YY' supports the last two digits of the
years 1939 to 2038. If 0101000070 then the account is disabled.
SYSTEM
This attribute can be used to describe multiple or alternate authentication methods the user must
use successfully before gaining access to the system. Possible tokens are:
• files: Allows only local users access to the system
• compat: The normal login procedure and therefore allows local and NIS users access to the
system
• DCE: The Distributed Computing Environment authentication
logintimes
Defines the times a user can login. The value is a comma separated list of items as follows:
• [!][MMdd[-MMdd]]:hhmm-hhmm

© Copyright IBM Corp. 2009, 2024 A-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
or
• [!]MMdd[-MMdd][:hhmm-hhmm]
or
• [!][w[-w]]:hhmm-hhmm
or
• [!]w[-w][:hhmm-hhmm]
Where MM is a month number (00=January, 11-December), dd is the day on the month, hh is the
hour of the day (00 - 23), mm is the minute of the hour, and w is the day of the week (0=Sunday,
6=Saturday).
pwdwarntime
The number of days before a forced password change that a warning is given to the user informing
them of the impending password change. Possible values: a positive integer or 0 to disable this
feature.
account_locked
Defines whether the account is locked. Locked accounts cannot be used for login or su. Possible
values: true or false.
loginretries
The number of invalid login attempts before a user is not allowed to login. Possible values: a
positive integer or 0 to disable this feature.
histexpire
Defines the period of time in weeks that a user will not be able to reuse a password. Possible
values: an integer value between 0 and 260. 26 (approximately 6 months) is the recommended
value.
histsize
Defines the number of previous passwords which cannot be reused. Possible values: an integer
between 0 and 50.
minage
Defines the minimum number of weeks between password changes. Default is 4. Range: 0 to 52.
maxage
Defines the maximum number of weeks a password is valid. The default is 13. Range: 0 to 52.
maxexpired
Defines the maximum number of weeks after maxage that an expired password can be changed
by a user. The default is 4. Range: -1 to 52. maxage must be greater than 0 for maxexpired to be
enforced. (root is exempt from maxexpired).
minalpha
Defines the minimum number of alphabetic characters in a password. The default is 2. Range: 0 to
8.

© Copyright IBM Corp. 2009, 2024 A-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
minloweralpha
Defines the minimum number of lower case alphabetic characters that must be in a new
password. The value is a decimal integer string. The default value is 1. Range: 0 to PW_PASSLEN.
minupperalpha
Defines the minimum number of upper case alphabetic characters that must be in a new
password. The value is a decimal integer string. The default value is 1. Range: 0 to PW_PASSLEN.
minother
Defines the minimum number of non-alphabetic characters in a password. The default is 1.
Range: 0 to 8.
mindigit
Defines the minimum number of digits that must be in a new password. The value is a decimal
integer string. The default value is 1. Range: 0 to PW_PASSLEN.
minspecialchar
Defines the minimum number of special characters that must be in a new password. The value is a
decimal integer string. The default value is 1. Range: 0 to PW_PASSLEN.
minlen
Defines the minimum length of a password. The value is a decimal integer string. The default value
is 10. The maximum value allowed is PW_PASSLEN attribute. This attribute is determined by the
minalpha attribute value added to the minother attribute value. If the sum of these values is
greater than the minlen attribute value, the minimum length is set to the result.
Note: The PW_PASSLEN attribute is defined in /usr/include/userpw.h. The value of the
PW_PASSLEN attribute is determined by the system-wide password algorithm that is defined in
/etc/security/login.cfg. The minimum length of a password is determined by the minlen
attribute and should never be greater than the PW_PASSLEN attribute. If the minalpha attribute
+ minother attribute is greater than the PW_PASSLEN attribute, then the minother attribute is
reduced to PW_PASSLEN attribute - minalpha attribute.
mindiff
Defines the minimum number of characters in the new password that were not in the old
password. The default is 0. Range: 0 to 8.
maxrepeats
Defines the maximum number of times a given character can appear in a password. The default is
8, which is equivalent to unlimited. Range: 0 to 8.
dictionlist
Defines the password dictionaries used when checking new passwords. The format is a comma
separated list of absolute path names to dictionary files. A dictionary file contains one word per
line where each word has no leading or trailing white space. Words should only contain 7 bit ASCII
characters. All dictionary files and directories should be write protected from everyone except
root. The default is valueless which is equivalent to no dictionary checking.
pwdchecks

© Copyright IBM Corp. 2009, 2024 A-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
Defines external password restriction methods used when checking new passwords. The format
is a comma separated list of absolute path names to methods or method path names relative to
/usr/lib. A password restriction method is a program module that is loaded by the password
restrictions code at run time. All password restriction methods and directories should be write
protected from everyone except root. The default is valueless, which is equivalent to no external
password restriction methods.
Students are encouraged to use SMIT to manage these attributes, or at least the chuser
command rather than editing the file. The exception is modifying the default stanza.
Let us look at AIX commands used to manage the users and groups.

© Copyright IBM Corp. 2009, 2024 A-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

User management commands


mkuser • Define a new user
passwd • Set or change password
pwdadm • Change password or clear flags for a user

lsuser • List user attributes • Or use SMIT


chuser • Change user attributes
rmuser • Remove a user

mkgroup • Define a new group


lsgroup • List group attributes
chgroup • Change group attributes
rmgroup • Remove a group
Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-11. User management commands

Overview
Rather than editing a variety of flat files, it is recommended that you use either SMIT or the high
level commands to manage your users and groups. The SMIT panels are the easiest way, but the
command line can be useful when scripting the management of large numbers of users. The use
of each of the listed commands is fairly intuitive and you are, in general, referred to the man pages
for details on them.
Password management for new users or when resting passwords
When first defining a user with the mkuser command, the password is not set and the user cannot
log in yet. The administrator must set an initial password. This can be done by the root user with
the passwd command or by a member of the security group using the pwdadm command, (The SMIT
panel uses passwd).
Any initial setting or resetting of password will result in the ADMCHG flag being set in that user’s
stanza in the /etc/security/passwd file. This forces the users to change their password when
they login, at which time the flag is removed. There are times when that behavior is not desirable
(such as an account to support remote automation using scripts which cannot properly handle a
interactive prompt to change the password). A convenient way to clear the ADMCHG flag is to use
the pwdadm command with the -c flag. This will clear all flags for the specified user.
Again, the other UNIX operating systems have similar user management commands, but they
have different names then what is used in AIX. This is just a reference for students to know how to
map their existing knowledge to the AIX set of commands. We encourage students to use SMIT
for user management if they are going to be setting different user attributes. Otherwise, a simple
mkuser <username> at the command prompt suffices. One difference is the use for the ADMCHG
flag and pwdadm command.
Let us finish up with a brief introduction to the security enhancements that you can find in AIX.

© Copyright IBM Corp. 2009, 2024 A-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

AIX 6 and AIX 7 security enhancements (1 of 2)


• Enhanced RBAC and Domain RBAC:
ƒ Command privileges authorized by user role
ƒ Can avoid use of SUID or even root user
ƒ Can control with which resources a user can use the authority
• Encrypted file systems
ƒ User can request transparent encryption of selected files
• Trusted execution
ƒ Periodically audit system for tampering of commands or files
ƒ Block execution of commands that are compromised
• Secure by Default (requires RBAC)
ƒ Install AIX with maximum hardening, loosen as needed

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-12. AIX 6 and AIX 7 security enhancements (1 of 2)

Overview
AIX6 and 7 introduced many major security enhancements. For a complete training on AIX
security, including the use of these new enhancements, it is suggested that the student attend
and AIX Security course.
RBAC
With enhanced Resource-Based Access Control (RBAC), commands can have privileges assigned
which are only usable when authorized. Typically, a user provides that authorization through
switching to a role which has been assigned to the user. Example of privileges would be the ability
to use certain kernel services or to have unlimited file access (some combination of read, write,
and execute). The authorizations and privileges are fine grained. Use of RBAC can effectively
eliminate the need to use SUID and SGID on commands and assignment of group memberships.
While the framework supports user defined privileged commands, authorizations and roles, AIX,
beginning with version 6, provides 10 predefined roles that can be used without additional RBAC
configuration. These include:
• isso - Information System Security Officer
• sa - System Administrator
• so – System Operator
• AccountAdmin - User and Group Account Administration
• BackupRestore -Backup and Restore Administration
• DomainAdmin - Remote Domain Administration
• FSAdmin - File System Administration

© Copyright IBM Corp. 2009, 2024 A-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
• SecPolicy - Security Policy Administration
• SysBoot - System Boot Administration
• SysConfig - System Configuration
Domain RBAC
With enhanced Resource-Based Access Control (RBAC), authorization for a particular function but
did not constrain with which instance of a resource it could be used. For example, the RBAC role
would permit modification file system attributes, but could not restrict which file systems could
be modified by the user. With Domain RBAC (introduced in AIX 7), the domain of an ability can be
defined. In the file system example, you could identify which users are allowed to use their file
system management abilities against particular file systems.
Trusted Execution (TE)
The usual way for a malicious user to harm the system is to get access to the system and then
install Trojan horses, rootkits, or tamper with some security critical files such that the system
becomes vulnerable or exploitable. The central idea behind TE is to be able to prevent such
activities or at least be able to identify if any such thing happens to the system.
Selective critical files have their attributes (such as size, permissions, and checksums) recorded in
a Trusted Signature Database (TSD). The integrity of either individual files or all TSD defined files
can then be checked by comparing their current characteristics with what is in the TSD. The
integrity check can be done as an audit activity (periodically check the TSD defined files) or as a
runtime check which will prevent execution of a command that has been tampered with.
Encrypted files system
The Encrypted Files System (EFS) feature, introduced in AIX 6.1, enables individual users on the
system to encrypt their data on a JFS2 file system using that user’s keystore file. Once setup, the
access and use of the encrypted files is transparent to the user and looks no different than
working with a non-encrypted file.
• Files are in an encrypted state only on disk. After creating an EFS file system, one can then
define encrypted file support either for a single file or set encryption inheritance at either the
file system level or at a directory level.
• Files can be backed up encrypted.
• Each file is encrypted separately.
• EFS is integrated into JFS2 processing.
• AIX commands have been modified to take encrypted file systems into account.
Secure by Default
While AIXpert is normally used to take a system that is fairly open and allow the administrator to
tighten security and harden the system by taking away capabilities that have potential exposures,
the Secure by Default (SbD) installation option installs AIX in a hardened state and then leaves it
up to the administrator to re-enable any abilities that the organization feels is needed. SbD
actually installs a minimal collection of filesets. Rather than installing support for network access
by way of telnet and then disabling the port for telnet, it simply does not install the related fileset.
Encrypting physical volumes

© Copyright IBM Corp. 2009, 2024 A-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
Starting from AIX 7.3 with Technology Level 1, you can encrypt the physical volumes that uses the
small computer systems Interconnect (SCSI) protocol. Data that is written to the physical volume
is encrypted and data that is read from the physical volume is decrypted during an I/O operation.
Data encryption on a physical volume is not enabled by default. To encrypt data that is stored in a
physical volume, you must enable encryption for the physical volume. When encryption is enabled
for a physical volume, all previous data on that physical volume is deleted. The size of the
encrypted physical volume is smaller than the size of the physical volume before encryption
because the encryption feature reserves some space on the physical volume for the encryption
process.
Encrypted logical volumes
To protect business and personal data, starting with AIX 7.2 with Technology Level 5, the Logical
Volume Manager (LVM) supports the data encryption at the logical volume (LV) level. By using this
feature, you can encrypt the data at rest to protect data exposure due to lost or stolen hard disk
drives or inappropriately decommissioned computers. The term data at rest refers to inactive data
that is stored physically in any digital form. Each LV is encrypted with a unique key. The logical
volume data is encrypted before the data is written to the physical volume. This data is decrypted
when it is read from the physical volume. By default, data encryption is not enabled in logical
volumes. The data encryption option must be enabled at the volume group level before you
enable the data encryption option at the logical volume level. The LV encryption creates one data
encryption key for each logical volume. The data encryption key is protected by storing the keys
separately in other data storage devices. The following types of key protection methods are
supported:
• Paraphrase
• Key file
• Cryptographic key server
• Platform keystore (PKS) (available in IBM PowerVM® firmware of the IBM Power® System
FW950)
This is just to let the students know that there is a lot more to AIX security than just the traditional
UNIX security that the unit has reviewed up to this point.

© Copyright IBM Corp. 2009, 2024 A-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

AIX 6 and AIX 7 security enhancements (2 of 2)


• AIXpert
ƒ Predefined or customized levels of system hardening
• PowerSC
ƒ Trusted Logging: Store log in real time in VIOS
ƒ Trusted Network Connect and Patch Management: Detect if connecting system has required
security patches
ƒ Trusted Boot: Validates boot image, OS, and software
ƒ Trusted Firewall: VIOS bridge acts as firewall, avoiding need to use external switch.

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-13. AIX 6 and AIX 7 security enhancements (2 of 2)

AIXpert
AIX Security Expert allows you to standardize the hardening of an AIX system and facilitates
applying the same hardening policy to multiple systems. There are over 300 settings or
commands which are described in tables located in the AIX 7.3 Security manual. AIXpert comes
with three levels of predefined hardening: low, medium, and high. The hardening includes such
items as disabling TCP and UDP ports with know exposures, removing SUID and SGID from
various files, and more. Do not use this tool to harden without understanding the consequences.
For example, if you request the high level, but did not first configure for ssh, you might find
yourself locked out due to disablement of telnet.
Trusted Boot
Reduces risk of compromised security by guaranteeing that an AIX operating system image has
not been inadvertently or maliciously altered. Trusted boot is used to verify the integrity of an AIX
boot image. It is designed so that you can know by way of a yes or no answer that the image has
not been tampered with. An integrity check is implemented in such a manner that you can from a
central console verify the integrity of an LPAR using a method that cannot be spoofed, replayed, or
forged.
Trusted Logging
Prevents tampering or covering security issues by storing AIX virtual machine system logs
securely on a central PowerVM Virtual I/O Server. Also, reduces backup and archive time using
storing audit logs in a central location. Trusted logging allows the AIX administrator to write to
both the local log and to a log file on a VIO server. The hypervisor is used for secure
communication as it has never been hacked. The VIOS LPAR is more secure than the AIX LPAR
since end users do not normally access the VIOS LPAR and could be removed from the end user
network.

© Copyright IBM Corp. 2009, 2024 A-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty
Trusted Network Connect And Patch Management
Ensures that site patch levels policies are adhered to in virtual workloads. Also provides
notification of noncompliance when back-level systems are activated. Verifies that all AIX
systems in the virtual environment are at the specified software and patch level and provides
management tools to ensure that all AIX systems are at the specified software level. Provides
alerts if a down-level virtual system is added to the network or if a security patch is issued that
affects the systems.
Trusted Firewall
Improves performance and reduces network resource consumption by providing firewall services
locally with the virtualization layer. The Trusted Firewall feature provides virtualization-layer
security that improves performance and resource efficiency when communicating between
different virtual LAN (VLAN) security zones on the same Power Systems server. Trusted Firewall
decreases the load on the external network by moving the filtering capability of firewall packets
meeting specified rules to the virtualization layer.
Note: Trusted AIX is removed in AIX 7.3
(https://www.ibm.com/docs/en/aix/7.3?topic=notes-aix-732-release). If you want to implement
a fine-grained security model where privileges are separated across different users based on
applying a labeled model to users and resources, consider the AIX Domain RBAC feature,
https://www.ibm.com/docs/en/ssw_aix_73/security/domain_rbac.html.
Let’s review some of what we have discussed with some checkpoint questions.

© Copyright IBM Corp. 2009, 2024 A-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

2    (1 of 2)
1. Which performance statistics commands does AIX support?
a. iostat
b. vmstat
c. netstat
d. ps
e. All of the above

2. True or False: Use of the crontab command allows you to set up recurring job executions in
AIX.

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-14. Review questions (1 of 2)

© Copyright IBM Corp. 2009, 2024 A-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

2    (1 of 2)
1. Which performance statistics commands does AIX support?
a. iostat
b. vmstat
c. netstat
d. ps
e. All of the above
The answer is all of the above.

2. True or False: Use of the crontab command allows you to set up recurring job executions in
AIX.
The answer is true.

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-15. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 A-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

2    (2 of 2)
3. What can be done in AIX if paging space is filling up?
a. Stop and start programs with memory leaks
b. Dynamically increase the size of existing paging spaces
c. Dynamically define and activate a new paging space
d. Stop low priority programs
e. All of the above

4. True or False: AIX allows you to use standard UNIX security or use enhanced security
facilities.

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-16. Review questions (2 of 2)

© Copyright IBM Corp. 2009, 2024 A-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

2    (2 of 2)
3. What can be done in AIX if paging space is filling up?
a. Stop and start programs with memory leaks
b. Dynamically increase the size of existing paging spaces
c. Dynamically define and activate a new paging space
d. Stop low priority programs
e. All of the above
The answer is all of the above.

4. True or False: AIX allows you to use standard UNIX security or use enhanced security
facilities.
The answer is true.

Survey of additional AIX facilities © Copyright IBM Corporation 2024

Figure A-17. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 A-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix A. Survey of additional AIX facilities

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Identify AIX supported performance monitoring commands
ƒ Identify standard UNIX scheduling abilities in AIX
ƒ Identify the print subsystems supported by AIX and describe the
common UNIX print management commands supported
ƒ Describe the AIX paging space management commands
ƒ Identify common UNIX security mechanisms used in AIX

© Copyright IBM Corporation 2024

Figure A-18. Unit summary

© Copyright IBM Corp. 2009, 2024 A-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Appendix B. Printers and queues


Estimated time
00:30

Overview
This unit covers the purpose and benefits of queuing systems, details the components of a print
request process, and provides practical skills for adding printer queues, submitting print jobs, and
viewing print queue status.

References
Online AIX 7.3 Operating System Management Guide
Online AIX 7.3 Printing Guide
Note: References listed as Online above are available at the following address:
https://www.ibm.com/docs/en/aix/7.3
Printing for Fun and Profit under AIX 5L (Redbook)

© Copyright IBM Corp. 2009, 2024 B-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Unit objectives • After completing this unit, you should be able to:
ƒ Describe the purpose and the benefits of a queuing system
ƒ Identify the major components that are responsible for processing a print
request
ƒ Add a printer queue and device under different circumstances
ƒ Submit jobs for printing
ƒ View the status of the print queue

© Copyright IBM Corporation 2024

Figure B-1. Unit objectives

Let us start by looking at an overview of the print subsystem.

© Copyright IBM Corp. 2009, 2024 B-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

AIX printing environments


• Print subsystems:
ƒ AIX print subsystem
ƒ System V print subsystem
• Print directly to a local printer device
• Print directly to a remote printer through a socket program

Printers and queues © Copyright IBM Corporation 2024

Figure B-2. AIX printing environments

Introduction
The visual gives an overview of the different approaches that can be taken to printing under AIX
5L and later. In the next two visuals, System V printing is compared to the traditional AIX print
subsystem. The remainder of this unit will focus on using the AIX print subsystem.

Note

You can use either the AIX print subsystem or the System V print subsystem. They will not run
concurrently.

Print directly to a local printer device


This is the simplest form of printing. If your printer is directly attached to a serial or parallel port
on the local machine, it is possible to print by sending a file directly to the device. For example:
# cat /home/grogu/myfile > /dev/lp0
In this approach, you lose the ability to serialize (spool) print requests. Only one user can print at a
time. On the other hand, if a printer is dedicated to one use, this can be a good solution. Examples
might be logging to a printer, or printing checks.
Print directly to a remote printer through a socket program
This is similar to printing to a device driver, except that in this case, you are sending the output to
a program which makes a connection to the printer over the network.
Print using the System V print subsystem

© Copyright IBM Corp. 2009, 2024 B-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
In this environment, files to be printed are sent to the System V print service daemon, lpsched,
using the lp or lpr commands. The print service daemon serializes the jobs, so they will be
printed in the order in which they were submitted. The print service can filter the file to format the
data so that it matches the types of data acceptable to the printer. The print service then sends
files, one at a time, to the interface program, which can do additional filtering before sending the
file to the local printer driver or network printing application.
Print using the AIX print subsystem
In this environment, files to be printed are sent to the AIX print spooler daemon, qdaemon, using
any of the AIX print commands (enq, qprt, lp, or lpr). The spooler daemon serializes the jobs. The
spooler sends jobs, one at a time, to programs that can filter the data, before sending it to the
local printer driver or network printing application.
There are several places later in this unit that mention a few System V print commands that are in
AIX V4.3.3. These notes have not been changed as they are still true. AIX now provides full
support for the print subsystem.
Now, let us look at the strengths of the AIX print subsystem.

© Copyright IBM Corp. 2009, 2024 B-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

AIX print subsystem: Advantages


• Powerful and flexible printer drivers
• System management tools:
ƒ Limits fields and options validation
ƒ Easy printer customization
ƒ Single step print device and queue creation
• Customizable spooling subsystem

Printers and queues © Copyright IBM Corporation 2024

Figure B-3. AIX print subsystem: Advantages

Powerful and flexible printer drivers: AIX printer drivers provide many printing options that can
be easily controlled using command line options to the qprt command. Printer defaults can be
easily managed using SMIT or the command line.
System management tools: The AIX print subsystem includes mature and powerful system
management using either the web-based System Manager or SMIT, as well as the command line.
Some specific system management advantages using the AIX print subsystem are:
• Limits fields and options validation: Gives the user or administrator a range of valid values for
print options and prevents the user from using an invalid value.
• Easy printer customization
• Printers can be customized using menu selections or command line options. Under System V
printing, customizing printers often requires a knowledge of shell programming.
• Single step print device and queue creation.
• Under System V printing, you must first add a print device and then create the print queue.
Customizable spooling subsystem: The AIX print subsystem is specifically designed so that it
can be used to serialize other types of jobs beyond just printing.
In summary, the main advantages of AIX printing are flexibility and ease of use. AIX printing and
System V are tightly integrated into SMIT.
Now, let us look at the strengths of the System V print subsystem.

© Copyright IBM Corp. 2009, 2024 B-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

System V print subsystem: Advantages


• Compatibility
• Availability of interface programs
• Security
• Support for forms
• Standard PostScript filters
• Long term strategy

Printers and queues © Copyright IBM Corporation 2024

Figure B-4. System V print subsystem: Advantages

Compatibility
System administrators with experience in other UNIX variants that use System V printing, will find
it easy to manage printing under AIX’s System V print subsystem.
Availability of interface programs
Many printer manufacturers provide interface shell scripts to support using their products under
System V printing. Usually, only minor modifications are required for individual UNIX variations.
Because the AIX print subsystem is proprietary, an interface program written for another
operating system cannot be used in the AIX print subsystem. It must be completely rewritten.
This has led to a limited number of printers supported under AIX. With the support of System V
printing in AIX 6.1 (and later), it is easier for manufacturers to include support for AIX printing.
Security
Controlling user access to printers can be an important issue. For example, you might need to
limit access to the printer used to print checks. System V printing includes built-in capabilities for
restricting user access to certain printers. Using the AIX print subsystem, the backend program
must be customized to restrict user access.
Support for forms
If you are printing to preprinted forms, it is important that other users not be able to print while
the expensive forms are loaded on the printer. The System V print subsystem provides a
mechanism for mounting forms on printers, and allowing or denying, user access based on the
form which is mounted. To provide this capability under AIX printing, you must create multiple
queues and manage which queues are enabled while a form is mounted.
Standard PostScript filters

© Copyright IBM Corp. 2009, 2024 B-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
The System V print subsystem includes a number of filters for converting different file formats to
PostScript. Some formatting and page selection capabilities are also included.
Long-term strategy
IBM’s long-term printing strategy for AIX is to maintain compatibility with other UNIX systems.
This means that new features and functions are added to the System V print subsystem in later
releases, while the AIX print subsystem is supported, but not enhanced in future releases.
In summary, the main advantages of System V has to do with compatibility. This makes it easy for
system administrators from other UNIX variants to transition to AIX and it drives availability of
support for a larger number of printers on AIX. System V also adds forms support and better
security.
Directory-enabled printing is supported beginning with AIX 5L V5.2. System V printing on AIX
uses LDAP (Lightweight Directory Access Protocol) as the directory service. A directory is an
ordered list of objects, including details about each object. Obvious examples are phone books or
library card catalogs. Directories are a type of database. They differ from other databases in that
accesses are mostly reads, with only occasional writes. Directory protocols are optimized to
facilitate a high read environment. Computer directories can be searched in many ways, making
them a very powerful way to store and manage information.
In the case of a printer directory, this might include searching for the name of a printer to get its
characteristics, searching for printers in a particular location, searching for printers with particular
features, and so forth. Directory enabled printing provides an easy way for users to search for a
printer that is close and has the features they require. If security or other control features are
made part of the directory, directory enabled printing facilitates easier management by system
administrators.
Now, let us look at traditional AIX printing and queues.

© Copyright IBM Corp. 2009, 2024 B-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Concepts of queues

file1
Queue1
file1

file2

.
file2 .
file3
/dev/lp0
Queue2
file3
file4
file4
/dev/lp1
Printers and queues © Copyright IBM Corporation 2024

Figure B-5. Concepts of queues

Purpose for queues


The purpose of the queuing system is to maintain a queue of jobs that are waiting for their turn to
run (that is, use some system resource, like a printer or the CPU). The AIX queuing system
performs this function.
Benefits of queues
The queues also give control to the system administrator over the queuing mechanism. Therefore,
the system administrator can perform tasks like canceling jobs on queues, changing priorities of
jobs, and so forth. A queue enables the sharing of resources in an ordered fashion. The diagram in
the visual illustrates three important issues:
• One print queue can point to a number of printers (and it is the job of the qdaemon to
determine the next available printer to print on), for example, Queue1.
• Users can submit their jobs to a number of different queues.
• A printer can have a number of different queues pointing to it, for example, the printer
/dev/lp1 is accessed by both Queue1 and Queue2.
A simple way of submitting jobs to the printer device is with the following command:
$ cat myfile > /dev/lp0
This prints the output from the cat command on the printer lp0. The printer device modifies the
data stream to ensure things like number of lines on a page, page ends, page ejects, and so forth.
It has certain characteristics like an 80-character line already set.
The major disadvantage of using the above method for printing is that you bypass the queue
facility and lose your ability to serialize print requests to a printer through the queuing system.
Printing by utilizing a queuing system, enables a user or an application to send a print job to a

© Copyright IBM Corp. 2009, 2024 B-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
queue, and then the queuing subsystem itself will drive the printers and share them among the
applications and users who want to access the printers.
The motivation behind having two queues sharing the same printer is the ability to have different
types of data streams for the same printer. For example, one queue might be straight ASCII while
another queue might support PostScript printing.
Let us look at the actual data flow through the queuing system.

© Copyright IBM Corp. 2009, 2024 B-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Printer data flow


# qprt -Pps [-c] file
print request

lp lpr qprt
enq
copy of file (if requested)
Queue
Spool
monitors directory
qdaemon uses spool file
(if it exists)
starts
Backend Virtual Printer
(piobe) Definition

submits file to
printer

/dev/lp0
Printers and queues © Copyright IBM Corporation 2024

Figure B-6. Printer data flow

Print request
Local printing is implemented through a queuing mechanism. The user can issue one of the printer
commands qprt, lp, lpr, or enq to submit a print job. Although a user can use any one of these
four commands, the true entry point to the spooler is the enq command which is responsible for
processing the job request, creating a job description file (JDF), and notifying the qdaemon of the
new job.
The qdaemon
The qdaemon process runs at all times. The qdaemon maintains a list of all of the defined queues
and monitors the queues for newly submitted jobs. qdaemon tries to process the job if the
destination device is available; otherwise, the job remains in the queue and qdaemon tries again
later.
Queuing system process
The flow of the queuing system shown in the visual:
• The printing command calls enq. enq checks to see if the requested queue name is a valid
queue and all of the parameters are correct. If so, it continues, if not, an error message is
returned to the user.
• An entry is made in the /var/spool/lpd/qdir directory identifying the job to be run. If the
printer command uses an option to indicate that a copy of the file is to be made, the copy is
placed in the spool directory /var/spool/qdaemon.
• The qdaemon is notified of a new job in its qdir directory.
• When the queue is ready for the job, the qdaemon reads information from the /etc/qconfig
file describing the queue.

© Copyright IBM Corp. 2009, 2024 B-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
• The qdaemon updates the /var/spool/lpd/stat file for the appropriate queue to show that the
queue is now working on a new job.
• The qdaemon starts the back-end program, passing the file names and appropriate options on
the command line.
• The back-end determines the correct data stream characteristics, and merges these with the
actual file. The data stream characteristics are stored as virtual printer definitions in the
/var/spool/lpd/pio/@local directory.
• The back-end program sends its data stream to the device driver for the appropriate printer.
What happens when a file is spooled?
When a file is spooled, a copy of that file is sent to the print spool directory, /var/spool/qdaemon.
The copy remains in that directory until it is printed. This means that if you spool a file to the
printer, a user could continue to make revisions to the original since the copy in the print spool
directory will not be altered. This ensures that the file that is sent to the printer gets printed in its
original form, even if a user edits the original file that is on disk. Spooled files take up disk space in
/var until they are printed.
When a file is queued, one line of information is sent to the /var/spool/lpd/qdir directory which
points back to the original file on disk. If revisions are made to the file on disk before it is pulled
from the queue to print, the revised file is printed.
Virtual printer definitions: This file pairs the attributes or characteristics of a specific printer with
the attributes of a specific data stream. For example, if a printer supports both ASCII and
PostScript data streams, you must create two virtual printer definitions for the printer. These can
be created using SMIT and are stored in the /var/spool/lpd/pio/@local directory. A subdirectory
called custom must hold an entry for each virtual printer. SMIT will automatically place an entry in
this directory for each queue defined. The mkvirprt command can also be used to create a virtual
printer.
Now that you have seen the major components, let us take a closer look at the corresponding files
and structures that are directly associated with the queuing system.

© Copyright IBM Corp. 2009, 2024 B-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

System files associated with printing

/etc/qconfig Queue configuration files


/var/spool/* Spooling directories
/var/spool/lpd/qdir/* Queue requests
/var/spool/qdaemon/* Temporary enqueued files
/var/spool/lpd/stat/* Line printer status information
/var/spool/lpd/pio/@local Virtual printer directories

Printers and queues © Copyright IBM Corporation 2024

Figure B-7. System files associated with printing

Print related files and directories


The system files and directories used for printing include:
• The /etc/qconfig file describes the queues and devices available for use by the printing
commands.
• The /var/spool directory contains files and directories used by the printing programs and
daemons.
• The /var/spool/lpd/qdir directory contains information about files queued to print.
• The /var/spool/qdaemon directory contains copies of the files that are spooled to print.
• The /var/spool/lpd/stat directory is where the information on the status of jobs is stored. It is
used by the qdaemon and backend programs.
• The /var/spool/lpd/pio/@local directory holds virtual printer definitions. This is where the
attributes of printers are paired with the attributes of corresponding data stream types.
It is recommended that SMIT be used to update these device-related files. In most cases,
updating standard system files is not recommended.
This is provided as a reference for students who want to know which files are involved in printing.
This unit will not discuss in detail how virtual printers work, as most users never work directly with
virtual printers.
Having looked at the files involved in queuing, let us review the role of the qdaemon.

© Copyright IBM Corp. 2009, 2024 B-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

qdaemon
• Manages queues
• Is started in the /etc/inittab file
• Invokes the back-end programs
• Optionally records accounting data

Printers and queues © Copyright IBM Corporation 2024

Figure B-8. qdaemon

qdaemon introduction
The qdaemon program schedules jobs that have been enqueued. It is a background process that
is usually started at system IPL through the startsrc command run from /etc/inittab.
qdaemon is controlled by the /etc/qconfig file. /etc/qconfig contains a stanza for each queue.
The stanza identifies any queue management options and points to a queue device stanza, which
identifies the destination printer, the formatting options, and the back-end program.
The back-end program
The back-end program is called by qdaemon to actually process each request. The back-end
program is determined by how the printer is connected to the AIX system. For local printing, the
back-end program is /usr/lib/lpd/piobe. For a remote printer, it is /usr/lib/lpd/rembak.
The back-end program uses printer attribute information to prepare the printer and format the
data for output. It also prints header and trailer pages, if they are enabled.
qdaemon is a process that starts when you start your system and runs until you shut your system
down. It keeps track of print job requests and the printer. It is also the parent to the back-end
process. It maintains queues of outstanding requests and sends them to the proper device at the
proper time. It is managed under the control of the SRC. The proper way to start and stop it is
through the SRC.
The queue-to-device relationships are held in the /etc/qconfig file. Let us look at the format of
this file.

© Copyright IBM Corp. 2009, 2024 B-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

The /etc/qconfig file


lp0:
device = lp0dev
up = TRUE
discipline = fcfs
lp0dev: One queue pointing to one device
file = /dev/lp0
backend = /usr/lib/lpd/piobe
header = group
trailer = never
lpq:
device = lpqdev1,lpqdev2
lpqdev1:
file = /dev/lp1 One queue pointing to two devices
backend = /usr/lib/lpd/piobe
lpqdev2:
file = /dev/lp2
backend = /usr/lib/lpd/piobe
ps:
device = psdev
psdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe
Two queues pointing to one device
asc:
device = ascdev
ascdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe
Printers and queues © Copyright IBM Corporation 2024

Figure B-9. The /etc/qconfig file

Introduction
The /etc/qconfig file is an attribute file. Some stanzas in this file describe queues, and other
stanzas describe devices. Every queue stanza requires that one or more device stanzas
immediately follow it in the file. This file is the key to customizing the queues. Although the file
can be edited directly, it is recommended that it be changed through high-level commands or
through SMIT.
Queue stanza
This starts with the queue name, which can be up to 20 characters, followed by a colon. The
queue name is used by the person submitting a job to indicate the requested queue. The first
queue in the /etc/qconfig file is the default queue, which receives any job requests submitted
without a specific queue name.
Some of the attributes that can be found in the queue stanza include:
• device: Identifies the symbolic name that refers to the device stanza
• discipline: Defines the queue serving algorithm. Default: fcfs. Other: sjn
• acctfile: Identifies the file used to save print accounting information. Default: false. Other:
filename
• up: Defines the state of the queue. Default: TRUE. Other: FALSE
Device stanza: The name of a device stanza is arbitrary and can be from one to 20 characters
long. The name is followed by a colon. The attributes that can be found in the device stanza
include:
• file: Identifies the special file where the output of back-end is to be redirected. Default:
FALSE, indicates no redirection and that the file name is /dev/null

© Copyright IBM Corp. 2009, 2024 B-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
• backend: Specifies the full path name of the back-end, optionally followed by the flags and
parameters to be passed to it
• access: Specifies the type of access the back-end has to the file specified by the file field This
field is ignored if the file field has the value, FALSE. Default: write. Other: both (used for
modems or backends needing read capability)
• header: Specifies whether a header page prints before each job or group of jobs. Default:
never. Other: always group
• trailer: Specifies whether a trailer page prints after each job or group of jobs. Default: never.
Other: always group
• feed: Specifies either the number of separator pages to print when the device becomes idle or
the value never, which indicates that the back-end is not to print separator pages. Default:
never. Other: integer
• align: Specifies whether the back-end sends a form-feed control before starting the job, if the
printer was idle. Default: FALSE. Other: TRUE
The device stanza must contain an attribute that designates the back-end program. The function
of the back-end is to manage the printing of the actual job. It also produces the final data stream
that goes to the printer. The most common back-end program for local printing is piobe.
If different users prefer different default printers, then the PRINTER variable can be set up, on a
per user basis. The PRINTER variable should be set to the queue that the user wants to be their
default queue, for example:
# PRINTER=ps ; export PRINTER
The reason that it is recommended to use SMIT rather than editing the file directly, is mainly to
keep the contents of /etc/qconfig consistent with the contents of the ODM. For example, if you
use vi to remove an entire stanza of information from the file, the ODM still has an entry for that
printer, and you are not able to redefine that printer until the ODM is in sync with the /etc/qconfig
file.
A queue can have a one to one relationship, where there is one queue to one printer. Or, a queue
can have a one to many relationship, where there are many printers in the same room and the job
goes to the first available printer. There might be times when there are multiple queues that
support one printer giving each queue its own characteristics of printing a job, which is referred to
as the many-to-one relationship. This occurs when a printer is capable of printing different types
of output such as ASCII, PostScript, and graphics.
The discipline attribute defines the queue serving algorithm. The default value, fcfs, means
first-come-first-served. sjn means shortest job next.
How can you tell what the default queue is based on the /etc/qconfig file? Answer: The first
queue name specified is the default queue.
The LPDEST variable can also be set to define a user default queue. If both PRINTER and LPDEST are
set, LPDEST's value is the value that is used.
Let us look at how to define printers and print queues.

© Copyright IBM Corp. 2009, 2024 B-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Printer menu

# smit spooler_choice

Print Spooling

Move cursor to desired item and press Enter.

AIX Print Spooling


System V Print Spooling

F1=Help F2=Refresh F3=Cancel F8=Image


F9=Shell F10=Exit Enter=Do

Printers and queues © Copyright IBM Corporation 2024

Figure B-10. Printer menu

Interface to manage spooling


AIX print spooling and System V print spooling are both supported by SMIT in AIX 6.1 and later.
Note: The choice between AIX Print Spooling and System V Print Spooling will only be available
in SMIT if the bos.svprint.rte fileset is installed.
Let us configure a local print queue through SMIT.

© Copyright IBM Corp. 2009, 2024 B-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

AIX printer menu

# smit spooler
AIX Print Spooling

Move cursor to desired item and press Enter.


Start a Print Job
Manage Print Jobs
List All Print Queues
Manage Print Queues
Add a Print Queue
Add an Additional Printer to an Existing Print Queue
Change / Show Print Queue Characteristics
Change / Show Printer Connection Characteristics
Remove a Print Queue
Manage Print Server
Programming Tools

Change / Show Current Print Subsystem


F1=Help F2=Refresh F3=Cancel F8=Image

F9=Shell F10=Exit Enter=Do

Printers and queues © Copyright IBM Corporation 2024

Figure B-11. AIX printer menu

SMIT AIX printer menu


The SMIT fastpath to this menu is smit spooler. The options on this menu are:
Start a Print Job 
This option starts a print job by submitting the job to a print queue.
Manage Print Jobs 
This option opens a submenu which enables you to cancel jobs, show the status of jobs, prioritize
jobs, hold and release jobs, and move jobs between print queues.
List All Print Queues 
This option displays a list of all the print queues and their associated printers.
Manage Print Queues 
You can start and stop print queues, show the status of print queues and change the system's
default print queue.
Add a Print Queue 
This option adds a print queue to the system configuration and creates the associated queue
device and printer device definition, if needed.
Add an Additional Printer to an Existing Print Queue 
This option adds another printer to an existing queue.
Change/Show Print Queue Characteristics 
This option will provide access to screens that enable you to change the printer setup, default
print job attributes, accounting file setup, and queuing discipline.
Change/Show Printer Connection Characteristics 
This option changes or shows printer communication and startup characteristics.

© Copyright IBM Corp. 2009, 2024 B-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
Remove a Print Queue 
This option removes a print queue from the system configuration. It also removes the associated
spooler queue device and printer device definition. If a print queue has more than one printer
associated with it, then all the printers are removed from the print queue.
Manage Print Server 
This option configures this machine as a print server. Allows you to control which clients have
print access to this machine, list clients with print access, add and remove clients, and stop and
start the server subsystem.
Programming Tools 
This option enables you to access low-level utilities for manipulating databases and filters.
Change/Show Current Print Subsystem 
Only one of the two print subsystems at the same time can be active. By default, after installation,
the AIX printer subsystem is active.
Other commands
To show the current print subsystem: switch.prt -d
To change the current print subsystem, you can use either:
•switch.prt -s AIX
•switch.prt -d SystemV
To check if binaries are correctly linked, you can use either:
•/usr/bin/lpstat --> /usr/aix/bin/lpstat
•/usr/bin/lpstat --> /usr/sysv/bin/lpstat
Let us assume we want to add a queue. Select the Add a Print Queue option.

© Copyright IBM Corp. 2009, 2024 B-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Configuring a printer with a queue


AIX Print Spooling

Move cursor to desired item and press Enter.

Add a Print Queue

Move cursor to desired item and press Enter. Use arrow keys to scroll.
#ATTACHMENT TYPE DESCRIPTION
local Printer Attached to Local Host
remote Printer Attached to Remote Host
xstation Printer Attached to Xstation
ascii Printer Attached to ASCII Terminal
hpJetDirect Network Printer (HP JetDirect)
file File (in /dev directory)
ibmNetPrinter IBM Network Printer
ibmNetColor IBM Network Color Printer
other User Defined Backend

F1=Help F2=Refresh F3=Cancel


F8=Image F10=Exit Enter=Do
/=Find n=Find Next

Printers and queues © Copyright IBM Corporation 2024

Figure B-12. Configuring a printer with a queue

Adding a local print queue


In our example, assume that the printer is directly attached to our AIX system. To configure a
printer attached in this way, choose local.
Some applications contain their own print control mechanisms and thus require that a printer be
configured without a queue. Use the SMIT fastpath smit pdp to define a printer without a queue.
In AIX V4, the SMIT menus were modified so that both the printer and the queue can be
configured in one operation. Note that this menu will always be presented to the user, regardless
of whether they are adding a new printer, or a queue, to an existing printer.
This menu supports definitions for printers attached in a variety of ways. Many installations these
days use network-attached printers. To define this type of printer, choose either hpJetDirect,
ibmNetPrinter, or ibmNetColor.
You can also configure just the printer device without any queues through SMIT. This is useful in
instances where the application is responsible for the print job and utilizes its own control
mechanisms.
Once the attachment type is defined, the printer manufacturer has to be specified.

© Copyright IBM Corp. 2009, 2024 B-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Selecting a printer type (1 of 2)


AIX Print Spooling

Printer Type

Move cursor to desired item and press Enter.

Bull
Canon
Dataproducts
Hewlett-Packard
IBM
Lexmark
OKI
Printronix
QMS
Texas Instruments
Other (select this if your printer is not listed above)

F1=Help F2=Refresh F3=Cancel


F8=Image F10=Exit Enter=Do
/=Find n=Find Next

Printers and queues © Copyright IBM Corporation 2024

Figure B-13. Selecting a printer type (1 of 2)

Specify the printer manufacturer


The next selection that has to be made is the printer type. Notice that IBM is only one of the
choices and many other manufacturers are supported as well. Note also that there is an Other
option which will be selected if the printer type is not supported; that is, not part of the list.
This screen is also presented to the user regardless of whether they are adding a queue to a new
device or to an existing one.
Assuming that you select IBM from this menu, the next screen is a list of all the IBM supported
printers. Let us view the list.

© Copyright IBM Corp. 2009, 2024 B-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Selecting a printer type (2 of 2)


AIX Print Spooling

Printer Type

Move cursor to desired item and press Enter.

[MORE...8]
ibm2391-2 IBM 2391 Plus printer (Model 2)
ibm3112 IBM 3112 Page Printer
ibm3116 IBM 3116 Page Printer
ibm3130 IBM 3130 LaserPrinter
ibm3812-2 IBM 3812 Model 2 Page Printer
ibm3816 IBM 3816 Page Printer
ibm4019 IBM 4019 LaserPrinter
ibm4029 IBM 4029 LaserPrinter
ibm4037 IBM 4037 LP printer
ibm4039 IBM 4039 LaserPrinter
[MORE...49]
F1=Help F2=Refresh F3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next
Printers and queues © Copyright IBM Corporation 2024

Figure B-14. Selecting a printer type (2 of 2)

Select the manufacturer’s supported printer


If you do not have the software installed for your printer, you are prompted to insert the media to
install the software first, before configuring the device and the queue.
The choice of printer determines the queue, or the virtual printer, setup. For example, an IBM
4029 Laser Printer is capable of handling PostScript, ASCII, GL Emulation, and PCL Emulation.
The SMIT print spooling menus guide you through the creation of up to four separate queues
which submit to the same printer.
Having selected IBM from the previous menu, the system next presents the user with a list of all
the supported IBM printers. Once the printer is selected, the system then prompts the user to
create a separate queue for each mode the printer is capable of supporting.
If the printer selected from this menu does not have device support installed, the user is
prompted to install the support at this time. With AIX 6.1, no printer drivers are installed by
default. However, the AIX installation media contains the device support for many printers. Also,
many OEM printers are delivered along with the necessary printer support software.
The next section deals with how the printer is physically connected to the server.

© Copyright IBM Corp. 2009, 2024 B-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Printer attachment

Printer Interface
Move cursor to desired item and press Enter.
parallel
rs232
rs422

Parent Adapter
Move cursor to desired item and press Enter.

ppa0 Available 01-G0 Standard Parallel Port Adapter

Printers and queues © Copyright IBM Corporation 2024

Figure B-15. Printer attachment

Selecting the printer attachment


After selecting a printer type, a pop-up window is displayed where the printer interface must be
chosen. Possible values are parallel, RS232, and RS422. Some printers support multiple
attachment methods. Then, a list of installed adapters that support that method of attachment
are presented.
If you are adding a queue to an existing printer, then before the two menus are displayed as
shown on the visual, an extra menu is displayed which reads: Add a new printer or select
existing printer from below.
Let us assume that you already have an IBM 4029 printer configured on the system. Having just
selected IBM from the first menu and IBM 4029 from the second printer type menu, the system at
this point is not sure whether you are trying to add a queue to the printer which already exists or
whether you are trying to configure yet another IBM 4029 printer for your system. That is why it
will ask for clarification by displaying the screen with the above message.
In the visual, we are assuming that there are no printers configured yet, or at least not one of the
type that we have selected, so the two screens are displayed. We are assuming that the printer is
connected to the parallel port.
This example is no longer common (or in many cases no longer possible with modern Power
servers). It is shown for completeness only.
Once information about the printer has been defined, the next menu asks for information about
the new print queues.

© Copyright IBM Corp. 2009, 2024 B-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Add the print queues


Add a Print Queue
Type or select values in entry fields.

Press Enter AFTER making all desired changes.


[Entry Fields]
Description IBM 4029 LaserPrinter
Names of NEW print queues to add
ASCII [asc]
GL Emulation []
PCL Emulation []
PostScript [ps]
Printer connection characteristics

* PORT number [p] +


Type of PARALLEL INTERFACE [standard] +
Printer TIME OUT period (seconds) [600] +#
STATE to be configured at boot time available +

F1=Help F2=Refresh F3=Cancel F4=List


F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do

Printers and queues © Copyright IBM Corporation 2024

Figure B-16. Add the print queues

Create the print queues


This menu varies depending on the characteristics of the physical printer. If the printer is capable
of two or three different modes or emulations, the system prompts you for a separate queue name
for each emulation. Once these queues are created, they are sometimes referred to as virtual print
devices.
Additional queues can be added to this printer after the initial queues are created.
There are many variations on the naming of print queues and print devices. It is recommended
that they are kept short and simple without loosing the unique description required by the users.
Once these initial print queues are created, more queues and queue customization can be done. It
is this procedure that creates the print and queue relationships and subsequently updates the
/etc/qconfig file. It is highly recommended that you do not edit the /etc/qconfig file directly. Use
SMIT whenever possible, because of the implications with the ODM updates.
In our example, you have chosen to create just two queues for our IBM 4029 printer. Take the
time to point out the two queues (ps and asc as shown in the student notes) that were created as
a result of having a printer which is capable of multiple modes. More often than not, this is
probably going to be the case. Also, point out that the /etc/qconfig file has a stanza construct
added, that will point two queues, to a single printer.
Now that the printer infrastructure is in place, let us talk about remote printing.

© Copyright IBM Corp. 2009, 2024 B-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Remote printing

host1 client1
lp1

• Set up the local print queue


• Configure a
• Define client machines in remote queue
/etc/hosts.lpd
• Start the lpd daemon

Printers and queues © Copyright IBM Corporation 2024

Figure B-17. Remote printing

Overview of print server setup


Once your system has the local queue set up, any user on that system can print. If the machine is
networked, it can also provide printing for client machines by becoming a print server.
To set up a print server, you need to define the client machine names, or IP addresses, in the
/etc/hosts.lpd file, and then start the lpd daemon. Both of these tasks can be done through
SMIT. To use SMIT, the fastpath to identify the client system is smit mkhostslpd.
The lpd daemon is controlled by SRC. You should use SMIT to start it, because SMIT also adds
entries to /etc/inittab to ensure that it is started on reboot. The fastpath for this screen is smit
mkitab_lpd.
We keep this discussion simple, as this is not a discussion on networking or TCP/IP. This visual
assumes that networking is already configured. Most users operate in a networking environment
and network printing is very common.
There are different techniques to set up remote printing. Here, you are showing how to take an
AIX system with a local printer, and turn it into a print server. This does not require much
discussion of the network itself. All the user needs to know is what the names (or IP addresses)
are of the client machines.
There are other ways to set up remote printing. For example, HP Jet Direct cards are very
common. If the students are using these, then the AIX system is a client rather than a host. We
will see this next.
These SMIT screens can be found in Print Spooling > Manager Print Server.
Let us take a look at the screen to define the client systems.

© Copyright IBM Corp. 2009, 2024 B-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Client authorization

# smit mkhostslpd

Add Print Access for a Remote Client

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

* Name of REMOTE CLIENT [client1]

(Hostname or dotted decimal address)

F1=Help F2=Refresh F3=Cancel F4=List

F5=ResetF6=Command F7=Edit F8=Image

F9=ShellF10=Exit Enter=Do

Printers and queues © Copyright IBM Corporation 2024

Figure B-18. Client authorization

Set up client authorization


This step is done on the print server. On this screen, enter the client machine's name or IP
address. A plus sign (+) is also valid. It indicates that this AIX system is a print server to all
machines.
Enter the name or IP address. A plus (+) symbol gives access to all machines. The entries are
added to the /etc/hosts.lpd file.
Let us see how to start the print server.

© Copyright IBM Corp. 2009, 2024 B-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Start lpd
# smit mkitab_lpd
Start the Print Server Subsystem
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
Start subsystem now, on system restart, or both [both] +
TRACE lpd daemon activity to syslog? [no] +
EXPORT directory containing print attributes? [no] +

Note:
Exporting this print server's directory
containing its print attributes will allow
print clients to mount the directory. The
clients can use this server's print attributes
to display and validate print job attributes
when starting print jobs destined for this
print server. Note that the Network File
System (NFS) program product must be installed
and running

Printers and queues © Copyright IBM Corporation 2024

Figure B-19. Start lpd

Starting the lpd daemon


This step is done on the print server. The lpd daemon is controlled by the system resource
controller (SRC). The commands startsrc and stopsrc can be used to control lpd. By using
SMIT, an entry is placed in the /etc/inittab file to ensure that lpd is started each time the
machine is booted.
The screen's defaults are all that is needed to start the lpd daemon and turn the AIX system into a
print server.
Now that the server is running, let us see how to configure a client machine for remote printing.

© Copyright IBM Corp. 2009, 2024 B-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Add a remote print queue

AIX Print Spooling

Move cursor to desired item and press Enter.

Add a Print Queue

Move cursor to desired item and press Enter.Use arrow keys to scroll.

#ATTACHMENT TYPE DESCRIPTION


local Printer Attached to Local Host
remote Printer Attached to Remote Host
xstation Printer Attached to Xstation
ascii Printer Attached to ASCII Terminal
hpJetDirect Network Printer (HP JetDirect)
file File (in /dev directory)
ibmNetPrinter IBM Network Printer
ibmNetColor IBM Network Color Printer
other User Defined Backend

Printers and queues © Copyright IBM Corporation 2024

Figure B-20. Add a remote print queue

Adding a remote queue on the client


This step is done on the client machine. The procedure to add a remote queue starts the same
way as a local queue: smit spooler > Add a Print Queue. This time, select remote as the
attachment type.
You are prompted to determine if you want to perform any type of filtering or pre-processing to
the print job before it is sent. Normally, Standard Processing is selected. This just sends the job
to the printer server and the print server is responsible for processing the job.
Each attachment type will ask for different information. Let us show what information is needed to
set up the remote queue.
Note that there will be one more screen that follows this. It is used to pre-process a job. Selecting
Standard Processing will leave all processing to the printer server.
Let us see what is needed to complete the process.

© Copyright IBM Corp. 2009, 2024 B-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Define the print server on the client

Add a Standard Remote Print Queue

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
*Name of QUEUE to add [rq1]
*HOSTNAME of remote server [host1]
*Name of QUEUE on remote server [lp1]
Type of print spooler on remote server AIX Version 3 or 4 +
Backend TIME OUT period (minutes) [] #
Send control file first? no +
TO turn on debugging, specify output []
file pathname
DESCRIPTION of printer on remote server []

Printers and queues © Copyright IBM Corporation 2024

Figure B-21. Define the print server on the client

Required input
Only three lines are required to complete the queue set up. You must name your local (to the
client) queue name. Then, provide the name of the printer server. Lastly, name the queue on the
print server.
Let’s focus on the first three lines.
Name of QUEUE to add is the name of the queue on the client side. The remote hostname and the
name of the remote queue on the remote host must be added. Users logged in to the client
machine, send their jobs to this queue.
The local queue name, and printer server's queue names, can be different or they can be the
same. By keeping them the same, users on both machines would direct their print jobs to queues
of the same name. This is easier for the users and the administrator.
Let us do a quick review.

© Copyright IBM Corp. 2009, 2024 B-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Let us review
1. True or False: The qdaemon is responsible for printing jobs.

2. To set up remote printing, what daemons are needed, and do they run on the
server, the client, or both?

3. What does the up = TRUE indicate in the /etc/qconfig file?

4. What does discipline mean in reference to the /etc/qconfig file? What are its
possible values?

Printers and queues © Copyright IBM Corporation 2024

Figure B-22. Let us review

© Copyright IBM Corp. 2009, 2024 B-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Let us review solutions


1. True or False: The qdaemon is responsible for printing jobs.
The answer is false. The printer back-end is responsible for printing. The qdaemon
manages jobs in queue. The qdaemon hands the jobs off to the back-end for printing.
2. To set up remote printing, what daemons are needed, and do they run on the
server, the client, or both?
The answer is qdaemon and lpd on the server; qdaemon only on the client.
3. What does the up = TRUE indicate in the /etc/qconfig file?
The answer is it means the queue is accepting jobs. If it were FALSE, the user would
be notified that the queue is not accepting jobs.
4. What does discipline mean in reference to the /etc/qconfig file? What are its
possible values?
The answers are discipline is read by qdaemon to determine the sorting order for
jobs in the queue. The values supported are fcfs (first come first server) and sjn
(shortest job next).
Printers and queues © Copyright IBM Corporation 2024

Figure B-23. Let us review solutions

Now, let us look at how to submit print jobs.

© Copyright IBM Corp. 2009, 2024 B-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Submitting print jobs


• AIX print systems offer compatibility to System V print commands
• To submit a job to a queue:
System V BSD AIX
lp lpr qprt

$ lp -d queuename filename

OR

$ qprt -P queuename filename

Printers and queues © Copyright IBM Corporation 2024

Figure B-24. Submitting print jobs

Introduction
There are three sets of commands for submitting, listing and canceling print jobs. They come from
either System V, BSD, or IBM versions of UNIX and are all available in AIX. The commands have
slightly different options.
Submitting a print job
To submit a print job to a queue, use either lp, lpr, or qprt. All jobs go to the system default
queue, unless the PRINTER or LPDEST variables are set. You can also specify, on the command line,
which queue to use. Use -d with lp or use -P with qprt and lpr.
Spooling
The commands lp and qprt both queue without spooling, by default. Specify the -c option if
spooling is desired. The command lpr spools and queues by default. The -c option will turn off
spooling with lpr.
Multiple copies
To print multiple copies, with qprt use the -N # option, with lp use -n # option, and with lpr use
just a hyphen followed by the number of copies (-#) . The lp, lpr, and qprt commands create a
queue entry in /var/spool/lpd/qdir and, depending upon the options specified, copy the file to be
printed to the /var/spool/qdaemon directory.
The enq command
All the print commands, lp, lpr, and qprt, actually call the enq command which places the print
request in a queue. enq can be used instead of the other commands to submit jobs, view job
status, and so forth. To submit a job using enq:
$ enq -Pqueuename filename

© Copyright IBM Corp. 2009, 2024 B-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
Requesting a specific printer
Ordinarily your request is serviced by the first device on the queue that becomes available.
However, if more than one printer services a queue, you can request a specific printer by using the
name of the queue followed by a colon (:) and then the name of the printer. For example, if a
system with one queue (ps) is serviced by two printers (lp0 and lp1), and a print job needs to be
printed on the lp1 printer, use the command:
$ qprt -Pps:lp1 /home/team01/myfile
Students should choose the command(s) that work best for them.
You might also want to take note of the -j option, which can be used with the enq and lpr
commands, so that the job number is displayed once the job has been submitted to print. The lp
command displays the job number by default. The qprt command uses the -j option for another
purpose.
Once you have submitted a job, you probably want to view where in the queue your job is. Let us
see how you can do this.

© Copyright IBM Corp. 2009, 2024 B-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Listing jobs in a queue


• To list jobs in a queue:

SYSTEM V BSD AIX


lpstat lpq qchk

For example:

$ qchk
Queue Dev Status Job Files User PP % Blks Cp Rnk
ps lp0 DOWN QUEUE 569 /etc/motd root 1 1 1

Printers and queues © Copyright IBM Corporation 2024

Figure B-25. Listing jobs in a queue

Checking status with the qchk command


Many of the print job control tasks require the user to supply a job number. The job number, along
with other queue status information is available by checking the status of print jobs.
The fields from the qchk command are as follows:
• Queue: Queue name
• Dev: Logical device name for the queue
• Status: Status of the queue (READY, DOWN, WAITING, RUNNING, and so forth)
• Job: The job number assigned by the qdaemon
• Files: Files sent to the queue
• User: User who sent the print request
• PP: Number of pages printed
• %: Percent completed
• Blks: The number of 512-byte blocks the print job has been split into
• Cp: Copies of each job to be printed
• Rnk: Order on that queue
Other viewing commands
Other commands that can be used to view printer status include:
• lpstat: Shows status of all queues
• lpq: Shows status of the default queue

© Copyright IBM Corp. 2009, 2024 B-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
• qchk -A: Shows status of all queues
• enq -A: Shows status of all queues
• qchk -W: Shows status in wide-form mode. This is helpful if using long queue and device
names, and 6-digit job numbers. This option is available with AIX V4.2.1 and later
Note the advantage of the lpstat command which by default lists information about all the
configured queues. With the qchk command, use the -A option to obtain a similar sort of listing.
The qchk with no options lists only the default queue information.
Also mention the -L option with the qchk command. This option displays a long-form listing of the
queues including spool file information. The -W option displays a wide-form listing, which is
helpful if device or queue names are long. The wide-form listing lists queue names up to 20
characters, and device names up to 14 characters (versus 7 and 5 characters respectively). This
option is available with AIX V4.2.1 and later, and cannot be used when the -L option is used.
Let us look at more tools that enable you to manage your print queues.

© Copyright IBM Corp. 2009, 2024 B-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Change characteristics of a queue


# smit chpq
Print Queue to Change / Show
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
PRINT QUEUE name [ps] +

Characteristics to Change / Show


Move the cursor to the desired item and press Enter.
1. Printer Setup
2. Default Print Job Attributes
3. Accounting File
4. Queuing Discipline

Printers and queues © Copyright IBM Corporation 2024

Figure B-26. Change characteristics of a queue

To modify print queue attributes use the smit fastpath:


# smit chpq
Attributes for Printer Setup option
After selecting 1. Printer Setup, the following attributes can be changed or shown:
• Automatic mode switching to PostScript
• Paper size in trays and the manual feeder
• Envelope size
• ID of the font cards
• Paper trays for header and trailer pages
• Formatting flags for the header and trailer pages
• Users to get the intervention messages
• Flags prohibited for all print files
• Mode in which to leave the printer at the end of the job
• Width of printable area on header page
Attributes for Default Print Job option
After selecting 2. Default Print Job Attributes, the following attributes can be changed or shown:
• Text print options such as emphasized print
• Job processing options such as page number where printing should begin
• Text formatting options such as top Margin and lines per page

© Copyright IBM Corp. 2009, 2024 B-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
• Paper/Page Options such as page orientation
• Header/Trailer Page such as separator pages
• Messages/Diagnostics
Attributes for Accounting File option
After selecting 3. Accounting File, the following attribute can be changed or shown:
• Accounting file name
Attributes for Queuing Discipline option
After selecting 4. Queuing Disciple, the following attribute can be changed or shown:
• Queuing discipline
You must select the queue name to which you want to make the changes. Then, select the option
that holds the attribute that you are changing.
The actual contents of each option will vary depending on the type of queue being customized (for
example, an ASCII queue versus a PostScript queue).
Under Default Print Job Attributes => Job Processing Options..., some queues allow you to
specify the page number where printing should begin. This can be helpful if there is a paper jam in
the middle of printing a job. Bring the queue down and fix the jam. Then, alter this value to indicate
the page at which you want the print job to resume. Then, change the value back to 1 for printing
future jobs.
The queuing discipline will be covered in more detail shortly. The two disciplines that can be
chosen are either First Come First Serve or Shortest Job Next.
Let us see how we can remove a queue.

© Copyright IBM Corp. 2009, 2024 B-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Removing a queue
# smit rmpq

Remove a Print Queue

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Print queue to remove ps:lp0
Local printer device /dev/lp0

KEEP the local printer device? no +

Printers and queues © Copyright IBM Corporation 2024

Figure B-27. Removing a queue

Removing a queue with SMIT


It is not possible to remove a queue containing jobs. The jobs would have to be removed first.
The last option on the screen asks whether the printer device definition should be kept. This
option will only appear if the queue being removed is the only queue defined for a printer. Note
that by default, it will be removed. You might want to keep the definition if in the future you want
to add a new queue which uses the same printer. If there were other queues which were using the
printer, the last option would not be present on the SMIT screen. This option will remove the print
queue from the system configuration.
Other management tasks can be carried out on queues. Let us see what they are.

© Copyright IBM Corp. 2009, 2024 B-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Managing queues
# smit pqmanage

Manage Print Queues

Move the cursor to the desired item and press Enter.

Show Status of Print Queues


Stop a Print Queue
Start a Print Queue
Set the System's Default Print Queue

Printers and queues © Copyright IBM Corporation 2024

Figure B-28. Managing queues

To manage the print queues use the smit fastpath:


# smit pgmanage
SMIT Managing Queues options
The following actions can be performed:
• Show Status of Print Queue gives output similar to qchk and lpstat
• Stop a Print Queue runs the disable command
• Start a Print Queue runs the enable command
• Set the System's Default Print Queue reorders the /etc/qconfig file to ensure the default
queue is the first queue in the file
The visual is fairly self-explanatory. Note that if a print queue is stopped, print jobs can still be
submitted to the queue. However, they will not be processed until the queue is enabled.
Changing the system wide default printer will affect everyone other than those who have set the
PRINTER or LPDEST variable to their own personal choice.
We will look at the first three items on this menu. The last item is self-explanatory, so there is no
need to spend more time on it.
Be sure to point out that the last three tasks on this menu can only be performed by the root user
or a member of the printq group.
Let us see what the different queue statuses mean.

© Copyright IBM Corp. 2009, 2024 B-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Understanding queue status


Queue Dev Status Job Files User PP % Bks Cp Rnk
pslp0 DOWN QUEUED 1569 /etc/motd root 1 1 1

State Description
DEV_BUSY Printer is busy servicing other print requests.
DEV_WAIT Queue is waiting for the printer
DOWN Queue is down and no jobs will be serviced
from this queue until it is brought up.
OPR_WAIT The queue is waiting for operator intervention.
QUEUED Job is queued and waiting.
READY Everything is ready to receive a print request.
RUNNING Print file is printing.
UNKNOWN Problem with the queue: Need to investigate
further to determine cause.
Printers and queues © Copyright IBM Corporation 2024

Figure B-29. Understanding queue status

Introduction
The status of the queues and jobs can be displayed with qchk, lpstat, or lpq. There are a number
of different status states that can be seen.
DEV_BUSY
This status can occur when more than one queue is defined to a print device and another queue is
currently using the print device. It could result when the qdaemon attempts to use the printer
port device and another application is currently using that print device. Normal recovery: You have
to wait until the queue or application has released the print device, or kill the job or process that is
using the printer port.
DEV_WAIT
This status means that the queue is waiting on the printer because the printer is offline, out of
paper, jammed, or the cable is loose, bad or wired incorrectly. Normal recovery: Check to see if
the printer is offline, out of paper, jammed, or loosely cabled. Sometimes the jobs have to be
removed from the queue before the problem can be corrected.
DOWN
This status is set when the device driver cannot communicate with the printer after TIME OUT
seconds (which can be set through SMIT). This variable indicates the amount of time, in seconds,
that the queuing system waits for a printer operation. If the printer is off, the queue will go down.
Also, the operator can bring down the queue intentionally, which might be necessary for system
maintenance. Normal recovery: Correct the problem that has brought the queue down and then
bring the queue up again.
OPR_WAIT

© Copyright IBM Corp. 2009, 2024 B-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
This status is set when the back-end program is waiting on the operator to change the paper,
change forms, and so on. This is usually software related. Normal recovery: Respond
appropriately to the request that is made by the queuing system.
QUEUED
This status is set when a print file is queued and is waiting in line to be printed.
READY
This is the status of a queue when everything involved with the queue is ready to queue and print
a job.
RUNNING
This status occurs when a print file is printing.
UNKNOWN
This status occurs when a user creates a queue on a device file that another queue is using, and its
status is DEV_WAIT. The queue cannot get a status from the printer device when it is on hold.
Normal recovery: Bring down the other queue or fix the problem with the printer (paper out,
jammed, offline and so on). Bring the new queue down and then back up so that the queue will
register as READY.
Let us see how to bring a queue up and down.

© Copyright IBM Corp. 2009, 2024 B-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Bringing queues up and down


# lpstat

Queue Dev Status Job Files User PP % Bks Cp Rnk

draft lp0 DOWN

QUEUED 132 /etc/motd team01 1 1 1

quality lp0 READY

• To enable a queue whose status is DOWN:


# enable draft

• To disable a queue whose status is READY:


# disable quality

You must be a member of the printq group or root

Printers and queues © Copyright IBM Corporation 2024

Figure B-30. Bringing queues up and down

Enabling a queue
Occasionally, problems with printers can bring a queue down. Once the problem has been fixed it
can be brought back up with:
# enable <queuename>
Disabling a queue
Sometimes, you might want to bring a queue down. This is recommended if any maintenance is
going to be performed on the printer. You can do this with either of the commands:
disable <queuename>
enq -D -P <queuename>
There are several commands that can be used to bring queues up and down. The student notes
show two of them. The enq options -D and -U can only be used on local print jobs. Most system
administrators find that the enable and disable commands are the easier ones to use.
This example shows queue names of draft and quality.
Let us turn our focus to jobs and how to manage them.

© Copyright IBM Corp. 2009, 2024 B-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Managing Print Jobs

# smit jobs

Manage Print Jobs

Move the cursor to the desired item and press Enter.

Cancel a Print Job


Show the Status of Print Jobs
Prioritize a Print Job
Hold / Release a Print Job
Move a Job between Print Queues

Printers and queues © Copyright IBM Corporation 2024

Figure B-31. Managing Print Jobs

Who can manage print jobs?


The root user or a member of the printq group can work with any print request. Normal users can
only work with their own print jobs.
Let us look at these tasks one at a time.

© Copyright IBM Corp. 2009, 2024 B-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Cancel a Print Job

# smit qcan

Cancel a Print Job

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
PRINT QUEUE containing job [ ] +
(required for remote jobs)
* Print JOB NUMBER [ ] +#

Printers and queues © Copyright IBM Corporation 2024

Figure B-32. Cancel a Print Job

Introduction
The qcan command cancels either a particular job number or all jobs in a print queue. Normal
users can only cancel their own jobs, whereas root can cancel any job.
Commands to cancel print jobs
To cancel a job you can either use the smit qcan fastpath, or use one of the following commands:
• cancel (System V)
• lprm (BSD)
• qcan (AIX)
Examples
To cancel job number 127 on whatever queue the job is on, you can use either of the following two
commands:
# cancel 127
To cancel all jobs queued on printer lp0, you can use either of the following two commands:
# qcan -X -Plp0
# cancel lp0
Point out that there are restrictions. As an ordinary user, you can only cancel your own requests
(which is a desirable thing!). However, root or a member of the printq group can cancel any job
from any queue.
With the qcan command the use of the -x option allows you to cancel a specific job by its job
number. An equivalent command to that shown in the student notes is cancel 127. The use of the

© Copyright IBM Corp. 2009, 2024 B-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
-X option allows you to cancel all jobs queued on a specific printer. If a normal user uses this
option, only the jobs that they submitted will be canceled.
The qcan command can be used to cancel both local and remote jobs. This command can also be
used to cancel HELD jobs.
Also note that a running job can only be canceled if all of it hasn't been sent to the printer. Today's
printers all have buffers. Once the print job has left the system it is outside the control of printer
commands. The status might show running but there won't be any way to cancel it. On some
printers, it is possible to power-off the printer as a way to clear the buffer. A large job that is bigger
than the printer buffer can be canceled before it completes. Keep in mind that whatever is in the
printer buffer will still be printed.
Let us see how the priority of print requests can be changed.

© Copyright IBM Corp. 2009, 2024 B-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Job priority example


# qchk -L
Queue Dev Status Job Name From To
______ ___ _______ Submitted Rnk Pri Blks Cp PP %
ps lp0 DOWN
QUEUED 569 /etc/qconfig root root
06/18/24 09:39:25
1 15 2 1
/etc/qconfig
QUEUED 570 /etc/motd root root
06/18/24 09:40:15 2 15 1 1
/etc/motd

# qpri -#570 -a 25
# qchk -L
Queue Dev Status Job Name From To
______ ___ ______ Submitted Rnk Pri Blks Cp PP %
ps lp0 DOWN
QUEUED 570 /etc/motd root root
06/18/24 09:40:15 1 25 1 1
/etc/motd
QUEUED 569 /etc/qconfig root root
06/18/24 09:39:25 2 15 2 1
/etc/qconfig

Printers and queues © Copyright IBM Corporation 2024

Figure B-33. Job priority example

Processing order
The discipline line in the /etc/qconfig file determines the order in which the printer serves the
requests in the queue. In the queue stanza, the discipline field can either be set to fcfs
(first-come-first-serve) or sjn (shortest-job-next). If there is no discipline in the queue stanza,
requests are serviced in fcfs order.
Changing print job priority
Each print job also has a priority that can be changed through SMIT (smit qpri) or with the qpri
command. Print jobs with higher-priority numbers are handled before requests with lower-priority
numbers. Only a user who has root authority or who belongs to the printq group can change the
priority of a local print request.

Note

You can only set priorities on local print jobs. Remote print jobs are not supported.

The qprt -R command can also be used to set job priority.


Example
The example in the visual shows that when print jobs are submitted they receive the default
priority of 15. The example shows how the qpri command can be used to change the priority of
job number 570 to 25. Use the qchk -L command to show the new job priorities.
Note that normal users can only raise their priority to 20, whereas members of the printq group or
root can change their priority to 30. Mention also that jobs by default are submitted with a priority
of 15.

© Copyright IBM Corp. 2009, 2024 B-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
You can only assign priority on local queues. You cannot assign the priority of a remote print job.
The example shows that when print jobs are submitted they receive the default priority of 15. The
example shows how the priority of job number 570 has been increased to 25. This is clearly seen
in the output of the qchk -L command.
You may note that the ps queue has been disabled. However, it is still possible to send jobs to the
queue.
Priority takes precedence over discipline. Even in the shortest-job-next environment, priority is
the most important.
Now let us see how a job can be held in a queue.

© Copyright IBM Corp. 2009, 2024 B-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Holding a job in a queue


# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
pslp0 DEV_BUSY
QUEUED 1493 /etc/qconfig root 1 1 1

# qhld -#1493
# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
pslp0 DEV_BUSY
HELD 1493 /etc/qconfig root 1 1 1

# qhld -r -#1493
# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
pslp0 DEV_BUSY
QUEUED 1493 /etc/qconfig root 1 1 1

Printers and queues © Copyright IBM Corporation 2024

Figure B-34. Holding a job in a queue

Holding and releasing a print job


The qhld command is used to put a temporary hold on a job that is waiting in the queue. The qhld
command is also the command that is used to release job back in the queue.
The visual provides an example of using the qhld command to hold and then release job # 1493.
This task can also be accomplished through SMIT (smit qhld).
qhld can be used to hold a job, a queue (use -P) or jobs owned by a particular user (use -u). If
you specify and own and do not specify a queue name, then all jobs by that owner are effected.
You cannot hold a job once it starts printing. You cannot hold or release remote print jobs.
In the visual, job number 1493 is first held and then released. In reality, if the queue were ready
and only one job was queued, the job would print before you could alter it to HELD. So, for the
sake of example, assume that there are other jobs in the queue that might currently be printing.
Print jobs can also be moved from one queue to another. Let us see how this can be done.

© Copyright IBM Corp. 2009, 2024 B-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Moving a job between queues

# qchk -A
Queue Dev Status Job Files User PP% Blks Cp Rnk
asc lp0 DOWN
QUEUE 11 /etc/qconfig root 2 1 1
ps lp0 READY

# qmov -mps -#11


# qchk -A

Queue Dev Status Job Files User PP% Blks Cp Rnk


asc lp0 DOWN

ps lp0 RUNNING 11 /etc/qconfig root 2 1 1

Printers and queues © Copyright IBM Corporation 2024

Figure B-35. Moving a job between queues

Moving print jobs


You can move jobs between queues in AIX. The command qmov is used. The -m option specifies
what queue to move the job to and the -# option specifies the job number.
This can be done through SMIT using smit qmov.
In the example the job is moved from the asc queue to the ps queue.
You cannot move a remote print job to another queue.
A job cannot be moved once it starts printing.
Question: When would this be useful?
Answer: If the user has made a mistake of submitting a job to the wrong queue.
Let us see what print-related directories to monitor.

© Copyright IBM Corp. 2009, 2024 B-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Printing-related directories to monitor

var

spool

lpd
qdaemon

qdir
• Temporary copies of enqueued
• Contains queue requests files if spooling
(job description files)

Printers and queues © Copyright IBM Corporation 2024

Figure B-36. Printing-related directories to monitor

Why directories fill up


The directories shown in the visual fill up very quickly if the spooling mechanism encounters a
problem. For example, if the queue goes down, or if there are many users submitting jobs, there
might not be enough room to handle the requests.
Remember, when print jobs are submitted to spooling rather than just queuing, a copy of that file
is created and stored in the /var/spool/qdaemon directory until that job has printed. At that time,
the temporary file is removed. If the queue or multiple queues quit working, jobs don't get through
the system. This could cause a full condition in this directory structure.
/var/spool/lpd/qdir contains one request for each job submitted to the printer, and the requests
are in the format NumberUser_name:Queue_name. This is what qdaemon uses to determine who
submitted the job, which of the users use to determine who submitted the job, which of the users
requested this particular job, and the queue name to which the job was submitted. The
/var/spool/qdaemon directory contains the spool files (if one is requested).
If the print spooler system needs to be cleared and restarted, it is possible to remove all files from
these directories. For example: rm /var/spool/lpd/qdir/* and rm /var/spool/qdaemon/*. Be
aware that these commands will completely delete all jobs in the queues and the jobs need to be
resubmitted. There are times when these actions are necessary due to system problems. Of
course, only the root user can execute these rm commands.
Also, if the /var file system becomes too large, actions also need to be taken.
What if you encounter a problem with your printer or the queues? What can you try?

© Copyright IBM Corp. 2009, 2024 B-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Printing problem checklist

# cat file > /dev/lp0


Any output?

NO YES
Check hardware Check software

9 Check physical cables 9 qdaemon running


9 Printer online and ready 9 Check /etc/qconfig
9 No paper jams 9 Queue enabled
9 Not out of paper 9 /var and /tmp not full
Printers and queues © Copyright IBM Corporation 2024

Figure B-37. Printing problem checklist

First step
If you experience problems trying to print, start by checking the simple things first. The easiest
test to perform is to cat a file and redirect standard output to the printer device file. This
by-passes the queuing system and helps to narrow the problem.
Check hardware
After redirecting a file to the print device, if it does not print, the problem is usually
hardware-related. Check to make sure the cables are attached securely. Make sure the printer is
ready to print (online). Make sure there is paper in the printer and there are no paper jams.
Potential software problems
If something does print out using cat but not print out when using lp, qprt, or lpr, the problem is
most likely software-related. Check to make sure the qdaemon is running. If not, start it.
# lssrc -s qdaemon
# startsrc -s qdaemon
Look at the contents of /etc/qconfig to make sure it is not corrupt.
Ensure the queue is enabled. If not, enable it.
# lpstat
or
# qprt -A
# enable queuename
Check to make /tmp and /var are not full with the command: df

© Copyright IBM Corp. 2009, 2024 B-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty
Question: If /tmp or /var is full, what commands would be useful in determining what is filling the
file system?
Answer:
# df
# du -ax /tmp | sort -nr
# du -ax /var | sort -nr
When checking to see if qdaemon is running, make sure there is only one qdaemon running.
Having multiple qdaemons running is not a likely situation, but it would cause a problem if it
happened. If qdaemon is being used properly under SRC, it is not likely that this problem would
ever occur.
Let us take a look at some checkpoint questions.

© Copyright IBM Corp. 2009, 2024 B-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

2    (1 of 2)
1. True or False: One of the advantages of queues is that each user can have a different
default queue set up for them.

2. True or False: The /etc/qconfig file is read by the back-end program to determine
what the queue discipline is.

3. True or False: All printer software is automatically installed when you install the base
operating system.

4. What is the difference between these two commands?


# qprt -Pasc file1
# qprt -c -Pasc file1

Printers and queues © Copyright IBM Corporation 2024

Figure B-38. Review questions (1 of 2)

© Copyright IBM Corp. 2009, 2024 B-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

2    (1 of 2)
1. True or False: One of the advantages of queues is that each user can have a
different default queue set up for them.
The answer is true. This can be accomplished using the PRINTER environment variable.

2. True or False: The /etc/qconfig file is read by the back-end program to determine
what the queue discipline is.
The answer is false. It is read by qdaemon.

3. True or False: All printer software is automatically installed when you install the
base operating system.
The answer is false. Only a handful of printer software is installed by default.

4. What is the difference between these two commands?


# qprt -Pasc file1
# qprt –c -Pasc file1
The answer is # qprt -c -Pasc file1. The -c flag produces a spool file.

Printers and queues © Copyright IBM Corporation 2024

Figure B-39. Review answers (1 of 2)

© Copyright IBM Corp. 2009, 2024 B-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

2    (2 of 2)
5. What three methods can be used to find out what the system default queue is?

6. What users can bring print queues down?

7. True or False: Once the queue is down, no more jobs can be submitted to the
printer.

8. Can users hold all their print jobs in a specific queue? If so, how?

Printers and queues © Copyright IBM Corporation 2024

Figure B-40. Review questions (2 of 2)

© Copyright IBM Corp. 2009, 2024 B-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

2    (2 of 2)
5. What three methods can be used to find out what the system default queue is?
The answers are first entry in /etc/qconfig file; the output from the qchk command with
no options; the first queue listing from the lpstat command.

6. What users can bring print queues down?


The answer is the root user or members of the printq group.

7. True or False: Once the queue is down, no more jobs can be submitted to the printer.
The answer is false. Jobs can be submitted to the queue. However, they will not be
printed until the queue is brought up again.

8. Can users hold all their print jobs in a specific queue? If so, how?
The answer is yes, they can by only specifying a queue name and not individual job
numbers.

Printers and queues © Copyright IBM Corporation 2024

Figure B-41. Review answers (2 of 2)

© Copyright IBM Corp. 2009, 2024 B-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix B. Printers and queues

Uempty

Unit summary • After completing this unit, you should be able to:
ƒ Describe the purpose and the benefits of a queuing system
ƒ Identify the major components that are responsible for processing a print
request
ƒ Add a printer queue and device under different circumstances
ƒ Submit jobs for printing
ƒ View the status of the print queue

© Copyright IBM Corporation 2024

Figure B-42. Unit summary

© Copyright IBM Corp. 2009, 2024 B-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP

Appendix C. Quick reference: Solaris to


AIX
Use this reference to contrast the AIX and Solaris 8 operating systems.
The following tables contrast the structure of these two operating systems. Tasks are grouped
according to major categories that are listed below. Each major category is contained within a
table. Tables can also include location information of files or pertinent information that is related
to the category they contain.
This reference provides information on AIX and Solaris in the following categories:
• Packaging
• Booting and Shutting Down
• Installing and Upgrading Tasks
• User Management Tasks
• Device Management and Configuration
• Network Management and Configuration
• File System Management
• Virtual Disk Management
• Logical Volume Management

Packaging
The following information contrasts AIX and Solaris packaging details.
Units AIX Solaris
Smallest installable unit fileset package
Single installable image must be distrib- package package
uted and installed as a unit
Logical grouping of packages bundle software cluster
Logical grouping of packages and software Bundle offering, for example: Software configuration clusters, for exam-
clusters • App-Dev: Application Development ple:
Environment • Core: Required operating system files
• Client: • End-User System Support: Core plus
– Pers-Prod window environment
– DCE-Client • Developer System Support: End-User
– Media-Defined plus the development environment
• Entire Distribution: Developer System
plus enhanced features
• Entire Distribution Plus OEM: Entire
Distribution plus third-party hardware
drivers (on SPARC only)

© Copyright IBM Corp. 2009, 2024 C-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Installing and upgrading tasks
The information contrasts AIX and Solaris installing and upgrading tasks.
Tasks AIX Solaris
Install packages installp -a pkgadd
or fast path:
smitty install_latest
Display installed packages lslpp -L pkginfo
or fast path: or
smitty list_installed_sw pkgparam
;Pa
Remove software package installp -r pkgrm
or fast path: smitty reject
installp -u
or fast path: smitty remove
Verify correct installation lppchk pkgchk
or fast path:
smitty check_file
Install a patch instfix patchadd
or fast path:
smitty update_by_fix
Remove a patch installp -r patchrm
or fast path:
smitty reject
Display installed patches instfix -ia showrev -p
Install OS on another disk (Alternate alt_disk_install Live Upgrade
disk installation)
Create an installation server for nimconfig setup_install_server
network installation install_dir_path
Create a boot server for network smitty nim_config_env setup_install_server -b bootdirpath
installation
Set up a client for network nim -o bos_inst add_install_client
installation

© Copyright IBM Corp. 2009, 2024 C-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Booting and shutting down
The following displays processes and locations of items that are involved in booting and shutting
down a system in AIX and Solaris.
Tasks AIX Solaris
Boot process Phases: Phases:
• Read Only Storage (ROS): Check • Boot PROM: Display system
the system mother board, information, run POST, load
perform Power-On Self-Test bootblk, locate ufsboot
(POST), locate the boot image, • Boot Programs: bootblk loads
load the boot image into memory, and executes the ufsboot
begin system initialization and • Kernel Initialization: ufsboot
execute phase 1 of the loads and executes the core
/etc/rc.boot script kernel, initializes core kernel
• Base Device Configuration: data structures, loads other
StartConfiguration Manager to kernel modules based on the
configure base devices /etc/system file, starts
• System Boot: Start init process /sbin/init program
phase 2, switch to hard-disk root • init: Starts other processes
file system, start other processes based on the /etc/inittab file
defined by records in the
/etc/inittab file and execute
phase 3 of the /etc/rc.boot script
Kernel modules directory Kernel and kernel extension modules Kernel modules are stored in three
are stored in two directories: directories:
• /usr/lib/boot • /platform/sparc/kernel or 
• /usr/lib/drivers /platform/i86pc/kernel
• /kernel
• /usr/kernel
Create and stop processes and Set the default environment variables Set the default environment variables
services for a current system run as defined in /etc/rc as defined in /etc/default/init.
level based on the /etc/inittab file.
System run levels Defined run levels: Eight run levels:
• 0-1: Reserved for future use • 0: Power-down state
• 2: Multiuser state with NFS • s or S: Single-user state
resources shared (default run • 1: Administrative state
level) • 2: Multiuser state
• 3-9: Defined according to the • 3: Multiuser state with NFS
user’s preferences resources shared (default run
• m,M,s,S: Single-user state level)
(maintenance level) • 4: Alternative multiuser (not in
• a,b,c: Starts processes assigned use)
to the new run levels while • 5: Power-down state
leaving the existing processes at • 6: Reboot state
the current level running
• Q,q: init command to reexamine
the /etc/inittab file
Note: When a level from 1 to 9 is
specified, the init command kills all
processes at the current level and
restarts any processes associated
with the new run level based on the
/etc/inittab file.
Determine a system’s run level who -r who -r

© Copyright IBM Corp. 2009, 2024 C-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Tasks AIX Solaris
Choose one of the following:
• halt
• init
Change a system’s run level telinit level number • poweroff
• reboot
• shutdown
• telinit
• uadmin
Startup script /etc/rc /sbin/rc run-level number
Display boot information bootinfo N/A
Display or alter the list of boot
bootlist boot
devices

Device management and configuration


The following is a list of tasks that are used for device management and configuration in AIX and
Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) admintool
environment

Configure a device cfgmgr Choose one of the following:


• drvconfig
• devlinks
• disks
• tapes
• ports
Define a device mkdev Choose one of the following:
• drvconfig
• devlinks
• disks
• tapes
• ports
Remove a device rmdev rem_dev
Change a device chdev N/A
List devices lsdev sysdef
Display device lscfg prtconf

© Copyright IBM Corp. 2009, 2024 C-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Network management and configuration
The following are tasks that are employed when performing network management and
configuration in AIX and Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) N/A
environment
Configure TCP/IP mktcpip ifconfig or 
vi /etc/nsswitch.conf
Display interface settings ifconfig ifconfig
Configure interface ifconfig ifconfig
Change name service chnamsv vi /etc/nsswitch.conf
Unconfigure name service rmnamsv vi /etc/nsswitch.conf
Display name service lsnamsv cat /etc/nsswitch.conf

File system management


The following are tasks that are employed when performing file system management in AIX and
Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) N/A
environment
Format a disk N/A - Automatically handled format
Check a file system fsck fsck
Mount a file system mount mount
Display available file-system space df df
Partition a disk N/A - Automatically handled format
List a volume’s table of contents lsvg prtvtoc
lslv
Add a file system crfs newfs
or
mkfs
Unmount a file system umount umount
Back up file systems/files/directories backup ufsdump
Restore file systems/files/directories restore ufsrestore
Change a file system chfs tunefs
Remove a file system rmfs N/A
Display a file system lsfs cat /etc/vfstab

© Copyright IBM Corp. 2009, 2024 C-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Virtual disk management
The following is a list of tasks that are used when implementing virtual disk management in AIX
and Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI smitty chjfs metatool
environment
Expand file system chfs growfs
or
smitty chjfs
Delete metadevice N/A metaclear
Configure metadevice N/A metainit
Modify metadevice N/A metaparam
Rename metadevice N/A metarename
Display status of metadevice N/A metastat

Logical volume management


The following is a list of tasks that are used when performing logical volume management in AIX
and Solaris. The information in this table includes Solaris 8 and the Veritas Volume Manager
(VxVM). IBM includes its Logical Volume Manager (LVM) in AIX.
Task AIX Solaris
Storage Structure A disk is composed of physical A disk is composed of
partitions. partitions/slices.
A physical volume is the same thing as A file system is placed onto a
a disk. partition.
A volume group is composed of A subdisk (somewhat similar to AIX
physical volumes. physical partition) is composed of
A volume group is divided into logical partitions/slices.
volumes. A plex (similar to AIX logical partition)
A file system is placed onto a logical is composed of subdisks.
volume. A volume (similar to AIX logical
volume) is composed of plexes.AVM
disk is composed of subdisks.
A disk group (similar to AIX volume
group) is composed of VM disks.g
Run multiple tasks in a GUI SMIT (smitty in non-GUI) vxva
environment
Move logical volume to another migratepv vxassist move
physical volume
Create logical volume mklv vxassist make
Extend logical volume extendlv vxassist growto
Remove logical volume rmlv vxedit rm
Set up sysboot information on VM N/A vxbootsetup
disk
Manage VM disks N/A vxdisk
Create volume group mkvg vxdg init
Remove disk from volume group reducevg vxdg rmdisk
Add disks under volume manager extendvg vxdiskadd

© Copyright IBM Corp. 2009, 2024 C-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix C. Quick reference: Solaris to AIX

AP
Task AIX Solaris
Administer disks reducevg vxdiskadm
or
extendvg
Set up disks extendvg vxdisksetup
Change logical volume settings chlv vxedit set
Create configuration records for mkvg vxmake
storage structures or
mklv
Manage plexes or volume groups chvg vxplex
or
mkvg
Display volume group lsvg vxprint
Manage subdisk or physical volume chpv vxsd
Display statistics for storage Choose one of the following: vxstat
structures • lspv
• lsvg
• lslv
Manage volume Choose one of the following: vxvol
• chlv
• mklv
• rmlv
Back up operating system mksysb (to tape or file) Solstice Backup: nwadmin
or
mkcd (CD-ROM)
Restore operating system mksysb (to tape or file) Choose one Solstice Backup:
or nwadmin
mkcd (CD-ROM) nwrecover

© Copyright IBM Corp. 2009, 2024 C-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP

Appendix D. Quick reference: HP-UX to


AIX
Use this reference to contrast the AIX and HP-UX operating systems.
The following tables contrast the structure of these two operating systems. Tasks are grouped
according to major categories that are listed below. Each major category is contained within a
table. Tables can also include location information of files or pertinent information that is related
to the category they contain.
This reference provides information on AIX and HP-UX in the following categories:
• Software Packaging
• Installing and Upgrading Tasks
• Booting and Shutting Down
• Device Management and Configuration
• Network Management and Configuration
• File System Management
• Logical Volume Management

Packaging
The following information contrasts AIX and HP-UX packaging details.
Units AIX HP-UX
Smallest installable unit fileset fileset
Single installable image must be package Product
distributed and installed as a unit
Logical grouping of packages bundle bundle
Logical grouping of packages and Bundle offering, for example:
software clusters • App-Dev: Application
Development Environment
• Client:
▪ Pers-Prod
▪ DCE-Client
▪ Media-Defined

© Copyright IBM Corp. 2009, 2024 D-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP
Installing and upgrading tasks
The information contrasts AIX and HP-UX installing and upgrading tasks.
Tasks AIX HP-UX
Install packages installp -a update (HP-UX 9)
or fast path: swinstall (starting with HP-UX 10)
smitty install_latest
Display installed packages lslpp -L rmfn, what (HP-UX 9)
or fast path: swlist (starting with HP-UX 10)
smitty list_installed_sw
Remove software package installp -r swremove
or fast path: smitty reject
installp -u
or fast path: smitty remove
Verify correct installation lppchk swlist -l fileset -a state
or fast path:
smitty check_file
Install a patch instfix swinstall
or fast path:
smitty update_by_fix
Remove a patch installp -r swremove
or fast path:
smitty reject
Display installed patches instfix -ia swlist -l patch 
what /stand/vmunix
Install OS on another disk (Alternate alt_disk_install Live Upgrade
disk installation)
Create an installation server for nimconfig setup_install_server
network installation install_dir_path
Create a boot server for network smitty nim_config_env setup_install_server -b bootdirpath
installation
Set up a client for network nim -o bos_inst add_install_client
installation

© Copyright IBM Corp. 2009, 2024 D-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP
Booting and shutting down
The following displays processes and locations of items that are involved in booting and shutting
down a system in AIX and HP-UX.
Tasks AIX HP-UX
Boot process Phases: Phases:
• Read Only Storage (ROS): Check • pdc: Firmware
the system mother board, processor-dependent code (pdc)
perform Power-On Self-Test is executed to verify hardware
(POST), locate the boot image, and general system integrity.
load the boot image into memory, • isl: The initial system loader is
begin system initialization and loaded and executed. isl finds
execute phase 1 of the and executes the autoexecute
/etc/rc.boot script file.
• Base Device Configuration: Start • hpux: boot image loaded and
Configuration Manager to control is passed to the init
configure base devices process. /etc/inittab file is read
• System Boot: Start init process to complete initialization.
phase 2, switch to hard-disk root
file system, start other processes
defined by records in the
/etc/inittab file and execute
phase 3 of the /etc/rc.boot script
Kernel modules directory Kernel and kernel extension modules Kernel modules are stored in:
are stored in two directories:
• /usr/lib/boot /stand
• /usr/lib/drivers
Create and stop processes and Set the default environment variables Set the default environment variables
services for a current system run as defined in /etc/rc as defined in /sbin/rc
level based on the /etc/inittab file.
System run levels Defined run levels: Defined run levels:
• 0-1: Reserved for future use • 0: Halted.
• 2: Multiuser state with NFS • S: Single user mode.
resources shared (default run • 1: Minimal system configuration
level) • 2: Multi-user mode.
• 3-9: Defined according to the • 3: Exported file system
user’s preferences • 4: HP-VUE
• m,M,s,S: Single-user state • 5,6: Not currently used.
(maintenance level) Note: When entering from lower
• a,b,c: Starts processes assigned state, all start scripts are executed.
to the new run levels while When entering from higher state, all
leaving the existing processes at kill scripts are executed
the current level running
• Q,q: init command to reexamine
the /etc/inittab file
Note: When a level from 1 to 9 is
specified, the init command kills all
processes at the current level and
restarts any processes associated
with the new run level based on the
/etc/inittab file.
Determine a system’s run level who -r who -r
Change a system’s run level telinit level number Choose one of the following:
• init
• shutdown
• telinit
Startup script /etc/rc /sbin/rc run-level number

© Copyright IBM Corp. 2009, 2024 D-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP
Device management and configuration
The following is a list of tasks that are used for device management and configuration in AIX and
HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI
SMIT (smitty in non-GUI) sam
environment
Configure a device cfgmgr insf -e
Define a device mkdev mksf
Remove a device rmdev rmsf
Change a device chdev N/A
List devices lsdev lsdev
Display device lscfg ioscan

Network management and configuration


The following are tasks that are employed when performing network management and
configuration in AIX and HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI SMIT (smitty in non-GUI) sam
environment
Configure TCP/IP mktcpip ifconfig
or
vi /etc/nsswitch.conf
Display interface settings ifconfig lansan -v
Configure interface ifconfig ifconfig
Change name service chnamsv vi /etc/nsswitch.conf
Unconfigure name service rmnamsv vi /etc/nsswitch.conf
Display name service lsnamsv cat /etc/nsswitch.conf

© Copyright IBM Corp. 2009, 2024 D-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP
File system management
The following are tasks that are employed when performing file system management in AIX and
HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI SMIT (smitty in non-GUI) sam
environment
Check a file system fsck fsck
Mount a file system mount mount
Display available file-system space df -k bdf
List a volume’s table of contents lsvg vgdisplay
lslv lvdisplay
Add a file system crfs newfs
Unmount a file system umount umount
Back up file systems/files/directories backup fbackup
Restore file systems/files/directories restore frestore
Change a file system chfs
Remove a file system rmfs
Display a file system lsfs
Extend a file system chfs -a size=# extendfs

© Copyright IBM Corp. 2009, 2024 D-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Appendix D. Quick reference: HP-UX to AIX

AP
Logical volume management
The following is a list of tasks that are used when performing logical volume management in AIX
and HP-UX. The information in this table includes HP-UX LVM and AIX LVM.
Task AIX HP-UX
Storage Structure A disk is composed of physical A disk is composed of extends
partitions. (physical partition in AIX).
A physical volume is the same thing as A physical volume is a hard disk.
a disk. A file system is placed onto a logical
A volume group is composed of volume.
physical volumes. A logical volume (similar to AIX
A volume group is divided into logical logical volume) is composed of
volumes. extends.
A file system is placed onto a logical A volume group (similar to AIX
volume. volume group) is composed of
physical volumes.
A volume group is divided into logical
volumes
Run multiple tasks in a GUI SMIT (smitty in non-GUI) sam
environment
Move logical volume to another migratepv pvmove
physical volume
Create logical volume mklv lvcreate
Extend logical volume extendlv lvextend
Remove logical volume rmlv lvremove
Create volume group mkvg vgcreate
Remove disk from volume group reducevg vgreduce
Add disks under volume manager extendvg vgextend
Administer disks reducevg vgreduce
or
extendvg
Set up disks extendvg vgextend
Change logical volume settings chlv lvchange
Create configuration records for mkvg vgcreate
storage structures or or
mklv lvcreate
Manage volume groups chvg vgchange
or or
mkvg vgcreate
Display volume group lsvg vgscan
Change volume characteristic chlv lvchange
Manage subdisk or physical volume chpv pvchange
Display statistics for storage Choose one of the following:
pvdisplay
structures lspv
lvdisplay
lsvg
vgscan
lslv
Manage volume Choose one of the following:
lvchange
chlv
lvcreate
mklv
lvremove
rmlv
Back up operating system mksysb (to tape or file) /opt/ignite/bin/make_recovery
or
mkcd (CD-ROM)
Restore operating system frestore

© Copyright IBM Corp. 2009, 2024 D-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0
Glossary

glos
Glossary
Synonymous with: This is a backward reference
from a defined term to all other terms that have
Note: the same meaning.
See: This refers the reader to multiple-word terms
The entries in this glossary were developed a that have the same last word.
number of years ago and indicate the use of various See also: This refers the reader to terms that have a
terms at a particular point in UNIX history. Hence, related, but not synonymous, meaning.
Deprecated term for: This indicates that the term
some of the definitions might not be applicable to should not be used. It refers to a preferred term,
current UNIX implementations such as AIX 6, and which is defined in its proper place in the glossary.
some other statements in the entries might not be
current. However, this glossary still provides
valuable information regarding the historical use of
the terms listed here. A
This glossary includes terms and definitions from: access mode A matrix of protection information
stored with each file specifying who can do what
• The American National Standard Dictionary for to a file. Three classes of users (owner, group, all
Information Systems, ANSI X3.172-1990, others) are allowed or denied three levels of
access (read, write, execute).
copyright 1990 by the American National
Standards Institute (ANSI). Copies can be access permission See access mode.
purchased from the American National access privilege See access mode.
Standards Institute, 11 West 42nd Street, New address space The address space of a process is
York, New York 10036. Definitions are the range of addresses available to it for code and
identified by the symbol (A) after the definition. data. The relationship between real and perceived
space depends on the system and support
• The ANSI/EIA Standard— 440-A, Fiber Optic hardware.
Terminology. Copies can be purchased from the AIX Advanced Interactive Executive. IBM's
Electronic Industries Association, 2001 implementation of the UNIX Operating System.
Pennsylvania Avenue, N.W., Washington, DC AIX Family Definition IBM's definition for the
20006. Definitions are identified by the symbol common operating system environment for all
(E) after the definition. members of the AIX family. The AIX Family
Definition includes specifications for the AIX Base
• The Information Technology Vocabulary, System, User Interface, Programming Interface,
developed by Subcommittee 1, Joint Technical Communications Support, Distributed Processing,
Committee 1, of the International Organization and Applications.
for Standardization and the International alias The command and process of assigning a new
Electrotechnical Commission (ISO/IEC name to a command.
JTC1/SC1). Definitions of published parts of ANSI American National Standards Institute. A
this vocabulary are identified by the symbol (I) standards organization. The United States liaison
after the definition; definitions taken from draft to the International Standards Organization (ISO).
international standards, committee drafts, and application program A program used to perform an
working papers being developed by ISO/IEC application or part of an application.
JTC1/SC1 are identified by the symbol (T) after argument An item of information following a
the definition, indicating that final agreement command. It might, for example, modify the
has not yet been reached among the command or identify a file to be affected.
participating National Bodies of SC1. ASCII American Standard Code for Information
Interchange. A collection of public domain
• The Network Working Group Request for character sets considered standard throughout
Comments: 1208. the computer industry.
The following cross-references are used in this awk An interpreter, included in most UNIX
glossary: operating systems, that performs sophisticated
Contrast with: This refers to a term that has an text pattern matching. In combination with shell
opposed or substantively different meaning. scripts, awk can be used to prototype or
Synonym for: This indicates that the term has the implement applications far more quickly than
same meaning as a preferred term, which is traditional programming methods.
defined in its proper place in the glossary.

© Copyright IBM Corp. 2009, 2024 X-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

B that will work on any computer with a standard C


compiler.
background (process) A process is “in the
background” when it is running independently of change mode The chmod command will change
the initiating terminal. It is specified by ending the the access rights to your own files only, for
ordinary command with an ampersand (&). The yourself, your group or all others.
parent of the background process does not wait character I/O The transfer of data byte by byte;
for its “death”. normally used with slower, low volume devices
backup diskette A diskette containing information such as terminals or printers.
copied from another diskette. It is used in case the character special file An interface to devices not
original information is unintentionally destroyed. capable of supporting a file system; a byte
Berkeley Software Distribution Disseminating arm oriented device.
of the UNIX operating system community at the child The process emerging from a fork command
University of California at Berkeley; commonly with a zero return code, as distinguished from the
abbreviated “BSD”. Complete versions of the parent which gets the process id of the child.
UNIX operating system have been released by client User of a network service. In the
BSD for a number of years; the latest is numbered client/server model, network elements are
4.3. The phrase “Berkeley extensions” refers to defined as either using (client) or providing
features and functions, such as the C shell, that (server) network resources.
originated or were refined at UC Berkeley and that
are now considered a necessary part of any fully command A request to perform an operation or run
configured version of the UNIX operating system. a program. When parameters, arguments, flags, or
other operands are associated with a command,
bit bucket The AIX file “/dev/null” is a special file the resulting character string is a single command.
which will absorb all input written to it and return
no data (null or end of file) when read. command file A data file containing shell
commands. See shell file, or shell script.
block A group of records that is recorded or
processed as a unit. command interpreter The part of the operating
system that translates your commands into
block device A device that transfers data in fixed instructions that the operating system
size blocks. In AIX, normally 512 or 1024 bytes. understands. command or previous command
block special file An interface to a device capable key.
of supporting a file system. concatenate The process of forming one character
booting Starting the computer from scratch (power string or file from several. The degenerate case is
off or system reset). one file from one file just to display the result
break key The terminal key used to unequivocally using the cat command.
interrupt the foreground process. console The only terminal known explicitly to the
BSD Berkeley Software Distribution. Kernel. It is used during booting and it is the
destination of serious system messages.
• BSD 2.x - PDP-11 Research
context The hardware environment of a process,
• BSD 4.x - VAX Research including:
• BSD 4.3 - Current popular VAX version of UNIX.
• CPU registers
button • Program address
1. A word, number, symbol, or picture on the • Stack
screen that can be selected. A button can • I/O status
represent a command, file, window, or value, context The entire context must be saved during a
for example. process swap.
2. A key on a mouse that is used to select buttons control character Codes formed by pressing and
on the display screen or to scroll the display holding the control key and then some other key;
image. used to form special functions like End Of File.
byte The amount of storage required to represent control-d See eof character.
one character; a byte is 8 bits. cooked input Data from a character device from
which backspace, line kill, and interrupt
characters have been removed (processed). See
C raw input.
C The programming language in which the UNIX current directory The currently active directory.
operating system and most UNIX application When you specify a file name without specifying a
programs are written. The portability attributed to directory, the system assumes that the file is in
UNIX operating systems is largely due to the fact your current directory.
that C, unlike other higher level languages,
permits programmers to write systems-level code current subtree Files or directories attached to the
current directory.

© Copyright IBM Corp. 2009, 2024 X-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

curses A C subroutine library providing flexible execute permission to be a shell script. For a
screen handling. See Termlib and Termcap. directory, the permission to search the directory.
cursor A movable symbol (such as an underline) on
a display, usually used to indicate to the operator
where to type the next character. F
customize To describe (to the system) the devices, field A contiguous group of characters delimited by
programs, users, and user defaults for a particular blanks. A field is the normal unit of text processed
data processing system. by text processes like sort.
field separator The character used to separate one
field from the next; normally a blank or tab.
D FIFO “First In, First Out”. In AIX, a FIFO is a
DASD Direct Access Storage Device. IBM's term for permanent, named pipe which allows two
a hard disk. unrelated processes to communicate. Only
device driver A program that operates a specific related processes can use normal pipes.
device, such as a printer, disk drive, or display. file A collection of related data that is stored and
device special file A file which passes data directly retrieved by an assigned name. In AIX, files are
to/from the device. grouped by directories.
directory A type of file containing the names and file index Sixty-four bytes of information describing
controlling information for other files or other a file. Information such as the type and size of the
directories. file and the location on the physical device on
which the data in the file is stored is kept in the file
directory pathname The complete and unique index. This index is the same as the AIX Operating
external description of a file giving the sequence System i-node.
of connection from the root directory to the
specified directory or file. filename expansion or generation A procedure
used by the shell to generate a set of filenames
diskette A thin, flexible magnetic plate that is based on a specification using metacharacters,
permanently sealed in a protective cover. It can be which define a set of textual substitutions.
used to store information copied from the disk.
file system The collection of files and file
diskette drive The mechanism used to read and management structures on a physical or logical
write information on diskettes. mass storage device, such as a diskette or
display device An output unit that gives a visual minidisk.
representation of data. filter Data-manipulation commands (which, in
display screen The part of the display device that UNIX operating systems, amount to small
displays information visually. programs) that take input from one process and
perform an operation yielding new output. Filters
include editors, pattern-searchers, and
E commands that sort or differentiate files, among
others.
echo To simply report a stream of characters, either
as a message to the operator or a debugging tool fixed disk A storage device made of one or more
to see what the file name generation process is flat, circular plates with magnetic surfaces on
doing. which information can be stored.
editor A program used to enter and modify fixed disk drive The mechanism used to read and
programs, text, and other types of documents. write information on a fixed disk.
environment A collection of values passed either to flag See Options.
a C program or a shell script file inherited from the foreground (process) An AIX process which
invoking process. interacts with the terminal. Its invocation is not
escape The backslash “\” character specifies that followed by an ampersand.
the single next character in a command is ordinary formatting The act of arranging text in a form
text without special meaning. suitable for reading. The publishing equivalent to
Ethernet A baseband protocol, invented by the compiling a program.
XEROX Corporation, in common use as the local fsck A utility to check and repair a damaged file
area network for UNIX operating systems structure. This normally results from a power
interconnected via TCP/IP. failure or hardware malfunction. It looks for
event One of the previous lines of input from the blocks not assigned to a file or the free list and
terminal. Events are stored in the (Berkeley) puts them in the free list. (The use of blocks not
History file. pointed at cannot be identified.)
event identifier A code used to identify a specific free list The set of all blocks not assigned to a file.
event. full path name The name of any directory or file
execution permission For a file, the permission to expressed as a string of directories and files
execute (run) code in the file. A text file must have beginning with the root directory.

© Copyright IBM Corp. 2009, 2024 X-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

G init The initialization process of AIX. The ancestor


of all processes.
gateway A device that acts as a connector between
two physically separate networks. It has initial program load The process of loading the
interfaces to more than one network and can system programs and preparing the system to run
translate the packets of one network to another, jobs.
possibly dissimilar network. i-node A collection of logical information about a
global Applying to all entities of a set. For example: file including owner, mode, type and location.
• A global search - look everywhere i number The internal index or identification of an
i-node.
• A global replace - replace all occurrences
• A global symbol - defined everywhere. input field An area into which you can type data.
input redirection The accessing of input data from
grep An AIX command which searches for strings other than standard input (the keyboard or a pipe).
specified by a regular expression. (Global Regular
Expression and Print.) interoperability The ability of different kinds of
computers to work well together.
group A collection of AIX users who share a set of
files. Members of the group have access privileges interpreter A program which “interprets” program
exceeding those of other users. statements directly from a text (or equivalent) file.
Distinguished from a compiler which creates
computer instructions for later direct execution.
H interrupt A signal that the operating system must
hardware The equipment, as opposed to the reevaluate its selection of which process should
programming, of a system. be running. Usually to service I/O devices but also
to signal from one process to another.
header A record at the beginning of the file
specifying internal details about the file. IP Internet Protocol.
heterogeneous Descriptor applied to networks ipl See initial program load.
composed of products from multiple vendors. ISO International Standards Organization. A United
hierarchy A system of objects in which each object Nations agency that provides for creation and
belongs to a group. Groups belong to other administration of worldwide standards.
groups. Only the “head” does not belong to
another group. In AIX this object is called the
“Root Directory”. J
highlight To emphasize an area on the display job A collection of activities.
screen by any of several methods, such as job number An identifying number for a collection
brightening the area or reversing the color of of processes devolving from a terminal command.
characters within the area.
history A list of recently executed commands.
home (directory). 1. A directory associated with an
K
individual user. kernel The part of an operating system that
contains programs that control how the computer
home (directory). 2. Your current directory on login does its work, such as input/output, management
or after issuing the cd command with no
and control of hardware, and the scheduling of
argument. user tasks.
homogeneous Descriptor applied to networks
composed of products from a single vendor. keyboard An input device consisting of various
keys allowing the user to input data, control cursor
hypertext Term for online interactive and pointer locations, and to control the
documentation of computer software; to be user/work station dialog.
included with AIX.
kill To prematurely terminate a process.
kill character The character which erases an entire
I line (usually @).
IEEE Institute of Electrical and Electronics
Engineers. A professional society active in
standards work, the IEEE is the official body for L
work on the POSIX (Portable Operating System for LAN Local Area Network. A facility, usually a
Computer Environments) open system interface combination of wiring, transducers, adapter
definition. boards, and software protocols, which
interconnects workstations and other computers
index See file index.
located within a department, building, or
indirect block A file element which points at data neighborhood. Token-Ring and Ethernet are local
sectors or other indirect blocks. area network products.
libc A basic set of C callable routines.

© Copyright IBM Corp. 2009, 2024 X-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

library In UNIX operating systems, a collection of IBM/Microsoft Presentation Manager user


existing subroutines that allows programmers to interface for OS/2. Also called OSF/Motif.
make use of work already done by other mount A logical (that is, not physical) attachment of
programmers. UNIX operating systems often one file directory to another. “remote mounting”
include separate libraries for communications, allows files and directories that reside on
window management, string handling, math, and physically separate computer systems to be
so forth. attached to a local system.
line editor An editor which processes one line at a mouse A device that allows you to select objects
time by the issuing of a command. Usually and scroll the display screen by means of buttons.
associated with sequential only terminals such as
a teletype. move Relinking a file or directory to a different or
additional directory. The data (if any) is not
link An entry in an AIX directory specifying a data moved, only the links.
file or directory and its name. Note that files and
directories are named solely by virtue of links. A multiprogramming Allocation of computer
name is not an intrinsic property of a file. A file is resources among many programs. Used to allow
uniquely identified only by a system generated many users to operate simultaneously and to keep
identification number. the system busy during delays occasioned by I/O
mechanical operations.
lint A program for removing “fuzz” from C code.
Stricter than most compilers. Helps former Pascal multitasking Capability of performing two or more
programmers sleep at night. computing tasks, such as interactive editing and
complex numeric calculations, at the same time.
Local Area Network (LAN) A facility, usually a AIX and OS/2 are multi-tasking operating
combination of wiring, transducers, adapter systems; DOS, in contrast, is a single-tasking
boards, and software protocols, which system.
interconnects workstations and other computers
located within a department, building, or multiuser A computer system which allows many
neighborhood. Token-Ring and Ethernet are local people to run programs “simultaneously” using
area network products. multiprogramming techniques.
login Identifying oneself to the system to gain
access.
N
login directory See home directory.
named pipe See FIFO.
login name The name by which a user is identified
to the system. Network File System (NFST) A program developed
by SUN Microsystems, Inc. for sharing files among
logout Informing the system that you are through systems connected via TCP/IP. IBM's AIX, VM,
using it. and MVS operating systems support NFS.
NFST See Network File System.
M NIST National Institute of Science and Technology
(formerly the National Bureau of Standards).
mail The process of sending or receiving an
electronically delivered message within an AIX node An element within a communication network.
system. The message or data so delivered. • Computer
make Programming tool included in most UNIX • Terminal
operating systems that helps “make” a new • Control Unit
program out of a collection of existing subroutines
and utilities, by controlling the order in which null A term denoting emptiness or nonexistence.
those programs are linked, compiled, and null device A device used to obtain empty files or
executed. dispose of unwanted data.
map The process of reassigning the meaning of a null string A character string containing zero
terminal key. In general, the process of characters.
reassigning the meaning of any key.
memory Storage on electronic memory such as
random access memory, read only memory, or O
registers. See storage. object-oriented programming Method of
message Information displayed about an error or programming in which sections of program code
system condition that might or might not require a and data are represented, used, and edited in the
user response. form of “objects”, such as graphical elements,
window components, and so forth, rather than as
motd “Message of the day”. The login “billboard” strict computer code. Through object-oriented
message.
programming techniques, toolkits can be
MotifT The graphical user interface for OSF, designed that make programming much easier.
incorporating the X Window System. Behavior of Examples of object-oriented programming
this interface is compatible with the languages include Pareplace Systems, Inc.'s

© Copyright IBM Corp. 2009, 2024 X-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

Smalltalk-80T, AT&T's C++T, and Stepstone Inc.'s pipes UNIX operating system routines that connect
Objective-CR. the standard output of one process with the
oem original equipment manufacturer. In the standard input of another process. Pipes are
context of AIX, OEM systems refer to the central to the function of UNIX operating systems,
processors of a heterogeneous computer network which generally consist of numerous small
that are not made or provided by IBM. programs linked together into larger routines by
pipes. The “piping” of the list directory command
Open Software FoundationT (OSF) A non-profit to the word count command is ls | wc. The passing
consortium of private companies, universities, and of data by a pipe does not (necessarily) involve a
research institutions formed to conduct open file. When the first program generates enough
technological evaluations of available data for the second program to process, it is
components of UNIX operating systems, for the suspended and the second program runs. When
purpose of assembling selected elements into a the second program runs out of data it is
complete version of the UNIX operating system suspended and the first one runs.
available to those who want to license it. IBM is a
founding sponsor and member of OSF. pipe fitting Connecting two programs with a pipe.
operating system The programs and procedures pipeline A sequence of programs or commands
designed to cause a computer to function, connected with pipes.
enabling the user to interact with the system. portability Desirable feature of computer systems
option A command argument used to specify the and applications, referring to users' freedom to
details of an operation. In AIX an option is run application programs on computers from
normally preceded by a hyphen. many vendors without rewriting the program's
code. Also known as “applications portability”,
ordinary file Files containing text, programs, or “machine-independence”, and
other data, but not directories. “hardware-independence”; often cited as a cause
OSFT See Open Software Foundation. of the recent surge in popularity of UNIX operating
systems.
output redirection Passing a programs standard
output to a file. port A physical I/O interface into a computer.
owner The person who created the file or his POSIX “Portable Operating Systems for Computer
subsequent designee. Environments”. A set of open standards for an
operating system environment being developed
under the aegis of the IEEE.
P preprocessor The macro generator preceding the C
packet switching The transmission of data in compiler.
small, discrete switching “packets” rather than in process A unit of activity known to the AIX system,
streams, for the purpose of making more efficient usually a program.
use of the physical data channels. Employed in
some UNIX system communications. process 0 (zero) The scheduler. Started by the
“boot” and permanent. See init.
page To move forward or backward on screen full of
data through a file usually referring to an editor process id A unique number (at any given time)
identifying a process to the system.
function.
process status The process's current activity.
parallel processing A computing strategy in which
a single large task is separated into parts, each of • Non existent
which then runs in parallel on separate • Sleeping
processors. • Waiting
parent The process emerging from a Fork with a • Running
non#zero return code (the process ID of the child • Intermediate
process). A directory which points at a specified
directory. • Terminated
• Stopped.
password A secret character string used to verify
user identification during login. profile A file in the users home directory which is
executed at login to customize the environment.
PATH A variable which specifies which directories The name is .profile.
are to be searched for programs and shell files.
prompt A displayed request for information or
path name A complete file name specifying all operator action.
directories leading to that file.
protection The opposite of permission, denying
pattern-matching character Special characters access to a file.
such as * or ? that can be used in a file
specification to match one or more characters. For
example, placing a ? in a file specification means
that any character can be in that position. Q
permission The composite of all modes associated quotation Temporarily canceling the meaning of a
with a file. metacharacter to be used as a ordinary text

© Copyright IBM Corp. 2009, 2024 X-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

character. A backslash (\) “quotes” the next server A provider of a service in a computer
character only. network; for example, a mainframe computer with
large storage capacity can play the role of
database server for interactive terminals. See
R client.
raw I/O I/O conducted at a “physical” level. setuid A permission which allows the access rights
of a program owner to control the access to a file.
read permission Allows reading (not execution or The program can act as a filter for user data
writing) of a file.
requests.
recursive A recursive program calls itself or is
shell The outermost (user interface) layer of UNIX
called by a subroutine which it calls.
operating systems. Shell commands start and
redirection The use of other than standard input control other processes, such as editors and
(keyboard or pipe output) or standard output compilers; shells can be textual or visual. A series
(terminal display or pipe). Usually a file. of system commands can be collected together
regular expression An expression which specifies a into a “shell script” that executes like a batch
set of character strings using metacharacters. (.BAT) file in DOS.
relative path name The name of a directory or file shell program A program consisting of a sequence
expressed as a sequence of directories followed of shell commands stored in an ordinary text file
by a file name, beginning from the current which has execution permission. It is invoked by
directory. simply naming the file as a shell command.
RISC Reduced Instruction Set Computer. A class of shell script See shell program.
computer architectures, pioneered by IBM's John single user (mode) A temporary mode used during
Cocke, that improves price#performance by “booting” of the AIX system.
minimizing the number and complexity of the
signal A software generated interrupt to another
operations required in the instruction set of a
computer. In this class of architecture, advanced process. See kill.
compiler technology is used to provide operations, sockets Destination points for communication in
such as multiplication, that are infrequently used many versions of the UNIX operating system,
in practice. much as electrical sockets are destination points
for electrical plugs. Sockets, associated primarily
root directory The directory that contains all other with 4.3 BSD, can be customized to facilitate
directories in the file system.
communication between separate processes or
between UNIX operating systems.
S software Programs.
scalability Desirable feature of computer systems special character See metacharacter.
and applications. Refers to the capability to use special file A technique used to access I/O devices
the same environment on many classes of in which “pseudo files” are used as the interface
computers, from personal computers to for commands and data.
supercomputers, to accommodate growth or
divergent environments, without rewriting code or standard error The standard device at which errors
losing functionality. are reported, normally the terminal. Error
messages can be directed to a file.
SCCS Source Code Control System. A set of
programs for maintaining multiple versions of a standard input The source of data for a filter, which
file using only edit commands to specify alternate is by default obtained from the terminal, but which
versions. can be obtained from a file or the standard output
of another filter through a pipe.
scope The field of an operation or definition. Global
scope means all objects in a set. Local scope standard output The output of a filter which
means a restriction to a subset of the objects. normally is by default directed to the terminal, but
which can be sent to a file or the standard input of
screen See display screen. another filter through a pipe.
scroll To move information vertically or horizontally stdio A “Standard I/O” package of C routines.
to bring into view information that is outside the
display screen or pane boundaries. sticky bit A flag which keeps commonly used
programs “stick” to the swapping disk for
search and replace The act of finding a match to a performance.
given character string and replacing each
occurrence with some other string. stopped job A job that has been halted temporarily
by the user and which can be resumed at his
search string The pattern used for matching in a command.
search operation.
storage In contrast to memory, the saving of
sed Non-interactive stream editor used to do information on physical devices such as fixed disk
“batch” editing. Often used as a tool within shell or tape. See memory.
scripts.

© Copyright IBM Corp. 2009, 2024 X-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

store To place information in memory or onto a TCP/IP Transmission Control Protocol/Internet


diskette, fixed disk, or tape so that it is available Protocol. Pair of communications protocol
for retrieval and updating. considered de facto standard in UNIX operating
streams Similar to sockets, streams are destination system environments. IBM TCP/IP for VM and IBM
points for communications in UNIX operating TCP/IP for MVS are licensed programs that
systems. Associated primarily with UNIX System provide VM and MVS users with the capability of
V, streams are considered by some to be more participating in networks using the TCP/IP
elegant than sockets, particularly for interprocess protocol suite.
communication. termcap A file containing the description of several
string A linear collection of characters treated as a hundred terminals. For use in determining
unit. communication protocol and available function.
subdirectory A directory which is subordinate to termlib A set of C programs for using termcap.
another directory. tools Compact, well designed programs to perform
subtree That portion of an AIX file system specific tasks. More complex processes are
accessible from a given directory below the root. performed by sequences of tools, often in the
form of pipelines which avoid the need for
suffix A character string attached to a file name temporary files.
that helps identify its file type.
two-digit display Two seven-segment
superblock Primary information repository of a file light-emitting diodes (LEDs) on the operating
system (location of i-nodes, free list, and so forth). panel used to track the progress of power-on
superuser The system administration; a user with self-tests (POSTs).
unique privileges such as upgrading execution
priority and write access to all files and
directories. U
superuser authority The unrestricted ability to UNIX Operating System A multi-user,
access and modify any part of the Operating multi-tasking interactive operating system
System. This authority is associated with the user created at AT&T Bell Laboratories that has been
who manages the system. widely used and developed by universities, and
that now is becoming increasingly popular in a
SVID System V Interface Definition. An AT&T wide range of commercial applications. See
document defining the standard interfaces to be Kernel, Shell, Library, Pipes, Filters.
used by UNIX System V application programmers
and users. user interface The component of the AIX Family
Definition that describes common user interface
swap space (disk) That space on an I/O device
functions for the AIX PS/2, AIX/RT, and AIX/370
used to store processes which have been operating systems.
swapping out to make room for other processes.
/usr/grpR One of the oldest, and still active, user
swapping The process of moving processes groups for the UNIX operating systems. IBM is a
between main storage and the “swapping device”, member of /usr/grp.
usually a disk.
uucp A set of AIX utilities allowing
symbolic debugger Program for debugging other
programs at the source code level. Common • Autodial of remote systems
symbolic debuggers include sdb, dbx, and xdbx. • Transfer of files
sync A command which copies all modified blocks • Execution of commands on the remote system
from RAM to the disk. • Reasonable security.
system The computer and its associated devices
and programs. V
system unit The part of the system that contains vi Visual editor. A character editor with a very
the processing unit, the disk drive and the disk, powerful collection of editing commands
and the diskette drive. optimized for ASCII terminals; associated with
BSD versions of the UNIX operating system.
System V AT&T's recent releases of its UNIX
operating system are numbered as releases of visual editor An optional editor provided with AIX
“UNIX System V”. in which changes are made by modifying an image
of the file on the screen, rather than through the
exclusive use of commands.
T
TCP Transmission Control Protocol. A facility for the
creation of reliable bytestreams (byte-by-byte,
W
end#to#end transmission) on top of unreliable wild card A metacharacter used to specify a set of
datagrams. The transmission layer of TCP/IP is replacement characters and thus a set of file
used to interconnect applications, such as FTP, so names. For example "*" is any zero or more
that issues of re-transmission and blocking can be characters and "?" is any one character.
subordinated in a standard way. See TCP/IP.

© Copyright IBM Corp. 2009, 2024 X-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Glossary

window A rectangular area of the screen in which


the dialog between you and a given application is
displayed.
working directory The directory from which file
searches are begun if a complete pathname is not
specified. Controlled by the cd (change directory)
command.
workstation A device that includes a keyboard
from which an operator can send information to
the system, and a display screen on which an
operator can see the information sent to or
received from the computer.
write Sending data to an I/O device.
write permission Permission to modify a file or
directory.

X
X/OpenT An international consortium, including
many suppliers of computer systems, concerned
with the selection and adoption of open system
standards for computing applications. IBM is a
corporate sponsor of X/Open. See Common
Application Environment.
X Windows IBM's implementation of the X Window
System developed at the Massachusetts Institute
of Technology with the support of IBM and DECT,
that gives users “windows” into applications and
processes not located only or specifically on their
own console or computer system. X-Windows is a
powerful vehicle for distributing applications
among users on heterogeneous networks.

Y
yacc “Yet Another Compiler# Compiler”. For
producing new command interfaces.

Z
zeroeth argument The command name; the
argument before the first.

© Copyright IBM Corp. 2009, 2024 X-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V12.0

backpg

© Copyright International Business Machines Corporation 2009, 2024.

You might also like