An14g7 Course
An14g7 Course
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
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
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.
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
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
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
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
Uempty
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.
Uempty
Uempty
Uempty
Uempty
Uempty
Uempty
Uempty
Class logistics
• Schedule:
Breaks and lunch
Start and stop times
• Logistics:
Building access
Messages
Facilities
Parking
Emergency exits
Uempty
Introductions
• Name
• Company
• Job duties
• AIX or other UNIX experience
• Computer systems at work
• System usage/application
• Expectations
Uempty
Overview
This unit provides an introduction to IBM Power servers, AIX, and system administration.
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
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
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.
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
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
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.
Uempty
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
• 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
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.
Uempty
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
• 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.
Uempty
Power Hypervisor
System Hardware (memory, processors, devices)
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
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
Uempty
Private Service
Processors Managed
network system
Secondary HMC
‘Backup’ LPAR 1
LPAR 2
Primary HMC Public/open SAN
network LPAR 3
LPAR 4
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
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.
Uempty
The HMC is a key box; let us provide an overview.
Uempty
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
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.
Uempty
The HMC (2 of 2)
ManagedSystems
Navigation
Area
Task Pad
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
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.
Uempty
Virtualization example
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
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.
Uempty
Review questions
1. What is the name of the device that creates and controls LPARs?
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
Uempty
Review answers
1. What is the name of the device that creates and controls LPARs?
The answer is the HMC.
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
Uempty
Exercise
Introduction to AIX and IBM Power servers © Copyright IBM Corporation 2024
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
Uempty
Overview
This unit describes the system management tools available in AIX, with a particular focus on SMIT
and DSH.
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
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
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)
Uempty
AIX administration
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
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
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.
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.
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
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.
Uempty
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.
Uempty
Dialog screen
# smit date
Change / Show Day and Time
[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] #
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.
Uempty
Output screen
COMMAND STATUS
No standard
Command: OK stdout: yes stderr: no
error
Before command completion, additional instructions may appear below.
Command (stdout)
completed
successfully
Uempty
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.
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.
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)
Uempty
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.
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
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:
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.
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
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.
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.
Uempty
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.
The visual above shows a dsh command log file. It shows that the date command was run on
target nodes aixperf and aixsec.
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
HOST: aix2
------------
-rw-r--r-- 1 root system 5 Oct 23 11:26 /tmp/test
AIX system management tools © Copyright IBM Corporation 2024
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
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.
Uempty
Review questions
1. What is the main system management tool available on AIX?
Uempty
Review answers
1. What is the main system management tool available on AIX?
The answer is SMIT
Uempty
Exercise
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
Uempty
Overview
This unit describes how to perform software installation and maintenance.
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
Uempty
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
Uempty
AIX media
Base Install AIX 7.3
IBM PowerSC
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.
Uempty
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)
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:
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.
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
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
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.
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
Uempty
Fix Packs
Interim
Base Technology + Service packs fixes
AIX Level level
(Contain APARs)
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.
Uempty
# oslevel –s
7300–01–01–2246
• 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.
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.
Uempty
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.
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
[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
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 .
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.
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
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
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.
Uempty
Type codes:
F -- Installp Fileset
P -- Product
C -- Component
T -- Feature
R -- RPM Package
E -- Interim Fix
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.
Uempty
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
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.
Uempty
[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]
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.
Uempty
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.
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.
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
Uempty
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.
Uempty
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
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.
Uempty
# instfix –i
• Interim fixes between services packs, including service advisories, is now done through
interim fix management.
emgr command
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?
Uempty
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 ”.
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.
Uempty
[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 +
[ ... ]
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.
Uempty
# 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
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.
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
Uempty
Remove
# rpm -e cairo-1.0.2-6 package
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>
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.
Uempty
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.
Uempty
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
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.
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)
#
AIX software installation and maintenance © Copyright IBM Corporation 2024
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
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
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!
#
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.
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
Complete!
#
The visual shows an example of installing an RPM package with dnf on AIX 7.3
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
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.
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
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
The dnf update command updates all installed RPM packages to the latest level.
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
Removed:
wget-1.21.2-1.ppc
Complete!
The dnf remove command updates all installed RPM packages to the latest level.
Let us introduce SUMA.
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
Uempty
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
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.
Uempty
Base Configuration
[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] #
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.
Uempty
[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] +
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.
Uempty
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
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.
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
Uempty
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.
Uempty
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.
Uempty
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
Uempty
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.
Uempty
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.
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
Uempty
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.
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
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.
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.
Uempty
Exercise
AIX software
installation and
maintenance
Uempty
Uempty
Overview
This unit describes how to list and understand the system configuration and manipulate devices.
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.
Uempty
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
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
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.
Uempty
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
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.
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"
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.
Uempty
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.
Uempty
# lscfg
...
* vscsi0 U8203.E4A.10CD211-V3-C2-T1 Virtual SCSI Client Adapter
...
* hdisk0 U8203.E4A.10CD211-V3-C2-T1-L8100000000000000 Virtual SCSI Disk Drive
...
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).
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
Uempty
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.
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
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.
Uempty
Network Information
Host Name: sys304_118
IP Address: 10.6.52.118
Sub Netmask: 255.255.255.0
Gateway: 10.6.52.254
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.
Uempty
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.
Uempty
# lscfg –v –l ent4
ent4 U5877.001.00H0301–P1–C5–T1 2–Port
10/100/1000 Base–TX PCI–Express Adapter (14104003)
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.
Uempty
# 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)
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.
Uempty
# 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
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.
Uempty
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.
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
Uempty
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.
Uempty
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.
Uempty
Device configuration
ODM root file system
/dev
Predefined
Customized
cfgmgr or
mid-level commands
mkdev, chdev,
rmdev
Physical devices
Device drivers
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).
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.
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.
Uempty
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.
Uempty
# 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
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.
Uempty
rendev command
• You must first unconfigure the device to Defined state first.
# rmdev -l hdisk2
hdisk2 Defined
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.
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?
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.
Uempty
Exercise
Uempty
Uempty
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.
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
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
Let us start with a discussion of network interface cards, specifically the most common type of
adapter - Ethernet adapter.
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
Uempty
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.
Uempty
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.
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.
Uempty
[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 +
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.
Uempty
netinet kernel
extension
netstat or ifconfig
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.
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
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)
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.
Uempty
Partition Activation
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.
Uempty
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.
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
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:
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
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
Uempty
/home
network
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.
Uempty
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.
Uempty
The rmnfs command changes the configuration of the system to stop running NFS daemons. It
accepts the same flags as mknfs.
Uempty
/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
Uempty
# df /data
Filesystem 512–blocks Free %Used Iused %Iused Mounted on
nfs_server:/data 278528 212920 24% 1317 6% /data_client_mnt
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>
Uempty
• /etc/filesystems
/data_client_mnt:
dev = "/data"
vfs = nfs
nodename = nfs_server
mount = false
options = bg,hard,intr,sec=sys
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.
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
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.
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.
Uempty
Exercise
TCP/IP Implementation
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
Uempty
Overview
This unit describes how to start up and shut down the managed system and AIX partitions.
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
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
Uempty
Uempty
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
Uempty
Let us look at how we start a partition from the HMC.
Uempty
LOGIN
System startup and shutdown © Copyright IBM Corporation 2024
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
Uempty
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.
Uempty
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.
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
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
……………
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"
Uempty
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.
Uempty
./rc4.d:
./rc5.d:
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
Uempty
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
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
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.
# refresh –s sshd
0513–005 The Subsystem, sshd, only supports signal
communication.
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.
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
Uempty
SHUTDOWN PROGRAM
Thu 9 Oct 20:15:49 2008
0513–044 The sshd Subsystem was requested to stop.
Wait for 'Rebooting...' before stopping.
...
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.
Uempty
Do a fast shutdown,
shutdown -F
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.
Uempty
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.
Uempty
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
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
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.
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.
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.
Uempty
Exercise
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
Uempty
Overview
This unit describes basic things that you need to know to configure a basic partition.
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
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
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.
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
Uempty
Uempty
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.
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.
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)
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.
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.
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
Uempty
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.
Uempty
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
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.
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?
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.
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.
Uempty
Exercise
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
Uempty
Overview
This unit describes the process of installing the AIX 7.3 operating system.
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
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
The objectives list what you should be able to do at the end of this unit.
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
Uempty
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)”:
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.
Uempty
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.
Uempty
Multiboot
1. Select Install/Boot Device
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 )
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.
Uempty
SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )
1. Information
2. Normal Mode Boot
3. Service Mode Boot
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.
Uempty
Type the number of your choice and press Enter. Choice is indicated by >>>.
88 Help ?
99 Previous Menu
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.
Uempty
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
+-----------------------------------------------------
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]:
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.
Uempty
Method of installation
• Choose option 1 for a fresh installation.
Change Method of Installation
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
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 >>>.
>>> 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
Uempty
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.
88 Help ?
99 Previous Menu
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.
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.
Uempty
Security Models
• These settings are beyond the scope of this class.
• Security models are all set to None by default.
Security Models
1. LV Encryption........................................... No
3. Secure by Default....................................... No
88 Help ?
99 Previous Menu
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.
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
Uempty
Install Options
• Further install / software options
Install Options
88 Help ?
99 Previous Menu
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
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.
Uempty
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
Please wait...
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?
Uempty
License Agreements
Software License Agreements
[Entry Fields]
ACCEPT Installed License Agreements yes +
[Entry Fields]
ACCEPT Software Maintenance Agreements? yes +
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.
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
Uempty
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.
Uempty
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. *
* *
* *
*******************************************************************************
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?
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
Uempty
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.
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.
Uempty
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.
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
--------------------------------------------------------------------
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
------------------------------------------------------------------------------
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.
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
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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.
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
------------------------------------------------------------------------------
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.
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
------------------------------------------------------------------------------
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.
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.
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.
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.
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
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.
Uempty
Exercise
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
Uempty
Overview
This unit describes how to work with logical volumes, physical volumes, and volume groups.
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:
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
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
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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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)
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
[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
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.
Uempty
[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
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.
Uempty
datavg datavg
datavg datavg
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
OR
datavg hdisk2
hdisk1
# smit reducevg2
Remove a Volume Group
[Entry Fields]
* VOLUME GROUP name [datavg] +
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
[Entry Fields]
* VOLUME GROUP name [datavg] +
Put volume group in SYSTEM no +
MANAGEMENT mode?
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
[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
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.
Uempty
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
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.
Uempty
[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
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.
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.
Uempty
# 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
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)
Uempty
# 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
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.
Uempty
Now that you can create VGs, let us see how you can change a VG.
Uempty
[Entry Fields]
VOLUME GROUP name [datavg]
* PHYSICAL VOLUME name [hdisk3] +
Volume Group MAJOR NUMBER [] +#
[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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
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
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.
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
Uempty
# smit pv
Physical Volumes
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
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
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.
Uempty
# 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
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.
Uempty
lv00 lv00
hdisk1 hdisk2
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
physical
physical PP20
physical
disks
physical
PP42 PP52
disks
physical
disks
disks
volumes
PHYSICAL VOLUME PHYSICAL VOLUME
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
# smit lv
Logical Volumes
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
This is the top-level SMIT menu for logical volumes. The next few pages discuss these items.
Uempty
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.
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
[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
Uempty
Inner-middle (im)
Edge (e)
Inner-edge (ie)
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.
Uempty
[Entry Fields]
* CURRENT logical volume name [] +
* NEW logical volume name []
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
hdisk3 hdisk4
datavg
1 2 3 4
empty
5 6 7 8
hdisk3 hdisk4
datavg
1 3 5 7 2 4 6 8
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
.
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
[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
This is the SMIT panel for increasing the size of a logical volume.
Uempty
[Entry Fields]
* CURRENT logical volume name [datalv] +
* NEW logical volume name [datalv1]
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
Uempty
[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
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.
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
Uempty
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.
Uempty
PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3
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.
Uempty
hdisk3 hdisk4
PP20
PP2
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
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
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.
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
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.
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.
Uempty
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
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,
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.
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
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).
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
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):
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.
Uempty
# 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
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
Uempty
# 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
Uempty
# 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
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.
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
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.
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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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.
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
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
Uempty
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
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.
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 ===============
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
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.
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
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
Uempty
Exercise
Working with the Logical Volume Manager © Copyright IBM Corporation 2024
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
Uempty
Overview
This unit covers important concepts and procedures that are related to AIX file systems.
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
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
JFS2 will be the main focus of this unit. Let us start by providing an overview of journaled file
systems.
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
Uempty
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
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
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.
Uempty
Reference: JFS2 size limits,
https://www.ibm.com/docs/en/aix/7.3?topic=limitations-jfs2-size-limits
Uempty
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
Uempty
# 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
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.
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
Uempty
[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 []
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
Uempty
[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
Uempty
[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 []
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.
Uempty
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.
Uempty
/ /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents of data file system
.profile .profile
.exrc files doc .exrc files doc
myscript myscript
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.
Uempty
/ /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents of data file system .profile
.exrc files doc
myscript
.profile
.exrc files doc
myscript
File systems administration © Copyright IBM Corporation 2024
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.
Uempty
# 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
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.
Uempty
[Entry Fields]
File system name /data
NEW mount point [/data]
SIZE of file system
Unit Size Gigabytes +
Number of units [10] #
...
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.
Uempty
# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y
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>
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
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
Uempty
# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y
# 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
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.
Uempty
Example:
# rmfs /data2
OR
# smit rmjfs2
[Entry Fields]
* FILE SYSTEM name /data2 +
Remove Mount Point no +
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
Uempty
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.
Uempty
# 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
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
Uempty
# 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
...
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.
Uempty
• /etc/security/failedlogin
• /var/adm/sulog
• /var/spool/*/*
• /var/tmp/*
• $HOME/smit*
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.
Uempty
Uempty
if [ $PERC -gt 70 ]
then
mail -s "Filesystem check on box: `hostname`" \
[email protected] << EOF
$FILESYSTEM is $PERC% full, please check
EOF
fi
done
Uempty
/export # du FirstBoot.sh
8 FirstBoot.sh
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
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
Uempty
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.
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
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.
Uempty
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.
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?
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.
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?
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.
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
10.What is the mount point for the file system located on the /dev/hd4 logical volume?
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
Uempty
Exercise
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
Uempty
Overview
This unit covers important concepts and procedures that are related to AIX file systems.
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
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
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
Uempty
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*).
Uempty
Devices Software
System
SMIT menus
Resource ODM and panels
Controller
Uempty
ODM components
1
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.
Uempty
It is also important to understand how the terms predefined device information and customized
device information are used when discussing the ODM.
Uempty
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.
Uempty
Predefined databases
PdDv
PdCn PdAt
Configuration manager
Config_Rules
(cfgmgr)
Customized databases
CuDvDr CuVPD
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
Uempty
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,
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.
Uempty
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"
PdAt: CuAt:
uniquetype = "adapter/pci/14106902" name = "ent1"
attribute = "jumbo_frames" attribute = "jumbo_frames"
deflt = "no" value = "yes"
values = "yes,no" type = "R"
... ...
Uempty
File system
information ?
User/security
information ?
Queues and
queue devices ?
The Object Data Manager © Copyright IBM Corporation 2024
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.
Uempty
1.
_______
2. 3.
AIX kernel Applications
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.
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?
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
Uempty
ODM commands
Object class: odmcreate, odmdrop
Descriptors: odmshow
Introduction
Different commands are available for working with each of the ODM components: object classes,
descriptors, and objects.
Uempty
The visual shows an extraction from ODM class PdAt, where four descriptors are shown
(uniquetype, attribute, deflt, and values).
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
Uempty
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)
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?
Uempty
Software states
Introduction
The AIX software vital product database uses software states that describe the status of an
installation or update package.
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?
Uempty
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.
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.
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).
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.
Uempty
Exercise
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
Uempty
Overview
This unit explains how metadata concepts are important in understanding and working with AIX
logical volume manager problems.
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
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.
Uempty
Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.
Uempty
Physical Logical
Partitions Partitions
Physical Logical
Volumes Volume
Volume
Group
LVM metadata © Copyright IBM Corporation 2024
Introduction
This visual and the associated student notes provide a review of basic LVM terms.
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.
Uempty
LVM identifiers
# uname -m
00C35BA04C00
LVM metadata © Copyright IBM Corporation 2024
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.
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.
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.
Uempty
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.
Uempty
Uempty
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.
Uempty
Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.
Uempty
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.
Uempty
myvg
Uempty
What happens if logical volumes exist during the importvg?
Uempty
Uempty
hdisk3
myvg
hdisk2
datavg
importvg can also accept the PVID in place of the hdisk name.
LVM metadata © Copyright IBM Corporation 2024
Uempty
# umount /home/michael
# mount –o log=/dev/loglv01 /dev/lv24 /home/michael
Uempty
/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
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.
Uempty
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.
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.
Uempty
Topic 1 objectives
• Explain where LVM metadata information is stored.
• Use importvg and exportvg to manage LVM metadata.
• Solve ODM-related LVM problems.
Uempty
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.
Uempty
• If the ODM problem is not in the rootvg, for example in volume group
homevg, do the following:
# varyoffvg homevg
Uempty
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.
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.
Uempty
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.
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.
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.
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.
Uempty
Exercise
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.
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.
Uempty
Overview
This unit describes different disk management procedures.
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
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
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
Uempty
Mirroring
hdisk1
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.
Uempty
Stale partitions
hdisk0
Mirrored
hdisk1 logical
volume
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.
Uempty
Mirroring rootvg
hd1 hd1
hdisk0 hdisk1
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
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.
Uempty
VGDA count
Uempty
datavg
hdisk1 hdisk2
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.
Uempty
Uempty
hdisk1 hdisk2
Quorum checking on
With quorum checking on, you always need > 50% of the VGDAs available (except to vary on
rootvg).
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.
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
Uempty
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
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.
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.
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
Uempty
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
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.
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
Uempty
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.
Uempty
Uempty
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
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.
Uempty
Uempty
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.
Uempty
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.
Uempty
# rmfs filesystem
4. Remove all logical volumes from failing disk:
hdiskX hdiskY
# rmlv logical-volume
5. Remove disk from volume group:
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.
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.
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
Uempty
datavg
Contains OS
logical
hdiskZ volumes
mksysb
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.
Uempty
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.
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.
Uempty
ODM problem in No
rootvg? Export and import
volume group
Yes
rvgrecover
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.
Uempty
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.
Uempty
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.
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?
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.
Uempty
Exercise
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
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.
Uempty
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.
References
AIX Version 7.3 Operating system management:
https://www.ibm.com/docs/en/aix/7.3?topic=operating-system-management
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
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
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
Uempty
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.
Uempty
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.
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?
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.
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
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.
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
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.
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 =
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
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.
Uempty
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.
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
Uempty
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)
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.
Uempty
Type the number of your choice and press Enter. Choice is indicated by >>>.
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.
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
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.
Uempty
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
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.
Uempty
Please wait...
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.
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
Uempty
[Entry Fields]
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.
Uempty
The restvg command or the smit restvg fast path can be used to restore a user defined
(non-rootvg) volume group.
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
Uempty
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.
Uempty
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.
Uempty
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.
Uempty
# umount /userFS
# mount /userFS
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.
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
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.
Uempty
cpio command
• cpio is derived from copy in and out.
Create a cpio backup (-o)
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.
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)
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.
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.
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.
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.
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.
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).
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.
Uempty
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.
Uempty
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.
Uempty
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.
Uempty
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.
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
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.
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.
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.
Uempty
snappedFS
inode1 inode2
snapshot
inode1 inode2
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.
Uempty
snappedFS
inode1 inode2
snapshot
inode1 inode2
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.
Uempty
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.
Uempty
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
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.
Uempty
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 ....
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.
Uempty
Listing snapshots
# smit lssnap (and select file system from list)
-OR-
# snapshot –q /home/myfs2
# snapshot –q /home/myfs
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
Uempty
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.
Uempty
Uempty
Uempty
• 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
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.
Uempty
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.
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.
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.
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
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.
Uempty
Exercise
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
Uempty
Overview
This unit focuses on an overview of the AIX Error Log facility.
References
Error-logging overview:
https://www.ibm.com/docs/en/aix/7.3?topic=concepts-error-logging-overview
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
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
Uempty
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
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.
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 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).
Uempty
SMIT can be used to generate an error report.
Uempty
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.
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.
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).
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.
Uempty
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.
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.
Uempty
Uempty
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
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.
Uempty
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.
Uempty
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
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
Uempty
[Entry Fields]
LOGFILE [/var/adm/ras/errlog]
* Maximum LOGSIZE [1048576] #
Memory BUFFER SIZE [32768] #
...
# smit errclear
Clean the error log
[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
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
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?
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
Uempty
ODM-Based:
/etc/objrepos/errnotify
Error notification
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.
Uempty
while true
do
sleep 60 # Let's sleep one minute
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.
Uempty
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"
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).
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
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.
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
Uempty
syslogd daemon
/etc/syslog.conf:
daemon.debug /tmp/syslog.debug
/tmp/syslog.debug:
# stopsrc -s inetd
# startsrc -s inetd -a "-d" Provide debug
information
Function of syslogd
The syslogd daemon logs system messages from different software components (kernel, daemon
processes, system applications).
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.
Uempty
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.
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.
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.
Uempty
/etc/syslog.conf:
Redirect all syslog
*.debug errlog
messages to error log
# errpt
Uempty
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 = "errpt -l $1 | tail -1 | logger -t errpt -p
daemon.notice"
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.
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
Uempty
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
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).
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
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.
Uempty
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
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"
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
Uempty
# 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
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.
Uempty
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
=====================================
? exit
#
Error monitoring © Copyright IBM Corporation 2024
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:
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.
Uempty
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 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
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.
Uempty
Review questions
1. Which command generates error reports?
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.
Uempty
Exercise
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
Uempty
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.
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
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
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
Uempty
Possible failures
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,
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.
Uempty
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
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.
Uempty
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)
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.
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.
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.
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?
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
Uempty
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:
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.
Uempty
• The bootlist command now shows the pathid with the device:
# bootlist -m normal –o
hdisk0 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=1
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
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.
Uempty
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.
Uempty
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
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.
Uempty
After the category of boot device is selected, you need to select the device to use in the identified
position in the bootlist.
Uempty
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
Uempty
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
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.
Uempty
Uempty
Maintenance
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.
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>
Uempty
Maintenance
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.
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.
Uempty
Type the number for a volume group to display the logical volume
information
and press Enter.
-----------------------------------------------------------------------------
Volume Group ID 00c35ba000004c00000001153ce1c4b0 includes the following
logical volumes:
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.
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
Uempty
Maintenance
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.
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.
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?
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.
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?
7. True or false: During the AIX boot process, the AIX kernel is loaded from the root file system.
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.
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.
Uempty
Exercise
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
Uempty
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.
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
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
Uempty
Topic 1 objectives
• Identify the steps in system initialization from loading the boot image to boot completion
• Analyze and solve boot problems
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.
Uempty
/
Restore RAM file system from
boot image etc dev mnt usr
Configure remaining
Start "real" init process rc.boot 3 devices
(from rootvg)
/etc/inittab
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024
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).
Uempty
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.
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
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.
Uempty
rc.boot 2 (1 of 2)
fsck -f /dev/hd9var
517 mount /var /
518 copycore RAM file system
umount /var
Uempty
6. The primary paging space /dev/hd6 is made available.
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.
Uempty
rc.boot 2 (2 of 2)
mount /var
dev etc mnt usr var
ODM
Copy boot messages to
alog /
RAM file system
Kernel removes RAMFS
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.
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
savebase hd5:
ODM
System initialization: rc.boot and inittab © Copyright IBM Corporation 2024
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.
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.
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
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.
Uempty
Topic 1 objectives
• Identify the steps in system initialization from loading the boot image to boot completion
• Analyze and solve boot problems
Uempty
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.
Uempty
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
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
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.
Uempty
# 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 ***********
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.
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
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
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
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
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.
Uempty
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
523 - 534 ODM files missing ODM files are missing or inaccessible.
Restore missing files from a system backup
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.
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
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.
Uempty
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
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?
Uempty
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
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.
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?
4. What is the likely cause if your system stops booting with LED 553?
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).
Uempty
Exercise
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
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.
Uempty
Overview
This unit explains how to maintain the AIX system dump facility and how to obtain a system
dump.
References
AIX Version 7.3 System Dump Facility
https://www.ibm.com/docs/en/aix/7.3?topic=facilities-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
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
Uempty
System dumps
• What is a system dump?
• What is a system dump used for?
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
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.
Uempty
hd6
/dev/hd6
Primary (paging) dump device
Next boot:
Copy dump into...
Uempty
hd6
/dev/lg_dumplv
Primary (dedicated) dump device:
Firmware assisted dump is written while the
LPAR is restarting
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.
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.
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
Uempty
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.
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.
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
---------------------------------------------------------------------------
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.
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.
Uempty
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.
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%
Uempty
• 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.
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,
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.
Uempty
• Note: Use of an LVM mirrored dedicated dump LV is supported, but not recommended due to
performance issues.
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.
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
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.
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.
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
Uempty
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.
Uempty
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
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.
Uempty
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.
Uempty
Is hd6 being
yes rc.boot 2
used as the
dump LV?
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
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.
88 Help?
99 Exit
Uempty
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.
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.
Uempty
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.
Uempty
Review questions
1. Your system is configured for firmware assisted dumps. What is the default primary dump
device after AIX installation?
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?
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.
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.
Uempty
Exercise
System Dump
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
Uempty
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.
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
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
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.
Uempty
# smit alt_install
Uempty
hdisk0
rootvg (AIX 7.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).
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.
Uempty
[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.
Uempty
hdisk0
rootvg (AIX 7.3 TL1)
Clone
hdisk1
AIX 7.3 TL2 rootvg (AIX 7.3 TL2)
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).
Uempty
• -r (Reboot after cloning).
• -s script
• -P phases
• -R resolv.conf
• -W filesets
Let’s review the SMIT fastpath.
Uempty
Uempty
Original hdisk0
rootvg (AIX 7.3 TL1)
Uempty
To use the alternate disk capabilities with a migration installation, you need to use NIM.
Uempty
hdisk0
rootvg
(AIX 7.2)
Clone
NIM server NIM client:
hdisk1
lpar1
rootvg
AIX 7.3 (AIX 7.3)
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
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.
Uempty
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.
Uempty
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.
Uempty
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.
Uempty
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.
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"
Uempty
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.
Uempty
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
Uempty
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.
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.
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.
Uempty
general:
kext_check =
disks:
nhdisk = hdisk1
mhdisk = hdisk2
tohdisk = hdisk3
tshdisk = hdisk4
hmc:
lpar_id = 5
management_console = hmc4.austin.ibm.com
user = hscroot
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
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.
Uempty
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.
Uempty
The visual lists the recommended sequence of steps to perform a Live Update operation.
Uempty
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
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.
Uempty
HMC
VIOS
Virt. ent Virt. ent
SEA
vSCSI/vFC
vSCSI/vFC vSCSI/vFC
Original
rootvg
VIOS
New rootvg
(Alt-disk-install)
vSCSI/vFC
Uempty
HMC
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
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.
Uempty
HMC
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
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
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.
Uempty
HMC
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
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.
Uempty
HMC
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
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.
Uempty
HMC
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
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.
Uempty
Exercise
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
Uempty
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.
Uempty
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)
BLV jfslog
(bos_hd5) (bos_hd8)
Install and cloning techniques © Copyright IBM Corporation 2024
Uempty
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.
Uempty
The visual above shows the various arguments to the multibos command.
Uempty
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.
Uempty
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.
Uempty
Uempty
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.
Uempty
+––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
Customization Operation
+––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+
Verifying operation parameters
. . .
Unmounting /bos_inst/usr
Unmounting /bos_inst
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.
Uempty
• 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
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
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
Uempty
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.
Uempty
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
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.
Uempty
Review questions (1 of 2)
1. Name the two ways alternate disk installation can be used.
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.
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.
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
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.
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
Uempty
Exercise
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
Uempty
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)
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
Uempty
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
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.
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
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
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.
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
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.
Uempty
Let us next look at how AIX supports memory paging.
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
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.
Uempty
Uempty
Note
Uempty
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.
Uempty
Security logs
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.
Uempty
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
/etc/profile
Enter login shell $HOME/.profile
Survey of additional AIX facilities © Copyright IBM Corporation 2024
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).
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.
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"
. . .
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
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
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.
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
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.
Uempty
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.
Uempty
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
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
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.
Uempty
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.
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.
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.
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.
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.
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.
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
Uempty
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)
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
Uempty
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.
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.
Uempty
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.
Uempty
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
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.
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
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.
Uempty
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
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.
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.
Uempty
Uempty
qdaemon
• Manages queues
• Is started in the /etc/inittab file
• Invokes the back-end programs
• Optionally records accounting data
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.
Uempty
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
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.
Uempty
Printer menu
# smit spooler_choice
Print Spooling
Uempty
# smit spooler
AIX Print Spooling
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.
Uempty
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
Uempty
Printer Type
Bull
Canon
Dataproducts
Hewlett-Packard
IBM
Lexmark
OKI
Printronix
QMS
Texas Instruments
Other (select this if your printer is not listed above)
Uempty
Printer Type
[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
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.
Uempty
Uempty
Remote printing
host1 client1
lp1
Uempty
Client authorization
# smit mkhostslpd
[Entry Fields]
F9=ShellF10=Exit Enter=Do
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
Uempty
Move cursor to desired item and press Enter.Use arrow keys to scroll.
Uempty
[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 []
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.
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?
4. What does discipline mean in reference to the /etc/qconfig file? What are its
possible values?
Uempty
Uempty
$ lp -d queuename filename
OR
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
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.
Uempty
For example:
$ qchk
Queue Dev Status Job Files User PP % Blks Cp Rnk
ps lp0 DOWN QUEUE 569 /etc/motd root 1 1 1
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.
Uempty
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.
Uempty
Removing a queue
# smit rmpq
[Entry Fields]
Print queue to remove ps:lp0
Local printer device /dev/lp0
Uempty
Managing queues
# smit pqmanage
Uempty
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
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
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.
Uempty
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.
Uempty
# smit jobs
Uempty
# smit qcan
[Entry Fields]
PRINT QUEUE containing job [ ] +
(required for remote jobs)
* Print JOB NUMBER [ ] +#
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
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.
Uempty
# 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
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.
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.
Uempty
# 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
Uempty
# 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
Uempty
var
spool
lpd
qdaemon
qdir
• Temporary copies of enqueued
• Contains queue requests files if spooling
(job description files)
Uempty
NO YES
Check hardware Check software
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
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.
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.
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.
Uempty
2 (2 of 2)
5. What three methods can be used to find out what the system default queue is?
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?
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.
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.
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
AP
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)
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
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
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
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
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
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
AP
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
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
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
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
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
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
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.
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.
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
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.
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.
backpg