Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
cover
Trademarks
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:
Active Memory™ AIX 5L™ AIX 6™
AIX® Approach® DB2®
Electronic Service Agent™ Everyplace® Initiate®
Language Environment® MVS™ Notes®
Power Architecture® POWER Hypervisor™ Power Systems™
Power® PowerHA® PowerPC®
PowerVM® POWER6® POWER7+™
POWER7® POWER8™ Redbooks®
RS/6000® System p® System Storage®
Tivoli® WebSphere®
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Windows is a trademark of Microsoft Corporation 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.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
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:
Active Memory™ AIX 5L™ AIX 6™
AIX® Approach® DB2®
Electronic Service Agent™ Everyplace® Initiate®
Language Environment® MVS™ Notes®
Power Architecture® POWER Hypervisor™ Power Systems™
Power® PowerHA® PowerPC®
PowerVM® POWER6® POWER7+™
POWER7® POWER8™ Redbooks®
RS/6000® System p® System Storage®
Tivoli® WebSphere®
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Windows is a trademark of Microsoft Corporation 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
Instructor course overview
This is a five-day course for experienced UNIX administrators on how to
install, customize, and administer the AIX operating system in a Power
Systems partitioned environment. The course requires the students to be
familiar with AIX from an end-user’s point of view (for example, to be able to
use the vi editor). They are expected to be familiar with all aspects of UNIX
system administration and only need to know how AIX differs and how to
translate their skills to the AIX environment.
At the end of the week, students should be proficient in most aspects of AIX
system administration. Additional LPAR and virtualization skills are available
by attending the virtualization series of courses: AN11G, AN30G, and AN31G.
Additional AIX skills in AIX TCP/IP configuration and in AIX Performance
Management can be obtained by attending AN21G and AN51G respectively.
AIX WPAR training can be obtained by attending AN17G.
With this release of the course, the materials are AIX 7.1 compliant. The
course has been designed to reflect partitioning technology. There is no
reference to the concept of a stand-alone system.
pref
Course description
AIX Jumpstart for UNIX Professionals
Duration: 5 days
Purpose
Provide focused training for experienced UNIX administrators on how to
install, customize, and administer the AIX operating system in a multiuser
Power Systems partitioned environment. The course is based on AIX 7.1
running on a Power system managed by Hardware Management Console
version 7 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 POWER processor based systems in a multiuser Power Systems
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 (AU13 or AN10) 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
• System shutdown and restart
• Backup and recovery
• System task scheduling
Objectives
After completing this course, students should be able to:
• 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) and IBM Systems Director console for AIX
• 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
• Introduction to IBM Power Systems and AIX
• AIX system management tools
• AIX software installation and maintenance
• System configuration and device
• TCP/IP networking
• System startup and shutdown
• Basic logical partition definition and use
• AIX installation
• Working with the Logical Volume Manager (LVM)
• File system administration
• Backup and restore
• Working with the Object Data Manager (ODM)
• Working with the AIX error log
• System boot problem management
• LVM and file system problem management
• Disk management procedures
• Advanced installation and system update techniques
• AIX dump creation and packaging for AIX support
• Use of JFS2 snapshot for backup and restore
• (Optional) Survey of additional AIX features
Curriculum relationship
This course acts as a starting point in the AIX system administration and
POWER virtualization curriculum for experienced UNIX administrators. The
next recommended course is AN11G. AN14G attendees should not attend
AN12G or AN15G, because AN14G already covers the material in those
courses. Other follow-on courses related to AIX system administration would
be AN51G (performance management), AN21G (networking), AN22G (NIM),
and AN17G (workload partitions).
pref
Agenda
Day 1
(00:30) Welcome
(00:35) Unit 1: Introduction to AIX and IBM Power Systems
(00:30) Exercise 1: Introduction to AIX and IBM Power Systems
(00:40) Unit 2: AIX system management tools
(00:30) Exercise 2: Using system management tools in AIX
(01:15) Unit 3: AIX software installation and maintenance
(00:20) Exercise 3: AIX software installation and maintenance
(00:45) Unit 4: System configuration and devices
(00:30) Exercise 4: System configuration and devices
Day 2
(00:40) Unit 5: TCP/IP networking
(00:25) Exercise 5: TCP/IP implementation
(01:00) Unit 6: System startup and shutdown
(00:30) Exercise 6: System startup and shutdown
(00:20) Unit 7: Basics of configuring logical partitions
(01:00) Exercise 7: Configuring logical partitions
(01:20) Unit 8: AIX installation
(00:50) Exercise 8: AIX installation
(01:30) Unit 9: Working with the Logical Volume Manager
Day 3
(01:10) Exercise 9: Working with LVM
(01:05) Unit 10: File systems administration
(00:25) Exercise 10: File systems administration
(00:45) Unit 11: The Object Data Manager
(00:30) Exercise 11: The Object Data Manager
(00:50) Unit 12: LVM metadata
(00:45) Exercise 12: LVM metadata issues
(01:10) Unit 13: Disk management procedures
(00:40) Exercise 13: Disk management procedures
Day 4
(01:30) Unit 14: Backup and restore
(01:00) Exercise 14: Backup and restore
(00:55) Unit 15: Error monitoring
(00:25) Exercise 15: Error monitoring
(01:05) Unit 16: System initialization - I
(00:45) Exercise 16: System initialization - I (Parts 1-3)
Day 5
(00:20) Exercise 16: System initialization - I (Part 4)
(00:45) Unit 17: System initialization - II
(00:35) Exercise 17: System initialization - II
(00:35) Unit 18: The AIX system dump facility
(00:20) Exercise 18: System dump
(00:45) Unit 19: Advanced install techniques (Topic 1: Alternate disk
installation)
(01:00) Exercise 19: Advanced install techniques (Topic 1: Alternate disk)
(00:35) Unit 19: Advanced install techniques (Topic 2: Using multibos)
(00:35) Exercise 19: Advanced install techniques (Topic 2: multibos)
(00:45) Optional Appendix A: Survey of additional AIX facilities
(00:40) Optional Appendix B: Printers and queues
Uempty
Unit 1. Introduction to AIX and IBM Power
Systems
Estimated time
00:35
References
Online AIX 7.1 Information
POO03022USENAIX “From Strength to Strength”
AU73G System p LPAR configuration and virtualization I
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ib
m.aix.base/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AIX overview
IBM Power Systems
LPAR:
AIX2
LPAR:
AIX3
Notes:
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. Live Application Mobility is a capability of WPAR
technology, which allows partitions to move between systems with limited application downtime (for
example, 20 seconds).
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Ease of use:
– SMIT and IBM Systems Director Console, in addition to command line
– Object Data Manager (ODM) for central configuration repository
• Reliability, availability, and serviceability:
– Resiliency that is built into design of components
– Dynamic changes to system without reboot
– High availability clustering with PowerHA
• Storage management:
– Logical Volume Manager
– Enhanced journaled file system
• Network Installation Manager
• Workload management and migration
– Workload Manager and Workload Partitions
• Security
– Role-based access, Trojan detection, system hardening, and more
Notes:
• Management tools
AIX provides several easy to use system administration tools. Foremost among them are SMIT
and the IBM Systems Director Console. These allow 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
Uempty 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
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.
• 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.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Identify AIX capabilities in which it might differ from other UNIX operating systems.
Details — Do not get into too much detail. These topics are better taught in detail later in the course
or in subsequent courses in the curriculum.
Additional information —
Transition statement — Let’s start looking at the virtual environment where AIX is typically hosted.
Uempty
Power Hypervisor
System Hardware (memory, processors, devices)
Notes:
Logical partition (LPAR)
Logical partitioning is the ability to make a single system that runs as if it were two or more systems.
Each partition represents a division of resources in the Power System. The partitions are logical
because the division of resources is logical and not along physical boundaries.
Hypervisor Partitions are isolated from each other by firmware (underlying software) called the
POWER Hypervisor. The names POWER Hypervisor and Hypervisor is used interchangeably in
this course.
Each partition has its own environment, for example – IP address or time of day, just as any AIX
instance.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the concepts of LPARs.
Details — Describe what is meant by logical partitions.
The visual shows different time zones and country flags to show that because LPARs are separate
operating environments, system variables such as the time zone, can be set in each operating
system of each LPAR.
Additional information —
Transition statement — Let us look at a typical system layout.
Uempty
Private Service
Processors Managed
network system
Secondary HMC
‘Backup’ LPAR 1
LPAR 2
Primary HMC Public/open SAN
network LPAR 3
LPAR 4
Notes:
The diagram shows a typical example of a Power System 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. 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 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.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show the group a typical Power System configuration.
Details — Introduce the big picture. Be sure to clearly explain the terminology, especially the term
Managed System. Point out 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). Details on setting up and connecting the
hardware are provided in the AN11 course.
Additional information —
Transition statement — The HMC is a key box; let us provide an overview. Note, this is not an
HMC course so point them to our LPAR class if more details are required.
Uempty
Notes:
• Dynamic logical partitioning (DLPAR)
The term dynamic in DLPAR means we can add, move, or remove resources without having to
reactivate the partition. If there are partitions that need more or can do with fewer resources,
you can dynamically move the resources between partitions within the managed system without
shutting down the partitions. Both the source and the destination partitions must support the
dynamic partitioning operation.
• Processors and memory
Each running LPAR has an active profile that contains the resources that LPAR is entitled to.
For processor and memory settings, there is a maximum and a minimum range. These
boundaries cannot be exceeded when performing dynamic reallocation operations.
• Live Partition Mobility
Live Partition Mobility is a new capability that enables users to move partitions between systems
with no application downtime. Live Partition Mobility enables organizations to move LPARs from
CPU intensive servers to improve overall throughput based on requirements at a particular time.
This also allows us to use a maintenance window on a physical machine without the need for
any application downtime. The only interruption of service would be due to network latency. If
sufficient bandwidth is available, a delay of at most, a few seconds, is typically expected.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Point out some of the highlights of the POWER-based virtualization capabilities.
Details —
Additional information —
Transition statement — Let us take a closer look at how we work with the HMC.
Uempty
The HMC (1 of 2)
IBM Power Systems
Notes:
The HMC is an Intel-based server that runs a customized version of Linux (SuSE). Its main purpose
is to configure and control up to 48 managed systems.
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).
You can access the HMC either through a web browser graphic interface (https) or through an ssh
protocol command-line interface.
Note
On entry level machines, such as POWER8 scale-out servers, if the system is to be used as a
non-partitioned system, then an HMC is not required. An HMC is mandatory for enterprise class
systems (Power 770 and above for POWER7, Power Systems E870 and above for POWER8). The
supported virtual machine configurations are:
• With an HMC (AIX, Linux, IBM i)
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Without an HMC:
- IVM (AIX, Linux, IBM i)
- PowerKVM (Linux)
- Full system partition (AIX, Linux, IBM i)
Note that not all systems support IBM i. Only certain models of POWER8 scale-out server support
PowerKVM.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
The HMC (2 of 2)
IBM Power Systems
Managed
Systems
Notes:
The diagram in this visual shows the main view of a managed system – sys034. Operations such as
create, stop, and 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 (on the left) 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 v7.3.3.1. Pre-v7 HMCs ran WebSM, which was a much
different interface based on Java.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Virtualization example
IBM Power Systems
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide an overview of partition virtualization.
Details — Introduce the information that is provided on the visual.
Additional information —
Transition statement — Let us review what we covered with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement —
Uempty
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 1. Introduction to AIX and IBM Power Systems 1-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — End of unit.
Uempty
Unit 2. AIX system management tools
Estimated time
00:40
References
Online AIX Version 7.1 Systems Director Console for AIX
AIX Version 7.1 Operating System and Device
Management
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ib
m.aix.base/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AIX administration
IBM Power Systems
System IBM
Management Systems Director
Interface Tool Console for AIX
(smit) (pconsole)
High-level commands
Low-level Intermediate-level
commands commands
System
System Kernel Resource Object Data ASCII
calls services Controller Manager files
Notes:
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. IBM Systems Director console is an attractive web-based offering in AIX.
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.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
SMIT
IBM Power Systems
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit
System Management
Notes:
Main menu selections
The SMIT main menu enables you to select the administrative tasks to be performed. You can also
select online help on how to use SMIT.
Use of keys
In the ASCII mode, in order to select from the menus, you must use the up and down arrow keys.
This moves a highlighted bar over the menu items. Press Enter to select the highlighted item. You
can also use some of the keyboard function keys to perform other functions, such as exiting SMIT
or starting a shell.
Importance of TERM environment variable
When using SMIT in the ASCII mode, the menus and dialog panels sometimes come up distorted.
That is the result of not having an appropriate TERM variable value. Setting and exporting this
variable can solve the problem. For example, executing the command export TERM=vt320 might
solve the problem.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the SMIT main menu and highlight the options.
Details — Explain how to open SMIT. There is an example in the notes. It might be helpful to
provide a demonstration.
Additional information —
Transition statement — Let us see a dialog screen example.
Uempty
Dialog screen
IBM Power Systems
# smit date
Change / Show Day and Time
[Entry Fields]
YEAR (00-99) [08] #
MONTH (01-12) [10] #
DAY (1-31) [08] #
HOUR (00-23) [11] #
MINUTES (00-59) [23] #
SECONDS (00-59) [06] #
Shell exit,
useful to check
Command Current fast path:
something preview "date"
before execution
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
Notes:
Dialog screens and selector screens
A dialog screen allows you to enter values that are used in the operation performed. Some fields
are already completed from information that is held in the system. Usually, you can change this data
from the default values.
A selector screen is a dialog screen on which there is only one value to change. The value usually
indicates the object that is acted upon by the subsequent dialog and AIX command.
Entering data
To enter data, move the highlighted bar to the value you want to change. Then, either enter a value
or select one from a list. Fields that you can type in have square brackets [ ]. Fields that have data
that is larger than the field width, have angle brackets < >, to indicate that there is data further to the
left, right, or both sides of the display area.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Special symbols
Special symbols on the screen are used to indicate how data is to be entered:
• Asterisk (*): This is a required field.
• Number sign (#): A numeric value is required for this field.
• Forward slash (/): A path name is required for this field.
• X: A hexadecimal value is required for this field.
• Question mark (?): The value that is entered is not displayed.
• Plus sign (+): A pop-up list or ring is available.
An asterisk (*) in the leftmost column of a line indicates that the field is required. A value must be
entered here before you can commit the dialog and execute the command. In the ASCII version, a
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: Execute the current command or select from a single-selection pop-up list.
• /text: Find the text in the output.
• n: Find the next occurrence of the text.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Output screen
IBM Power Systems
Command
completed No
successfully COMMAND STATUS Standard
error
Command: OK stdout: yes stderr: no
Standard Output
following command
execution
(Stdout)
Notes:
Fields on first line of output
The Command field can have the following values: OK, RUNNING, and FAILED.
The value of the stdout field indicates whether there is standard output, that is, whether there is
output that is produced as a result of running the command. The output is displayed in the body
section of this screen.
The value of the stderr field indicates whether there are error messages. In this case, there are no
error messages.
In the Motif version of SMIT, a representation of a person in the top right-hand corner of the screen
is used to indicate the values of the Command field.
Body of the screen
The body of the screen holds the output or error messages from the command. In this example,
there is output, but there are no error messages.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
smit.log
smit
command smit.script
execution
smit.transaction
• $HOME/smit.log
– Records a log of all menu and dialog screens that are visited, all commands
that are executed, and their output
– Records any errors during the SMIT session
• $HOME/smit.script
– Shell script that contains all AIX commands that are executed by SMIT
• $HOME/smit.transaction
– SMIT transactions log
– Records date, description, and command script output of the commands that
were executed
SMIT output is redirected to
file: /tmp/new-script.
# smitty –xs /tmp/new-script No commands are run.
Notes:
• Overview
SMIT creates three files in the $HOME directory of the user who is running SMIT. If these files
exist, then SMIT appends to them. These files can grow 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 that is
visited, the AIX commands that are 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 that are 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.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the output files from SMIT.
Details — Explain that 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, customers learn more about these
commands and put them into scripts.
Additional information — Since AIX 5L V5.3, SMIT creates an more output files,
$HOME/smit.transaction. This file is always created in the home directory. It is created to provide
some consistency with the web-based System Manager, which creates a
$HOME/websm.transaction file. While similar in format and usage as the smit.script file,
smit.transaction should include 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.
Transition statement — The IBM Systems Director Console for AIX provides a good web
browser-based graphical interface. Let us look at that.
Uempty
# lssrc -s pconsole
Subsystem Group PID Status
pconsole pconsole 737388 active
Figure 2-8. IBM Systems Director Console for AIX (pconsole) AN14G5.0
Notes:
• IBM Systems Director Console for AIX
The IBM Systems Director Console for AIX, also known as the Console, is a management
interface that allows administrators to manage AIX remotely through a browser. It provides web
access to common systems management tasks. The Console is included as part of AIX 6.1.
The only extra component that is required is a web browser.
The Console is named after the IBM Systems Director because it is built on the same graphical
user interface as the IBM Systems Director. Although the Console is named after the IBM
Systems Director, it is not a prerequisite. All components necessary to run the Console are
included in AIX.
The Console also includes menu links to the Systems Management Interface Tool (SMIT) and
Distributed Command Execution Manager (DCEM). DCEM is a facility to securely execute
SMIT operations or other commands on multiple machines at one time. This can improve
administrator efficiency by reducing the need to log in to multiple systems to run the same
systems management task.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Console interface
IBM Power Systems
Notes:
Logging in to the Console
IBM Systems Director Console for AIX relies on your AIX user account for user-logon security. If the
user ID that you provide is already logged in to the Console, the Console prompts you to choose
between logging out from the other session or returning to the login page. If you choose to log out
from the other session, the Console will not recover any unsaved changes that were made by that
user.
Use the Logout link in the console toolbar when you are finished using the Console to prevent
unauthorized access. If there is no activity during the login session for an extended time, the
session expires and you must log in again to access the Console. The default session timeout
period is 30 minutes.
If you encountered the login problem, check the following items:
• No user account on the target server?
- Have the administrator create an account.
• Password is expired or not set (new user account)?
Uempty - Log in through local terminal or telnet, and set the password.
• Already logged in to console?
- Look for a warning message that gives you the option to terminate the previous session.
You can log in to the Console as root, which gives you the authority to perform all tasks, or you can
delegate certain tasks to non-root users. If the only user that you want to authorize as a console
user is root, no further setup is required.
The root ID has console administrator authorization, which authorizes them to launch any console
task. By default, console tasks are visible only to root. If you want to authorize non-root users to
perform console tasks, extra setup is required. You must authorize each user to access one or more
tasks that appear in the console navigation area. And you must assign each user the AIX
authorizations by using Role-Based Access Control for the actions that are performed by these
tasks.
Changing port values
IBM Systems Director Console for AIX uses the http: 5335 and https: 5336 ports. If you need to
change the port numbers, modify the following properties in the
/pconsole/lwi/conf/overrides/port.properties file and then restart pconsole to change these
ports:
• com.ibm.pvc.webcontainer.port=5335
• com.ibm.pvc.webcontainer.port.secure=5336
In addition, modify /pconsole/lwi/conf/webcontainer.properties. Change all occurrences of
5336 to the secure port you want to use.
Console security
By default, the IBM Systems Director Console for AIX provides a Secure Sockets Layer (SSL)
certificate that enables HTTPS connections between the IBM Systems Director Console for AIX
and the web browser client.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explore the console interface and how we log in.
Details — Provide an overview of the Console main interface. The default access is SSL, even if
non-SSL port 5335 is selected.
Additional information —
Transition statement — Let us break down the pconsole graphic user interface into its
components.
Uempty
Work area
Notes:
Toolbar
The toolbar and banner area displays a common image across IBM System Director Console for
AIX installations. The Console toolbar provides the following functions:
• Displays user name, for example, Welcome root
• Help
• Logout
Help is available for the entire console or for a specific module in the console. To access console
help, perform the following steps:
• Select Help on the console toolbar. The help is displayed in a separate browser window.
• In the Help navigation tree, select the help set you want to view. For example, select Console
help to view topics that provide information for new console users. Use the console controls as
needed. To access help for a module on a page, on the title bar for the module, click the ? icon.
This icon is displayed only if help is available for the module. The help is displayed in a separate
browser window.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Navigation area
The Navigation area provides a tree to the tasks that are available in the console. Tasks are
grouped into organizational nodes that represent categories of tasks. For example, OS
Management or Settings, are organizational nodes. The organizational nodes can be nested in
multiple levels.
The navigation tree displays only tasks to which you have access. This is controlled by the Console
Roles and Role-based Access Control authorizations.
In this area, the following task categories can be accessed:
• Welcome
• My Startup Pages
• OS Management (AIX settings)
• Health
• Settings (Console settings)
When you select a task in the navigation tree, a page that is containing one or more modules for
completing the task is displayed in the work area.
Work area
When you initially log in to the console, the work area displays a Welcome page. After you launch a
task from the navigation tree, the contents of the task are displayed in a page in the work area. A
page contains one or more console modules that are used to perform operations. Each console
module has its own navigation controls. Some pages include a control to close the page and return
to the Welcome page.
Startup pages
Regular pconsole users might want to set up startup pages at login, rather than seeing the
Welcome page every time. To do this, simply select the page that you are interested in from the box
in the upper right hand area of the screen. Select add to my start-up pages. The next time you log
in, the page will be displayed in a tab.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Console applications
IBM Power Systems
Notes:
A number of applications exist within pconsole:
• Console management
This is the core of the application. Menu options are similar to SMIT but in a redesigned new
layout.
• Portlets/Modules
These are facilities within pconsole that provide system information and health details.
• Classical SMIT
Very useful for those who still prefer the look and feel of traditional SMIT.
DCEM logging
System Director Console places DCEM logs in $HOME/dcem/logs/dcem.log.
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
An example DCEM.log:
------------------------------------------------------------
Command name: Unspecified
Default user: root
Command definition:
export PATH=\$PATH;uname -a
Started: Tue Oct 14 17:06:34 2014
Ended: Tue Oct 14 17:06:35 2014
Successful targets:
DSH nodes:
statler.lpar.co.uk
waldorf.lpar.co.uk
Failed targets:
none
Targets not run:
none
Status:
Command execution completed.
------------------------------------------------------------
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
fileset
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Using system
management tools in AIX
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 2. AIX system management tools 2-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 3. AIX software installation and maintenance
Estimated time
01:15
References
Online AIX 7.1 Information
SG24-7910 IBM AIX Version 7.1 Difference Guide (Redbooks)
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ib
m.aix.base/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AIX media
IBM Power Systems
AIX InfoCenter
Notes:
Each of the products that are listed in this visual has a program ID number. At the time of
publication they were:
AIX v7.1 standard edition; program ID number: 5765-G98
• AIX v7.1 AIX Base
• AIX v7.1 Expansion Pack
• AIX v7.1 InfoCenter (DVD)
• AIX Toolbox for Linux
• Mozilla Firefox Browser
For virtual environments, a PowerVM license is required. PowerVM standard edition program ID
number: 5765-PVS. The following software is supplied:
• Virtual I/O Server V2.2
• Virtual I/O Server Expansion Pack
Uempty PowerVM Enterprise Edition also comes with the VIOS software. The Enterprise Edition is
everything the Standard Edition is plus it enabled Live Partition Mobility and Active Memory
Sharing.
The AIX Expansion Pack is a collection of extra software that extends the base operating system
capabilities. It contains filesets such as:
• Open Secure Sockets Layer (OpenSSL)
• Java 32- and 64 Bit
• iSCSI Target Device Driver
• List of Open Files (LSOF) and many more
The IBM Knowledge Center contains a list of support guides and help documentation. It is also
available online:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.base/kc_welcome_71.h
tm
Also, available online in the AIX toolbox (open source) filesets
http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define exactly what software is available for AIX.
Details — Go through the core software stack available for Power Systems.
Additional information —
Transition statement — Let us define the structure of an LPP package.
Uempty
LPP
Base operating
system component
bos
Package
Base networking
bos.net package
TCP/IP collection
bos.net.tcp of filesets
bos.net.tcp.server
Fileset
TCP/IP server fileset
‘the smallest unit’
Notes:
• 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, and 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: restore –Tvf <package> or extracted with restore –xvf <package>. (The backup and
restore utilities will be covered later in the course).
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
For example: To list the contents of bos.alt_disk_install.rte fileset contained in AIX 7.1 TL03
SP03:
# restore -Tqvf U859716.bff
New volume on U859716.bff:
Cluster 51200 bytes (100 blocks).
Volume number 1
Date of backup: Tue Dec 3 04:47:18 2013
Files backed up by name
User BUILD
0 ./
6263 ./lpp_name
0 ./usr
0 ./usr/lpp
0 ./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.rte/7.1.3.15
157942
./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.rte/7.1.3.15/liblpp.a
0
./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.rte/7.1.3.15/inst_root
8640
./usr/lpp/bos.alt_disk_install/bos.alt_disk_install.rte/7.1.3.15/inst_root/libl
pp.a
259559 ./usr/lpp/bos.alt_disk_install/bin/altlib
249318 ./usr/lpp/bos.alt_disk_install/migration/alt_disk_mig_lib
33476 ./usr/lpp/bos.alt_disk_install/migration/alt_disk_mig_posti
136621 ./usr/lpp/bos.alt_disk_install/migration/alt_disk_mig_prei
6548 ./usr/sbin/alt_blvset
54357 ./usr/sbin/alt_disk_copy
63768 ./usr/sbin/alt_disk_mksysb
46236 ./usr/sbin/alt_rootvg_op
14936 ./usr/lib/instl/jfs2j2
8577 ./usr/lpp/bos.alt_disk_install/bin/alt_import_oldvgs
40981 ./usr/sbin/nimadm
9727 ./usr/lpp/bos.sysmgt/nim/methods/c_alt_disk_install
total size: 1096949
files archived: 20
Note: This is the only way, in AIX, to see which files are located within an LPP fileset before
installation.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Software bundles
IBM Power Systems
# cat /usr/sys/inst.data/sys_bundles/openssh_server.bnd
[ ... ]
I:openssl.base
I:openssl.license
I:openssl.man.en_US
I:openssh.base.server
I:openssh.man.en_US
Notes:
Since there are thousands of filesets, having to determine which individual fileset you want on your
machine could 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 can vary from AIX version to AIX version.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• There are four distinct software levels and management for AIX:
– Base level
– Technology level (TL)
– Service pack (SP)
– Interim fixes
Fix Packs
Interim
Base Technology + Service packs fixes
AIX Level level
(Contain APARs)
Notes:
Base AIX level is OS version and release, as first installed.
Maintenance:
• Technology level (TL): A TL is a major maintenance update and contains fixes and functional
enhancements. TLs are released twice per year. The first TL is restricted to hardware features
and enablement, in addition to software service. The second TL includes new hardware
features and enablement, software service, and new software features, making it the larger of
the two yearly releases. Each TL is supported for up to two years from the introduction of the
update. This means that clients with a Software Maintenance Agreement for the AIX OS are
able to contact IBM support for defect support during that two-year period without having to
move up to the latest Technology Level update. In previous versions of AIX, Technology levels
were referred to as Maintenance Levels (MLs). The terms are often still used interchangeably.
• Service pack (SP): SPs contain service-only updates, also known as Program Temporary
Fixes (PTF), that are grouped together for easier identification. SPs are released between
Technology Levels and contain fixes for highly pervasive, critical, or security-related issues.
Service Packs are cumulative.
Uempty • Interim fixes (ifix): Generally, this term refers to a certified fix that is generally available to all
customers between regularly scheduled fix packs or other releases. It can contain fixes for one
or more product defects (APARs). Specifically for AIX, the term Interim Fix (IF) is used as a
replacement for emergency fix or efix. While the term emergency fix is still applicable in some
situations (a fix given in the middle of the night with minimal testing, for example), the term
Interim Fix is more descriptive in that it implies a temporary state until an update can be applied
that has been through more extensive testing. IF fixes often rectify security vulnerabilities.
• Authorized Problem Analysis Reports (APARs): A formal report to IBM development, of a
problem that is caused by a suspected defect in a current unaltered release of an IBM program.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the tiers of AIX software levels.
Details — Explain the details in the slide and notes.
Additional information — Ensure that all students are aware that once they build an AIX system,
their first task should be to bring it up to the latest TL and SP level.
Transition statement — Let us see how to discover the installed level (technology level, and
service pack) of the system.
Uempty
# oslevel -s
7100-03-04-1441
Service Pack
AIX Level Release date
VRMF for example, 41st week
in 2014
Service Pack
Technology
Level
• To upgrade from one AIX version and release to another (for example,
AIX 6.1 to AIX 7.1) a migration must be performed.
• New TLs or SPs are applied through updates.
Notes:
The oslevel command reports the level of installed AIX. With the -s option it provides detail in
dash delimited fields:
• AIX version and release
• Technology level
• Service pack
• Service pack release date, which is coded as the two-digit year followed by the two-digit week in
the year.
The visual shows 7100-03-04-1441. This means that the system is level AIX 7.1, technology level
3, service pack 4; and that the SP was released the 41st week of 2014.
Service packs and technology level fixes are applied to a running system. To update the system
with a new level, for example, from AIX 6.1 to 7.1, a new migration update must take place. This
involves system downtime.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — How to report the current OS level of the system.
Details — Explain the output of oslevel-s command. Ensure that they understand the difference
between migrating and updating the system.
Additional information —
Transition statement — How do we perform software and installation maintenance?
Uempty
Notes:
The lslpp and installp commands are vital for interacting, installing, and maintaining software on
AIX.
The rpm and geninstall commands are relatively new. These commands were introduced in AIX
5L as part of the AIX affinity for Linux applications, which included support for other software
formats like RPM and ISMP (InstallShield MultiPlatform).
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide an overview of software and installation maintenance.
Details — 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).
Additional information —
Transition statement — Before we show how to install software, let us explain the concept of a
software repository.
Uempty
Software repository
IBM Power Systems
[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
Notes:
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 table of contents (.toc) file
This is a mandatory file that is required for installing and updating packages on AIX. If the
command-line installp is used, then the user must manually create the .toc file. This is
done by using the inutoc command. To create a .toc file in the current directory, type:
inutoc. SMIT automatically creates a .toc file when copying software files to disk and before
installing LPPs.
• Difference between bffcreate and gencopy
The bffcreate utility works with installation image files in backup file format (bff) only. The bff
format is the native AIX software packaging. This is also often referred to as installp format
because the installp utility is used to install software that uses this format.
The gencopy utility works with software products of various packaging formats (installp, RPM,
ISMP).
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the concept of a software repository.
Details — Refer to the details in the visual and notes. Go through the example that is explaining
how to copy the contents of an AIX CD to disk.
Additional information —
Transition statement — Let us explain software states, apply, and commit.
Uempty
Software states
IBM Power Systems
7.1.0.1 Saved
7.1.0.1
bos.perf.tools
Action: Apply Committed
7.1.0.2 Reject
7.1.0.2 Applied or
Commit
7.1.0.2
Committed
© Copyright IBM Corporation 2009, 2015
Notes:
• Committed state and the initial installation
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 that there is only one level of
that software product that is installed on your system.
• Applied state versus committed state for maintenance
When you are installing a set of fixes or upgrading to a new technology level on your system,
you have the option of installing the software either in the committed state or the applied state.
The applied state allows you to maintain two levels of the software on your system. When
software is installed in the applied state, the older version is saved on the disk and is
deactivated, while the newer version is installed and becomes the active version.
The applied state gives you the opportunity to test the newer software before committing to its
use. If it works as expected, then you can commit the software, which removes the old version
from the disk. If the newer version is causing a problem, you can reject it, which removes the
newer version and reverts back to the old version.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the applied and committed states.
Details — Go through the process of applying, committing, and rejecting software.
A fix can be applied only to a fileset that is in a committed state. If the fileset is in an applied state,
you must first commit that previous level before applying the new level.
Additional information —
Transition statement — Let us see how we list the version and states of AIX installed software.
Uempty
Notes:
The lslpp command displays information about installed filesets or fileset updates. Each fileset has
a version number that is associated with it (in the format of Version.Release.Modification.Fix), a
state code, and a type code.
For the example of:
bos.net.tcp.client 7.1.3.16 C F TCP/IP Client
• The version and release is 7.1
• The mod level is 3
• The fix level is 16.
The following two codes that represent the state and type of fileset have legends for the codes at
the bottom of the lslpp -L report.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to list the level and states of an LPP fileset.
Details — Review the lslpp command and associated output.
Additional information — Do not forget to point out State and Type codes. You might want to
explain some other lslpp flags.
Transition statement — Let us see how to find out what files are in an LPP and what LPP a file
belongs to.
Uempty
Notes:
The lslpp command has many useful flags. It is also possible to see when a particular LPP was
installed by 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 prints out 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.1.0.0
/usr/sbin/shutdown bos.rte.control 7.1.0.0
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to find out what files are in an LPP and what LPP a file belongs to.
Details — Introduce the –f and –w flags to the lslpp command. Some users might find
which_fileset useful so I included it in the student notes as supplement information only.
Additional information — alex.grumpy.rte is an application that is written in C and packaged as
an LPP fileset. Many development organizations package their own products into LPPs. If you know
how to, then explain it to the students. If not, just proceed.
Transition statement — Let us see how to install new software.
Uempty
• smit install_all
Install and Update from ALL Available Software
[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]
Notes:
There are two fast paths worth remembering when it comes to software and SMIT:
• install_all to install new software
• update_all to update current software
Before the screen shown in the visual, you are asked to select the “INPUT device / directory for
software”. The input device could be tape (/dev/rmt0), optical media (/dev/cd0), or a directory.
The period (.) in the example indicates the directory that 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.
If you don't change the ACCEPT new license agreements field to yes, then the software is not
installed. You always must change this field before the installation.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to install software on AIX.
Details — Go through the SMIT panel. Highlight the key fields:
•INPUT device / directory for software
•SOFTWARE to install
•PREVIEW only?
•COMMIT software updates?
•SAVE replaced files?
•AUTOMATICALLY install requisite software?
There is an option for updating WPAR software which is not shown on the visual.
Additional information — Optionally, but recommended, explain that .toc files are created
automatically when using SMIT.
Transition statement — Let us see how to install software by using the command line.
Uempty
Installing software using command line:
Examples
IBM Power Systems
• installp
-a (apply), -c (commit), -p (preview), -g (apply prerequisites), -X
(expand file systems, if needed), -Y (accept license agreements),
-d (device or directory location of software), -q (quiet mode)
# installp -acpgXYd . bos.rte.install
# installp -acpgXYd /TL03_SP04 all
• geninstall
-I (use installp flags, as described above), -p (preview), -d
(device or directory location of software)
# geninstall -I "-acgXY" -p -d . bos.rte.install
# geninstall -I "-acgXY" -p -d /TL03_SP04 all
Notes:
The installp command handles software that is packaged in the traditional AIX bff format. The
geninstall command determines the type of packaging and start the appropriate utility to handle
the selected packages. For example, it would start 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 started 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.
•-d <device or directory>
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
In addition to 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 by 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 that are combined with the industrial strength foundation and performance advantages
that are afforded to native AIX applications.
Quick guide to RPM:
• To install: rpm -i <packagefilename>
• To upgrade (works for installation as well): rpm -U <packagefilename>
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce RMP and Linux affinity within AIX.
Details — Go through the details in the visual and notes.
Additional information — 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.
Transition statement — Let us see how to update the system.
Uempty
• Ideally, all systems should be at the latest fix pack (TL and SP level).
• IBM recommends installing the complete fix pack.
• System updates can be applied through smit update_all or using
geninstall or installp commands.
Some items
# smitty update_all were removed
for clarity.
* INPUT device / directory for software /updates
* SOFTWARE to update _update_all
PREVIEW only? (update operation will NOT occur) yes +
COMMIT software updates? no +
SAVE replaced files? yes
[...]
Notes:
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 sometime 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.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to patch an AIX system.
Details — Go through the details in the visual and the notes.
Additional information — 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
Transition statement — Let us see an update example that uses the command line.
Uempty
• installp example:
# lslpp -L |grep -i cluster |grep pdf
cluster.doc.en_US.es.pdf 5.4.0.0 C F HAES PDF Documentation
Apply
# installp -aB -d . cluster.doc.en_US.es.pdf
update
# lslpp -L |grep -i cluster |grep pdf (-aB)
cluster.doc.en_US.es.pdf 5.4.1.0 A F HAES PDF Documentation
Note: installp –s lists all Applied software on the system
OR
# installp –c all Commit all
applied
Installation Summary software (-c)
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
cluster.doc.en_US.es.pdf 5.4.1.0 USR COMMIT SUCCESS
Notes:
The visual shows a fileset update being applied to cluster.doc.en_US.es.pdf. This can be done
with system management tools like SMIT, 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).
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show updates from the command line.
Details — Point out that it is often useful to first apply updates and test before committing them,
especially when installing TLs/SPs.
Additional information —
Transition statement — Let us see how we list fixes.
Uempty
Notes:
Fixes displayed with the instfix –i command are installed through Technology Level and Service
Pack updates. In previous versions of AIX, interim fixes, between Maintenance 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.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to list fixes (APARs) installed on the system.
Details — instfix is still a useful command for listing installed fixes on the system.
Additional information —
Transition statement — How do we patch the system when we are at the latest TL and SP?
Uempty
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce ifix management.
Details — Go through the details in the visual and the notes.
Additional information — The 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.
Transition statement — Let's see how we can remove software.
Uempty
• # smit remove
Remove Installed Software
[Entry Fields]
* SOFTWARE name [cluster.es.cspoc.cmds] +
PREVIEW only? (remove operation will NOT occur) yes +
REMOVE dependent software? yes +
EXTEND file systems if space needed? no +
DETAILED output? no +
[ ... ]
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to remove software from AIX.
Details — Go through the details in the visual and notes.
Additional information —
Transition statement — Let us see how to recover from broken, inconsistent filesets.
Uempty
# installp -C
Notes:
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 by using installp –u <fileset>.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to recover from broken, inconsistent software states.
Details — Go through the example in the visual and notes.
Additional information —
Transition statement — Let us introduce SUMA.
Uempty
Notes:
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 not installed by default and has prerequisites of bos.ecc_client.rte and
Java6.sdk.
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 that is spent on system administration to perform
these tasks.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce SUMA.
Details — 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. This is the main reason many customers
do not use it.
Additional information —
Transition statement — Let's see the task configuration details.
Uempty
• Base configuration
– # smit suma_config_base
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] #
Notes:
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 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 by using the lppmgr command.
The global configuration settings can be viewed from the command line, with the suma -c
command.
In AIX 7.1, use of HTTP or HTTPS proxy connections requires that the ECC service connection be
configured. This is shared with Service Agent and Inventory Scout.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show SUMA base global configuration.
Details — Show the configuration details. Highlight the main fields that you think are of interest and
might consider changing. The HTTP proxy configuration is of interest to facilities that want to use
SUMA but does not allow direct connection to the IBM server.
Additional information — 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.
Transition statement — Let us look at some command-line examples.
Uempty
Notes:
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:
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
0 23 * * 3 _SUMA=cron /usr/suma/bin/suma -x 1
The output of command:
# suma -l
1:
DisplayName=
Action=Download
RqType=TL
RqName=6100-09
RqLevel=
PreCoreqs=y
Ifreqs=y
Supersedes=n
ResolvePE=IfAvailable
Repeats=y
DLTarget=/aix/FIXES
NotifyEmail=root
FilterDir=/aix/FIXES
FilterML=6100-09
FilterSysFile=localhost
MaxDLSize=-1
Extend=y
MaxFSSize=-1
For further information, see the SUMA man page.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
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
On the My IBM Profile page, click Register to create a new account.
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
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
Notes:
Checkpoint solutions
IBM Power Systems
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 answers are Applied state and Commit state.
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
AIX software
installation and
maintenance
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 3. AIX software installation and maintenance 3-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 4. System configuration and devices
Estimated time
00:45
References
Online AIX 7.1 Information
AIX Version 7.1 Operating System and Device
Management
Note: References listed as Online are available through the IBM Knowledge
Center at the following address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.b
ase/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
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 might result in
data corruption.
An AIX partition does not need to have any real devices. In today's Power Systems environments,
virtual LPARs are fast becoming the norm. Virtualization is a large topic and is covered in a
separate LPAR and virtualization education track. It is beyond the scope of the course.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
prtconf (1 of 2)
IBM Power Systems
Notes:
prtconf is a useful command that displays an overview of the system configuration. This is
particularly useful for documentation purposes. One should run this command regularly and save or
print the output.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
prtconf (2 of 2)
IBM Power Systems
INSTALLED RESOURCE LIST
Notes:
The last function prtconf performs is to run the lscfg command as shown in the visual. Although
the prtconf –v flag can be used to display detailed vital product data (VPD) information, the output
on the previous page is omitted. To get around this problem, simply make a copy of the prtconf
script to prtconfVPD and append a –v flag to the last lscfg command at the end of the script.
As follows:
# tail `which prtconf`
done
fi
#devices information
lscfg ######## APPEND –v here !!! ###########
fi
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
lscfg
IBM Power Systems
• lscfg can be used to display vital product data (VPD) information for
devices.
– IBM customer engineers (CEs) need this to order and replace failed
components.
Physical
location code
# lscfg -v -l ent4
ent4 U5877.001.00H0301-P1-C5-T1 2-Port
10/100/1000 Base-TX PCI-Express Adapter (14104003)
VPD
2-P NIC-TX PCI-e:
information
EC Level....................D76567
Part Number.................46K6601
Manufacture ID..............YL1026
FRU Number..................46K6601
Network Address.............00145E76B484
ROM Level.(alterable).......EP0170
Hardware Location Code......U5877.001.00H0301-P1-C5-T1
Notes:
The lscfg command displays configuration, diagnostic, and vital product data (VPD) information
about the system.
Use the lscfg command to display vital product data (VPD) such as part numbers, serial numbers,
and engineering change levels. VPD data is required for hardware engineers when they need to
order replacement parts due to failures.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
lsdev
IBM Power Systems
# 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)
Child
devices
Device state
Locating the
# lsdev –Cl cd1 –F parent parent
ide0 device
Notes:
The lsdev command displays information about devices in the device configuration database.
The -C flag requests information about all the customized devices. Newer versions of AIX assume
customized devices if neither -P nor -C are coded. 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.
A -P flag displays information about a device that is supported by the system. Any combination of
the -c Class, -s Subclass, and -t Type flags selects a subset of the supported devices.
Commonly used classes include disk, cdrom, adapter, and if (interface).
A simple script that can be useful in seeing the full parentage of a device is:
# cat parent.device
DEV=$1
while test $? -eq 0
do
printf "$DEV "; DEV=`lsdev -Cl $DEV -F parent`
done 2> /dev/null
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
The lsattr command displays information about the attributes of a given device or type of device.
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 might not be allowed when the device is in the available state. When
changing the device characteristics, you can supply the flags either on the command line, or in the
specified -f <File> flag.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Device states
IBM Power Systems
• 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 remains known by its device driver.
Notes:
Device states
• Undefined is not a state one can see assigned in the system, more of a reference statement. It
refers to a device that 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 means that the device is configured, but not available for use by applications.
• 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.
cfgmgr
The cfgmgr command configures devices and optionally installs device software into the
system. It can be run at any time.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# 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.
# mkdev -l rmt0 The Kernel references Certain devices like
rmt0 Available the tape device tapes can behave in
through the major different ways.
# rmdev -l rmt0 -d number (37).
rmt0 deleted
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Device addressing
IBM Power Systems
• Both physical and AIX codes can be seen side by side with:
– lsdev –CHF "name, status, physloc, location"
Notes:
Every device is assigned a physical location code when it is attached to the system. These codes
are critical. If a device has a problem such as a disk 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 Systems, there were only AIX location codes, and they
remain today for legacy purposes. On POWER based processor servers that can be partitioned,
you need to use physical location codes.
Note
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
System planar (P1), Card slot No 4, 2nd port, adapter is in the CEC
Planar 1 (P1), PCI slot No 4, 2nd port, SCSI ID 8,0, disk is in an attached SCSI 7311-D 20
I/O Drawer.
System planar (P1), Card slot No 3, Port 1, W = WW unique name of an FC adapter (where
the FC adapter is in a remote storage subsystem), L = LUN ID. The disk is a logical
device (identified by the LUN ID) in the remote storage subsystem.
Notes:
The visual 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 CEC within the system enclosure.
• The model number for a CEC is always: 001.
• DNWGGRX is the serial number of the CEC.
Power Systems usually has I/O expansion drawers, or in the case of the larger machines,
expansion frames that contains I/O drawers. U7311.D20 is a popular remote I/O drawer (RIO) for
low- to mid-range systems. 6516D3 is the serial number that is assigned to the drawer.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Teach students how to read physical location codes.
Details — Go through the examples in the visual. Point out the machine type and model (MTM) and
serial portion of each location code. Point out the planar ID. Compare the remaining location code
positions for devices, which are integrated on the planar versus those that are accessed through
the adapter; specifically, point out the “card” portion of the code. Explain how the final part of the
location code varies widely according to the type of device. Explain the examples that are shown.
Additional information —
Transition statement — It is likely that students will be working with virtual partitions. Therefore, let
us briefly look at a virtual devices code example.
Uempty
– VIOS partition
vhost0 U8204.E8A.652ACD2-V1-C12 Virtual SCSI Server Adapter
Virtual Server adapter, Virtual (LPAR) ID 1, virtual card slot (Adapter ID) 12
Notes:
Virtual devices are assigned location codes in a similar format to physical devices. The format is:
Unit_type.Model_no.Serial_no-virtual_planar_number-virtual_card_slot_number-[port]
-[LUN]
The visual shows a VIOS presenting a virtual disk (hdisk1) to a VIO Client. In order to do this, 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.
The vhost device in the VIOS symbolizes the virtual server adapter. In the example: V1 represents
a virtual device with an assigned ID of one. C12 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. In the example, V2 again
represents a virtual device with an assigned ID of two. C12 represents the virtual card slot number,
which is also equal the adapter ID as defined on the HMC. T1 specifies the port number of the
adapter.
The client disks that are associated with the virtual client adapter will always inherit the location
code definition plus one more field, the LUN ID (L81000000000). In this example, eight is the SCSI
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
ID of the physical disk in the VIOS. One represents the first disk on the adapter to be presented to
the client.
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
System configuration
and devices
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 4. System configuration and devices 4-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 5. TCP/IP networking
Estimated time
00:40
References
Online AIX Version 7.1 System Management: Operating system
and device management
AIX Version 7.1 Networks and communication
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.b
ase/kc_welcome_71.htm
Unit objectives
IBM Power Systems
Notes:
MAC
Address
# lsdev -Cl ent0
ent0 Available 01-08 10/100/1000 Base-TX PCI-X Adapter
# lscfg -v -l ent0 |grep Network IP addresses
are assigned to
Network Address.............001125BF9018 the interfaces.
In this case,
# lsdev -Cc if en0.
Notes:
• Brief history of Ethernet
The original Ethernet is called Experimental Ethernet today. It was developed by Robert
Metcalfe in 1972 (patented in 1978) and was based in part on the ALOHAnet protocol. The first
Ethernet that was generally used was DIX Ethernet (known as Ethernet II) and was derived
from Experimental Ethernet. Today, there are many different standards, under the umbrella of
IEEE 802.3, and the technical community has accepted the term Ethernet for all of them. The
standardization for 40 Gbps and 100 Gbps Ethernet (IEEE 802.3ba) was completed in June
2010. For further information, see http://www.ieee802.org/3.
• Configuration of adapters and interfaces
In AIX, when cfgmgr discovers an Ethernet adapter, it creates an ent# device object to
represent that adapter in the ODM customized device database (the numeric suffix is
incremented for each instance of that type of adapter). cfgmgr Runs a method (a program)
which does additional configuration that is specific to the type of adapter. In the case of an
Ethernet adapter, the method creates two interface devices, en# and et# (where the numeric
suffix always matches the numeric suffix of the adapter upon which they are based). The en#
interfaces use the DIX Ethernet protocol and frame structure. The et# interface uses the IEEE
Uempty 802.3 Ethernet protocol and frame structure. Of course, all of these devices are also defined to
the kernel.
The interfaces are initially placed in a defined state without any IP configuration. When you
configure the interface with an IP address and netmask, the interface state is changed to
available.
These interfaces are not interchangeable. An interface that uses IEEE 802.3 cannot talk to an
interface on another machine that is using DIX. A common error is to accidentally configure et0
instead of en0. Since most hosts on the local network use only DIX, the misconfigured machine
cannot talk to any of them. Some routers dynamically adjusts to whichever format they receive.
• Ethernet adapter support on AIX
- 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
Almost all cases, on AIX, you will configure the en (DIX) interface (et interfaces are rarely (if at all)
used).
Note
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.
Instructor notes:
Purpose — Provide an introduction to Ethernet adapters.
Details — Provide a little Ethernet history to the students. Give a brief overview of the adapter
support in AIX. Ensure that students understand that the adapter is both a layer 1 and 2 device, and
that for each adapter, there are two layer 3 interfaces, enX and etX. In the visual, en0 is shown as
available. Explain that it is made available when an IP address is assigned to it.
Additional information — Traditional copper (TX) is inexpensive. However, to go further distances
and higher speeds, Fiber is required.
Transition statement — Once the interface devices have been created, we are ready to configure
the interfaces. How is this typically done in AIX?
Uempty
• There are many ways. However, in most cases you start with:
# smit mktcpip
A one stop
Minimum Configuration & Startup shop for TCP/IP
config on AIX.
To Delete existing configuration data, use Further Configuration
menus
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* HOSTNAME [waldorf]
* Internet ADDRESS (dotted decimal) [10.47.1.18]
Network MASK (dotted decimal) [255.255.0.0]
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) [10.47.1.33]
DOMAIN Name [lpar.co.uk]
Default Gateway
Address (dotted decimal or symbolic name) [10.47.0.1]
Cost [0] #
Do Active Dead Gateway Detection? no +
Your CABLE Type N/A +
START Now no +
Notes:
AIX provides a Minimum Configuration and Startup SMIT panel for configuring TCP/IP on the
system. The command with 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 ifconfig 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 route command to update the routing table.
Note
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.
[Entry Fields]
Network Interface Name en1
INTERNET ADDRESS (dotted decimal) [192.168.0.1]
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 +
Notes:
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
Note
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.
Note that you need to separately configure name resolution for the interface.
interface objects
chdev /etc/rc.net
inet0 object (bootup_option=no)
mkdev
rmdev
netinet kernel
extension
netstat or ifconfig
Notes:
Introduction
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 and chdev
SMIT simply runs high-level commands, which we can run ourselves. Specifically, it runs
(depending on the situation) either the 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.
Management of network-related information
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
Uempty 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.
Displaying the network configuration
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.
Instructor notes:
Purpose — Describe the relationship between the SMIT, the ODM, and the kernel.
Details —
Additional information — The diagram lists both interface objects and the inet0 object as being
updated. Here are examples of the type of information that is kept in each type of object:
• Network adapters (ent, tok, atm, …)
- Alternate hardware address
- Media speed
• Network interfaces (en, et, tr, at, …)
- IP address
- Netmask
- Aliases, if any
- Maximum transmission unit (MTU)
• netinet kernel extension (inet0)
- Hostname
- Static routes
- Authentication methods
Transition statement — The current slide emphasizes how the ODM is used at system restart to
reestablish our network configuration in the kernel. What if you do not want to use this method? Let
us look at the system startup procedures in more detail.
Uempty
TCP/IP startup
IBM Power Systems
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)
Notes:
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 can be started from scripts that are listed later in the inittab.
Instructor notes:
Purpose — Highlight how TCP/IP starts-up on AIX.
Details — Give the audience an overview of the critical TCP/IP files that are used during start-up.
Additional information —
Transition statement — Let us look at the different user interfaces for managing our network
definitions.
Uempty
• If the direct method is used, in order to make persistent through reboot, place
the commands at the end of:
– /etc/rc.net (overrides any matching ODM configuration)
– /etc/rc.bsdnet (if inet0 bootup_option=yes)
Notes:
As well as SMIT, TCP/IP configuration can be driven from the command line. There are two ways to
handle this:
• The AIX way, in which configuration is stored in the AIX internal database (ODM). This way, the
configuration remains after shutdown/restart.
• 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.
Instructor notes:
Purpose — Show how to configure AIX from the command line.
Details — It is important for students to understand the different configuration methods available on
AIX.
Sometimes, it is preferable to do some things manually, like routing. One real world example: In a
mission critical environment, an AIX server crashed and was subsequently set to reboot. On reboot,
the system did not come up. This happened during hours when only basic first line support staff
were on hand. They were not able to fix the problem. On investigation, a route had become
corrupted in the ODM causing a hard mount to get stuck. The route was not be able to remove from
the ODM by using the standard SMIT panels. This took some time for experienced personnel to
solve. Subsequently, all routing was done manually and documented in the /etc/rc.net file. No
further routing problems occurred.
Additional information —
Transition statement — Let us next look at how we can control name resolution.
Uempty
Name resolution
IBM Power Systems
Notes:
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.
• File sets:
– Server: bos.net.nfs.server
– Client: bos.net.nfs.client
• Server configuration
– Starting and stopping NFS daemons (now and at system restart)
• /usr/sbin/mknfs -B or smit mknfs
• /usr/sbin/rmnfs -B or smit rmnfs
# lssrc –g nfs
biod nfs 352444 active
nfsd nfs 221328 active
rpc.mountd nfs 315524 active
rpc.statd nfs 364738 active
rpc.lockd nfs 258262 active
Notes:
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
Uempty created when file systems are exported on the server. This process is covered in the next
visual.
• The rpc.statd and rpc.lockd daemons work together to main stateful locking. NFS
implements an advisory locking mechanism, meaning if a program, and does not pay any
attention to the locking messages it receives, it can go ahead and access the file. 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 /etc/sm directory, the /etc/sm.bak
file, and the /etc/state file. When restarted, the statd daemon queries these files and tries to
reestablish the connection it had before termination.
The rmnfs command changes the configuration of the system to stop running NFS daemons. It
accepts the same flags as mknfs.
In order to configure an NFS server, you must first decide:
• What directories you want to export
• Which clients you want to have access the directories and files
• The permissions (for example, read-write, read-only) clients will have when accessing the files
Only when the NFS subsystem is activated, by using the mknfs command, can directories be made
available. When the /etc/export file has been configured, the exportfs command is used to
make the directories available for client mounting. The exportfs -a command exports all items
that are listed in the /etc/exports file and automatically copies the entries to the /etc/xtab file.
/etc/xtab file entries are used by the system and always reflect what is currently exported. This
leaves the /etc/exports file available for updating at any time. The /etc/xtab file must never the
edited directly.
An easy way to maintain the NFS export list is to use SMIT or the AIX commands that are issued by
SMIT. These commands are mknfsexp, chnfsexp, and rmnfsexp. The SMT panels will simplify the
creation of otherwise complicated entries in the /etc/exports files. The panel (and the underlying
AIX command) provides an option to specify whether you want to only update /etc/exports or
also export the change to /etc/xtab.
Instructor notes:
Purpose — Provide an overview to NFS.
Details — Go through the details that are provided in the visual.
Additional information — NFS version support is not relevant. The focus, is on NFS version 3,
which is the default.
Transition statement — Let us review what we have covered with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
2. True or False: You can choose to configure either en0 or et0 since they
both map to the same Ethernet adapter port.
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.
Notes:
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
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 DIX).
3. True or False: The core TCP/IP daemons are typically started by /etc/rc.tcpip
at system restart.
The answer is true.
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.
Additional information —
Transition statement —
Uempty
Exercise
IBM Power Systems
TCP/IP
implementation
Notes:
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — End of unit.
Uempty
Unit 6. System startup and shutdown
Estimated time
01:00
References
Online AIX Version 7.1 Operating System and Device
Management
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ib
m.aix.base/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
SMS top-level
PowerPC Firmware
Version AL730_122 firmware menu
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
----------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
Notes:
System Management Services
To boot into SMS, either press the 1 key shortly after partition activation, or set the partition to
specifically SMS boot. To do this, click the Advanced button on activation and set the boot mode to
SMS.
SMS is the Power System firmware menu. The code is shipped with the hardware. This resource
can be used to select the boot device, or change the order of the bootlist and boot the system into
Service mode, if maintenance is required.
Service mode enables the user to run diagnostics or access the system in single-user mode.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Normal mode
– AIX boots into multi-user mode (run level 2).
– Users can log in, the system can be configured, and applications can
start.
– The bootlist command can change the start-up boot device list.
Notes:
Start-up modes that are listed in the HMC LPAR activation Advanced panel:
• 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 in service mode by using the
default boot list that is built into the system firmware. This mode is normally used to either boot
to diagnostics from a hard disk, 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 by 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.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
To activate
into SMS
Notes:
Activating a partition
To activate a partition from the HMC Server Management application, select the partition name and
choose Activate from the menu. An Activate Logical Partition screen appears from which the user
can select the start-up profile.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AIX Version 7
Copyright IBM Corporation, 1982, 2013
Console login:
Notes:
Activating a partition (continued)
Partitions can have one or many profiles that are assigned, one of which is the default. Profiles
contain the attributes of the partition such as process and memory requirements, and assigned
devices. A profile must always be specified when starting a partition.
The Activate Logical Partition panel presents you with two options.
• One is to open a virtual console session to your LPAR.
• The other is an Advanced button that enables users to set the start-up mode. A default start-up
mode is contained within the profile.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
/etc/inittab
IBM Power Systems
Notes:
• Overview
The init process uses the inittab to start other processes in the system. The inittab file
designates which programs to run. In this and in the structure of the inittab, it does not differ
much from other UNIX operating systems. But there are some unique aspects to how AIX uses
and works with the inittab.
• Format of entries
The individual line entries in /etc/inittab contain the following fields:
- Id: Up to 14 characters that identify the process.
- Runlevel: Defines the run levels for which the process is valid. AIX uses run levels of 0-9. If
the telinit command is used to change the run level, a SIGTERM signal is sent to all
processes that are not defined for the new run level. If, after 20 seconds, a process has not
terminated, a SIGKILL signal is sent. The default run level for the system is 2, which is AIX
multiuser mode.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how AIX uses the /etc/inittab file.
Details — The students should already be familiar with the inittab. You need to focus on how AIX
differs from other UNIX operating system in its use. Do not explain the structure of the entries. Point
out the items that have call-outs pointing to them, but do not spend a lot of time explaining them in
detail; these are covered in more detail on the following visuals. This slide is basically providing a
context for the topics that follow.
Additional information — The inittab file is reread by the init daemon every 60 seconds. The
telinit q command is only needed if you cannot wait for the next 60-second check. The inittab
is read top to bottom. This is why the wait action is important. There are dependencies in this file
like rcnfs and rctcpip. NFS, stands for network file system, which allows sharing of file systems
across the network. NFS cannot work if the line above it (rctcpip), which starts networking, is not
started and completed. Notice that rctcpip's start action is wait.
Transition statement — How many run levels do we have and is there any run level control over
and above inittab?
Uempty
Notes:
Run levels
Run levels define the behavior of init, and by extension, those processes that 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. The system can be at one of the following run levels:
• 0-9
Tells the init command to place the system in one run level 0-9.
When the init command requests a change to run levels 0-9, it kills all processes at the current
run levels and then restarts any processes that are associated with the new run levels.
• 0-1
Reserved for the future use of the operating system.
• 2
Contains all of the terminal processes and daemons that are run in the multiuser environment.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
In the multiuser environment, the /etc/inittab file is set up so that the init command creates
a process for each terminal on the system. The console device driver is also set to run at all run
levels so the system can be operated with only the console active.
• 3-9
Can be defined according to the user's preferences.
• S,s,M,m
Tells the init command to enter the maintenance mode. When the system enters maintenance
mode from another run level, only the system console is used as the terminal.
• a,b,c,h
Tells the init command to process only those records in the /etc/inittab file with a, b, c, or h
in the run level field. These four arguments, a, b, c, and h, are not true run levels. They differ
from run levels in that the init command cannot request the entire system to enter run levels a,
b, c, or h. When the init command finds a record in the /etc/inittab file with a value of a, b,
c, or h in the run level field, it starts the process. However, it does not kill any processes at the
current run level. Processes with a value of a, b, c, or h in the run level field, are started in
addition to the processes already running at the current system run level. Another difference
between true run levels and a, b, c, or h, is that processes started with a, b, c, or h are not
stopped when the init command changes run levels. There are three ways to stop a, b, c, or h
processes:
- Type off in the Action field.
- Delete the objects entirely.
- Use the init command to enter maintenance state.
Modifying /etc/inittab
The /etc/inittab file lists the processes that init starts, and it also specifies when to start 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 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, 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, type:
chitab { [ Identifier ] : [ RunLevel ] : [ Action ] : [ Command ] }
- Example: chitab "tty002:4:respawn:/usr/sbin/getty /dev/tty"
Run level control scripts
Run level scripts enable system administrators to start and stop selected applications and services,
or perform tasks during system start-up, shutdown, or during run level change. Run level scripts
Uempty need to be created in the subdirectory of /etc/rc.d that is specific to the run level. Scripts
beginning with K are stop scripts, while scripts beginning with S are start scripts. Below is an
example (recursive) listing of the /etc/rc.d directory on an AIX system with open ssh installed:
/etc/rc.d # ls -R
init.d rc rc2.d rc3.d rc4.d rc5.d rc6.d rc7.d rc8.d rc9.d
./init.d:
./rc2.d:
Ksshd Kwpars S00ct_boot Ssshd
./rc3.d:
./rc4.d:
./rc5.d:
./rc6.d:
./rc7.d:
./rc8.d:
./rc9.d:
By default, there is not much in AIX that uses rc.d scripts and what there is only for the AIX default
run level of 2.
The traditional AIX design is to place startup scripts as regular entries in the inittab. The SRC
groups provide an easy way to stop and start groups of subsystems without playing with run levels.
The shutdown command handles stopping the subsystems and (traditionally) any special shutdown
logic is placed in /etc/rc.shutdown.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce and explain run levels.
Details — Go through the main points in the visual (supporting detail in the student notes). The
inittab control commands are unique to AIX. Try to make them understand the rationale behind the
AIX differences. Remember that the focus is not on teaching everything from scratch, but only on
how AIX is different.
Additional information — Other UNIX systems often have many different predefined run levels, so
the concept of having only run level 2 might seem strange to the students. The other UNIX
operating systems also make heavier use of the /etc/rc.d stop and start scripts.
The only difference (from traditional UNIX) for the telinit argument is the use of M or m as
alternatives to S and s. That is why they are highlighted in the visual.
The most common inittab changes are from software installation and configuration, rather than
manual changes. New software often adds itself to the inittab (or one of the existing startup
scripts) through a method that is part of the file set installation or as part of the logic when
configuring that facility. The itab commands that are listed above provide an easy and safe method
for doing this in a script.
Transition statement — Let us take a closer look at one of the AIX facilities that is used by
inittab entries to start subsystems: the System Resource Controller.
Uempty
Notes:
Purpose of the system resource controller
The system resource controller (SRC) provides a set of commands to make it easier for the
administrator to control subsystems. A subsystem is a daemon, or server, that is controlled by the
SRC. A subserver is a daemon that is controlled by a subsystem. Daemon commands and daemon
names are usually denoted by a d at the end of the name. For example, inetd is a subsystem and
can be controlled through SRC commands. rlogind is a subserver, which is started by the inetd
subsystem as shown in the visual.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the SRC.
Details — The information below might be helpful if students ask for further discussion on the
differences between subsystem groups, subsystems, and subservers.
Subsystem groups: A subsystem group is a group of any specified subsystems. Grouping
systems together allows the control of several subsystems at one time.
Examples are: TCP/IP, NIS, and NFS.
Subserver: A subserver is a program or process that belongs to a subsystem. A subsystem can
have multiple subservers and is responsible for starting, stopping, and providing status of
subservers.
Additional information — Ensure that the students understand the big picture. If the students
have terminals available to them, you might want to have them type in lssrc -a to show them the
grouping. These groupings are established in the ODM.
Transition statement — Let us identify some of the commands that the SRC uses to control the
subsystems.
Uempty
Listing subsystems
IBM Power Systems
Notes:
• Introduction
In this section, we discuss some examples of SRC commands.
• Listing SRC status
The lssrc command is used to show the status of the SRC subsystems. In the example that is
shown on the visual, we are checking the status of all subsystems by using the -a flag and the
TCP/IP group by using the -g flag.
• Specifying a subsystem or subsystem group
The -s and -g flags are used to specify subsystems or subsystem groups, respectively.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the lssrc command.
Details — Go through each example on the visual.
Additional information —
Transition statement — Let us see how we can stop, start, and refresh subsystems.
Uempty
SRC control
IBM Power Systems
• 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.
Notes:
If a change is made to a subsystem configuration, then the subsystem needs to be refreshed. For
example, if the entry for the ftp service is disabled in the inetd.conf file, then the inetd
subsystem needs to be refreshed by using the refresh command. Not all subsystems can be
refreshed. If this is the case, simply use the stopsrc and startsrc commands.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — To show how we can control subsystems.
Details — Go through the examples on the visual.
Additional information —
Transition statement — Let us see how we shut down an AIX partition.
Uempty
Connection closed.
Notes:
Introduction
The smit shutdown fast path or the shutdown command is used to shut down the system cleanly. If
used with no options, shutdown displays a message on all enabled terminals (by using the wall
command). Then after one minute, it disables all terminals, kills all processes on the system, syncs
the disks, unmounts all file systems, and then halts the system.
Some commonly used options
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.
Using the halt command is not the same as using the shutdown -F and using the reboot
command is not the same as using shutdown -Fr. Use the shutdown command if you are not
certain of the safety of using halt or reboot.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Do a fast
shutdown:
shutdown -F
Notes:
From the HMC, the following shutdown options are supported. Generally, best practice is to shut
down AIX from within the partition.
• Delayed: The HMC shuts down the logical partition by 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 ends 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
Uempty partition bypasses messages to other users and other shutdown activities. This option is only
available for AIX logical partitions.
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe how to shut down an AIX partition from the HMC.
Details — Go through the options in the visual. Using your own experience, discuss the relative
merits of HMC versus command line.
Warn students that they should 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.
Additional information —
Transition statement — Let us review with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
2. Which AIX feature can be used to stop and start subsystems and
groups of daemons?
The answer is the System Resource Controller (SRC).
Additional information —
Transition statement —
Uempty
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 6. System startup and shutdown 6-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — End of unit.
Uempty
Unit 7. Basics of configuring logical partitions
Estimated time
00:20
References
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
SA76-0098 Logical Partitioning Guide
SA76-0085 Operations Guide for the HMC and Managed Systems
The following document can be accessed from redbooks.ibm.com:
SG24-7940 IBM PowerVM Virtualization Introduction and Configuration
SG24-7491 IBM Power Systems HMC Implementation and Usage
Guide
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
The objectives list what you should be able to do at the end of this unit.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Partition type
– Select AIX or Linux environment (rather than VIO server).
• Partition name and ID:
– Partitions are assigned an LPAR ID.
– Partitions and profiles have names (easily changed).
• Partition profiles:
– Define characteristics of the partition (such as boot mode).
– Define resource allocated to the LPAR environment:
• Processors
• Memory
• Adapters (devices)
– An LPAR can have multiple profiles.
– LPAR activation must select one profile.
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Memory allocation:
– Recommend a minimum of 512 MB for running AIX
– Allocated in logical memory blocks (LMB)
– LMB size for a server is configurable between 16 MB and 256 MB
• Processor allocation:
– Dedicated (whole processors) or portion of shared processor pool
– Increments in 0.01 processing units
• For each partition, configure for memory and processors:
– Minimum:
• Partition will not start if this amount is not available
• Partition can be dynamically decreased to this amount
– Desired:
• Partition will use up to this amount upon activation if available
– Maximum:
• Partition can be dynamically increased to this amount
Notes:
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 to boot is 512 MB.
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.
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.
Uempty 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+ servers,
each LPAR can have a minimum entitlement of 1/20 of a processor, allowing 20 LPARs per core.
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.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Cover the memory and processor allocations as specified in the profile.
Details — Cover what is in the visual.
Obviously, there is much more than what is covered here, especially when it comes to the virtual
resources, but this is just the basics. The student should attend the virtualization curriculum
(starting with AN11) to get the full training.
Describe the minimum, desired, and maximum settings. Describe the desired versus required
settings for adapters.
Give an example of where the actual processors or memory might be somewhere in between the
minimum and desired settings. For example, if the memory minimum is 2 GB, the desired is 3 GB,
but there is only 2.25 GB available, then the partition would take the 2.25 GB if using shared
processors.
The official AIX minimum memory allocation is 512 MB but this is for a partition with little I/O
resources and it still may fail to boot. In actual practice, you should allocate at least 768 MB or 1 GB
as the minimum. For example, one LHEA logical port requires 102 MB of memory and some
physical adapters require 512 MB. In addition, any applications that are running are likely to need
more memory for the best performance.
Students learn how to design and construct the entire picture when they attend the virtualization
courses.
Additional information —
Transition statement — Let us next look at adapter allocations.
Uempty
Adapter allocation
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Virtual devices
If there is a single physical storage adapter with many disks, it would be good to be able to provide
access to that adapter from multiple logical partitions. This can be done by allocating the physical
adapter to a Virtual I/O Server (VIOS) and then providing the client logical partitions access to the
devices through virtual adapters. The allocation of a virtual adapter is really the creation of virtual
adapter definition.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
Introduction
The first step in creating partitions is to power on your managed system. You do this from the
System Management > Servers 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, you can create Logical Partitions. Select the server and then,
from the tasks menu, run the Configuration > Create Partition > AIX or Linux task to create AIX
or Linux type partitions. Other options are to create a Virtual I/O Server or an IBM i partition.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
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 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.
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.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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.
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
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.
The answers are maximum for the upper limit, minimum for the lower limit, and 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.
3. What is the minimum amount of memory for an AIX V5.3 (or later) partition?
The answer is the recommendation is 512 MB. What firmware enforces is:
128 MB, or if the LMB size of the partition is 256 MB, then the minimum would be
256 MB.
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
More summary information:
• Partition concepts:
- Partition identification with LPAR ID and LPAR name
- Partition profiles contain resource configuration information
• Processors, memory, I/O slots
• Minimum, Maximum, and Desired settings for memory and processors
• Required and Desired settings for I/O slots
• Create Partition wizard leads you through creating partitions and profiles
© Copyright IBM Corp. 2009, 2015 Unit 7. Basics of configuring logical partitions 7-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 8. AIX installation
Estimated time
01:20
References
Online AIX Version 7.1 Installation and migration
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.in
stall/insgdrf-kickoff.htm
SG24-7910 IBM AIX Version 7.1 Difference Guide (Redbooks)
http://www.redbooks.ibm.com/redbooks.nsf/RedbookAbstracts/sg247910.ht
ml?Open
GI11-9815 AIX Version 7.1 Release Notes
http://www-01.ibm.com/support/docview.wss?uid=pub1gi11981500
GI11-9835 AIX Version 7.1 Expansion Pack Release Notes
http://www-01.ibm.com/support/docview.wss?uid=pub1gi11983500
Unit objectives
IBM Power Systems
Notes:
Notes:
When a Power Systems 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 that includes AIX.
AIX 6 and AIX 7 are delivered, by default, on DVD media. Optionally, AIX 6 can also be ordered on
CD (one through eight disks).
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 you can load it into a virtual optical drive that is
served from the VIOS.
• ESS website: (IBM ID is required)
https://www-304.ibm.com/servers/eserver/ess/ProtectedServlet.wss
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.
• Steps:
Assume that a partition and partition profile have already been created.
1. Place the AIX DVD in the drive.
2. Activate the partition to SMS and open terminal window.
3. Select to boot device by using SMS menus in the terminal window.
4. Interact with the AIX installation menus.
Notes:
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 owns 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 that 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.
Multiboot
1. Select Install/Boot Device
Notes:
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.
Select Task
SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )
1. Information
2. Normal Mode Boot
3. Service Mode Boot
Notes:
Once the optical media device is selected, you 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.
Type the number of your choice and press Enter. Choice is indicated by >>>.
88 Help ?
99 Previous Menu
Notes:
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.
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.............New and Complete Overwrite
Disk Where You Want to Install.....hdisk0
3 Security Model.......................Default
+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [0]:
Notes:
The Installation and Settings menu enables you to set the key options and configuration settings to
be deployed during installation.
Method of installation
IBM Power Systems
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
Notes:
• Changing the method of installation
When you select Option 1 in the Installation and Settings menu to change the method of
installation, the Change Method of Installation submenu that is shown in the visual is displayed.
The contents of which depends on the current state of the machine.
• Complete Overwrite Install
On a new machine, New and Complete Overwrite is the only possible method of installation. On
an existing machine, if you want to completely overwrite the existing version of the Base
Operating System (BOS), then you should use this method.
• Preservation Install
Use the Preservation Install method when a previous version of BOS is installed on your system
and you want to preserve the user data in the root volume group. This method removes only the
contents of /usr, / (root), /var, and /tmp. The Preservation Install option preserves page and
dump devices as well as /home and other user-created file systems. System configuration must
be done after doing a preservation installation.
Instructor notes:
Purpose — Define the different installation methods.
Details — Explain each type of installation method. For this course, you should choose New and
Complete Overwrite.
Additional information —
Transition statement — The next setting to consider, is on which disks the operating system is
going to be installed.
Uempty
Installation disks
IBM Power Systems
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 >>>.
Notes:
Selecting installation disks
After you select the type of installation, you must then select the disks that are to be used for the
installation. A list of all the available disks is displayed, similar to the one shown.
This screen also gives you the option to install to an unsupported disk by adding the code for the
device first.
When you finished selecting the disks, type <0> in the Choice field and press Enter.
Instructor notes:
Purpose — Define how disks can be selected for installation.
Details — After booting from an external media or over the network, BOS install announces its
intentions to install the AIX BOS onto the default disks and asks the user if it is acceptable. The
default disks are where the operating system was previously located. If the user does not want to
use the default disk, then the user can select a target disk. All disks that are available are displayed
with a single option to use a supplemental third-party target device. If the supplemental device
option is selected, the BOS install prompts the user to load the device configuration support drivers.
Option 77 on this menu displays the Physical Volume ID, which is what is found in the ODM. This
information is provided in case that a student asks what this option displays.
Additional information —
Transition statement — Let us look how we define the primary language environment.
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
Notes:
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.
Instructor notes:
Purpose — Define how the primary language environment after the installation is set.
Details — 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.
In reality, this screen displays many language options. Users can also create their own specific
combinations by typing 159.
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.
Additional information — 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.
Transition statement — Let us look at the security options.
Uempty
Security Models
IBM Power Systems
1. Trusted AIX............................................. No
88 Help ?
99 Previous Menu
Notes:
Type <1> and press Enter to change the selection for Trusted AIX. Trusted AIX enables Multi Level
Security (MLS) capabilities in AIX MLS is also referred to as label-based security.
As compared to regular AIX, Trusted AIX label-based security implements labels for all subjects
and objects in the system. Access controls in the system are based on labels that provide for an
MLS environment and include support for the following:
• Labeled objects: Files, IPC objects, network packets, and other labeled objects
• Labeled printers
• Trusted Network: Support for RIPSO and CIPSO in IPv4 and IPv6
Note that once you choose this mode of installation, you are not able to go back to a regular AIX
environment without performing an overwrite install of regular AIX. Evaluate your need for a Trusted
AIX environment before choosing this mode of install.
Do not forget standard AIX provides a set of security features to enable information managers and
administrators to provide a basic level of system and network security. The primary AIX security
features include the following:
Attention: Evaluate your need for any security options before making your choice. Additional
information is available in your security documentation.
For more training on AIX installation security options, attend the IBM training course:
Implementing the AIX Security Features (course codes AU47 or AN57).
Install Options
88 Help ?
99 Previous Menu
Notes:
When Graphics Software 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, and pconsole.
The default action, since AIX 5.3, is to create all logical volumes in rootvg by using JFS2 file
systems.
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 useful if you want to clone the image to another system that differs
in type or device layout.
To install more software, select option 5 and press Enter.
Please wait...
Notes:
Before installation, a summary page is displayed. If you are ready to proceed with your options,
select 1 and press Enter to continue and the system installation begins. It takes approximately 1
hour to build the partition from DVD or CD media.
[Entry Fields]
ACCEPT Installed License Agreements yes +
[Entry Fields]
ACCEPT Software Maintenance Agreements? yes +
Notes:
When AIX installation is complete, the user must accept both Software and Maintenance License
agreements, as shown in the visual.
• Post-install tasks:
– Accept the license agreement.
Notes:
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: http://www.ibm.com/support/fixcentral
• What is NIM?
– Centralized Installation and Management of AIX over a network
Client
systems
LPAR 1
Public/Open LPAR 2
NIM Server network
Client definitions
LPAR1
LPAR2
…
Actions:
• Resources are allocated to clients
• Clients are set for a BOS operation
Figure 8-16. AIX installation in a partition using NIM: NIM overview AN14G5.0
Notes:
• Network Install Manager (NIM) introduction
NIM can be used to manage the installation of the Base Operating System (BOS) and optional
software on one or more networked machines. NIM gives you the ability to install and maintain
the AIX operating system, and any additional software, and fixes that can be applied over time.
NIM allows you to customize the configuration of machines both during and after installation.
NIM eliminates the need for access to physical media, such as tapes and optical media, once
the NIM master is loaded. You use the NIM master to load other network clients. System
backups can be created with NIM, and stored on any server in the NIM environment.
The advantage to using NIM in an LPAR environment is that it solves the device allocation
issue. Since AIX might already be installed once on the system before it is shipped, you can
configure this partition to be the NIM master. Or, you can use another AIX system that is the
proper AIX version. One of the optional steps in creating a NIM master is creating a mksysb
(AIX system backup image). You can use this mksysb to install AIX in the other partitions. The
advantage to mksysb is that it copies AIX customizations from the source system.
Instructor notes:
Purpose — Provide a brief introduction to NIM as a prerequisite for AIX installation.
Details — Go through the details in the visual and notes.
Provide a brief introduction to NIM.
Define what a NIM server is, the basic SPOT and lpp_source resources, and how a BOS
installation occurs.
Do not get too involved with NIM as it is a large topic. Refer students to the IBM training NIM class
AN22 as a means to build important NIM skills.
Additional information —
Transition statement — OK, that concludes the high-level NIM introduction. Now, let us define the
configuration steps that are required for a client BOS operation.
Uempty
AIX installation in a partition by using NIM:
Configuration steps
IBM Power Systems
• Note:
– Subsequent installs and updates for the same partition can be
initiated from the NIM master.
– A mksysb restore example is provided in a later unit (Backup and
Restore).
© Copyright IBM Corporation 2009, 2015
Figure 8-17. AIX installation in a partition using NIM: Configuration steps AN14G5.0
Notes:
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 if you were installing from optical
media, except that you would not need 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.
Instructor notes:
Purpose — Define the configuration steps that are required for a BOS installation of an AIX client.
Details — Go through the details in the visual and notes. Keep the details at a high level.
Additional information —
Transition statement — 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)
IBM Power Systems
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
--------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
--------------------------------------------------------
Navigation Keys:
X = eXit System Management Services
-------------------------------------------------------
Notes:
Network boot (remote IPL)
To configure a partition to boot from another system over the network, first boot the partition to SMS
mode. Then, choose Setup Remote IPL (Initial Program Load) from the main SMS menu.
Instructor notes:
Purpose — Show where to initiate a network boot.
Details — This page shows where to access the Remote IPL option (that is, network boot).
Not all SMS versions have menus that look exactly like this. Point out that you need to read the
menu and choose the appropriate item for “Remote IPL” or similar phrase.
Additional information —
Transition statement — The next visual shows the screen that you will see after choosing option 2
from the main SMS menu.
Uempty
Network boot (2 of 7)
IBM Power Systems
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
----------------------------------------------------------
NIC Adapters
Device Location Code
1. Port 1 - IBM 2 PORT 10/100/100 U78A0.001.DNWGCP5-P1-C4-T1
2. Port 2 - IBM 2 PORT 10/100/100 U78A0.001.DNWGCP5-P1-C4-T2
----------------------------------------------------------
Navigation Keys:
X = eXit System Management Services
---------------------------------------------------------
© Copyright IBM Corporation 2009, 2015
Notes:
NIC adapter
Select which network interface to use. The example in the visual shows two ports on the integrated
Ethernet controller.
Instructor notes:
Purpose — Describe what to do from the Remote IPL SMS menu.
Details — The visual shows the screen where you choose which network adapter to use to access
the NIM server.
Additional information —
Transition statement — After selecting the Network adapter, the following menu displays.
Uempty
Network boot (3 of 7)
IBM Power Systems
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
---------------------------------------------------------
Select Network Service
Port 1 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter: U78A0.001.DNGWCP5-C1-C4-
1. BOOTP
2. ISCSI
---------------------------------------------------------
Navigation Keys: X = eXit System Management Services
---------------------------------------------------------
Notes:
Select the Network service: BOOTP.
Note that older firmware levels might not provide an ISCSI option.
Instructor notes:
Purpose — Explain network service selection.
Details —
Additional information —
Transition statement — The visual displays the menu where you specify the network parameters
and the network adapter configuration.
Uempty
Network boot (4 of 7)
IBM Power Systems
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
---------------------------------------------------------
Network Parameters
Port 1 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter: U78A0.001.DNGWCP5-C1-C4-
1. IP Parameters
2. Adapter Configuration
3. Ping Test
4. Advanced Setup: BOOTP
---------------------------------------------------------
Navigation Keys: X = eXit System Management Services
---------------------------------------------------------
© Copyright IBM Corporation 2009, 2015
Notes:
Network parameters
1. Choose option 1 and configure the IP parameters. This screen is shown in the next visual.
2. Then, choose option 2 and configure the adapter settings, such as media speed and duplex
setting.
3. When everything is configured properly, run the ping test (option 3) 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.
Instructor notes:
Purpose — Describe what to do from the Network Parameters SMS menu.
Details — 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.
Additional information —
Transition statement — Let us see the screen if you choose option 1, IP Parameters.
Uempty
Network boot (5 of 7)
IBM Power Systems
IP parameters:
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
---------------------------------------------------------
IP Parameters
Port 1 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter: U78A0.001.DNGWCP5-C1-C4-
1. Client IP Address [10.6.103.64]
2. Server IP Address [10.6.103.1]
3. Gateway IP Address [10.6.103.254]
4. Subnet Mask [255.255.255.0]
---------------------------------------------------------
Navigation Keys:
X = eXit System Management Services
---------------------------------------------------------
© Copyright IBM Corporation 2009, 2015
Notes:
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 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.
Instructor notes:
Purpose — Describe what to enter on the IP Parameters SMS screen.
Details — Do not describe what a subnet mask is, or even much about gateways if the students do
not meet the prerequisite training on this topic. You do not have time for a mini-TCP/IP lesson.
Encourage them to discuss these items with their network administrator if they are not familiar with
them, or recommend that they take a TCP/IP course.
Additional information —
Transition statement — Now, let us see the adapter configuration screen.
Uempty
Network boot (6 of 7)
IBM Power Systems
Adapter configuration:
PowerPC Firmware
Version EL320_040
SMS 1.7 (c) Copyright IBM Corp. 2000,2007 All rights
---------------------------------------------------------
IP Parameters
Port 1 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter: U78A0.001.DNWGCP5-P1-C4
1. Speed,Duplex
Disable Spanning Tree
2. Spanning Tree Enabled
for faster operation
3. Protocol
---------------------------------------------------------
Navigation Keys:
X = eXit System Management Services
---------------------------------------------------------
© Copyright IBM Corporation 2009, 2015
Notes:
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.
Instructor notes:
Purpose — Show the parameters available on the adapter configuration screen.
Details — This screen allows you to configure the adapter parameters. You can disable spanning
tree for a faster NIM or media boot.
Additional information —
Transition statement — What is left is the ping test.
Uempty
Network boot (7 of 7)
IBM Power Systems
Notes:
Ping test
This option pings the NIM server. If it fails, suspect your IP configuration or the network.
Instructor notes:
Purpose — Describe how to perform the ping test and what might be wrong if it is unsuccessful.
Details — 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.
Additional information —
Transition statement — Next, let’s review this unit.
Uempty
Checkpoint
IBM Power Systems
Notes:
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
1. AIX 7 can be installed from which of the following? (Select all that are
correct.)
a. 8 mm tape
b. CD-ROM
c. NIM server
The answers are CD-ROM and NIM server.
Additional information —
Transition statement —
Uempty
Exercise
IBM Power Systems
AIX
installation
Notes:
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — End of unit.
Uempty
Unit 9. Working with Logical Volume Manager
Estimated time
01:30
References
Online AIX Version 7.1 Operating System and Device
Management
AIX Version 7.1 Command References
SG24-5432 AIX Logical Volume Manager, from A to Z: Introduction and
Concepts (Redbooks)
Note: References listed as Online above are available at the following
address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.b
ase/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
1
2
3
4
write(data);
5
6
x
y
Application
z
Notes:
• Volume group (VG)
A volume group (VG) is the largest unit of storage allocation. A VG consists of a group of one or
more physical volumes (disks) all of which are accessed under one VG name. The combined
storage of all the physical volumes makes up the total size of the VG. This space can be used
by other storage entities like file systems and logical volumes.
VGs are portable and can be disconnected from one system and connected to another system.
All disks in the VG must move together.
• Physical volume (PV)
A physical volume (PV) is the name for an actual disk or hard disk drive. A PV can be internally
or externally attached.
For a disk to be used by LVM, the disk must be added to a volume group, or a new volume
group must be set up for it. A PV can belong to only one VG.
A PV can belong to only one volume group (VG).
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the LVM components and major concepts.
Details — Experienced UNIX administrators should be familiar with the underlying concepts, but
they need to learn the AIX terminology. It is crucial that they understand the concepts of logical
partitions and physical partitions. This can be difficult because there are so many other associations
with term partition. Make sure that they understand that these are just (relatively small) units of
allocation. Many students might want to think that an LVM logical partition is similar in concept to
what we call a logical volume. You must make the difference clear.
Additional information —
Transition statement — Since the major purpose of LVM is to provide a flexible way to allocate
disk storage to logical volumes, let us look at the various uses that AIX makes of these logical
volumes.
Uempty
Notes:
• Introduction
When you install the system, one volume group (rootvg) is automatically created, which
consists of a base set of logical volumes that are required to start the system. rootvg contains
such things as paging space, the journal log, and boot data, each usually in its own separate
logical volume. It also creates a collection of file systems with each having its own dedicated
logical volume (its own allocation of disk storage). The AIX defined file systems and their
associate logical volume names are shown in the visual.
You can create additional logical volumes with the mklv command or go through the SMIT
menus. This command allows you to specify the name of the logical volume and to define its
characteristics.
• JFS and JFS2 file systems
The native file system on AIX is the journaled file system (JFS), or the enhanced journaled file
system (JFS2). They use database journaling techniques to maintain consistency. It is through
the file system's directory structure that users access files, commands, applications, and so
forth.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Journal log
The journal log is the logical volume where changes made to the file system structure are
written until the structures are updated on disk. Journaled file systems and enhanced journaled
file systems are discussed in greater detail later in the course.
• Paging space
Paging space is hard disk storage for information that is resident in virtual memory but is not
currently being maintained in real memory.
• Boot logical volume
The boot logical volume is a physically contiguous area on the disk that contains the boot
image.
• Dump device
When you install the operating system, the dump device is automatically configured for you. By
default, the primary device is /dev/hd6, which is the paging logical volume, and the secondary
device is /dev/sysdumpnull. For systems migrated from versions of AIX earlier than V4.1, the
primary dump device is what it formerly was, /dev/hd7.
• Raw logical volume
A raw logical volume is an empty logical volume. Database applications, for example, Oracle
and DB2, recommend the use of raw logical volumes.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Issues with traditional UNIX disk storage management
Traditionally, disk allocation has been implemented through partitions. These partitions were
large contiguous allocations (such as a quarter or a half of an entire disk). Customers had to
select the correct size for each partition before the system can be installed.
Each file system was on a partition on the hard disk.
Changing the size of the partition, and thus the file system, was no easy task. It involved backing
up the file system, removing the partition, creating new ones, and restoring the file system.
A major limitation to partitions was that each partition had to consist of contiguous disk space.
This characteristic limited the partition to reside on a single physical drive. It cannot span
multiple hard disks. Since file systems were always contained within a partition, no file system
can be defined that would be larger than the largest physical drive. This meant that no single file
can be larger than the largest physical drive.
• Constraints eliminated
Modern UNIX storage management software, of which AIX’s LVM is one of the best, eliminates
these traditional constraints.
The tasks that are listed in the visual, can be performed while users are on the system.
Details on these tasks will be covered in detail, later in the unit.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Volume groups
IBM Power Systems
Notes:
Volume group types
With successive versions of AIX, new types of volume groups have been introduced, which allow
for greater capacities and greater flexibility:
• Original volume groups
When creating a volume group with SMIT or by using the mkvg command, original volume
groups are the default.
• Big volume groups
Big volume groups were introduced with AIX V4.3.2. Besides increasing the number of PVs per
VG, the big volume group also doubled the maximum number of LVs per VG from 255 to 512.
Support for creating big volume groups through SMIT was introduced in AIX 5L V5.3. Previous
to 5.3 big volume groups can be created only from the command line.
• Scalable volume groups
Scalable volume groups were introduced with AIX 5L V5.3. A scalable VG can accommodate a
maximum of 1024 PVs and raises the limit for the number of LVs to 4096. The -t factor does
not apply to the scalable VG type.
Uempty The maximum number of PPs is no longer defined on a per disk basis but applies to the entire
VG. This opens up the prospect to configure VGs with a relatively small number of disks, but
with fine grained storage allocation options, through many PPs, which are small in size. The
scalable VG can hold up to 2097152 (2048 KB) PPs. Optimally, the size of a physical partition,
can also be configured for a scalable VG.
Existing and new volume groups
When the system is installed, the root volume group (rootvg) is created. rootvg consists of a base
set of logical volumes and physical volumes that are required to start the system, and any other
logical volumes you specify to the installation script.
More disks can either be added to rootvg, or a new volume group can be created for them. There
can be up to 255 VGs per system.
Why create separate volume groups?
It is recommended that all user and application data be separated from the OS by placing the data
into volume groups. The data should be grouped into individual volume groups by type or purpose
(for example, Oracle data). By maintaining the user file systems and the operating system files in
distinct volume groups, the user files are not jeopardized during operating system updates,
reinstallations, and crash recoveries.
Maintenance is easier because you can update or reinstall the operating system, without having to
restore user data.
For security, you can make the volume group unavailable using varyoffvg.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Expand on the different types of volume groups and their limits. Also, define the
advantages of separate VGs.
Details — You have not discussed how to create a volume group yet. The command mkvg is new
to the students. However, since you discussed the concept of a volume group and the maximums
for volume groups, it is important to introduce the concept of big VGs, scalable VGs, and factors.
Existing volume groups can be converted to scalable or big volume groups and the -t factor can be
changed as well. Both of these can be done dynamically. To modify an existing VG, the command is
chvg instead of mkvg.
Discuss the main reasons for having external VGs as opposed to internal, and what considerations
must be made when adding a new disk to the system.
The rootvg includes paging space, the journal log, boot data, and dump storage usually each in its
own logical volume. The rootvg has attributes that differ from the user-created VGs. For example, it
cannot be imported or exported (moved) like other VGs can.
Point out that VGs can contain disks of different sizes. Only the physical partitions within a VG, must
be the same size.
Additional information — Once a volume group is converted to big or scalable, it cannot be
converted back dynamically. It also cannot be used on earlier versions of AIX that do not support
big volume groups.
Transition statement — The SMIT menu for managing volume groups lists the many tasks that
can be done with them. Let us look at that menu and then we will go through most of these tasks, by
using both SMIT dialog panels and line commands.
Uempty
Volume Groups
Notes:
The visual shows the SMIT screen that allows for the configuration of volume groups.
To get to this menu, use the SMIT fast path, smit vg.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the options available for volume groups.
Details — Provide a quick overview of the items on this screen.
Additional information — In the next few visuals, we describe many of the options that are listed
on this screen.
Transition statement — Let us see how we can create a 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 +
Notes:
• The mkvg command
The mkvg command (or equivalent SMIT panel) is used to create a volume group. A new volume
group must contain at least one physical volume, but multiple disks can be specified. 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. The volume group type defaults to an Original volume group, which is
the dialog in the visual. Forcing the creation is sometimes necessary when a disk still has a
VGDA, even though you are certain that there is nothing on the disk that needs preserving.
It is generally best not to select a physical partition size as the system selects the best fit
automatically. The default is the smallest physical partition size consistent with the maximum
number of physical partitions per physical volume and with the largest physical volume in the
volume group.
• Special high availability cluster options
The volume group MAJOR NUMBER on the SMIT dialog screen is used by the kernel to
access that volume group. This field is most often used for PowerHA where the major number
ideally should be the same for all nodes in the cluster.
Concurrent capable VGs are used for parallel processing applications, whereby the volume
group is read/write accessible to multiple machines at the same time.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show students how to add a volume group.
Details — Go through the example of how to add a VG to a system. Point out that the big VG panel
is identical.
Additional information —
Transition statement — Let us look at how adding a scalable volume group differs.
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 +
Notes:
Additional options for scalable volume groups
To specify that you want to create a scalable VG, use the -S flag with the mkvg command. There is
also a separate SMIT panel for adding scalable volume groups. Besides creating a different format
VGDA, 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 -t factor. In scalable volume groups, the physical partitions are
managed on a volume group wide basis.
The maximum number of logical volumes was fixed depending upon the type of volume group.
Now, in scalable volume groups, the maximum is tunable.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the AIX scalable volume group creation options.
Details — Warn the students not to make the maximums larger than they really need them to be.
The increased size of the control block structures can have a detrimental impact on performance.
Additional information —
Strict Mirror Pool: If this is enabled, all of the logical volumes in the volume group must use mirror
pools. When strict mirror pools are enabled, any logical volume that is created in the volume group
must have mirror pools that are enabled for each copy of the logical volume.
Infinite retry option of the volume group: If enabled the failed I/O request is retried until it is
successful. It does not affect the logical volume infinite retry option.
Transition statement — Now, let us move on to how we can list the volume groups and attributes
after they have been created.
Uempty
# lsvg -o
datavg
rootvg
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER:
00f6060300004c0000000148d7b47287
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 511 (8176 megabytes)
MAX LVs: 256 FREE PPs: 205 (3280 megabytes)
LVs: 11 USED PPs: 306 (4896 megabytes)
OPEN LVs: 10 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 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
Notes:
The lsvg command, with no parameters, lists the volume groups in the system. If used with the –o
options, all varied on/active volume groups are displayed.
To further list the information about the status and content of a particular volume group, run lsvg
<Volumegroup_name>
The output provides status information about the volume group. The most useful information here
is:
• Volume group state (VG STATE - active or inactive/complete if all physical volumes are active)
• Physical partition size
• Total number of physical partitions (TOTAL PPs)
• Number of free physical partitions (FREE PPs)
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to list VGs and their attributes.
Details — Go through the details in the visual and in the notes. Point out particular attributes that
should be of interest to the class.
Additional information —
Transition statement — Let us now see how we can use lsvg to list the disks and LVs in a VG.
Uempty
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 99 23 15..00..00..00..08
hdisk5 active 31 31 07..06..06..06..06
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT
POINT
hd5 boot 2 2 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 15 15 1 open/syncd /
hd2 jfs2 177 177 1 open/syncd /usr
hd9var jfs2 26 26 1 open/syncd /var
hd3 jfs2 8 8 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 20 20 1 open/syncd /opt
hd11admin jfs2 8 8 1 open/syncd /admin
livedump jfs2 16 16 1 open/syncd
/var/adm/ras/livedump
© Copyright IBM Corporation 2009, 2015
Notes:
The lsvg -p Volumegroup command gives information about all of the physical volumes within the
volume group. The information that is 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 that are given are:
• Logical volume name (LVNAME)
• Type of logical volume (TYPE, for example, file system, paging)
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
[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 +
Infinite Retry Option no +
Notes:
The chvg command changes the characteristics of a volume group. In the example that is shown in
the visual, attributes Activate volume group AUTOMATICALLY at system restart? and A
QUORUM of disks required to keep the volume group on-line? were set to no, which causes
the following command to run: chvg –a n –Q n datavg
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
hdisk0 hdisk1
Notes:
• Add a physical volume to a volume group
To add a disk to an existing volume group, use the extendvg command or SMIT fast path smit
extendvg. The disk must be installed in the system or connected to it externally, and must be
powered on.
extendvg formats the disk into physical partitions and then adds them to the physical partition
mapping maintained in the VGDA for the volume group. 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 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 when adding a disk
that has been previously used, but contains data that is no longer needed.
The syntax for the extendvg command is:
extendvg [-f] Volumegroup hdiskn
• Remove a physical volume from a volume group
The reducevg command is used to remove a physical volume from a volume group. If it is the
last physical volume, the volume group is removed. To remove a disk from the volume group,
Uempty first be sure to free up all the storage on the disk by either deleting the logical volumes or
migrating them to some other disk in the volume group. Once there are no logical volumes, on
the disk, you can remove that disk from the volume group by using the reducevg command or
the SMIT fast path smit reducevg.
The syntax for the reducevg command is:
reducevg [-d] [-f] Volumegroup hdiskn
The -d option deallocates the existing logical volume partitions, and then deletes resultant
empty logical volumes from the specified physical volumes. User confirmation is required
unless the -f flag is added.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to extend or reduce the size of a volume group. Show how to add and
remove physical volumes in a volume group.
Details — Describe the steps that need to be taken to add or remove a physical volume from a
volume group.
Additional information — When the last physical volume has been removed from the volume
group, the volume group effectively no longer exists, since there are no more VGDAs to define it. At
that point, LVM also removes any record of the volume group from the ODM database.
Transition statement — Let us see how we can remove a VG.
Uempty
[Entry Fields]
* VOLUME GROUP name [db2_vg] +
Notes:
You can use the smit reducevg2 fast path to remove a volume group. It runs a script that 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.
The syntax of the reducevg command is:
reducevg [-d] [-f] VolumeGroup PhysicalVolume
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to delete a volume group.
Details — Go through the example in the visual.
Additional information —
Transition statement — Having played with altering the characteristics of the volume group, let us
look at how we can control access to the volume group.
Uempty
[Entry Fields]
* VOLUME GROUP name [datavg] +
RESYNCHRONIZE stale physical partitions? yes +
Activate volume group in SYSTEM no +
MANAGEMENT mode?
FORCE activation of the volume group? no +
Warning--this may cause loss of data integrity.
Varyon VG in Concurrent Mode? no +
Synchronize Logical Volumes? no +
[Entry Fields]
* VOLUME GROUP name [datavg] +
Put volume group in SYSTEM no +
MANAGEMENT mode?
Notes:
• The varyonvg command
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.
The -f option is used to force a volume group online. 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.
• The varyoffvg command
The varyoffvg command is used to deactivate a volume group. No logical volumes should be
open when this command is issued. Removing a disk without deactivating the volume group
might cause errors and loss of data in the volume group descriptor areas, and the logical
volumes within that volume group.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how volume groups, other than the rootvg, can be activated and deactivated.
Details — Go through the example of activating / deactivating VGs.
Additional information —
Transition statement — Let us next look at how we work with the logical volumes, which are
allocated out volume group disk space.
Uempty
Logical storage
IBM Power Systems
Physical volumes
1 4 1 4
7 2 3 7 2 3
10 10
8 9 8 9
13 16 13 16
14 15 19 14 15
19 22 22
20 21 25 20 21
25 28 28
26 27 31 26 27
31 34 34
32 33 32 33
35 38 35 38
36 37 41 36 37
41 44 44
42 43 42 43
47 50 47 50
48 49 48 49
1 2 3 4 1 2 3 4 Logical
partitions
Logical Logical
volume volume
© Copyright IBM Corporation 2009, 2015
Notes:
• Logical volumes
A logical volume is a group of logical partitions, which can span physical volumes, as long as
the physical volumes are in the same volume group. A file system resides on top of a logical
volume (LV). A logical volume can be dynamically extended.
• Logical partitions
Logical partitions are mapped one-to-one to physical partitions unless they are being mirrored.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review the logical volume structure as an introduction to a more detailed discussion.
Details — Review logical volumes and logical partitions and how they map to physical partitions.
Additional information — A logical volume has a device driver that allows an application to treat it
just as it would a physical disk. Database engines that access a logical volume in a raw mode is an
example of a situation where the logical volume device driver is accessed directly. In most
situations, even database engine uses the file system services rather than accessing the logical
volume directly.
Transition statement — Remember that a logical volume is a collection of logical partitions. The
mapping of those logical partitions to one or more physical partitions allows LVM to provide
software implemented RAID capabilities. Let us look at these capabilities and relate them to the
RAID implemented in a storage subsystem.
Uempty
Notes:
LVM supports three software RAID configurations:
• RAID 0: Striping provides improved performance and additional storage, but no fault tolerance.
Any disk failure destroys the array, which becomes more likely with more disks in the array. A
single disk failure destroys the entire array because when data is written to a RAID 0 drive, the
data is broken into fragments. The fragments are written to their respective disks simultaneously
on the same sector. This allows smaller sections of the entire chunk of data to be read off the
drive in parallel, giving this type of arrangement huge bandwidth. RAID 0 does not implement
error checking so any error is unrecoverable. More disks in the array means higher bandwidth,
but greater risk of data loss.
• RAID 1: Mirroring on AIX provides fault tolerance from disk errors by creating up to three copies
of the data on different drives.
• RAID 10: Combines RAID levels 0 + 1. Striping + mirroring provides fault tolerance along with
improved performance.
• Stripe size
The size of the stripe unit is specified at creation time. The stripe size can range from 4 KB -128
MB in powers of two.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Constraints
There are some constraints that are imposed by implementing striping:
- The number of physical partitions that are allocated to a striped logical volume must be
evenly distributable among the disks.
- At least two physical volumes are required.
• Performance considerations
There are some considerations in configuring striping for performance:
- Use as many adapters as possible. For example, if multiple disks in the stripe width are on
the same storage adapter, a read/write of a stripe is not able to read/write the stripe units in
parallel.
- Design to avoid contention with other uses of the disks that are used by the striped logical
volume.
- Create on a volume group that is dedicated to striped logical volumes.
It is not a good idea to mix striped and non-striped logical volumes in the same physical
volume. Physical volumes should ideally be the same size within the set that is used for a
striped logical volume. Just because a logical volume is striped, it does not mean that the
file's data blocks are going to be perfectly aligned with the stripe units. Therefore, if a file
block crosses a stripe boundary, the block gets split into multiple LVM I/Os.
• SAN support
AIX also supports Storage Area Networks (SAN). Most RAID configuration is done in the
SAN-attached storage subsystems that is using hardware RAID. Generally, configuring RAID in
the storage subsystem and in AIX is not advised.
When a SAN LUN (disk) is zoned to AIX and AIX discovers it by running cfgmgr, this LUN is
seen almost the same as a locally attached disk. And by default it is assigned a logical device
name following the usual hdisk# format.
When working with the SAN administrator, the common disk identifier usually is the unique_id
attribute for the disk.
The management of multiple paths to a LUN (for example using multiple HBAs) is either
managed by the AIX MPIO software or using OEM software that is designed to work with the
particular storage subsystem.
It is not unusual for a storage subsystem to increase the space allocation for a LUN. When this
happens, AIX can learn of LUN size increase by running: # chvg -g datavg
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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
Uempty 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
- 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.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
- Active (default):
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).
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
1 2 3 4
empty
5 6 7 8
1 3 5 7 2 4 6 8
Notes:
• Reorganizing a volume group
If the intra-physical volume allocation policy (location on disk: center, middle, edge, inner edge,
and inner middle) is changed after the logical volume is created, the physical partition does not
relocate 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. This
should improve disk performance. Preference is given in the order that is listed on the command
line.
• reorgvg syntax
The syntax is: reorgvg Volumegroup [LogicalVolume]
For example: reorgvg rootvg hd4 hd5
Using SMIT, no other arguments can be supplied. The entire volume group is reorganized.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit lv
Logical Volumes
Notes:
This is the top-level SMIT menu for logical volumes. The next few pages discuss these items.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
[Entry Fields]
Logical volume NAME [datalv]
* VOLUME GROUP name datavg
* Number of LOGICAL PARTITIONS [100] #
PHYSICAL VOLUME names [hdisk2 hdisk3] +
Logical volume TYPE [jfs2] +
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 2 +
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 +
Notes:
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 the logical volume belongs to, and the size in
logical partitions must be specified. Other characteristics that can be set are, the allocation policy,
copies (mirroring), scheduling policy, and striping.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Show LV characteristics
IBM Power Systems
# lslv datalv
LOGICAL VOLUME: datalv VOLUME GROUP: datavg
LV IDENTIFIER: 00cf2e7f00004c000000011d68130bea.1
PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 4 megabyte(s)
COPIES: 2 SCHED POLICY: parallel
LPs: 10 PPs: 20
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes (superstrict)
Serialize IO ?: NO
INFINITE RETRY: no
DEVICESUBTYPE: DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
# lslv -l datalv
datalv:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk2 010:000:000 100% 000:010:000:000:000
hdisk3 010:000:000 100% 000:010:000:000:000
Notes:
To list the characteristics of a logical volume, use the command:
lslv <logicalvolume_name>
The –l flag lists the following fields for each physical volume in the logical volume:
• PV: Physical volume name.
• Copies:
- The number of logical partitions containing at least one physical partition (no copies) on the
physical volume.
- The number of logical partitions containing at least two physical partitions (one copy) on the
physical volume.
- The number of logical partitions containing three physical partitions (two copies) on the
physical volume.
• In band: The percentage of physical partitions on the physical volume that belong to the logical
volume, and were allocated within the physical volume region that is specified by Intra-physical
allocation policy.
Uempty • Distribution: 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 of the physical
volume.
The lslv –m flag shows the detailed LP to PP relationship. In the following example, LP number 1
for datalv is mapped to physical partition number 104 on hdisk2, and is also mirrored to the same
physical partition number on hdisk3.
# lslv -m datalv
datalv:N/A
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0104 hdisk2 0104 hdisk3
0002 0105 hdisk2 0105 hdisk3
0003 0106 hdisk2 0106 hdisk3
0004 0107 hdisk2 0107 hdisk3
0005 0108 hdisk2 0108 hdisk3
0006 0109 hdisk2 0109 hdisk3
0007 0110 hdisk2 0110 hdisk3
0008 0111 hdisk2 0111 hdisk3
0009 0112 hdisk2 0112 hdisk3
0010 0113 hdisk2 0113 hdisk3
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to list the characteristics of a logical volume.
Details — Explain the output that is provided in the visual examples.
Additional information —
Transition statement — Let us continue exploring LV characteristics.
Uempty
[Entry Fields]
* LOGICAL VOLUME name datalv
* NEW TOTAL number of logical partition 3 +
copies
PHYSICAL VOLUME names [hdisk4] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [1] #
to use for allocation
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
File containing ALLOCATION MAP []
SYNCHRONIZE the data in the new yes +
logical partition copies?
Mirror Pool for First Copy [] +
Mirror Pool for Second Copy [] +
Mirror Pool for Third Copy [] +
Notes:
• Adding a copy of a logical volume
The mklvcopy command is used to add up to three copies to a logical volume. Specify the
logical volume to change and the total number of copies wanted. This succeeds only 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 are to be on different physical volumes. Once a logical volume
has been created, striping cannot be imposed or removed.
• Synchronizing a mirrored logical volume
Also, in order for the copies to match, the logical volume must be synchronized by using the
syncvg command. This can be done with the -k option when the copy is originally started. It can
be done later, by using the syncvg command.
• Removing a copy of a logical volume
The rmlvcopy command is used to reduce the total number of copies for a logical volume.
Specify the total number wanted. For example, specify two if you are reducing the number of
copies from three to two. The rmlvcopy command allows you to specify which disk to remove
the copy from.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to add mirrored copies to an LV.
Details — Be sure to point out the importance of synchronizing the copies, either while turning
mirroring on, or after it is turned on. Until the copy is synchronized, it is marked as stale.
Additional information —
Transition statement — Let us see how we can increase the size of a logical volume.
Uempty
[Entry Fields]
* LOGICAL VOLUME name datalv
* Number of ADDITIONAL logical partitions [20] #
PHYSICAL VOLUME names [] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [1] #
to use for allocation
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
File containing ALLOCATION MAP []
Notes:
The extendlv command increases the number of logical partitions that are allocated to the logical
volume, by allocating the number of additional logical partitions that are represented by the
Partitions parameter. The Logical Volume 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 Physical Volume parameter. Otherwise, all the physical volumes in a
volume group are available for allocating new physical partitions.
The default maximum number of partitions for a logical volume is 512. Before extending a logical
volume to more than 512 logical partitions, use the chlv command to increase the default value.
The default allocation policy is to use a minimum number of physical volumes per logical volume
copy, to place the physical partitions belonging to a copy as contiguously as possible, and then to
place the physical partitions in the requested region that is specified by the -a flag. Also by default,
each copy of a logical partition is placed on a separate physical volume.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to increase the size of a logical volume.
Details — Explain how to increase the size of an LV. Highlight the options in the visual.
Additional information —
Transition statement — Let us see how to remove an LV.
Uempty
[Entry Fields]
LOGICAL VOLUME name [datalv2] +
Notes:
The rmlv command removes logical volumes, and in the process, destroys all data.
The Logical Volume parameter can be a logical volume name or logical volume ID. The logical
volume first must be closed. If the volume group is varied on in concurrent mode, the logical volume
must be closed on all the concurrent nodes on which the volume group is varied on. For example, if
the logical volume contains a file system, it must be unmounted. However, removing the logical
volume does not notify the operating system that the file system residing on it has been destroyed.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — See how LVs are deleted.
Details — Explain how LVs are removed and deleted from the system.
Additional information — Before an LV can be removed, the LV_STATE must be closed/syncd.
For example, an LV cannot be removed if its corresponding file system is mounted.
Transition statement — Let us see how to list LVs.
Uempty
# lsvg -o | lsvg -i –l
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
datalv jfs2 30 90 3 closed/syncd N/A
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 2 2 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 15 15 1 open/syncd /
hd2 jfs2 177 177 1 open/syncd /usr
hd9var jfs2 26 26 1 open/syncd /var
hd3 jfs2 8 8 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 20 20 1 open/syncd /opt
loglv00 jfs2log 1 1 1 closed/syncd N/A
fslv00 jfs2 2 2 1 closed/syncd /db2
hd11admin jfs2 8 8 1 open/syncd /admin
livedump jfs2 16 16 1 open/syncd
/var/adm/ras/livedump
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to list all LVs by VG.
Details — Do not spend too much time going through all the attributes. The students should be
familiar with this type of output.
Additional information —
Transition statement — 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
Extra steps are
required for
# bootlist -m normal hdisk0 hdisk1
rootvg
Notes:
The mirrorvg command takes all the logical volumes on a given volume group and mirrors those
logical volumes. This same functions can 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 were to fail, the entire volume group would go offline.
Protecting rootvg on AIX from disk failure is important. Mirroring the data is one way to achieve
this. When mirroring rootvg there are extra steps to perform:
• Create a boot image on the mirrored disk, by using the bosboot command.
• Add the newly mirrored disk to the bootlist.
• Shut down and reboot the system.
It is recommended that you use the exact mapping option (-m) to ensure that the mirror copy of the
boot logical volume (hd5) is allocated contiguous physical partitions.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to mirror a VG.
Details — Explain how to mirror a VG by using the example in the visual. It is critical rootvg is
protected. In order to do this, in most cases, it is mirrored. Stress the importance of the additional
steps, which must be carried out when mirroring rootvg.
Additional information —
Transition statement — Let us now turn our attention to PVs.
Uempty
Physical volumes
IBM Power Systems
Volume group
PV1 PV2
1 1 4
4
2 2 3
7 3 7 10
10 8
8 9 9
13 13 16
16 14
14 15 19 15
19 22 22
20 20 21
25 21 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
Physical partitions
• Physical volume (PV)
– A hard disk, a virtual disk, or a LUN
• Physical partition (PP)
– Smallest assignable unit of allocation on a physical disk
© Copyright IBM Corporation 2009, 2015
Notes:
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, were given earlier in this unit.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review physical volume and physical partition concepts before going into a greater
discussion on them.
Details — Simply review the basic concepts.
Additional information —
Transition statement — Let us look at what we can do with physical volumes through SMIT.
Uempty
# smit pv
Physical Volumes
Notes:
This is the top-level menu for physical volume. Each of these items is discussed in the following
pages.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the SMIT Physical Volumes screen.
Details — At a high level, review each of the items in turn.
Additional information —
Transition statement — Let us first see how to list PV information.
Uempty
Notes:
From the smit pv fast path, the List all Physical Volumes in System option uses the
undocumented command lspv | /usr/bin/awk {print$1}'' to list the physical volumes in the
system.
The lspv command with no parameters can be used to list the physical volume name, physical
volume identifier, and volume group for all physical volumes in the system.
The lspv pvname command gives status information about the physical volume. The most useful
information here is:
• State (active or inactive)
• Number of physical partition copies that are stale (are not up to date with other copies)
• Total number of physical partitions
• Number of free physical partitions
• Distribution of free space on the physical volume
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — List physical volume information.
Details — Review the details in the visual.
Additional information —
Transition statement — Let us see how we can list logical volumes on a physical volume.
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
Notes:
The lspv -l pvname command, which is shown in the visual, lists all the logical volumes on a
physical volume including the number of logical partitions, physical partitions, and distributions on
the disk.
The lspv -p pvname command, as illustrated below, lists all the logical volumes on a disk, and the
physical partitions to which its logical partitions are mapped. It is listed in physical partition order
and shows what partitions are free and, which are used, as well as the location; that is, center, outer
middle, outer edge, inner edge, and inner middle.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# lspv -p hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-14 free outer edge
15-16 used outer edge fslv00 jfs2 /db2
17-20 used outer edge hd10opt jfs2 /opt
21-28 used outer middle hd6 paging N/A
29-29 used outer middle loglv00 jfs2log N/A
30-31 used outer middle hd11admin jfs2 /admin
32-32 used outer middle hd1 jfs2 /home
33-35 used outer middle hd3 jfs2 /tmp
36-40 used outer middle hd9var jfs2 /var
41-41 used center hd8 jfslog N/A
42-56 used center hd4 jfs2 /
57-59 used center hd2 jfs2 /usr
60-79 used inner middle hd2 jfs2 /usr
80-91 used inner edge hd2 jfs2 /usr
92-99 free inner edge
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• To add a disk:
– Ensure that disk is on the bus or LUN zoned to the FC adapter
– Configured to AIX through configuration manager (cfgmgr)
• To remove a disk:
– Move the contents of a physical volume to another disk:
• migratepv [ -l lvname ] sourcePV targetPV ..
# migratepv -l lv02 hdisk1 hdisk6
Notes:
Today, almost all disks can be configured to AIX by using the configuration manager (cfgmgr).
• Preparation to remove a physical device
The migratepv command can be used to move all partitions, or 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.
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-77
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 9. Working with Logical Volume Manager 9-79
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 10. File systems administration
Estimated time
01:05
References
Online AIX Version 7.1 Operating System and Device
Management
AIX Version 7.1 File Reference
SG24-5432 AIX Logical Volume Manager, from A to Z: Introduction and
Concepts (Redbooks)
http://www.redbooks.ibm.com/abstracts/sg245432.html
Note: References listed as online are available through the IBM Knowledge
Center at the following address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.b
ase/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Journaled file systems (JFS)
JFS was developed for transaction-oriented, high performance Power Systems. JFS is both
saleable and robust. One of the key features of the file system is logging. JFS is a recoverable
file system, which ensures that if the system fails during power outage, or system crash, no file
system transactions are left in an inconsistent state.
• Migration
JFS file systems can co-exist on the same system with JFS2 file systems. However, to fully
utilize the JFS2 features, the following steps are necessary:
1. Back up JFS file system data.
2. Create new JFS2 file systems.
3. Restore JFS file system data to new JFS2 file systems.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Increased performance
• Increased flexibility:
– File system can be dynamically increased and decreased
– Support for larger enabled file systems
– Internal or external JFS logging
– Data encryption
– Support for snapshots
Notes:
JFS2 is the default file system type on AIX, since version 5.3. JFS2 provides increased performance
and flexibility when compared to its predecessor, JFS. JFS file systems have the following restrictions:
• Cannot be dynamically decreased in size.
• Can support large files, greater than 2 GB, only 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.
- The use of fixed sized extents (128 KB in large file enabled) required more pointers to the
extents than can be supported (in files greater than 16 TB). In contrast, JFS2 uses variable
sized extents that (if there are enough contiguous blocks) massively reduce the number of
pointers that are needed to locate the data.
• Have performance problems when executing directory operations (add file, remove file, and
locate file) on very large directories, due to the sequential nature of the directory data file. In
contrast, the JFS2 file system uses a binary tree to manage the directory and is thus much more
scalable. As much as a 40 fold performance improvement has been seen with some large
directory applications.
• Support only 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.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# istat datafile1
Inode 12309 on device 10/8 File
Protection: rw-r----- i-node
Owner: 211(adminusr) Group: 7(security) number
Link count: 1 Length 119 bytes
Notes:
The istat command can be used to display the i-node information for a particular file or directory.
You can specify the file either by providing a file or directory name, or by providing an i-node
number by using the –i flag. I-node numbers can be discovered by using the –i flag with the ls
command.
The file system block size information can be discovered by using the lsfs command.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit crfs_j2
# crfs -v jfs2 -g datavg -a size=1G –m /data
[Entry Fields]
Volume group name datavg
SIZE of file system
Unit Size Gigabytes +
* Number of units [1] #
* 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 []
Notes:
The SMIT screen in the visual shows the creation of a 1 GB 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.
Data blocks
An individual file within a file system, by default, has units that are allocated to it in blocks of 4096
bytes. The file system block size can be set to 512, 1024, 2048, or 4096 bytes. A smaller block size
uses less disk space for small files, but can degrade performance. Some AIX commands often
report file sizes in units of 512 bytes to remain compatible with other UNIX file systems. This is
independent of the actual unit of allocation.
For most file systems, the default block size of 4 KB works well. For very large files, the
extent-based addressing of contiguous ranges of data blocks helps to manage the overhead costs.
But for file systems that have mostly tiny files (for example, 100-byte files), the wasted storage of
allocating a 4 KB block is unacceptable. Directories with large numbers of small files should be
placed in their own file systems, which have small blocks sizes.
For further information, see the crfs man page.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# lsfs /data
Name Nodename Mount Pt VFS Size Options Auto
Accounting
/dev/fslv01 -- /data 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 256 256 1 closed/syncd /data
Notes:
The visual shows the actual creation of the /data file system that is shown in the previous slide.
The lsfs command can be used to display the characteristics of the file system.
Before the creation of the file system, the contents of the datavg volume group were empty. We can
see two logical volumes are created, loglv00 and fslv00. The loglv00 volume acts as the JFS log
for both the /data file system and by default any other file systems that will be created. In creating
a file system this way, the underlying logical volume is created by using default options. Often it is
preferable to first create the logical volume (by using custom values) and then create the file system
on top. We will see this procedure later in the unit.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Figure 10-7. Mounting a file system and the /etc/filesystems file AN14G5.0
Notes:
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)
• 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, by using the mount command. As there
is a stanza in the /etc/filesystems file, the only parameter that is required is the name of the file
system. The mount command with no options, will display all file systems that are currently
mounted and available for use.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y
Notes:
As we saw by default, a JFS log file is created when the first file system is created in a volume
group. This JFS log acts as the global logging device for all file systems, unless:
• A specific external log is created for each file system in the volume group. This approach has
several advantages. It will aide performance and availability. If the logging device were to
become corrupted, it would affect only the associated file system.
• The JFS log device is internal to the file system (inline). This saves time to create, format, and
manage a separate JFS log volume. Inline logging is only available with JFS2 file systems.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit crfs_j2
# crfs -v jfs2 –d lv_for_data –m /data2 –A yes
[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 []
Figure 10-9. Creating a file system on a previously defined logical volume AN14G5.0
Notes:
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, by using PowerHA or Veritas Cluster
Services), one should always follow this method. 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 will be a
performance hit, especially for large file systems.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
[Entry Fields]
File system name /data2
NEW mount point [/data2]
SIZE of file system
Unit Size Gigabytes +
Number of units [10] #
Notes:
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, by using + or –
options respectively, or by providing a specific set number, as shown in the SMIT example.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
[Entry Fields]
* FILE SYSTEM name /data2 +
Remove Mount Point no +
Notes:
• Ways to remove a file system
The rmfs command or SMIT can be used to remove a file system.
• Restrictions
To remove a file system, it must be unmounted from the overall file tree. And this cannot be
done if the file system is in use. This means when some user or process is using the file system
or has it as a current directory, you cannot unmount the file system.
• Effects of using rmfs command
The rmfs command removes any information for the file system from the ODM and
/etc/filesystems. When the file system is removed, the logical volume on which it resides is
also removed.
• Syntax
The syntax of the rmfs command is:
rmfs [-r] [-i] FileSystem
- -r removes the mount point of the file system.
- -i displays warning and prompts the user before removing the file system.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Useful df command flags
A number of flags (options) can be used with the df command. Some of the most useful of
these flags are shown below:
-i Displays the number of free and used i-nodes for the file system; this output is the
default when the specified file system is mounted.
-I Displays information on the total number of blocks, the used space, the free space, the
percentage of used space, and the mount point for the file system.
-k Displays statistics in units of 1024-byte blocks.
-m Displays statistics in units of MB blocks.
-g Displays statistics in units of GB blocks.
• Specifying the units du should use
By default, du gives size information in 512-byte blocks. Use the -k option to display sizes in 1
KB units, use the -m option to display sizes in 1 MB units, or use the -g option to display sizes in
1 GB units.
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss management of file system usage in AIX.
Details — Keep this sweet and short.
The students should already be familiar with storage management. The df, du, find, and skulker
commands are all standard to a UNIX operating system, as is the disk quota system. Just assure
the students that the same tools are available in AIX as they are used to. While the commands are
the same, the flags are not. For example, Solaris has a -h flag, which gives the output in “human
readable” form. This dynamically selects the unit to use and appends a K or M or G as to
communicate the unit that is used. AIX has a -g flag to select GBs as the unit, in addition to the
more common -k and -m flags.
They already have been taught about the ability to dynamically increase and decrease an
enhanced journaled file system.
And we already discussed the desirability of a small block size when the files are all small.
Changing the block size is non-trivial, given that it can be specified only when first defining the file
system.
Additional information —
Transition statement — It's time for a checkpoint.
Uempty
Checkpoint
IBM Power Systems
2. Does the size of the file system change when the size of the
logical volume it is on is increased?
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
2. Does the size of the file system change when the size of the logical volume it
is on is increased?
The answer is no.
3. If you remove a file system, is the logical volume on which it sits removed as
well?
The answer is yes.
Additional information —
Transition statement —
Uempty
Exercise
IBM Power Systems
File systems
administration
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 10. File systems administration 10-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — End of unit.
Uempty
Unit 11. The Object Data Manager
Estimated time
00:45
References
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 General Programming Concepts: Writing
and Debugging Programs
Online AIX Version 7.1 Technical Reference: Kernel and
Subsystems
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Devices Software
System
SMIT menus
Resource ODM and panels
Controller
Notes:
Overview
There are many components in the AIX operating systems that use the ODM database to hold
configuration information. Some examples are: device configuration, installed software state and
relationships, SRC subsystem and group definitions, SMIT menu and dialog panel definitions,
TCP/IP object definitions, parameters for managing the AIX error log and the AIX dump facility, and
the NIM objects.
But not all configuration information is kept in the ODM. For example, the configuration information
for file systems is kept in a flat stanza-oriented file that is called /etc/filesystems and users are
defined in /etc/passwd. Shown here are some of the facilities that use the ODM database.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
ODM components
IBM Power Systems
Notes:
• Completing the drawing on the visual
The drawing on the visual above identifies the basic components of ODM, but some terms were
intentionally omitted from the drawing. Your instructor will complete this drawing during the
lecture. Complete your own copy of the drawing by writing in the terms that are supplied by your
instructor.
• ODM data format
For security reasons, the ODM data is stored in binary format. To work with ODM files, you must
use the ODM command-line interface. It is not possible to update ODM files with an editor.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Configuration manager
IBM Power Systems
PdAt
PdCn
Config_Rules
cfgmgr
Customized Methods
CuDv Define
Device Load
CuAt Configure
Driver
CuDep Change
CuVPD Undefine
© Copyright IBM Corporation 2009, 2015
Notes:
• Predefined and Customized device object classes
The Predefined object classes hold information about supported devices. The objects in these
object classes are created when you install the file set that contains support for a particular type
of device. The Predefined device objects hold such important information as the device drivers
and default attributes to use with that device. Without Predefined objects for a new device, AIX
cannot configure that device when it discovers it as connected to the system.
The Customized object classes hold information about specific devices that either are attached
or were attached to the system at some time before. These devices are considered defined
(and possibly available). It knows details about that specific device such as exactly how it is
attached to the system and the current state of the device.
• Roles of cfgmgr and Config_Rules
When an AIX system boots, the Configuration Manager (cfgmgr) is responsible for locating
attached devices and configuring those devices. If the device does not yet have matching
objects in the Customized object classes, cfgmgr creates the needed objects and configures
the device with a state of available. If the device already has matching objects in the
Uempty Customized object classes, then the device state is configured and set to a state of available.
For devices with matching objects in the Customized object classes, but that are not current
found on any of the buses, their state is set to defined (not available).
The method for configuring a device differs from one device type to another. The cfgmgr
command knows which method to use by examining the methods that are identified in the
Predefined device object class.
There is one ODM object class, which the cfgmgr uses to determine the type of devices to
search for and correct sequence in which to search for them: Config_Rules. This ODM object
class also contains information about various methods files that are used for device
management.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review predefined and customized database concepts and describe the operation of
cfgmgr and its interaction with the ODM.
Details — Explain how the plug and play gets added.
Additional information — Try entering the command odmget Config_Rules to find out more
about the content of this object class. Note the frequent references to the directories /etc/methods
and /usr/lib/methods. (Although we have not discussed the odmget command yet, you can use
the command odmget Config_Rules (as a sort of preview) and point out the references to the two
directories as a demonstration.)
Transition statement — Let us look at the four basic device-related object classes.
Uempty
PdDv:
type = “scsd" CuDv:
class = "tape" name = “rmt0"
subclass = "scsi" status = 1
prefix = "rmt" chgstatus = 2
... ddins = “tape"
DvDr = "tape" location = "01-08-01-8,0"
Define = "/etc/methods/define"
Configure = parent = "scsi1"
"/etc/methods/cfgsctape" connwhere = "8,0"
Change = "/etc/methods/chggen" PdDvLn = “tape/scsi/scsd"
Unconfigure =
"/etc/methods/ucfgdevice"
Undefine = "etc/methods/undefine"
...
uniquetype = "tape/scsi/scsd"
PdAt: CuAt:
uniquetype = "tape/scsi/scsd" name = “rmt0"
attribute = "block_size" attribute = “block_size"
deflt = "" value = “32768"
values = "0-2147483648,1" ...
...
Notes:
• Introduction
Being familiar with the descriptors of the various object class is useful in two ways.
- It helps in understanding the basic roles and relationships of the objects.
- It helps in fixing uncommonly difficult ODM corruption problems.
The second justification is a rare situation and it is recommended that you try to manually patch
the ODM only under the guidance of the AIX Support staff.
The first justification is what we focus on. The examples in the visual show only selected object
descriptors. We emphasize a few main concepts that are illustrated by these object descriptors.
• Finding the key
The ODM as a database has no built in concept of a key field or object uniqueness for an object
class. The ODM commands that we cover later can qualify an operation (restrict which objects it
matches) by using any descriptor and the ODM allows you to add objects that we would
consider duplicates. It is the AIX high-level utilities and commands, which use the ODM, that
decides whether a given descriptor should be treated as a key to the object class.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
For the Predefined Device (PdDv) object class, the device management software treats the
type, class, and subclass descriptors (together) as a key to that object class. This combination
of descriptors is so heavily used that they are restated as the uniquetype descriptor.
AIX uses the Customized Device (CuDv) name descriptor as the unique identifier of a CuDv
object.
When AIX needs to relate an attached device (in the CuDv object class) to the PdDv entry (in
order to know the device driver, configuration methods, and more), it must provide the
uniquetype descriptor value that uniquely identifies the PdDv object. In the CuDv object class,
the descriptor that holds this value is the PdDvLn descriptor. The PdAt object class has its own
uniquetype descriptor to refer back to the PdDv object to which the PdAt object is related.
The Customized Attribute (CuAt) object class does not need to reference the PdDv class
directly. It only needs to identify the device for which it holds the override of the default
attributes. The name descriptor provides that reference. Note that neither the name nor the
attribute descriptor alone uniquely identify a CuAt object. In most cases the two together
uniquely identify a CuAt object, but that is not true in all cases. We will see a case where name
and attribute together are not unique when we later examine disks in a volume group.
• Customized device location
Traditionally, the CuDv location descriptor would have an AIX location code that can uniquely
identify where a device was located. With virtualization, many devices no longer have AIX
location codes and thus that descriptor usually has a null value. But all devices can be located by
knowing the location of the parent device and how to locate that device once we are at the parent
device. The parent and connwhere fields provide this information. In the example, the parent is a
SCSI adapter port and the connwhere is the SCSI ID and the LUN of the device on the SCSI bus.
• Object class details
The details below are here just for the reference of those who enjoy mastering such technical
details.
• The Predefined Devices (PdDv) object class
The Predefined Devices (PdDv) object class contains entries for all devices that are supported
by the system. A device that is not part of this ODM class cannot be configured on an AIX
system. Key attributes of objects in this class are described in the following paragraphs.
- type
Specifies the product name or model number, for example, 8 mm (tape).
- class
Specifies the functional class name. A functional class is a group of device instances that
are sharing the same high-level function. For example, tape is a functional class name that
is representing all tape devices.
- subclass
Device classes are grouped into subclasses. The subclass scsi specifies all tape devices
that can be attached to a SCSI interface.
- prefix
Specifies the Assigned Prefix in the customized database, which is used to derive the
device instance name and /dev name. For example, rmt is the prefix name that is assigned
to tape devices. Names of tape devices would then look like rmt0, rmt1, or rmt2.
Uempty - base
This descriptor specifies whether a device is a base device or not. A base device is any
device that forms part of a minimal base system. During system boot, a minimal base system
is configured to permit access to the root volume group (rootvg) and hence to the root file
system. This minimal base system can include, for example, a SCSI hard disk. The device
that is shown on the visual is not a base device.
This flag is also used by the bosboot and savebase commands, which are introduced later
in this course.
- detectable
Specifies whether the device instance is detectable or undetectable. A device whose
presence and type can be determined by the cfgmgr. Once it is powered on and attached to
the system, is said to be detectable. A value of 1 means that the device is detectable, and a
value of 0 that it is not (for example, a printer or tty).
- led
Indicates the value that is displayed on the LEDs when the configure method runs. The
value that is stored is decimal, but the value that is shown on the LEDs is hexadecimal
(2418 is 972 in hex).
- setno, msgno
Each device has a specific description (for example, SCSI Tape Drive) that is shown when
the device attributes are listed by the lsdev command. These two descriptors are used to
look up the description in a message catalog.
- catalog
Identifies the file name of the national language support (NLS) catalog. The LANG variable
on a system controls which catalog file is used to show a message. For example, if LANG is
set to en_US, the catalog file /usr/lib/nls/msg/en_US/devices.cat is used. If LANG is
de_DE, catalog /usr/lib/nls/msg/de_DE/devices.cat is used.
- DvDr
Identifies the name of the device driver that is associated with the device (for example,
tape). Usually, device drivers are stored in directory /usr/lib/drivers. Device drivers are
loaded into the AIX kernel when a device is made available.
- Define
Names the define method that is associated with the device type. This program is called
when a device is brought into the defined state.
- Configure
Names the configure method that is associated with the device type. This program is called
when a device is brought into the available state.
- Change
Names the change method that is associated with the device type. This program is called
when a device attribute is changed through the chdev command.
- Unconfigure
Names the unconfigure method that is associated with the device type. This program is
called when a device is unconfigured by rmdev -l.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
- Undefine
Names the undefine method that is associated with the device type. This program is called
when a device is undefined by rmdev -l -d.
- Start, stop
Few devices support a stopped state (only logical devices). A stopped state means that the
device driver is loaded, but no application can access the device. These two attributes name
the methods to start or stop a device.
- uniquetype
This is a key that is referenced by other object classes. Objects use this descriptor as
pointer back to the device description in PdDv. The key is a concatenation of the class,
subclass, and type values.
• The Customized Devices (CuDv) object class
The Customized Devices (CuDv) object class contains entries for all device instances that are
defined in the system. As the name implies, a defined device object is an object that a define
method has created in the CuDv object class. A defined device object might or might not have a
corresponding actual device that is attached to the system.
The CuDv object class contains objects that provide device and connection information for each
device. Each device is distinguished by a unique logical name. The customized database is
updated twice, during system bootup and at run time, to define new devices, remove undefined
devices and update the information for a device that has changed.
The key descriptors in CuDv are described in the next few paragraphs.
- name
A customized device object for a device instance is assigned a unique logical name to
distinguish the device from other devices. The visual shows one device, a tape device rmt0.
- status
Identifies the status of the device instance. Possible values are:
• status = 0 - Defined
• status = 1 - Available
• status = 2 - Stopped
- chgstatus
This flag tells whether the device instance has been altered since the last system boot. The
diagnostics facility uses this flag to validate system configuration. The flag can take these
values:
• chgstatus = 0 - New device
• chgstatus = 1 - Do not care
• chgstatus = 2 - Same
• chgstatus = 3 - Device is missing
- ddins
This descriptor typically contains the same value as the Device Driver Name descriptor in
the Predefined Devices (PdDv) object class. It specifies the name of the device driver that
is loaded into the AIX kernel.
Uempty - location
Identifies the AIX location of a device. The location code is a path from the system unit
through the adapter to the device. In case of a hardware problem, the location code is used
by technical support to identify a failing device.
- parent
Identifies the logical name of the parent device. For example, the parent device of rmt0 is
scsi1.
- connwhere
Identifies the specific location on the parent device where the device is connected. For
example, the device rmt0 uses the SCSI address 8,0.
- PdDvLn
Provides a link to the device instance's predefined information through the uniquetype
descriptor in the PdDv object class.
• The Predefined Attribute (PdAt) object class
The Predefined Attribute (PdAt) object class contains an entry for each existing attribute for each
device that is represented in the PdDv object class. An attribute is any device-dependent
information, such as interrupt levels, bus I/O address ranges, baud rates, parity settings, or
block sizes.
The extract out of PdAt that is given on the visual shows one attribute (block size) and the
range of possible values.
The meanings of the key fields that are shown on the visual are described in the paragraphs
that follow.
- uniquetype
This descriptor is used as a pointer back to the device defined in the PdDv object class.
- attribute
Identifies the name of the attribute. This is the name that can be passed to the mkdev or
chdev command. For example, to change the default name of dumb to ibm3151 for tty0,
you can run the following command:
# chdev -l tty0 -a term=ibm3151
- deflt
Identifies the default value for an attribute. Nondefault values are stored in CuAt.
- values
Identifies possible values that can be associated with the attribute name. For example, allowed
values for the block_size attribute range from 0 to 2147483648, with an increment of 1.
• The Customized Attribute (CuAt) object class
The Customized Attribute (CuAt) object class contains customized device-specific attribute
information.
Devices that are represented in the Customized Devices (CuDv) object class have attributes
that are found in the Predefined Attribute (PdAt) object class and the CuAt object class. There
is an entry in the CuAt object class for attributes that take customized values. Attributes taking
the default value are found in the PdAt object class. Each entry describes the current value of
the attribute.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the basic structure and use of the four device-related object classes.
Details — Do not explain all shown descriptors from the visual. Provide a basic description of the
purpose and use of each object class. Concentrate on explaining descriptors that are focused on in
the notes. Mainly, the descriptors that can act as key fields and that relate one object to another.
Also, cover descriptors, which in combination, provide the location of a device.
Additional information — The value chgstatus=2 means that the state of hdisk2 has not
changed since last boot. The value chgstatus=1 would mean that the state of this device can not
be determined by the cfgmgr. (for example when dealing with a device that is attached by using a
serial or parallel port).
Ask students if anybody has seen the following message during system boot: A previously
defined device could not be detected. Explain that this message is caused by a device that is
defined in CuDv but is not physically present. For this device, the value of chgstatus is 3.
Transition statement — Let us look at an example of how the predefined object classes are used
to support the customized object classes.
Uempty
# cfgmgr
PdDv: CuDv:
type = "14106902" name = "ent1"
class = "adapter" status = 1
subclass = "pci" chgstatus = 2
prefix = "ent" ddins = "pci/goentdd"
... location = "02-08"
DvDr = "pci/goentdd" parent = "pci2"
Define = /usr/lib/methods/define_rspc" connwhere = "8“
Configure = "/usr/lib/methods/cfggoent" PdDvLn = "adapter/pci/14106902"
...
uniquetype = "adapter/pci/14106902"
PdAt: CuAt:
uniquetype = "adapter/pci/14106902" name = "ent1"
attribute = "jumbo_frames" attribute = "jumbo_frames"
deflt = "no" value = "yes"
values = "yes,no" type = "R"
... ...
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize how the basic ODM classes interact.
Details — Explain the flow as described in student notes.
Additional information — None.
Transition statement — Before we look at the ODM intermediate-level commands, let us first look
at the high-level device commands that work with these device ODM objects.
Uempty
Notes:
Most of the time, information in the ODM device database is accessed and managed by using
high-level commands. Understanding the object classes and their roles helps 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
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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 that 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.
The effective attributes are either the attributes in the Customized Attributes (CuAt) object class for
the specified device, or (if there is no value is specified in the CuAt) the default attribute value from
the related PdAt object. 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 allow
you to enter what it considers 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. This information is
displayed by the lsattr command when using the -R (range) flag. The -R option requires that the
attribute name is identified in addition to the logical name of the device for which you are attempting
modify that attribute.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
ODM commands
IBM Power Systems
Descriptors: odmshow
Notes:
• Introduction
Different commands are available for working with each of the ODM components: object
classes, descriptors, and objects.
• Commands for working with ODM classes
1.You can create ODM classes by using the odmcreate command. This command has the
following syntax:
odmcreate descriptor_file.cre
The file descriptor_file.cre contains the class definition for the corresponding ODM
class. Usually these files have the suffix .cre.
Uempty 2.To delete an entire ODM class, use the odmdrop command. The odmdrop command has the
following syntax:
odmdrop -o object_class_name
The name object_class_name is the name of the ODM class you want to remove. Be
careful with this command. It removes the complete class immediately.
• A command for working with ODM descriptors
To view the underlying layout of an object class, use the odmshow command:
odmshow object_class_name
The visual shows an extraction from ODM class PdAt, where four descriptors are shown
(uniquetype, attribute, deflt, and values).
• Commands for working with objects
Usually, system administrators work with objects. The odmget command retrieves object
information from an existing object class. To add new objects, use odmadd. To delete objects,
use odmdelete. To change objects, use odmchange. Working on the object level is explained in
more detail on the following pages.
• The ODMDIR environment variable
All ODM commands use the ODMDIR environment variable, which is set in the file
/etc/environment. The default value of ODMDIR is /etc/objrepos.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the ODM command-line interface.
Details — Explain briefly the different ODM commands. Introduce the ODMDIR variable that is used
for all ODM commands.
Additional information — Tell the students that for system developers an ODM API is available.
Transition statement — Let us look at an example of how the intermediate level ODM commands
might be used.
Uempty
# vi file
PdAt:
uniquetype = "tape/scsi/scsd"
attribute = "block_size"
deflt = “512" Modify deflt to 512
values = "0-2147483648,1"
width = ""
type = "R"
generic = "DU"
rep = "nr"
nls_index = 6
Notes:
• Command sequence on the visual
The odmget command in the example picks all the records from the PdAt class, where
uniquetype is equal to tape/scsi/scsd and attribute is equal to block_size. In this
instance, only one record should be matched. The information is redirected into a file that can
be changed by using an editor.
In this example, the default value for the attribute block_size is changed to 512.
The series of steps on this visual shows how the odmchange command can be used to replace
the object with the modified information.
Alternatively, you can use the odmdelete and odmadd steps that are shown at the bottom of the
visual.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Note
Before the new value of 512 can be added into the ODM, the old object (which had the block_size
set to a null value) must be deleted. Otherwise, you would end up with two objects that are
describing the same attribute in the database. The first object that is found is used, and the results
can be confusing. This is why it is important to delete an entry before adding a replacement record.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
PdCn: CuDvDr:
resource = "devno"
uniquetype = "adapter/pci/sym875"
value1 = "36"
connkey = "scsi"
value2 = "0"
connwhere = "1,0"
value3 = "hdisk3"
PdCn:
CuDvDr:
uniquetype = "adapter/pci/sym875"
resource = "devno"
connkey = "scsi"
value1 = "36"
connwhere = "2,0"
value2 = "1"
value3 = "hdisk2"
CuVPD:
CuDep: name = "hdisk2"
name = "rootvg" vpd_type = 0
dependency = "hd6" vpd = "*MFIBM *TM\n\
HUS151473VL3800 *F03N5280
CuDep: *RL53343341*SN009DAFDF*ECH17923D
name = "datavg" *P26K5531 *Z0\n\
dependency = "lv01" 000004029F00013A*ZVMPSS43A
*Z20068*Z307220"
Notes:
• PdCn
The Predefined Connection (PdCn) object class contains connection information for adapters
(or sometimes called intermediate devices). This object class also includes predefined
dependency information. For each connection location, there are one or more objects that
describe the subclasses of devices that can be connected.
The sample PdCn objects on the visual indicate that, at the given locations, all devices that aew
belonging to subclass SCSI can be attached.
• CuDep
The Customized Dependency (CuDep) object class describes device instances that depend
on other device instances. This object class describes the dependence links between logical
devices and physical devices as well as dependence links between logical devices, exclusively.
Physical dependencies of one device on another device are recorded in the Customized
Devices (CuDev) object class.
The sample CuDep objects on the visual show the dependencies between logical volumes and
the volume groups they belong to.
Uempty • CuDvDr
The Customized Device Driver (CuDvDr) object class is used to create the entries in the /dev
directory. These special files are used from applications to access a device driver that is part of
the AIX kernel. The attribute value1 is called the major number and is a unique key for a device
driver. The attribute value2 specifies a certain operating mode of a device driver.
The sample CuDvDr objects on the visual reflect the device driver for disk drives hdisk2 and
hdisk3. The major number 36 specifies the driver in the kernel. In our example, the minor
numbers 0 and 1 specify two different instances of disk dives, both using the same device
driver. For other devices, the minor number can represent different modes in which the device
can be used. For example, if we were looking at a tape drive, the operating mode 0 would
specify a rewind on close for the tape drive, the operating mode 1 would specify no rewind on
close for a tape drive.
• CuVPD
The Customized Vital Product Data (CuVPD) object class contains vital product data
(manufacturer of device, engineering level, part number, and so forth) that is useful for technical
support. When an error occurs with a specific device, the vital product data is shown in the error
log.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain briefly the function of some additional ODM classes.
Details — Describe the ODM classes that are shown by using the explanations in the student
notes.
Additional information —
Transition statement — The ODM is kept in one or more object repositories. Understanding this is
mainly of importance when working with the software-related ODM object classes. Let us look at
these object repositories.
Uempty
CuDv
CuAt Network
CuDep
CuDvDr
CuVPD
Config_Rules PdDv
PdAt
history PdCn
inventory
lpp history
product inventory
lpp history
nim_* product inventory
SWservAt lpp
SRC* sm_* product
Notes:
• Introduction
Originally, in order to support diskless, dataless, and other workstations, the ODM object
classes were held in three repositories. These days most us do not work with diskless and
dataless AIX workstations. Instead, we work with Power Servers that hold their own copy of the
entire operating system in their own rootvg. As such, we typically have all their repositories on
the same system. Without diskless and dataless workstations, the only object classes for which
we are concerned about these three parts are the software management object classes.
Starting with AIX 6, these distinctions have been given new life by the Workload Partitions
(WPAR) environment where multiple software partitions within a single LPAR share a common
kernel. In that environment, each WPAR has its own root portion (/etc/objrepos), but access a
single common copy of the shared portions (/usr/lib/objrepos and
/usr/share/lib/objrepos). The implementation and management of WPARs is covered in
later courses.
Each of these repositories is described in the material that follows.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• /etc/objrepos
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. 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. It contains the part of the product that cannot be shared among
machines. Each client must have its own copy. Most of this software that are requiring a
separate copy for each machine is associated with the configuration of the machine or product.
• /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,
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 of this are 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
file set recorded. This can be distracting if you are not concerned with these distinctions.
Alternately, you can run lslpp -L that reports only each file set once, without making
distinctions between the root, usr, and share portions.
• The ODMDIR environment variable
All ODM commands use the ODMDIR environment variable, which is set in the file
/etc/environment. The default value of ODMDIR is /etc/objrepos.
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
product:
lpp_name = "bos.rte.printers"
comp_id = "5765-G6200" inventory:
update = 0 lpp_id = 38
cp_flag = 2359571 private = 0
fesn = "0000" file_type = 0
name = "bos" format = 1
state = 5 loc0 = "/etc/qconfig"
ver = 7 loc1 = ""
rel = 1 loc2 = ""
mod = 0 size = 0
fix = 0
checksum = 0
ptf = ""
...
media = 0
sceded_by = ""
fixinfo = ""
prereq = "*coreq bos.rte 7.1.0.0"
description = "" history:
supersedes = "" lpp_id = 38
event = 2
lpp: ver = 7
name = "bos.rte.printers" rel = 1
size = 0 mod = 0
state = 5 fix = 0
cp_flag = 2359571 ptf = ""
group = "" corr_svn = ""
magic_letter = "I" cp_mod = ""
ver = 7 cp_fix = ""
rel = 1 login_name = "root"
mod = 0 state = 1
fix = 0 time = 1310159341
description = "Front End Printer Support" comment = ""
lpp_id = 38
Notes:
• Role of installp command
Whenever installing a product or update in AIX, the installp command uses the ODM to
maintain the Software Vital Product Database (SWVPD). The lslpp command displays the
contents of these object classes.
• 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, 6.1.5.2
or 7.1.3.4)
- The fix level, which contains a summary of fixes that are implemented in a product
- Any program temporary fix (PTF) that has been installed on the system
- The state of the software product:
• Available (state = 1)
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the software vital product database.
Details — Given that they rarely need to work with these object classes directly (odmadd,
odmdelete, and so on). And when they do, they will be under the direction of the AIX Support staff.
Do not spend too much time on the details of these classes. Explain, at a high level, what kind of
data is stored in the ODM classes (version, release, and so forth) and the meaning of the shown
ODM classes. Identify how the classes are linked together by the lpp_id descriptor. Note that the
list of descriptors is not complete. The slide lists only selected descriptors for teaching purposes.
Reviewing the lslpp command options in the context of these object classes is much more likely to
be of use to the students (see additional information, below).
Additional information — At this point, you might introduce the lslpp command, which has
options like -l, -h, -f, and -w. This command queries the software vital product database. We can
see most of this information with the high level lslpp command. The flags (and the related object
classes) are:
L : List the file sets (lpp object class) without separating out the three parts.
l : List the file sets (lpp object class), showing the different repository locations.
d : List the file set dependencies (product object class).
p : List the file set prerequisites (product object class).
w : List the file set for a given file (inventory object class).
f : List the files for a given file set (inventory object class).
h : List the maintenance history for a file set (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 file set, there are a number of
objects that match this query (hence the pg command). Note that there are also files in this file
set in the /usr file system.
To display these: ODMDIR=/usr/lib/objrepos, then rerun the last odmget command. (Note:
ODMDIR defaults to /etc/objrepos.)
- history:
# odmget -q lpp_id=38 history
Transition statement — Let us review with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement — Let us look at reinforcing what we covered by playing with the ODM in the
exercise.
Uempty
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the exercise.
Details —
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
• The ODM is made from object classes, which are broken into individual objects and descriptors
• AIX offers a command-line interface to work with the ODM files
• The device information is held in the customized and the predefined databases (Cu*, Pd*)
© Copyright IBM Corp. 2009, 2015 Unit 11. The Object Data Manager 11-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review some of the key points that are covered in the unit.
Details — Present the highlights from the unit.
Additional information — None.
Transition statement — Let us continue with the next unit.
Uempty
Unit 12. LVM metadata
Estimated time
00:50
References
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 Operating system and device management
SG24-5422-00 AIX Logical Volume Manager from A to Z: Introduction and
Concepts (Redbooks)
SG24-5433-00 AIX Logical Volume Manager from A to Z: Troubleshooting
and Commands (Redbooks)
GG24-4484-00 AIX Storage Management (Redbooks)
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
LVM identifiers
IBM Power Systems
# uname -m
00C35BA04C00
© Copyright IBM Corporation 2009, 2015
Notes:
• Use of identifiers
The LVM uses identifiers for disks, volume groups, and logical volumes. As volume groups can
be exported and imported between systems, these identifiers must be unique worldwide.
AIX generated identifiers are based on the CPU ID of the creating host and a time stamp.
• Volume group identifiers
As shown on the visual, the volume groups identifiers (VGIDs) have a length of 32 bytes.
• Disk identifiers
Hard 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
discovered over two different paths is actually the same disk. Some storage solutions, in an AIX
environment, use the PVID for this purpose. Other storage solutions use a IEEE volume
Uempty identifier (ieee_volname) or a UDID unique identifier (unique_id) for this purpose. Each of these
IDs would be attributes of the disk in the ODM.
The PVID attribute is set the first time when a disk is assigned to a volume group.
If you need to manually update the disk identifiers in the ODM, do not forget to add 16 zeros to
the physical volume ID.
• Logical volume identifiers
The logical volume identifiers consist of the volume group identifier, a period, and the minor
number of the logical volume.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the LVM identifiers.
Details — Explain by using the information that is provided in the student notes. Emphasize that
these identifiers are important, since the logical name you use might not be associated and in
various problem scenarios you need to work with the unique identifier instead.
Additional information — Be sure to explain that physical volume IDs are 32 bytes long. The last
16 bytes are currently set to zeros. That is important for the exercise.
Transition statement — Let us talk about where LVM stores its information.
Uempty
Notes:
• Disk control blocks that are used by LVM
The LVM uses three different disk control blocks:
1.The Volume Group Descriptor Area (VGDA) is the most important data structure of the LVM.
A redundant copy is kept on each disk that is contained in a volume group. Each disk
contains the complete allocation information of the entire volume group.
2.The Volume Group Status Area (VGSA) tracks the status of all physical volumes in the
volume group (active or missing) and the state of all allocated physical partitions in the
volume group (active or stale). Each disk in a volume group contains a VGSA.
3.The Logical Volume Control Block (LVCB) traditionally resides in the first 512 bytes of each
logical volume. If raw devices are used (for example, many database systems use raw
logical volumes), be careful that these programs do not destroy the LVCB. However, LVCB
is not kept at this location in scalable volume groups, but instead is kept in the same
reserved disk area as the VGDA. Also, the administrator of a big VG can use the -T option
of the mklv command to request that the LVCB not be stored in the beginning of the LV.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Overview
There are times when repair needs to be made to the ODM database, replacing missing or
incorrect entries. The visual provides information that helps to identify all of the object that you
might need to locate. Usually these types of fixes are executed under the direction and with the
assistance of the AIX support group. Later, the course will cover a common procedure that is
involving rootvg problems.
• CuDV entries for physical volumes
The CuDv object class contains information about each physical volume. There is nothing
unique to LVM about the descriptors. If this object is missing, the high-level commands that are
referring to the disk name fail.
CuDv:
name = "hdisk0"
status = 1
chgstatus = 2
ddins = "scsidisk"
location = ""
parent = "vscsi0"
connwhere = "810000000000"
PdDvLn = "disk/vscsi/vdisk"
CuDv:
name = "hdisk2"
status = 1
chgstatus = 0
ddins = "scdisk"
location = "01-08-01-8,0"
parent = "scsi1"
connwhere = "8,0"
PdDvLn = "disk/scsi/scsd"
• CuAt entries for physical volumes
The disk’s most important attribute is its PVID.
The PVID has a length of 32 bytes, where the last 16 bytes are set to zeros in the ODM.
Whenever you must manually update a PVID in the ODM, you must specify the complete
32-byte PVID of the disk.
Other attributes of physical volumes (for example, the size of the disk) can be stored in CuAt.
Following is an example of a CuAt object for a physical volume.
# odmget -q "name=hdisk0 and attribute=pvid" CuAt
CuAt:
name = "hdisk0"
attribute = "pvid"
value = "00c35ba07b2e24f00000000000000000"
type = "R"
generic = "D"
rep = "s"
nls_index = 11
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
CuDv:
name = "hd2"
status = 1
chgstatus = 1
ddins = ""
location = ""
parent = "rootvg"
connwhere = ""
PdDvLn = "logical_volume/lvsubclass/lvtype"
• CuAt entries for logical volumes
Attributes of a logical volume, for example, its LVID (lvserial_id), are stored in the object
class CuAt. Other attributes that belong to a logical volume are the intra-physical policy
(intra), stripe_width, type, size, and label.
Following is an example of a CuAt object for a logical volume:
# odmget -q "name=hd2" CuAt
CuAt:
name = "hd2"
attribute = "lvserial_id"
value = "00c35ba000004c00000001157f54bf78.5"
type = "R"
generic = "D"
rep = "n"
nls_index = 648
...
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• CuDvDr entries
The ODM class CuDvDr is used to store the major and minor numbers of the devices. These
same major and minor numbers are shown in a long listing (ls -l) of the special device files
directory (/dev).
Each object has three generic descriptors that are called value1, value2, and value3. The
descriptors value1 and value2 hold the major and minor numbers. The descriptor value3
identifies the device that uses that combination for invoking the device driver.
Here is an example of a CuDvDr object for a disk:
# odmget -q "value3=hdisk0" CuDvDr
CuDvDr:
resource = "devno"
value1 = "17"
value2 = "0"
value3 = "hdisk0"
CuDvDr:
resource = "devno"
value1 = "10"
value2 = "5"
value3 = "hd2"
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• The importvg and exportvg command
The importvg and exportvg commands help you manipulate the LVM-related metadata in the
ODM database. The importvg command locates, and removes all LVM metadata for the
specified volume group. The exportvg command reads the LVM metadata (such as the VGDA)
from a specified disk and build the related class objects in the ODM.
• The scenario
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 moon. This disk belongs to the myvg volume
group. This volume group needs to be transferred to another system.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review purpose of exportvg and importvg.
Details —
Additional information —
Transition statement — Let us describe how to import a volume group.
Uempty
Notes:
• Procedure to import a volume group
To import a volume group into a system, for example, into a system that is named mars, run the
following steps:
1. Connect all disks (in the example there is only one disk) and reboot the system so that
cfgmgr will configure the added disks.
2. You must specify only one disk (by using either hdisk# or the PVID) in the importvg
command. Because all disks contain the same VGDA information, the system can
determine this information by querying any VGDA from any disk in the volume group.
If you do not specify the option -y, the command generates a new volume group name.
The importvg command generates completely new ODM entries.
The volume group is automatically varied on.
3. Finally, mount the file systems.
SMIT can also be used to run this command:
# smit importvg
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to import a volume group.
Details — Complete the scenario where the destination system has its ODM and
/etc/filesystems updated to know about the new VG and all of its LVs and file systems. The
problems that are about to be discussed have to do with conflicts between the ODM on the new
system and data that are imported.
Additional information — As of AIX 5L V5.2, importvg was enhanced to accept a PVID as a
command-line argument. For example:
importvg -y myvg 0001810fd3838c5e
Beginning with AIX 5L V5.3, the default algorithm for the importvg command was enhanced to
reduce the execution time while maintaining a maximum of integrity protection. It is no longer the
default to scan every disk of a system for an import operation. Beginning with AIX 5L V5.3, the
importvg command uses the redefinevg command to get all the PVIDs by reading the VGDA of
the disk that is related to the given volume group. Then, only the initial LVM records for those
physical volumes are examined. The default method of previous AIX releases used to read the LVM
record of every disk in the system and tried to match the disks that are listed in the VGDA.
Beginning with AIX 5L V5.3, this method is an error path to try other disks in the system, if needed.
Transition statement — It is possible to have conflicts between the imported LVM metadata and
the existing LVM metadata in the ODM. Let us look at what happens in that situation.
Uempty
Notes:
• Duplicate names during importvg
If a logical volume name or a file system name (label) already exists on the system to which you
are importing a volume group, you run into problems. The best way to avoid this situation is to
have a naming convention for your logical volume and file system names that ensures
uniqueness across systems. The common reason for having duplicates is the acceptance and
use of the AIX default names.
• Duplicate logical volume names
If you are importing a volume group with logical volumes that already exist on the system, the
importvg command renames the logical volumes from the volume group that is being imported.
For example, the logical volume /dev/lv10 might exist on both on the system where the
volume group previously existed (and from which it was exported) and on the system to which
the volume group is being imported. During the importvg command, the /dev/lv10 logical
volume might be renamed to /dev/fslv00. Any application that might be accessing the logical
volume directly needs to be updated to know the correct name.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
importvg
ODM
VGDA
LVCB and
Change, by Match IDs by /etc/filesystems
using low-level name
commands
mkvg
Abnormal termination of extendvg
commands: mklv Update
Mismatch between crfs exportvg
ODM and control blocks chfs
rmlv
reducevg
...
Figure 12-8. How LVM interacts with ODM and VGDA AN14G5.0
Notes:
• High-level commands
Most of the LVM commands that are used when working with volume groups, physical, 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 shell scripts and use names
to reference a certain LVM object. The ODM is consulted to match a name, for example, rootvg
or hdisk0, to an identifier.
• Interaction with disk control blocks and the ODM
The high-level commands call intermediate or low-level commands that query or change the
disk control blocks VGDA or LVCB. Additionally, the ODM must be updated; for example, to add
a new logical volume. The high-level commands contain signal handlers to clean up the
configuration if the program is stopped abnormally. If a system crashes, or if high-level
commands are stopped by kill -9, the system can end up in a situation where the
VGDA/LVCB and the ODM are not in sync. The same situation might occur when low-level
commands are used incorrectly.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how LVM interacts with ODM and VGDA/LVCB.
Details — Use the student notes to guide your explanation.
Additional information —
Transition statement — What can we do to fix problems where the ODM is not up to data with the
disk control block LVM metadata?
Uempty
If the ODM problem is not in the rootvg, for example in volume group
homevg, do the following:
# varyoffvg homevg
Figure 12-9. Fixing ODM problems with user volume groups AN14G5.0
Notes:
• Determining which volume group has the problem
If you detect ODM problems, you must determine whether the volume group with the problem is
the rootvg or not. Because the rootvg cannot be varied off, the procedure that is given here
applies only to non-rootvg volume groups.
• Steps in ODM repair procedure (for problem not in rootvg)
1. In the first step, you vary off the volume group, which requires that all file systems must be
unmounted first. To vary off a volume group, use the varyoffvg command.
2. In the next step, you export the volume group by using the exportvg command. This
command removes the complete volume group from the ODM. The exportvg command
does not touch the VGDA and LVCB.
3. In the last step, you import the volume group by using the importvg command. Specify the
volume group name with option -y. Otherwise, AIX creates a new volume group name.
You need to specify only one intact physical volume of the volume group that you import.
The importvg command reads the VGDA and LVCB on that disk and creates new ODM
objects.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
This procedure does not allow the data to be used while repairing the corruption, even if the file
systems are mounted and are accessible despite the problem. The logical volumes must be
closed to vary the volume group offline.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
If the ODM problem is in the rootvg, try using the rvgrecover procedure:
PV=hdisk0
VG=rootvg
cp /etc/objrepos/CuAt /etc/objrepos/CuAt.$$
cp /etc/objrepos/CuDep /etc/objrepos/CuDep.$$
cp /etc/objrepos/CuDv /etc/objrepos/CuDv.$$
cp /etc/objrepos/CuDvDr /etc/objrepos/CuDvDr.$$
Notes:
• 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 below.
• The rvgrecover procedure
If you detect ODM problems in rootvg, you can try using the procedure that is called
rvgrecover. You might want to code this procedure in a script (shown on the visual) in /bin and
mark it executable.
The rvgrecover procedure removes all ODM entries that belong to your rootvg by using
odmdelete. That 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
Uempty With the rootvg, the corruption problem can 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-ROM or NIM). Before attempting this, you should make sure that you have a
current mksysb backup.
Use the steps in the following table (which are similar to those in the rvgrecover script that is
shown on the visual) to recover the rootvg volume group after booting to maintenance mode
and file system mounting.
Step Action
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
1
> odmdelete -q “name=$LVname” -o CuAt
> odmdelete -q “name=$LVname” -o CuDv
> odmdelete -q “value3=$LVname” -o CuDvDr
> done
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
2
# odmdelete -q “name=rootvg” -o CuDep
# odmdelete -q “dependency=rootvg” -o CuDep
# odmdelete -q “value1=10” -o CuDvDr
# odmdelete -q “value3=rootvg” -o CuDvDr
Add the volume group associated with the physical volume back to the ODM.
3
# importvg -y rootvg hdisk0
Re-create the device configuration database in the ODM from the information
4 on the physical volume.
# varyonvg -f rootvg
This assumes that hdisk0 is part of rootvg.
In CuDvDr:
value1 = major number
value2 = minor number
value3 = object name for major/minor number
rootvg always has value1 = 10.
The steps can also be used to recover other volume groups by substituting the appropriate
physical volume and volume group information. It is suggested that the steps in this example
are put into a script.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe how to fix ODM problems in rootvg by using the rvgrecover script and other
techniques.
Details — Explain the student material. Ensure that students understand that they do not need to
reboot in maintenance mode to fix non-rootvg inconsistencies. Remind them of the importance of
backing up rootvg (if possible) before attempting repair on rootvg.
Additional information —
Transition statement — Let us look at some useful intermediate level LVM commands.
Uempty
• synclvodm <vgname>
– Synchronizes the VGDA, LVCB, ODM, and special device files.
– Volume group must be active.
– First run redefinevg command if ODM does not have the minimum
required information about the volume group.
© Copyright IBM Corporation 2009, 2015
Notes:
• 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 be taken offline,
which would be disruptive. In these situations, it is useful to know some intermediate-level LVM
commands. These commands are primarily intended to be used by high-level ODM commands,
but they can be useful in solving tough problems.
• The synclvodm command
Syntax: synclvodm <VG> [<LV> ...]
Use of the synclvodm command is yet another way that you might be able to fix ODM problems
in rootvg. If for some reason the ODM is not consistent with on-disk information, the synclvodm
command can be used to re-synchronize the database. It synchronizes or rebuilds the LVCB,
the ODM, and the VGDAs. The volume group must be active for the re-synchronization to occur.
If logical volume names are specified, only the information that is related to those logical
volumes is updated.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
The synclvodm command, by itself, can do a fairly complete job of resynchronizing the ODM
with the LVM data areas on the disk. It will also synchronize the information between the LVM
data areas. (As such, it can worsen a situation where only one disk in the volume group is
corrupted data areas). The command can be restricted to synchronizing only specific logical
volumes. Otherwise, it synchronizes all logical volumes. The synclvodm command depends
upon a minimal amount of information in the ODM; most importantly, the ODM needs to know
the volume group name plus the physical volume and logical volume memberships.
• The redefinevg command
The redefinevg command redefines the set of physical volumes of the given 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 re-enters 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 still online (the ODM corruption might
prevent any attempt to vary them offline).
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
• The LVM information is held in a number of different places on the disk, including the ODM and
the VGDA
• ODM-related problems can be solved by:
- The exportvg and importvg commands for non-rootvg VGs.
- The rvgrecover command for rootvg.
- LVM intermediate commands.
© Copyright IBM Corp. 2009, 2015 Unit 12. LVM metadata 12-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 13. Disk management procedures
Estimated time
01:10
References
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 Operating system and device management
GG24-4484 AIX Storage Management (Redbooks)
SG24-5432 AIX Logical Volume Manager from A to Z: Introduction and
Concepts (Redbooks)
SG24-5433 AIX Logical Volume Manager from A to Z: Troubleshooting
and Commands (Redbooks)
Note: References listed as online are available through the IBM Knowledge
Center at the following address:
http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
Introduction
This unit presents many disk management procedures that are important for any AIX system
administrator.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
A disk must
be replaced ...
Yes
Disk mirrored? Procedure 1
No
Yes
Disk still working? Procedure 2
No
Volume group No
Procedure 3
lost?
Yes
Replace disk and Replace disk
recover mksysb and restvg
Notes:
• Reasons to replace a disk
Many reasons might require the replacement of a disk, for example:
- Disk too small
- Disk too slow
- Disk produces many DISK_ERR4 log entries
• Flowchart
Before starting the disk replacement, always follow the flowchart that is shown in the visual.
This 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, do the following
steps:
a.If the volume group can be varied on (normal or forced), use procedure 3.
Uempty b.If the volume group is totally lost after the disk failure, that means the volume group might
not be varied on (either normal or forced).
i.If the volume group is rootvg, replace the disk and restore from your mksysb. Any
volume groups, not in the mksysb captured ODM (such as those created after the
last mksysb) should be reimported.
ii.If the volume group is not rootvg, replace the disk and use the restvg command to
restore the user volume group.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide considerations before a disk replacement.
Details — Explain as described in the student material.
Additional information — This flowchart 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. For rootvg, if the volume group is totally lost after the disk failure, that means the volume group
might not be varied on, either normal or forced- Recover by using the mksysb backup of the
rootvg
5. For non-rootvg, if the volume group is totally lost after the disk failure, that means the volume
group might not be varied on, either normal or forced - Recover by using the restvg backup for
the non-rootvg
Transition statement — Let us start with Procedure 1.
Uempty
Notes:
• When to use this procedure
Use Procedure 1 when the disk that must be replaced is mirrored.
• Disk state
This procedure requires that the disk state of the failed disk must be either missing or removed.
Use 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.
Disable the quorum check if you have only two disks in your volume group.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Volume group
2. Add new disk to volume group:
# extendvg vg_name hdiskY
Notes:
• When to use this procedure
Procedure 2 applies to a disk replacement where the disk is unmirrored but could be accessed.
If the disk that must be replaced is in rootvg, follow the instructions on the next visual.
• The goal and how to do it
The goal is the same as always. Before we can replace a disk, we must remove everything from
the disk.
1.Shut down your system if you need to physically attach a new disk to the system. Boot the
system so that cfgmgr will configure the new disk.
2.Add the new disk to the volume group. Use either the SMIT fast path smit extendvg or the
extendvg command.
Uempty 3.Before executing the next step, it is necessary to distinguish between the rootvg and a
non-rootvg volume group.
a.If the disk that is replaced is in rootvg, execute the steps that are shown on the next visual
Procedure 2: Special steps for rootvg.
b.If the disk that is replaced is not in the rootvg, use the migratepv command:
# migratepv hdisk_old hdisk_new
This command moves all logical volumes from one disk to another. You can do this
during normal system activity. The command migratepv requires that the disks are in
the same volume group.
c.If the old disk was completely migrated, remove it from the volume group. Use either the
SMIT fast path smit reducevg or the reducevg command.
d.If you need to remove the disk from the system, remove it from the ODM by using the
rmdev command as shown. Finally, remove the physical disk from the system.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain Procedure 2.
Details — Describe as explained in the student material.
Additional information — Make it clear to the students that Step 3 is different for rootvg.
Transition statement — Let us describe the special considerations for rootvg.
Uempty
rootvg 1…
hdiskX 2…
hdiskY
Notes:
• More steps for rootvg
Procedure 2 requires some additional steps if the disk that must be replaced is in rootvg.
1.Connect the new disk to the system as described in Procedure 2.
2.Add the new disk to the volume group. Use smit extendvg or the extendvg command.
3.This step requires special considerations for rootvg:
a.Check whether your disk contains the boot logical volume. The default location for the
boot logical volume is /dev/hd5.
Use the command lspv -l to check the logical volumes on the disk that must be replaced.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
If the disk contains the boot logical volume, migrate the logical volume to the new disk and
update the boot logical volume on the new disk. To avoid a potential boot from the old disk,
clear the old boot record by using the chpv -c command. Then, change your bootlist:
# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
# chpv -c hdiskX
# bootlist -m normal hdiskY
If the disk contains the primary dump device, you must deactivate the dump before
migrating the corresponding logical volume:
# sysdumpdev -p /dev/sysdumpnull
b.Migrate the complete old disk to the new one:
# migratepv hdiskX hdiskY
If the primary dump device is not active, you must activate it:
# sysdumpdev -p /dev/hdX
4.After the disk is migrated, remove it from the rootvg volume group.
# 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.
# rmdev -l hdiskX -d
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
1. Identify all LVs and file systems on failed disk: Volume group
# lspv -l hdiskY
2. Unmount all file systems with data on failed disk:
# umount /dev/lv_name hdiskX hdiskY
3. Remove all file systems from failed disk:
# rmfs filesystem
4. Remove all LVs with data on failed disk:
# rmlv lv_name # lspv hdiskY
5. Remove disk from volume group: ...
# reducevg vg_name hdiskY PV STATE: removed
6. Remove disk from system:
# rmdev -l hdiskY –d # lspv hdiskY
7. Add new disk to volume group:
# extendvg vg_name hdiskZ
...
8. Re-create removed LVs and file systems: PV STATE: missing
# mklv -y lv_name
# smit crfs
9. Restore file systems from backup:
# restore -rvqf /dev/rmt0
Notes:
• When to use this procedure
Procedure 3 applies to a disk replacement where a disk could not be accessed but the volume
group is intact. The failing disk is either in a state (not device state) of missing (normal varyonvg
worked) or removed (forced varyonvg was necessary to bring the volume group online).
If the failing disk is in an active state (this is not a device state), this procedure does not work. In
this case, one way to bring the disk into a removed or missing state is to run the reducevg -d
command or to do a varyoffvg and a varyonvg on the volume group by rebooting the system.
The reboot is necessary because you cannot vary off a volume group with open logical
volumes. Because the failing disk is active, there is no way to unmount file systems.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe Procedure 3.
Details — Describe as explained in the student notes.
Additional information — 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 will be in a removed state. Use lspv
to analyze physical volume states. If it is a normal varyonvg, the disk will be in a missing state.
Note: Removing logical volumes is possible on a disk that could not be accessed.
Transition statement — Let us next look at special issues related to disk states and quorum.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Stale partitions
IBM Power Systems
hdisk0
Mirrored
Logical
hdisk1
Volume
Notes:
• How data becomes stale
If a disk that contains a mirrored logical volume (such as hdisk2 on the visual) fails, the data on
the failed disk becomes stale (not current, not up-to-date).
• How state information is kept
State information (active or stale) is kept for each physical partition. A physical volume is
shown as stale (lsvg VGName), as long as it has one stale partition.
• Updating stale partitions
If a disk with stale partitions was repaired (for example, after a power failure), you should run the
varyonvg command that starts the syncvg command to synchronize the stale partitions. The
syncvg command is started as a background job that updates all stale partitions from the VG.
Always use the varyonvg command to update stale partitions. After a power failure, a disk
forgets its reservation. The syncvg command cannot reestablish the reservation, whereas
varyonvg does this before calling syncvg. The term reservation means that a disk is reserved
for one system. The disk driver puts the disk in a state where you can work with the disk (at the
same time the control LED of the disk turns on).
The varyonvg command works if the volume group is already varied on or if the volume group is
the rootvg.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
VGDA count
IBM Power Systems
Notes:
• Reservation of space for VGDAs
Each disk that is contained in a volume group contains at least one VGDA. The LVM always
reserves space for two VGDAs on each disk.
• Volume groups that are containing two disks
If a volume group consists of two disks, one disk contains two VGDAs, the other disk contains
only one (as shown on the visual). If the disk with the two VGDAs fails, we have only 33% of
VGDAs available, that means we have less than 50% of VGDAs. In this case, the quorum,
which means that more than 50% of VGDAs must be available, is not fulfilled.
• Volume groups that are containing more than two disks
If a volume group consists of more than two disks, each disk contains one VGDA. If one disk
fails in a volume group with three disks, you still have 66% of VGDAs available and the quorum
is fulfilled.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
datavg
hdisk1 hdisk2
Notes:
• Introduction
What happens if quorum checking is enabled for a volume group and a quorum is not available?
Consider the following example (illustrated on the visual and discussed in the following
paragraphs): In a two-disk volume group datavg, the disk hdisk1 is not available due to a
hardware defect. hdisk1 is the disk that contains the two VGDAs; that means the volume group
does not have a quorum of VGDAs.
• Result if volume group not varied on
If the volume group is not varied on and the administrator tries to vary on datavg, the varyonvg
command will fail.
• Volume group that is already varied on
If the volume group is already varied on when a quorum is lost, the LVM deactivates the volume
group. There is no more access to any logical volume that is part of this volume group. At this
point, the system sometimes shows strange behavior. This situation is posted to the error log,
which shows an error entry LVM_SA_QUORCLOSE. After losing the quorum, the volume group
might still be listed as active (lsvg -o). However, all application data access and LVM functions
Uempty that require data access to the volume group will fail. The volume group is dropped from the
active list as soon as the last logical volume is closed. You can still use fuser -k /dev/LVname
and umount /dev/LVname, but no data is written to the disk.
• When normal vary on can fail
If the quorum of VGDAs is not available during vary on, the varyonvg command fails, even
when quorum is disabled. In fact, when quorum is disabled, the varyonvg command requires
that 100% of the VGDAs be available instead of 51%.
• Doing a force vary on
Before doing a forced vary on (varyonvg -f), always check the reason of the failure. If the
physical volume appears to be permanently damaged, use a forced varyonvg.
All physical volumes that are missing during this forced vary on will be changed to physical
volume state removed. This means that all the VGDA and VGSA copies will be removed from
these physical volumes. Once this is done, these physical volumes will no longer take part in
quorum checking, nor will they be allowed to become active within the volume group until you
return them to the volume group.
• Change in VGDA distribution
In the example on the visual, the active disk hdisk2 becomes the disk with the two VGDAs. This
does not change, even if the failed disk can be brought back.
• Quorum checking on
With Quorum Checking On, you always need > 50% of the VGDAs available (except to vary on
rootvg).
• Quorum checking off
With Quorum Checking Off, you must make a distinction between an already active volume
group and varying on a volume group.
An active volume group is kept open as long as 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 using MISSINGPV_VARYON=true, you take full responsibility for the
volume group integrity.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe the quorum mechanism.
Details — Describe what happens when the quorum is not available. Make sure that they
understand the difference between quorum checking of an active VG and the quorum mechanisms
that are involved with trying to vary on an inactive VG.
Additional information — Some of this discussion applies to rootvg. However, there are some
differences, as we will see later.
Transition statement — Let us describe how to set up nonquorum volume groups.
Uempty
Notes:
• Loss of quorum in a nonquorum volume group
When a nonquorum volume group loses its quorum it can not be deactivated, it is active until it
loses all of its physical volumes. On the other hand, a non-quorum VG requires all of the
VGDAs to be available in order to activate the VG.
• Recommendations when using single mirroring
When working with single mirroring, always disable quorum checking by using the command
chvg -Qn. For rootvg, rebuild the boot image. In AIX6 and later, the change in quorum
checking is effective immediately. In older versions of AIX, you need to vary off and vary on the
volume group to make the change effective.
Note: The mirrorvg command now automatically disables quorum checking for the mirrored
volume group.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
varyonvg VGName
Active
Missing Missing
varyonvg -f VGName
Hardware
Repair
Removed
Hardware Repair
followed by:
varyonvg VGName
chpv -v a hdiskX
Removed
© Copyright IBM Corporation 2009, 2015
Notes:
• 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 during a varyonvg it gets a PV state of active.
• Missing state
If a disk cannot be accessed during a varyonvg, but quorum is available, the failing disk gets a
PV state missing. If the disk can be repaired, for example, after a power failure, you just need
to 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 a varyonvg -f VGName, a forced vary on of the volume group.
The failing disk gets a PV state of removed, and it is not used for quorum checks any longer.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce physical volume states.
Details — Use the student notes to guide your presentation. Distinguish between PV states and
device states.
Additional information — None.
Transition statement — Let us review with a couple of checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of this unit.
Details — A suggested approach is to give the students about 5 minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement — Now, let us do an exercise.
Uempty
Exercise
IBM Power Systems
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the exercise.
Details —
Additional information —
Transition statement — Let us summarize the unit.
Uempty
Unit summary
IBM Power Systems
Notes:
• Different procedures are available that can be used to fix disk problems under various
circumstances:
- Procedure 1: Mirrored disk
- Procedure 2: Disk still working (rootvg specials)
- Procedure 3: Total disk failure (volume group not lost)
- Recovery from mksysb or savevg backup
• Quorum means that more than 50% of VGDAs must be available, but you can force the volume
group online.
• Quorum enforcement should be disabled when dealing with a two-disk mirrored VG.
• importvg can have logical volume and file system name conflicts that might need administrator
intervention.
© Copyright IBM Corp. 2009, 2015 Unit 13. Disk management procedures 13-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — Let us continue with the next unit.
Uempty
Unit 14. Backup and restore
Estimated time
01:30
References
Online AIX Version 7.1 Operating System and Device
Management
AIX Version 7.1 Installation and migration
Note: References listed as online are available through the IBM Knowledge
Center at the following address:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.b
ase/kc_welcome_71.htm
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Traditional UNIX utilities
In addition to using the AIX restore and backup commands, AIX also supports the common
UNIX commands that are used to backup files.
• tar
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.
Uempty • cpio
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 reads file path names from standard input and copies these files to standard output,
along with path names and status information.
- -i 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)
• pax
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.
• dd
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
• compress
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.
• gzip
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. gunzip does unzip the file.
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.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide an overview of different approaching to providing backups.
Details — 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.
Many facilities manage their backup by using TSM rather than using the AIX supplied commands or
the traditional UNIX utilities directly.
Additional information —
Transition statement — Our first topic is about the use of file and file system level backups.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Topic 1 objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# cd /home/aix
# find . | backup -iqvf /backup/aix.backup
List files
Extract
# restore -xvf /backup/aix.backup ./file1 individual file
Notes:
• The backup command
The backup command is a useful command for making backups of AIX files and directories.
backup supports two different methods:
• Backup by file name
• Backup by i-node (also call a file system backup)
When performing a backup by file name, the files must be in a mounted file system to be backed
up. Backup by i-node, backs up file systems when they are unmounted.
Note
Relative versus full file names impact the location of files on recovery!
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to back up and restore files by file name.
Details — Go through the examples in the visual.
Additional information —
Transition statement — Let us see how to perform a backup and restore by i-node.
Uempty
# cat /etc/dumpdates
/dev/rfslv00 1 Thu May 21 15:45:21 2015
Incremental
/dev/rfslv00 0 Thu May 21 15:40:54 2015 backup
Backup history
Notes:
Backup by i-node is useful for performing full (level 0) and incremental backups of file systems.
Backup by i-node should be completed only when the file system is unmounted!
Note
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 might not be consistent.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Topic 2 objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
JFS2 snapshot (1 of 2)
IBM Power Systems
Notes:
• JFS2 snapshot
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 might be 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 given point in time
that the snapshot was taken. The snapshot also provides the capability to access files or
directories as they were at the time of the snapshot.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
JFS2 snapshot (2 of 2)
IBM Power Systems
Notes:
• How the JFS2 snapshot works
During creation of a snapshot, the snappedFS I/O is momentarily frozen, and all new writes are
blocked. This 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 has been 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 given file system can use only either internal or external
snapshots; it cannot mix the different types.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Continue basic discussion of JFS2 snapshot provides.
Details —
Additional information — A JFS2 snapshot is a file system that maps its contents to the contents
of the source snappedFS. If the snappedFS is not modified, the snapshot does not store any of the
files in its own physical partition allocations, and has content that is identical to the snappedFS.
If the snappedFS is modified, the original value of the affected blocks is saved in the allocated
storage of the snapshot file system. When the snapshot is modified, it either retrieves the data from
the snappedFS (if the data has not been modified) or it retrieves the data from its own disk storage
(if the snappedFS data was changed).
So, the snapshot always gives us the state of the data at the time the snapshot was created, but
uses only enough storage to hold the data that has been changed in the snappedFS. When
allocating space for a snapshot logical volume, we can typically allocate as little as 2-6% of the size
of the snappedFS (depending on the volatility of the snappedFS).
Note: When compared to using split mirror copies, the JFS2 snapshot has very little overhead. We
do not have to create a total copy of the existing data when creating the snapshot (as we do in
creating mirror copies) and instead of doing a re-sync of the data before the next backup (as we
need to do with the spit mirror when re-joining), we simply eliminate the snapshot and create a new
one when needed for the next backup.
Transition statement — Let us look at how we create a JFS2 snapshot.
Uempty
# smit crsnapj2
Create Snapshot for an Enhanced Journaled File System
in New Logical Volume
[Entry Fields]
File System Name /home/myfs
SIZE of snapshot
Unit Size Megabytes +
* Number of units [500] #
Notes:
• Creating an external snapshot on a new LV 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 LV).
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
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
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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
This command creates a snapshot for the /home/myfs file system on the /dev/mysnaplv logical
volume, which exists.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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 which is internal to the
snappedFS /home/myfs.
• Creating an internal snapshot for a JFS2 file system that is not mounted
Uempty 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
or
# 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.
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.
• Internal JFS2 snapshot considerations:
- First, it is important to know that you cannot use internal snapshots 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 ....
- Internal snapshots are preserved when the logredo command runs on a JFS2 file system
with an internal snapshot.
- Internal snapshots are removed if the fsck command needs to modify a JFS2 file system to
repair it.
- If an internal snapshot runs out of space, or if a write to an internal snapshot fails, all internal
snapshots for that snappedFS are marked invalid. Further access to the internal snapshots
fails. These failures write an entry to the error log.
- Internal snapshots are not separately mountable.
- Internal snapshots are not compatible with AIX releases before AIX 6.1. A JFS2 file system
that is created to support internal snapshots cannot be modified on an earlier release of AIX.
- A JFS2 file system with internal snapshots cannot be defragmented.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to create a JFS2 internal snapshot.
Details —
Additional information —
Transition statement — Later, you might want to identify if a file system has a snapshot and obtain
information about those snapshots.
Uempty
Listing snapshots
IBM Power Systems
# snapshot -q /home/myfs
Notes:
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 asterisk (*) indicates the current snapshot.
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.
It is useful to be able to identify situations 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 that is 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 space, you can dynamically increase the size of the snapshot
logical volume by using the size option of the snapshot command.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
For an internal snapshot, there is no mechanism for identifying the space usage of the snapshots.
Instead, you monitor the size of the snappedFS.
When a file system is running out of space, one way to free space is to delete old snapshots.
Keeping many generations of snapshots can be useful, but it can also be expensive in terms of
space usage.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• rollback
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.
• Recover individual files
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 (ownership, permission,
sparseness, and so on). Using the backup and restore utilities to implement a copy of files is
often a safer technique.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Creating a snapshot and backup in one operation
The backsnap command provides an interface to create a snapshot for a JFS2 file system and
perform a backup of the snapshot. The command syntax for an external snapshot is:
# backsnap -m MountPoint -s Size BackupOptions snappedFS
For example:
# backsnap -m /mntsnapshot -s size=16M -i -f /dev/rmt0 /home/myfs
This command creates a 16 MB logical volume and creates a snapshot for the /home/myfs file
system on the newly created logical volume. It then mounts the snapshot logical volume on
/mntsnapshot. The remaining arguments are passed to the backup command. In this case, the
files and directories in the snapshot are backed up by name (-i) to /dev/rmt0.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Topic 3 objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
The mksysb utility provides the following functions:
• Saves the definition of the paging space
• Provides a non-interactive installation that gives information that is required at installation time
through a data file
• Saves the inter-disk and intra-disk policies for the logical volumes
• Saves map files for logical volumes, if requested by the user
• Provides the ability to shrink the file system and logical volume in a volume group at system
installation or mksysb recovery time
• Saves the file system characteristics
• Allows the user to restore single or multiple files from a system image
The volume group image is saved in backup format.
• System backup or clone?
If the mksysb command is used for to backup the source system, it is considered a system
backup. However, if the intent of the backup is to provide a customized system for use on other
machines, the mksysb is considered a clone. Cloning means preserving either all or some of a
Uempty system's customized information for use on a different machine. During installation, the default
option is Enable System Backups to install any system = Yes. This option means
that mksysb files are not system-specific. Otherwise, if the mksysb by itself, is used to clone a
machine or LPAR that is not a hardware clone, it might not work, as it cannot support hardware
devices unique to the new machine or LPAR. For example, loading a mksysb image that is
made from a physical machine does not install correctly on a virtual LPAR because they use
different AIX file sets. However, this is an easy problem to resolve. In addition to the mksysb,
you also need to boot by using the AIX installation media to provide the filesets that are 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.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain system image backups.
Details — Present the information in the visual and notes.
Make sure that the students understand that unmounted file systems are ignored.
Additional information —
Transition statement — Let us see how we can create an mksysb.
Uempty
Notes:
• 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.
• 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.
• EXCLUDE files?
This option excludes the files and directories that are listed in the /etc/exclude.rootvg file
from the system image 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.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
image.data file
IBM Power Systems
logical_volume_policy:
SHRINK = no
EXACT_FIT = no
[ . . . ]
Notes:
The image.data file contains information that is describing the image that is installed during the
BOS installation process. This information includes the sizes, names, maps, and mount points of
logical volumes and file systems in the root 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. The user can modify
this field 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
machine being installed. Any default values in the image.data file overrides values that are
Uempty obtained when the BOS installation queries the hardware topology and existing root volume group.
The image.data file resides in the / directory.
To create a mksysb backup image with a customized image.data file:
• Create a new image.data file: # mkszfile.
• Edit the image.data file as appropriate.
• Create mksysb with the customized image.data file: # mksysb /backup/my_mksysb.
This file is part of System Backup and BOS Install Utilities.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the image.data file.
Details — Present the information in the visual and notes.
Additional information —
Transition statement — Now let us discuss the bosinst.data file.
Uempty
bosinst.data file
IBM Power Systems
• Defines defaults for variables that are controlling an installation
• Can be used to created non-prompted installations
• Key options below, for a full description see:
– /usr/lpp/bosinst/bosinst.template.README
control_flow: FIREFOX_BUNDLE = no
CONSOLE = Default KERBEROS_5_BUNDLE = no
INSTALL_METHOD = overwrite SERVER_BUNDLE = yes
INSTALL_EDITION = REMOVE_JAVA_118 = no
PROMPT = no HARDWARE_DUMP = yes
EXISTING_SYSTEM_OVERWRITE = yes ADD_CDE = no
INSTALL_X_IF_ADAPTER = no ADD_GNOME = no
RUN_STARTUP = yes ADD_KDE = no
RM_INST_ROOTS = no ERASE_ITERATIONS = 0
ERROR_EXIT = ERASE_PATTERNS =
CUSTOMIZATION_FILE = SCREEN MKSYSB_MIGRATION_DEVICE =
TCB = no TRUSTED_AIX = no
INSTALL_TYPE = TRUSTED_AIX_LSPP = no
BUNDLES = TRUSTED_AIX_SYSMGT = yes
RECOVER_DEVICES = no SECURE_BY_DEFAULT = no
BOSINST_DEBUG = no ADAPTER_SEARCH_LIST =
ACCEPT_LICENSES = target_disk_data:
ACCEPT_SWMA = LOCATION =
DESKTOP = CDE SIZE_MB =
INSTALL_DEVICES_AND_UPDATES = yes HDISKNAME = hdisk0
IMPORT_USER_VGS = locale:
CREATE_JFS2_FS = Default BOSINST_LANG = en_US
ALL_DEVICES_KERNELS = no CULTURAL_CONVENTION = en_GB
GRAPHICS_BUNDLE = yes MESSAGES = en_US
SYSTEM_MGMT_CLIENT_BUNDLE = yes KEYBOARD = en_GB
Notes:
/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.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• CREATE_JFS2_FS: Specifies whether you want to create enhanced journaled file systems. The
choices are yes and no.
• 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
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.
• 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
• TARGET DISK STANZA: Determines where to create the root volume group.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
This visual shows the tape layout of a mksysb image.
• BOS boot image
The BOS boot image contains a copy of the system's kernel and device drivers that are needed
to boot from the tape.
• 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.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show the image format for the mksysb on tape.
Details — This information is important to know when you want to restore one file from the image
rather than the whole image. If the tape is positioned to the fourth file (rootvg data), files can be
retrieved by using restore.
Additional information — The sections are officially referred to as files. Section was used to avoid
any ambiguity.
Transition statement — Let us see how we back up other volume groups.
Uempty
• Using the SMS menus, boot the system from the tape device.
• Restore mksysb image from the device, that is, tape
(/dev/rmt0), as follows:
Welcome to Base Operating System
Installation and Maintenance
Notes:
• Start a mksysb restoration
To restore a mksysb image from tape, boot the machine into SMS just as if you were performing
an installation. As shown in the installation unit, select the device to boot from (in this case
tape). Then, insert the mksysb tape and start the machine or LPAR. The machine boots from the
tape and prompts you to define the console and select a language for installation. Once you
have answered those questions, then the Installation and Maintenance menu is presented.
On the Installation and Maintenance menu, select Start Maintenance Mode for System
Recovery. In the resulting menu panel, select Install from a System Backup. When presented
with a choice of devices, choose the one that hold the image media, such as the tape drive.
You can also boot from installation media (usually DVD drive) which presents the same
screens. Ensure to put the mksysb tape in the tape drive before answering the last question.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to recover by using a mksysb image (tape).
Details — Explain how to boot the machine from tape.
Additional information —
Transition statement — You then see more screens. Let us look.
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)
Please wait...
Notes:
Changing installation settings
Once you have selected the device that holds the image, the utility returns you to the Installation
and Maintenance menu.
From the Installation and Maintenance menu, select option 2, Change/Show Installation
Settings and Install.
The options from the System Backup and Installation and Settings menu are:
• 1 Disk(s) where you want to install
- Select disks where you want to install.
• 2 Use Maps
- The option Use Maps lets you use the map file created (if you created one) during the
backup process of the mksysb tape. The default is no.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
First, the resources (mksysb image, bosinst.data, SPOT) must be allocated to the client on the
NIM server and the NIM server must run a bosinst operation on your client machine. This is
covered in the NIM course, AN22).
Second, boot 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 to return to the main menu.
If the NIM server has a bosinst.data file that is allocated which has PROMPT=no and the needed
installation information, the next thing you see is that the installation process is starting.
If the NIM server either does not have a bosinst.data file allocated, or has one with PROMPT=yes,
then you would see the same Install and Maintenance menu and you would have a change to
validate the default installation options (such as target disk) and modify them before starting the
recovery.
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
To back up non-rootvg volume groups, use smit savevg. The parameters are almost identical to
creating a mksysb image.
The savevg command finds and backs up all files that are belonging to 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 that is created by the mkvgdata command. This data file can be one of
the following:
• /tmp/vgdata/vgname/<vgname>.data
Contains information about a user 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.
• /image.data
Contains information about the root volume group (rootvg). The savevg command uses this file
to create a backup image that can be used by Network Installation Management (NIM) to
reinstall the volume group to the current system or to a new system.
Uempty The example SMIT dialog panel is not shown in full. The full panel is:
The visual also shows the process of restoring a non-rootvg volume group.
The example SMIT dialog panel is not shown in full. The full panel is:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint (1 of 2)
IBM Power Systems
Notes:
Checkpoint solutions (1 of 2)
IBM Power Systems
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint (2 of 2)
IBM Power Systems
Notes:
Checkpoint solutions (2 of 2)
IBM Power Systems
Additional information —
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 14. Backup and restore 14-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 15. Error monitoring
Estimated time
00:55
References
Online AIX Version 7.1 General Programming Concepts: Writing
and Debugging Programs (Chapter 5. Error-Logging
Overview)
Online AIX Version 7.1 Command Reference volumes 1-6
Note: References listed as online above are available at the following
address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
smit
diagnostics
Email
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() (Time stamp)
kernel module
Notes:
• Detection of an error
The error logging process begins when an operating system module detects an error. The error
detecting segment of code then sends error information to either the errsave() kernel service
or the errlog() application subroutine, where the information is in turn written to the
/dev/error special file. This process then adds a time stamp to the collected data. The
errdemon daemon constantly checks the /dev/error file for new entries, and when new data is
written, the daemon conducts a series of operations.
• Creation of error log entries
Before an entry is written to the error log, the errdemon daemon compares the label that is sent
by the kernel or the application code to the contents of the Error Record Template Repository. If
the label matches an item in the repository, the daemon collects more data from other parts of
the system.
To create an entry in the error log, the errdemon daemon retrieves the appropriate template
from the repository, the resource name of the unit that caused the error, and the detail data.
Also, if the error signifies a hardware-related problem and hardware vital product data (VPD)
Uempty exists, the daemon retrieves the VPD from the ODM. When you access the error log, either
through SMIT or with the errpt command, the error log is formatted according to the error
template in the error template repository and presented in either a summary or detailed report.
Most entries in the error log are attributable to hardware and software problems, but
informational messages can also be logged, for example, by the system administrator.
• The errlogger command
The errlogger command allows the system administrator to record messages of up to 1024
bytes in the error log. Whenever you perform a maintenance activity, such as clearing entries
from the error log, replacing hardware, or applying a software fix, it is a good idea to record this
activity in the system error log.
The following example illustrates use of the errlogger command:
# errlogger system hard disk ’(hdisk0)’ replaced
This message is listed as part of the error log.
• The errclear command
The errclear command allows you to selectively delete records from the log. The criteria is the
same as for selectively reporting entries with errpt.
• The errnotify methods
Later in this unit presents details on the option to define an errnotify method to be run
anytime certain specified error records that are processed by the errdemon. The actions that
are taken by the method program or script can include such actions as sending email, writing to
the console, or triggering diagnostics.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the components of the error logging facility.
Details —
Additional information — See the AIX 5L Differences Guide Version 5.3 Edition Redbooks
(SG24-7463-00) for more information about error log hardening (also referred to as error log RAS).
The following is a list of terms that you will probably refer to:
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 are
encountered by the system.
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.
Cover the diagram on the visual starting from the bottom, with the error being detected by errlog()
or errsave() and an entry being made in /dev/error, 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 errpt command can be run from the shell or SMIT to format records in the errlog into readable
reports. The ODM classes CuDv, CuAt and CuVPD provides 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 can become corrupted. In AIX 5L V5.3, there were minor
modifications that are made to the errdemon to improve its robustness and to recover the error
log file at its start.
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 difference from the previous versions of AIX is that the errdemon used to reset the log file if
it was corrupted, instead of repairing it.
Uempty
# smit errpt
Generate an Error Report
Notes:
• Overview
The SMIT fast path 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. Some of these fields are described in more detail below.
• CONCURRENT error reporting?
Yes means that you want errors displayed or printed as the errors are entered into the error log
(a sort of tail -f).
• Type of report
Summary, intermediate and detailed reports are available. Detailed reports give comprehensive
information. Intermediate reports display most of the error information. Summary reports
contain concise descriptions of errors.
• Error CLASSES
Values are H (hardware), S (software) and O (operator messages that are created with
errlogger). You can specify more than one error class.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Error TYPES
Valid error types include the following:
- PEND: The loss of availability of a device or component is imminent.
- 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 so that they can be analyzed 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 type of 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).
• Sequence numbers
Provides the sequence number that uniquely identifies a particular error log record.
• STARTING and ENDING time interval
The format mmddhhmmyy can be used to select only errors from the log that are time stamped
between the two values.
• Show only duplicated errors
Yes reports only those errors that are exact duplicates of previous errors that are generated
during the interval of time specified. The default time interval is 100 milliseconds. This value can
be changed with the errdemon -t command. The default for the Show only Duplicated
Errors option is no.
• Consolidate duplicated errors
Yes reports only the number of duplicate errors and time stamps of the first and last occurrence
of that error. The default for the Consolidate Duplicated Errors option is no.
• FILENAME to send reports to
The report can be sent to a file. The default is to send the report to stdout.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Summary report:
# errpt
• Intermediate report:
# errpt -A
• Detailed report:
# errpt -a
• Summary report of all hardware errors:
# errpt -d H
• Detailed report of all software errors:
# errpt -a -d S
• Concurrent error logging ("Real-time" error logging):
# errpt -c > /dev/console
Notes:
• Types of reports available
The errpt command generates a report of logged errors. Three different layouts can be
produced, depending on the option that is used:
- A summary report, which gives an overview (default).
- An intermediate report, which displays only the values for the LABEL, Date/Time, Type,
Resource Name, Description, and Detailed Data fields. Use the option -A to specify an
intermediate report.
- A detailed report, which shows a detailed description of all the error entries. Use the option
-a to specify a detailed report.
• The -d option
The -d option (flag) can be used to limit the report to a particular class of errors. Two examples
illustrating use of this flag are shown on the visual:
- The command errpt -d H specifies a summary report of all hardware (-d H) errors.
- The command errpt -a -d S specifies a detailed report (-a) of all software (-d S) errors.
• Input file that is used
Uempty The errpt command queries the error log file /var/adm/ras/errlog to produce the error
report.
• 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, we 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 that are generated by the error log device driver.
• Additional information
The errpt command has many options. Refer to your AIX Commands Reference (or the man
page for errpt) for a complete description.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the errpt command.
Details — Describe by using the information in the student notes.
Additional information —
Transition statement — Now that we know how we can formulate a report, let us look at examples
of summary and detailed reports. Let us start with the summary report.
Uempty
# errpt
Error type:
Error class:
• P: Permanent,
• H: Hardware
Performance, or Pending
• S: Software
• T: Temporary
• O: Operator
• I: Informational
• U: Undetermined
• U: Unknown
Notes:
• Content of summary report
The errpt command creates by default a summary report that gives an overview of the different
error entries. One line per error is fine to get a feel for what is there, but you need more details
to understand problems.
• Need for detailed report
The example shows different hardware and software errors that occurred. To get more
information about these errors, you must create a detailed report.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss the summary error report.
Details — Use the information in the student notes and the information that is given under
“Additional information” below to guide your explanation.
Additional information — The first field indicates the error ID, which is not unique to each entry,
that is, to each instance of an error. It is unique for a kind of error.
The next field is the time field that is in the following format: mmddhhmmyy where mmddhhmmyy is the
month, day, hour, minute, and year (as previously discussed).
The third field specifies the type of error; possible values are defined at the bottom of the visual.
There is a problem with this field because there are three possible values that begin with the letter
P. As this field is a one-letter field, you cannot tell exactly what type of an error you are dealing with
until you view the detailed report.
The next field defines the class; again the possible values are given at the bottom of the visual.
The last two fields give the resource name of the component that is causing the problem and also a
description of the error.
Transition statement — Let us look at a detailed report.
Uempty
LABEL: LVM_SA_PVMISS
IDENTIFIER: F7DDA124
Description
PHYSICAL VOLUME DECLARED MISSING
Probable Causes
POWER, DRIVE, ADAPTER, OR CABLE FAILURE
Detail Data
MAJOR/MINOR DEVICE NUMBER
8000 0011 0000 0001
SENSE DATA
00C3 5BA0 0000 4C00 0000 0115 7F54 BF78 00C3 5BA0 7FCF 6B93 0000 0000 0000 0000
Notes:
• Content of detailed error report
As previously mentioned, detailed error reports are generated by issuing the errpt -a
command. The first half of the information that is displayed is obtained from the ODM (CuDv,
CuAt, CuVPD) and is useful because it shows clearly which part causes the error entry. The
next few fields explain probable reasons for the problem, and actions that you can take to
correct the problem.
The last field, SENSE DATA, is a detailed report about which part of the device is failing. For
example, with disks, it might tell you which sector on the disk is failing. This information can be
used by IBM support to analyze the problem.
• Interpreting error classes and types
The values that are shown for error class and error type provide information that is useful in
understanding a particular problem:
- The combination of an error class value of H and an error type value of PERM indicates that
the system encountered a problem with a piece of hardware and could not recover from it.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
- The combination of an error class value of H and an error type value of PEND indicates that a
piece of hardware might become unavailable soon due to the numerous errors detected by
the system.
- The combination of an error class value of S and an error type of PERM indicates that the
system encountered a problem with software and could not recover from it.
- 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 has been logged.
- An error class value of U indicates that an error class could not be determined.
• Link between error log and diagnostics
There is a link between the error log and diagnostics. Error reports include the diagnostic
analysis for errors that have been analyzed.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Error
Error label Recommendations
type
DISK_ERR1 P Failure of physical volume media
Action: Replace device as soon as possible.
DISK_ERR2, P Device does not respond
DISK_ERR3 Action: Check power supply.
DISK_ERR4 T Error that is caused by bad block or occurrence
of a recovered error
Rule of thumb: If disk produces more than one
DISK_ERR4 per week, replace the disk.
SCSI_ERR* P SCSI communication problem
(SCSI_ERR10) Action: Check cable, SCSI addresses, and
terminator.
Error types: P = Permanent
T = Temporary
© Copyright IBM Corporation 2009, 2015
Notes:
• Common disk errors
The following list explains the most common disk errors you should know about:
- DISK_ERR1 is caused from wear and tear of the disk. Remove the disk as soon as possible
from the system and replace it with a new one. Follow the procedures that you learned
earlier in this course.
- DISK_ERR2 and DISK_ERR3 error entries are mostly caused by a loss of electrical power.
- DISK_ERR4 is the most interesting one, and the one that you should watch out for, as this
indicates bad blocks on the disk. Do not panic if you get a few entries in the log of this type
of an error. What you should be aware of is the number of DISK_ERR4 errors and their
frequency. The more you get, the closer you are getting to a disk failure. You want to prevent
this before it happens, so monitor the error log closely.
- Sometimes SCSI errors are logged, mostly with the LABEL SCSI_ERR10. They indicate that
the SCSI controller is not able to communicate with an attached device. In this case, check
the cable (and the cable length), the SCSI addresses, and the terminator.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the different types of disk errors.
Details — Explain by using the information in the student notes.
Additional information — Explain each type of error in turn:
Disk errors 1,2, and 4 return sense data that can be analyzed by the diagnostic programs to provide
extra information regarding the nature of the error, and its severity.
DISK_ERR 4 is by far the most common error that is generated, and it is the least severe. It indicates
that a bad block has been detected during a read or write request to the disk drive.
Bad block relocation and mirroring
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. During use, however, 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 can be discovered during any read or write operation, triggering DISK_ERR4 errors. 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
occurs without intervention or special configuration.
Transition statement — Let us show the most 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.
LVM_SA_STALEPP S,P Stale physical partition
Action: Check disk and synchronize
data (syncvg).
LVM_SA_QUORCLOSE H,P Quorum lost, volume group closing
Action: Check disk and consider
working without quorum.
Notes:
• Important LVM error codes
The visual shows some important LVM error codes that you should know. All of these errors are
permanent errors that cannot be recovered. Often these errors are accompanied by hardware
errors such as those shown on the previous page.
• Immediate response to errors
Errors, such as those shown on the visual, require your immediate intervention.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce some important LVM errors.
Details — Review the different terms and the errors that are produced by LVM.
Additional information — None.
Transition statement — Let us see how to maintain the error log.
Uempty
# smit errdemon
Change / Show Characteristics of the Error Log
# smit errclear
Clean the Error Log
Notes:
• Changing error log attributes
To change error log attributes like the error log filename, the internal memory buffer size and the
error log file size, use the SMIT fast path smit errdemon. The error log file is implemented as a
ring. When the file reaches its limit, the oldest entry is removed to allow adding a new one. The
command that SMIT runs is the errdemon command. See your AIX Commands Reference for a
listing of the different options.
• Cleaning up error log entries
To clean up error log entries, use the SMIT fast path smit errclear. For example, after
removing a bad disk that caused error logs entries, you should remove the corresponding error
log entries regarding the bad disk. The errclear command is part of the file set
bos.sysmgt.serv_aid.
Entries in /var/spool/cron/crontabs/root use errclear to remove software and hardware
errors. Software and operator errors are purged after 30 days, hardware errors are purged after
90 days.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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"
Notes:
• The error notification object class
The Error Notification object class specifies the conditions and actions to be taken when errors
are recorded in the system error log. The user specifies these conditions and actions in an Error
Notification object.
Each time an error is logged, the error notification daemon determines if the error log entry
matches the selection criteria of any of the Error Notification objects. If matches exist, the
daemon runs the programmed action, also called a notify method, for each matched object.
The Error Notification object class is in the /etc/objrepos/errnotify file. Error Notification
objects are added to the object class by using ODM commands.
• Example on visual
The example on the visual shows an object that creates a mail message to root whenever a
disk error is posted to the log.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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 is accompanied by 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
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
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
/etc/syslog.conf:
# errpt
errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "errpt -l $1 | tail -1 | logger -t errpt -p
daemon.notice"
Figure 15-11. Redirecting messages between syslog and error log AN14G5.0
Notes:
• Consolidating error messages
Some applications use syslogd for logging errors and events. Some administrators find it
desirable to list all errors in one report.
• Redirecting messages from syslogd to the error log
The visual shows how to redirect messages from syslogd to the error log.
By setting the action field to errlog, all messages are redirected to the AIX error log.
• Using the logger command as AIX error log notification method
You can direct error log events to syslogd by using the logger command with the errnotify
ODM class. Using objects such as those shown on the visual, whenever an entry is posted to
the error log, this last entry can be passed to the logger command.
• Function of syslogd
The syslogd daemon logs system messages from different software components (kernel,
daemon processes, system applications).
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to redirect messages between the AIX error log and syslogd.
Details — Explain by using the information in the student notes.
Additional information — None.
Transition statement — Let us review what we covered with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Present the checkpoint questions.
Details — A Checkpoint Solution is given below:
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement — Let us practice working with the AIX Error Log facility with an exercise.
Uempty
Exercise
IBM Power Systems
Error monitoring
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Transition statement — Let us summarize what you learned.
Uempty
Unit summary
IBM Power Systems
Notes:
• Use the errpt (smit errpt) command to generate error reports.
• Different error notification methods are available.
• Use smit errdemon and smit errclear to maintain the error log.
© Copyright IBM Corp. 2009, 2015 Unit 15. Error monitoring 15-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — Let us continue with the next unit.
Uempty
Unit 16. System initialization - I
Estimated time
01:05
References
Online AIX Version 7.1 Operating system and device management
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
SG24-5496 Problem Solving and Troubleshooting in AIX 5L (Redbooks)
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
Introduction
Hardware and software problems might cause a system to stop during the boot process.
This unit describes the boot process of loading the boot image from the boot logical volume and
provides the knowledge a system administrator needs to have to analyze the boot problem.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Possible failures
Notes:
• Check and initialize hardware (POST)
After powering on a machine, the hardware is checked and initialized. This phase is called the
Power On Self-Test (POST). The goal of the POST is to verify the functions of the hardware.
• Locate and load the boot image
The system firmware obtains a potential boot device from a bootlist and attempts to load that
boot image to memory. During a normal boot, the location of the boot image is usually a hard
disk. Besides hard disks, the boot image might be loaded from tape, CD-ROM, or the network;
this is the case when booting into maintenance mode. If working with the Network Installation
Manager (NIM), the boot image is loaded through the network.
To use an alternative boot location you must start the appropriate bootlist by specifying the
bootlist from the HMC when activating the LPAR, or by keys during the boot process. There is
more information on bootlists, later in the unit.
• Last steps
Passing control to the operating system means that the AIX kernel (which has been loaded from
the boot image) takes over from the system firmware that was used to find and load the boot
Uempty 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. This is performed 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.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the AIX boot process. Keep this at the overview level.
Details —
Additional information — You might mention 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, CD-ROM/DVD, hard disk, and network. If it boots from the hard disk, it
loads AIX diagnostics rather than do a normal boot.
Transition statement — Let us take a closer look at how we identify the boot devices and the order
in which they should be used.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Normal bootlist
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0 blv=hd5 pathid=0
hdisk1 blv=hd5 pathid=0
Notes:
• 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 on the next visual.
• 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:
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe how to work with the bootlists.
Details —
Additional information — The bootlist command accepts one more mode, both. As you might
suspect, the both mode sets the service and normal bootlist as the same time to the same value.
Transition statement — Starting with AIX7, new abilities where added to the bootlist command
to better handle the multi-path reality of accessing SAN disks. Let us examine these
enhancements.
Uempty
Notes:
The pathid 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.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss AIX 7 bootlist pathid enhancements.
Details — In the past, the only information about a disk in the bootlist was the name of the disk.
Then, with the advent of multibos, we can have two boot LVs in the same rootvg, each at a different
fix pack level. As a result, the bootlist needed to identify both the disk name and the BLV that should
be used.
Disks that are defined in SAN-attached storage subsystems provides 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
given boot disk. Notice that there are two different syntaxes, both valid. The first syntax has the
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.
As explained in the student notes, 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.
Additional information —
Transition statement — The SMS programs provide another method to set a bootlist. Let us look
at how to start SMS.
Uempty
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
Notes:
• 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 reside 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 by using SMS.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Working with the bootlist
The System Management Service Main Menu lists:
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
In the System Management Service menu, pick Select Boot Options to work with the
bootlist.
The next screen is the Multiboot menu that lists:
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup <OFF>
Uempty With option 1, you select a specific device to boot from right now. With option 2, you can modify
the customized bootlists. Option 3 is a toggle that has the system stop at this Multiboot menu
every time it boots, or continue with the normal boot sequence.
The focus here is the second option, used to modify the customized bootlist. The Configure
Bootlist Device Order panel lists:
1. Select 1st Boot Device
2. Select 2nd Boot Device
3. Select 3rd Boot Device
4. Select 4th Boot Device
5. Select 5th Boot Device
6. Display Current Setting
7. 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. Diskette
2. Tape
3. CD/DVD
4. IDE
5. Hard Drive
6. Network
7. None
8. 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
on 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).
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to change the bootlist in SMS.
Details — When you use SMS to change the bootlist, you are changing both the normal and
service customizable bootlists. After fixing the problem at hand, you might want to use the
bootlist command to recustomize them if you want them to be different.
Additional information — 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-ROM, internal disk, and any communication adapter.
To boot diagnostics from disk, do not insert a CD and request to use the default bootlist by pressing
the appropriate key (F5 or numeric 5) or specifying with HMC.
The other options:
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.
Transition statement — After the category of boot device is selected, you need to select the
device to use in the identified position in the bootlist.
Uempty
Select Device
Device Current Device
Number Position Name
1. - IBM 10/100/1000 Base-TX PCI-X Adapter
( loc=U789D.001.DQDWAYT-P1-C5-T1 )
2. - SAS 73407 MB Harddisk, part=2 (AIX 7.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )
3. 1 SATA CD-ROM
( loc=U789D.001.DQDWAYT-P1-T3-L8-L0
Select Task )
4. None SAS 73407 MB Harddisk, part=2 (AIX 7.1.0)
===> 2 ( loc=U789D.001.DQDWAYT-P3-D1 )
1. Information
2. Set Boot Sequence: Configure as 1st Boot Device
Notes:
• Selecting bootlist devices
You are presented with list of devices to select from. For example:
1. - IBM 10/100/1000 Base-TX PCI-X Adapter
( loc=U789D.001.DQDWAYT-P1-C5-T1 )
2. - SAS 73407 MB Harddisk, part=2 (AIX 7.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )
3. 1 SATA CD-ROM
( loc=U789D.001.DQDWAYT-P1-T3-L8-L0 )
4. None
For each position in the bootlist, you can select a device. The location code that is provided with
each device in the list helps you to uniquely identify devices that otherwise might be confused.
Next, you are presented with a Select Task panel that provides the following options:
1. Information
2. Set Boot Sequence: Configure as 1st Boot Device
After you select a device, you need to set that selection.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
You can repeat this action for each position in the bootlist. The other option is to clear a device
by specifying none as an option for that position.
Exiting out of SMS always triggers a boot attempt. If you did not specify a particular device for
this boot, it uses the bootlist set in SMS.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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 Install 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 Install 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.
Uempty 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 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.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how the boot mode is controlled.
Details —
Additional information —
Transition statement — Let us continue to look at the factors that affect boot behavior.
Uempty
Notes:
• Booting off a disk with a boot logical volume (BLV)
When the boot device is a disk on your system, the disk must have a valid boot logical volume
to be successful. The result of the boot depends upon the mode of the boot. If booting in normal
mode, the system is booted up into multiuser mode (the default run level of the inittab). If doing
a service mode boot (that uses either default bootlist or the customizable service mode bootlist),
then the system runs the diagnostics program and present a Diagnostics menu.
When using the HMC advanced activation options, you can set the mode of your boot and, if
service mode, which bootlist to use: default or stored (customized service).
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Continue covering the factors that affect boot behavior.
Details —
Additional information —
Transition statement — Let us use what we learned to affect a boot to maintenance mode.
Uempty
HMC
Advance Activate options: Boot the system from
Default bootlist • BOS CD/DVD
• Tape
• Network device (NIM)
Maintenance
Notes:
• Introduction
The visual shows an overview of how we access a system that will not boot normally. The
maintenance mode can be started from an AIX CD/DVD, an AIX bootable tape (like a mksysb),
or a network device that can access a NIM master. The devices that contain the boot media
must be stored in the bootlists.
• Boot into maintenance mode
To boot into maintenance mode:
- AIX V5.3, AIX 6.1 and AIX 7.1 systems support the bootlist command and booting from a
mksysb tape, but the tape device is, by default, not part of the boot sequence.
- If planning to boot off media in an LPAR environment, check that the device adapter slot is
allocated to the LPAR in question. If not, you might need to update the partition profile to
allocate that device. If the device is allocated to another LPAR, then you need to first
deallocate it from that other LPAR. Use a dynamic LPAR operation on the HMC to allocate
that slot.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
- If using the default bootlist, the sequence is fixed and the CD/DVD drive is the first practical
device.
- If you are not using SMS for this boot and are using a tape drive or a network adapter as
your boot device, then you need to use one of the customizable bootlists. In this situation, it
is usually the service bootlist.
- Verify your bootlist, but do not forget that some machines do not have a service bootlist.
Check that your boot device is part of the bootlist:
# 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, your 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 later option is most common). Here is an
example of setting the service boot list:
# bootlist -m service ent0 gateway=192.168.1.1 bserver=192.168.10.3 \
client=192.168.1.57
You would also need to set up the NIM server to provide a boot image for doing a maintenance
boot. For example, at the NIM server:
# nim -o maint_boot -spot <spotname> <client machine object name>
• Use the correct installation media or SPOT
Be careful to use the correct AIX installation CD/DVD (or NIM spot, or mksysb tape) to boot your
machine. For example, you should not boot an AIX 7 installed machine with an AIX 6 installation
CD/DVD. You must match the version, release, and maintenance level. The same applies to the
NIM spot level when using a network boot with NIM as the server of the boot image. A common
error that you might experience, if there is a mismatch, is an infinite loop of /etc/getrootfs
errors when trying to access the rootvg in maintenance mode.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Maintenance
Notes:
• First steps
When booting in maintenance mode, you first must identify the system console that will be
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
Uempty To work in maintenance mode, use selection 3 to start the Maintenance menu:
1 Access a Root Volume Group
2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
5 Configure Network Disks (iSCSI)
6 Install from a System Backup
In a network boot that uses NIM, the console goes straight to the maintenance menu.
From this point, access the rootvg to run any system recovery steps that might be necessary.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the first maintenance menus that are shown.
Details — Describe how to start up the maintenance mode.
Additional information — 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.
Transition statement — Let us describe how to access the rootvg.
Uempty
Type the number for a volume group to display the logical volume information
and press Enter.
Choice: 1
-----------------------------------------------------------------------------
Volume Group ID 00c35ba000004c00000001153ce1c4b0 includes the following
logical volumes:
Notes:
• Select the correct volume group
When accessing the rootvg in maintenance mode, you need to select the volume group that is
the rootvg. The Access a Root Volume Group panel displays all detected volume groups and
the disks that comprise these volume groups. Only the volume group IDs are shown and not the
names of the volume groups. Check with your system documentation that you select the correct
disk. Do not rely too much on the physical volume name but instead rely more on the PVID,
VGID, or SCSI ID.
After selecting the volume group, it will show the list of logical volumes that are contained in the
volume group. Confirm that the rootvg is selected. Two selections are then offered:
- Access this Volume Group and start a shell
- Access this Volume Group and start a shell before mounting file systems
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Maintenance
Notes:
• 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 has been set up for a machine, you can also boot the machine from a NIM master in
maintenance mode. NIM is actual a common way to do special boots in a logical partition
environment.
• Re-creating the boot logical volume
After booting from CD/DVD, tape or NIM an Installation and Maintenance Menu is shown and
you can start up the maintenance mode. After accessing the rootvg, you can repair the boot
Uempty logical volume with the bosboot command. You need to specify the corresponding disk device,
for example hdisk0:
# bosboot -ad /dev/hdisk0
# sync
# sync
# reboot
The sync commands flush any file data in memory cache to disk. While you would normally use
a shutdown command, in maintenance mode it is appropriate to use the reboot command.
The bosboot command requires that the boot logical volume (hd5) exists and is valid. The BLV
might be deleted by mistake or the LVCB of hd5 might be damaged. If you need to re-create the
BLV from scratch, the following steps should be followed:
1. Boot your machine in maintenance mode (from CD/DVD or tape (numeric 5) or use
(numeric 1) to access the Systems Management Services (SMS) to select boot device).
2. Remove the old hd5 logical volume, if exists.
# rmlv hd5
3. Clear the boot record at the beginning of the disk.
# chpv -c hdisk0
4. Create a new 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.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe the bosboot command.
Details — Describe the steps that are necessary to re-create the boot logical volume.
Describe that an hd5 boot logical volume must exist on the system.
Be sure to note that they should use reboot only when the system is not running any significant
processes. When in normal mode, they should always use the shutdown command instead.
Additional information — Be careful to use the correct AIX installation CD/VDVD to boot your
machine. Consider installing AIX base media and then applying patches to the OS. The patches
change both kernel routines AND libc. These patches invalidate the use 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 reference 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.
Transition statement — Let us review what we covered with some checkpoint questions.
Uempty
Checkpoint (1 of 2)
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of this unit.
Details — A suggested approach is to give the students about 5 minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
Checkpoint solutions (1 of 2)
IBM Power Systems
1. 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.
Additional information —
Transition statement — Now, let us do some more checkpoint questions.
Uempty
Checkpoint (2 of 2)
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Checkpoint solutions (2 of 2)
IBM Power Systems
Additional information —
Transition statement — Now let us do an exercise.
Uempty
Exercise
IBM Power Systems
System initialization - I
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the exercise.
Details —
Additional information —
Transition statement — Let us summarize.
Uempty
Unit summary
IBM Power Systems
Notes:
• During the boot process, the kernel from the boot image is loaded into memory.
• Boot devices and sequences can be updated by using the bootlist command, the diag
command, and SMS.
• The boot logical volume contains an AIX kernel, an ODM, and a RAM file system (that contains
the boot script rc.boot that controls the AIX boot process).
• The boot logical volume can be re-created by using the bosboot command.
• A corrupted journal log can be rebuilt.
© Copyright IBM Corp. 2009, 2015 Unit 16. System initialization - I 16-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — Let us continue with the next unit.
Uempty
Unit 17. System initialization - II
Estimated time
00:45
References
Online AIX Version 7.1 Operating system and device management
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
Introduction
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.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
/
Restore RAM file system from
boot image etc dev mnt usr
rc.boot 2
Activate rootvg
Configure remaining
Start "real" init process rc.boot 3 devices
(from rootvg)
/etc/inittab
© Copyright IBM Corporation 2009, 2015
Notes:
Boot sequence
The visual shows the boot sequence after loading the AIX kernel from the boot image. The AIX
kernel gets control and runs 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 OS.
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 overmounts the RAM file system
with the file systems from rootvg. The init from the root file system, hd4 replaces the init
from the boot image in the kernel.
Uempty 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.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the AIX software boot process. Keep this lecture on the overview level.
Details — Explain as described in the student notes.
Additional information — Underline 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.
Transition statement — Let us first look at what is stored in the boot logical volume (BLV).
Uempty
Notes:
• AIX kernel
The AIX kernel is the core of the operating system and provides basic services like process,
memory, and device management. The AIX kernel is always loaded from the boot logical
volume. There is a copy of the AIX kernel in the hd4 file system (under the name /unix), but this
program has no role in system initialization. Never remove /unix. Because it is used for
rebuilding the kernel in the boot logical volume.
• RAMFS
This RAMFS is a reduced or miniature root file system that is loaded into memory and used as
if it were a disk-based file system. The contents of the RAMFS are slightly different depending
on the type of system boot:
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
rc.boot summary
IBM Power Systems
rc.boot
Where Action
phase
ipl_varyon rootvg
from fsck and mount /, /usr, /var fileystems
2 RAM FS Merge RAMFS /dev with rootvg /dev
to rootvg Copy RAM FS ODM to rootvg ODM
Run init from rootvg
fsck and mount /tmp
syncvg rootvg
3 rootvg
cfgmgr (remaining devices)
savebase (ODM base devices) to BLV
Notes:
• Summary
During rc.boot 1, all base devices are configured. This 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.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
- RAMFS files are accessed by using a prefix of /../. For example, to access the fsck
command in the RAMFS (before the /usr file system is mounted), rc.boot uses
/../usr/sbin/fsck.
- Disk-based files are accessed by using normal AIX file syntax. For example, to access the
fsck command on the disk (after the /usr file system is mounted) rc.boot uses
/usr/sbin/fsck.
Note
This syntax works only during the boot process. If you boot from the CD/DVD into maintenance
mode and need to mount the root file system by hand, you need to mount it over another
directory, such as /mnt, or you are unable to access the RAMFS files.
After the paging space /dev/hd6 is made available, the following tasks are run in rc.boot 2:
1.To understand this step, remember two things:
• /dev/hd4 is mounted onto root (/) in the RAM file system.
• In rc.boot 1, the cfgmgr is called and all base devices are configured. This
configuration data is written into the ODM of the RAM file system.
Now, mergedev is called and all /dev files from the RAM file system are copied to disk.
2.All customized ODM files from the RAM file system ODM are copied to disk as well. At this
stage, both ODMs (in hd5 and hd4) are in sync now.
3.The /var file system (hd9var) is mounted.
4.All messages during the boot process are copied into a special file. You must use the alog
command to view this file:
# alog -t boot -o
As no console is available at this stage all boot information is collected in this file.
When rc.boot 2 is finished, the /, /usr, and /var file systems in rootvg are active.
• Final stage of phase 2
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 / file system in rootvg.
Uempty 2.The rootvg is synchronized by syncvg rootvg. If rootvg contains any stale partitions (for
example, a disk that is part of rootvg was not active), these partitions are updated and
synchronized. syncvg is started as a background job.
3.The configuration manager is called again. If the boot mode is normal, the cfgmgr is called
with option -p2 (phase 2). If the boot mode is service, the cfgmgr is called with option -p3
(phase 3).
4.The configuration manager reads the ODM class Config_Rules and runs either all methods
for phase=2 or phase=3. All remaining devices that are not base devices are configured in
this step.
5.cfgcon configures the console. The numbers c31, c32, c33, or c34 are displayed depending
on the type of console:
• c31: Console not yet configured. Provides instruction to select a console.
• c32: Console is an LFT (graphic display) terminal.
• c33: Console is a TTY.
• c34: Console is a file on the disk.
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.
After the ODMs have been synchronized again, the following steps take place:
1.The syncd daemon is started. All data that is written to disk is first stored in a cache in
memory before writing it to the disk. The syncd daemon writes the data from the cache each
60 seconds to the disk.
Another daemon process, the errdemon daemon, is started. This process allows errors that
are triggered by applications or the kernel to be written to the error log.
2.The LED display is turned off.
3.If the file /etc/nologin exists, it is removed. If a system administrator creates this file, a login
to the AIX machine is not possible. During the boot process, /etc/nologin is removed.
4.If devices exist that are flagged as missing in CuDv (chgstatus=3), a message is displayed
on the console. For example, this message is displayed if external devices are not powered
on during system boot.
5.The last message, System initialization completed, is written to the console. rc.boot 3
is finished. The init process runs the next command in /etc/inittab.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize rc.boot script.
Details — Describe the highlights from the rc.boot phases that are shown in the table.
Additional information —
Transition statement — 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
/var/adm/ras/BosMenus.log
Use the
/var/adm/ras/bosinst.log
alog
command
/var/adm/ras/nimlog
to view /var/adm/ras/conslog
logs /var/adm/ras/errlog
# alog –o –t boot
Notes:
• 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
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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
• 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
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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, issue 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.
For JFS:
# logform -V jfs /dev/hd8
# fsck -y -V jfs /dev/hd1
# fsck -y -V jfs /dev/hd2
# fsck -y -V jfs /dev/hd3
# fsck -y -V jfs /dev/hd4
# fsck -y -V jfs /dev/hd9var
# fsck -y -V jfs /dev/hd10opt
# fsck -y -V jfs /dev/hd11admin
exit
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to fix a corrupted file system.
Details — Point out 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 issue the shutdown command from the LPARs command prompt.
Additional information —
Transition statement — Let us review some common boot problems, their symptoms, and
procedures for fixing the 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 are missing ODM files are missing or inaccessible.
Restore missing files from a system backup
Notes:
• Introduction
The visual shows some common boot errors that might happen during the AIX software boot
process. If the described procedures do not fix the problem, it is suggested that you recover by
restoring the system by using your mksysb backup. If no mksysb is available, there are
procedures through which AIX Support can guide you to get to the point where you can run a
mksysb. But they can result in loss of configuration data and should be used only as a last
resort. Those procedures are not covered here.
• Bootlist wrong?
If the bootlist is wrong, the system cannot boot. This problem is easy to fix. Boot in SMS and
select the correct boot device. Keep in mind that only hard disks with boot records are shown as
selectable boot devices.
• /etc/inittab corrupted? /etc/environment corrupted?
An LED of 553 usually indicates a corrupted /etc/inittab file, but in some cases a bad
/etc/environment might also lead to a 553 LED. To fix this problem, boot in maintenance
mode and check both files. Consider to use a mksysb to retrieve these files from a backup tape.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
2. Your system stops booting with LED 557. What are some
reasons for this problem?
Notes:
Checkpoint solutions
IBM Power Systems
2. Your system stops booting with LED 557. What are some
reasons for this problem?
The answers are corrupted JFS log or damaged file system.
Additional information —
Transition statement — Now, let us do an exercise.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
System initialization - II
Notes:
This exercise can be found in your Student Exercise Guide.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
• 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 varyon the rootvg are configured.
• During rc.boot 2, the rootvg is varied on.
• In rc.boot 3, the remaining devices are configured.
© Copyright IBM Corp. 2009, 2015 Unit 17. System initialization - II 17-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Unit 18. The AIX system dump facility
Estimated time
00:35
References
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 Kernel Extensions and Device Support
Programming Concepts (Chapter 16. Debug Facilities)
Online AIX Version 7.1 Operating system and device management
(section on System Startup)
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Types of dumps
IBM Power Systems
• Traditional:
– AIX generates dump before halt
• 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
• 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
Notes:
• Overview
In addition to the traditional dump function, AIX 6 introduced two new types of dumps.
• Traditional dumps
Traditionally, AIX alone handled system dump generation and the only way to get a dump was
to halt the system either due to a crash or through operator request. In a logical partition, it
dumps only the memory that is allocated to that partition.
• Firmware assisted dumps (fw-assist)
With AIX 6.1 (or later) and POWER6 (or later) hardware, you can configure the dump facility to
have the firmware of the hardware platform handle the dump generation. The main advantage
to this is that the operating system can start its reboot while the firmware handles the dumping
of the memory contents. AIX 7.1 defaults to using fw-assist if the hardware is capable.
In its default mode, it captures the same scope of memory as the traditional dump, but it can be
configured for a full memory dump.
Uempty If for some reason (such as memory restrictions), a configured or requested firmware assisted
dump is not possible, then the traditional dump facility is started.
More details on the configuration and initiation of firmware assisted dumps are covered later in
the context of the sysdumpdev and sysdumpstart commands.
• Live dump facility
AIX 6.1 also introduced a new live dump capability. If a system component is designed to use
this facility, a restricted scope dump of the related memory can be captured without the need to
halt the system.
If an individual component is having problems (such as being hung), a livedumpstart
command can be run to dump the needed diagnostic information.
The management of live dumps (such as enabling a component or controlling the dump
directory) is handled with the dumpctrl command.
The use and management of live dumps require a knowledge of system components that is
beyond the scope of this class. Use these commands only under the direction of the AIX
Support Line personnel.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the different types of dumps.
Details — This is only an overview of the dump types. Do not go into much detail here.
There are two main reasons for introducing these dump types. First, they will likely hear them
referred to and this will help clarify what these are about. Second, they will see references to the
firmware assisted dumps when we look at the SMIT panels and line commands for dump
management, later in the unit.
The way a system administrator works with a firmware assisted dump is the same as procedure as
when they work with a traditional dump.
Additional information —
Transition statement — Let us look at what happens when a dump is created, such as during a
system crash.
Uempty
hd6
/dev/hd6 Primary dump device
Next boot:
Copy dump into...
Notes:
• Primary dump device
If an AIX kernel crash (system-initiated or user-initiated) occurs, kernel data is written to the
primary dump device, which is, by default, /dev/hd6, the primary paging device. Note that, after
a kernel crash, AIX might need to be rebooted. (If the autorestart system attribute is set to
TRUE, the system automatically reboots after a crash.)
• The copy directory
During the next boot, the dump is copied (remember: rc.boot 2) into a dump directory; the
default is /var/adm/ras. The dump file name is vmcore.x, where x indicates the number of the
dump (for example, 0 indicates the first dump).
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe what happens if a dump occurs.
Details — Base your presentation on the material in the student notes.
Additional information — None.
Transition statement — Let us find out what controls the dump process and how you can
configure the dump options.
Uempty
# sysdumpdev -p /dev/sysdumpnull
Deactivate primary dump
device (temporary)
# sysdumpdev -P -s /dev/rmt0 Change secondary dump device
(permanent)
# sysdumpdev -L Display information about last dump
Device name: /dev/hd6
Major device number: 10
Minor device number: 2
Size: 9507840 bytes
Date/Time: Wed Jun 3 20:41:56 PDT 2015
Dump status: 0
Notes:
• Primary and secondary dump devices
There are two system dump devices:
- Primary: Usually used when you want to save the dump data
- Secondary: Can be used to discard dump data (by using /dev/sysdumpnull)
Use the sysdumpdev command or SMIT to query or change the primary and secondary dump
devices.
Make sure that you know your system and know what your primary and secondary dump
devices are set to. Your dump device can be a portable medium, such as a tape drive. AIX uses
/dev/hd6 (paging) as the default primary dump device.
SMIT can be used to set these values, rather than running the sysdumpdev command. Use the
SMIT fast path:
# smit dump
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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.
• DVD support for system dumps
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.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty 0c8 You did not defined 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 for 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 the list.
If the value does not change, then the dump did not complete due to
an unexpected error.
0cc This code indicates that the dump was not able to be written to the primary dump device.
Therefore, the secondary dump device is used.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss the sysdumpdev command and its various options.
Details — When you install the operating system, the dump device is automatically configured for
you. By default the primary device is /dev/hd6, which is a paging logical volume, and the
secondary device is /dev/sysdumpnull.
If a dump occurs to paging, the system automatically copies the dump when the system is
rebooted. By default, the dump gets copied to the /var/adm/ras directory. You will look at this in
detail later in this unit.
The recommended size for the dump device is at least a quarter of the size of real memory. In
problem situations 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 a support center
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.
Discussion items - What is the advantage of having two dump areas?
Answer: For a backup media.
Additional information —
Transition statement — For systems with more than 4 GB of memory, a dedicated dump device is
created at installation time.
Uempty
Notes:
• Creation of dedicated dump device
Servers with more than 4 GB of real memory have a dedicated dump device that is created at
installation time. This dedicated dump device is automatically created; no user intervention is
required. As indicated on the visual, the size of the dump device that is created depends in the
system memory size.
- Up to 12 GB of real memory - 1 GB dump device
- Up to 24 GB - 2 GB
- Up to 48 GB - 3 GB dump device
- 48 GB and above - 4 GB dump device
• Default name of dedicated dump device
The default name of the dump device logical volume is lg_dumplv.
• To create your own dedicated dump device
To create a dedicated dump logical volume, simply define the raw logical volume and use the
sysdumpdev command (or equivalent SMIT panel) to identify it as your dump device. The new
logical volume and dump configuration is included in the next system backup.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
– Validate that your new device is now the primary dump device:
• # sysdumpdev –l
Notes:
The other method for using a dedicated dump logical volume is to manually configure it after system
installation. The procedure that is shown is the visual is fairly straightforward. The main concern is
the usual one of need 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. The mirrorvg command does not mirror a dump
LV in the rootvg unless it is the paging space.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
dumpcheck utility
IBM Power Systems
Notes:
• Function of the dumpcheck utility
The /usr/lib/ras/dumpcheck utility is used to check the disk resources that are used by the
system dump facility. The command logs an error if either the largest dump device is too small
to receive the dump, or there is insufficient space in the copy directory when the dump device is
a paging space.
If the dump device is a paging space, dumpcheck verifies whether the free space in the copy
directory is large enough to copy the dump.
If the dump device is a logical volume, dumpcheck verifies that it is large enough to contain a
dump.
If the dump device is a tape, dumpcheck exits without message.
Any time a problem is found, dumpcheck logs an entry in the error log by default. If the -p flag is
present, dumpcheck displays a message to stdout.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss the dumpcheck command.
Details — Emphasize 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.
Additional information — 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).
You might mention a few other points about dump devices:
• 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.
Transition statement — There are several ways in which a system dump can be initiated. Let us
examine these options.
Uempty
Notes:
• Ways to obtain a system dump
The system can automatically initiate a system dump. In addition, there are several ways for a
user to start a system dump. The most appropriate method to use depends on the condition of
the system.
• Automatic invocation of dump routines
If there is a kernel panic, the system automatically dumps the contents of real memory to the
primary dump device.
• Using the sysdumpstart command or SMIT
One method a superuser can use to start a dump is to run the sysdumpstart command or start
it through SMIT (fast path smit dump).
The -p flag of sysdumpstart is used to specify a dump to the primary dump device.
The -s flag of sysdumpstart is used to specify a dump to the secondary dump device.
The -t flag of sysdumpstart is used to change the default type from fw_assist to traditional.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
The -f flag of sysdumpstart is used to change the scope of the dump (interacts with the
configuration set up with sysdumpdev):
• Disallow: Do not allow a full memory dump.
• Require: Require a full memory dump.
• Using the Hardware Management Console (HMC)
In an LPAR environment, a dump can be initiated from the Hardware Management Console
(HMC) by choosing Dump from the Restart Options (accessed through the Restart
Partition menu selection in the Server Management application). The Dump option is the
equivalent of pressing the physical Reset button on a non-LPAR system. The partition initiates a
system dump to the primary dump device if configured to do that. Otherwise, the partition
reboots.
• Using a special key sequence
If the system halted, but the keyboard still accepts input, a dump to the primary dump device
can be forced by pressing the <Ctrl-Alt-NUMPAD1> key sequence on the Low Function
Terminal (LFT) graphics console keyboard. (The key combination <Ctrl-Alt-NUMPAD2> on the
LFT can be used to initiate a system dump to the secondary dump device.) This method can be
used only when your machine's mode switch (if your machine has such a switch) is set to the
Service position or the Always Allow System Dump option is set to true. The Always Allow
System Dump option can be set to true by using SMIT or by using sysdumpdev -K.
• Using the remote reboot facility
The remote reboot facility can also be used to obtain a system dump.
• 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.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
This attribute (referred to as REMOTE Reboot STRING in SMIT) specifies the remote
reboot_string that the serial port scans for when the remote reboot feature is enabled. When
the remote reboot feature is enabled, and the reboot_string is received on the port, a '>'
character is transmitted, and the system is ready to reboot. If a '1' character is received, the
system is rebooted (and a system dump might be started, depending on the value of the
reboot_enable attribute); any character other than '1' aborts the reboot process. The
reboot_string has a maximum length of 16 characters and must not contain a space, colon,
equal sign, null, new line, or Ctrl-\ character.
• Enabling remote reboot
Remote reboot can be enabled through SMIT or the command line. For SMIT, the path System
Environments -> Manage Remote Reboot Facility can be used for a configured TTY.
Alternatively, when configuring a new TTY, remote reboot can be enabled from the Add a TTY
or Change/Show Characteristics of a TTY menus. These menus are accessed through the
path Devices -> TTY.
From the command line, the mkdev or chdev command is used to enable remote reboot.
Transition statement — 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 Is there
yes sufficient space
in /var to copy
Use savecore dump to?
no
Dump copied
Display the copy
dump to tape forced copy flag
Menu. = TRUE
/var/adm/ras
copy directory
Boot continues
Notes:
• Copying a dump to /var
After a crash, if the progress code displays 0c0, then you know that a dump occurred and that it
completed successfully. At this point, unless you set the autorestart system attribute to true,
you must reboot your system.
When using paging space (hd6) as the dump logical volume, the rc.boot script attempts to
copy the dump to a directory specified by copy directory (sysdumpdev).
When using a dedicated dump logical volume. The dump remains in the dump LV and is not
automatically copied anywhere at reboot. The savecore command can then be used to copy
the dump at a later convenient time.
• Sufficient space in /var
If there is enough space to copy the dump from the paging space to the /var/adm/ras directory,
then it is copied directly.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
If you believe that your problem is the result of a system defect, you can call 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.
Uempty • 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 PMR number (actually a PMR, branch number, and country number
combination) for tracking purposes. Each time, in the future, when you call about this problem,
you should have the PMR, branch, and country numbers at hand.
Once the basic information was 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 an anonymous FTP server for receiving your testcase data. The host
name for that server is: testcase.software.ibm.com.
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 FTP 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.
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the procedure for working with AIX Support.
Details —
Additional information —
Transition statement — Since AIX Support is likely to ask for it, let’s briefly look at the snap
command.
Uempty
• snap –a
– Gathers all system configuration information
– Is useful in identifying and resolving system problems
– Includes any dump that you collected
– Writes output to multiple files under /tmp/ibmsupt
Notes:
• Overview of the snap command
The snap command is used to gather system configuration information useful in identifying and
resolving system problems. It includes any dump that you collected.
The snap command is also used to compress the snap information gathered into a pax file.
Then, the file can be written to a device such as tape or DVD, or transmitted to a remote
system.
If you store the file on tape (to be shipped to IBM), be sure to label it properly. Provide:
- Problem Management Record (PMR) number
- Command that is used to create the tape
- Block size of the tape
Refer to the man page for snap or the corresponding entry in the AIX Commands Reference
manual for detailed information about the snap command and its various flags.
• Packaging system information by using the snap command
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
First, run snap -a command to gather all system configuration information. The output of this
command is written to the /tmp/ibmsupt directory.
# snap –a
Next, you should place any additional testcase data that you feel might be helpful in resolving
the problem being investigated into the /tmp/ibmsupt/other subdirectory or into the
/tmp/ibmsupt/testcase subdirectory. This additional information is then included (together
with the information gathered directly by snap) in the compressed pax file that is created in the
next step in this command sequence.
Then, the -c flag of the snap command should be used to create a compressed pax file
containing all files in the /tmp/ibmsupt directory. The output file that is created by this
command is /tmp/ibmsupt/snap.pax.Z.
# snap –c
Next, the /tmp/ibmsupt/snap.pax.Z output file should be renamed by using the mv command
to indicate the PMR number, branch number, and country number that is associated with the
data in the file. For example, if the PMR number is 12345, the branch number is 567, and the
country number is 890, the file should be renamed 12345.b567.c890.snap.pax.Z. (The
country code for the United States is: 000).
# mv /tmp/ibmsupt/snap.pax.Z PMR#.b<branch#>.c<country#>.snap.pax.Z
And upload to testcase.software.ibm.com.
Alternatively, the file can be copied to media and that media shipped to AIX Support.
# snap –o /dev/rmt0 (label and ship tape)
• 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.Z) 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.
Uempty - 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
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce the snap command.
Details — Do not go into too much detail on the snap facility. They need to know what it is and that
there is a way to handle large snaps. Point out that AIX Support is able to walk them through the
snap creation process if there is an issue about how it is handled. The main reason for this visual is
to support the snap creation in the lab exercise.
Additional information —
Transition statement — Let us review what we covered with some checkpoint questions.
Uempty
Checkpoint
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Present the checkpoint questions.
Details — A Checkpoint Solution is given below:
Checkpoint solutions
IBM Power Systems
1. If your system has less than 4 GB of main memory, what is the default
primary dump device? Where do you find the dump file after reboot?
The answers are the default primary dump device is /dev/hd6. The
default dump file is /var/adm/ras/vmcore.x, where x indicates the
number of the dump.
3. If the copy directory is too small, will the dump (which is copied during
the reboot of the system) be lost?
The answer is if the force copy flag is set to TRUE, a special menu is
shown during reboot. From this menu, you can copy the system dump
to portable media.
Additional information —
Transition statement — Let us switch over to the exercise.
Uempty
Exercise
IBM Power Systems
System dump
• Working with the AIX dump facility
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Transition to the exercise for this unit.
Details —
Additional information —
Transition statement — Let us recall some of the key points from this unit.
Uempty
Unit summary
IBM Power Systems
Notes:
• When a dump occurs, kernel and system data are copied to the primary dump device.
• The system by default has a primary dump device (/dev/hd6) and a secondary device
(/dev/sysdumpnull).
• During reboot, the dump is copied to the copy directory (/var/adm/ras).
© Copyright IBM Corp. 2009, 2015 Unit 18. The AIX system dump facility 18-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information — You might want to note that, if the system has 4 GB or more of main
memory, then a dedicated dump logical volume is created. So, the default primary dump device
depends on the amount of physical memory that is installed in the system.
Also, note:
• When a dump occurs, kernel, and system data are copied to the primary dump device.
• The system by default has a primary dump device (/dev/hd6) and a secondary device
(/dev/sysdumpnull).
• During reboot, the dump is copied to the copy directory (/var/adm/ras)
Transition statement — This brings us to the end of this unit.
Uempty
Unit 19. Advanced install techniques
Estimated time
01:15
Reference
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 Operating system and device management
Online AIX Version 7.1 Installation and migration
SC24-7910 AIX Version 7.1 Differences Guide (Redbooks)
SC23-6742 AIX Version 7.1 Understanding the Diagnostic Subsystem
for AIX
http://www.ibm.com/developerworks/aix/library/au-alt_disk_
copy
Note: References listed as online are available through the IBM Knowledge
Center at the following address: http://ibm.com/support/knowledgecenter.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Topic 1 objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit alt_install
Notes:
• Benefits of alternate disk installation
Alternate disk installation installs the operating system while the system is still up and running,
which reduces installation or upgrade downtime considerably. It also allows large facilities to
better manage an upgrade because systems can be installed over a longer period. While the
systems are still running at the previous version, the switch to the newer level can happen at the
same time.
• When to use an alternate disk installation
Alternate disk installation can be used in one of two ways:
- Installing a mksysb image on another disk
- Cloning the current running rootvg to an alternate disk. This also allows you to apply new
maintenance levels while cloning.
NIM also has the ability to initiate (for its NIM clients) either an alternate disk clone with
maintenance or an alternate disk migration. Details are provided in the NIM course (AN22)
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce alternate disk installation.
Details — Just an overview of the two basic modes for creating an alternate rootvg disk. Do not
spend much time here. The details are on the following slides.
Additional information —
alt_disk_install
New commands
command arguments
-C args disk alt_disk_copy args -d disks
-d mksysb args disks alt_disk_mksysb -m mksysb args -d disks
-W args disk alt_rootvg_op -W args -d disk
-S args alt_rootvg_op -S args
-P2 args disks alt_rootvg_op -C args -d disks
-X args alt_rootvg_op -X args
-v args disk alt_rootvg_op -v args -d disk
-q args disk alt_rootvg_op -q args -d disk
Uempty
hdisk0
• rootvg (AIX 6.1)
hdisk1
AIX 7.1
mksysb
Notes:
• Introduction
An alternate mksysb installation involves installing a mksysb image that was already created
from another system onto an alternate disk of the target system.
• Example
In the example, an AIX V7.1 mksysb tape image is installed on an alternate disk, hdisk1 by
running the following command:
# alt_disk_mksysb -m /dev/rmt0 -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).
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit alt_mksysb
[Entry Fields]
* Target Disk(s) to install [hdisk1] +
* Device or image name [/dev/rmt0] +
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 [] /
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
hdisk0
• rootvg (AIX 7.1 TL01)
Clone
hdisk1
AIX AIX 7.1 TL03 • rootvg (AIX 7.1 TL03)
Notes:
• Benefits of cloning rootvg
Cloning the rootvg to an alternate disk can have many advantages. One advantage is having
an online backup available if a disk fails. Another benefit of rootvg cloning is in applying new
maintenance levels or updates. A copy of the rootvg is made to an alternate disk (in the
example hdisk1) followed by the installation of a technology level on that copy. The active
system runs uninterrupted during this time. When the system is rebooted, it will boot from the
newly updated rootvg for testing. If the technology level causes problems, the old rootvg can
be used by resetting the bootlist and rebooting.
• Example
In the example, alt_disk_copy -b update_all -l /dev/cd0 -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.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Introduce alternate disk rootvg cloning.
Details —
Additional information — 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)
-r (Reboot after cloning)
-s script
-P phases
-R resolv.conf
-W filesets
Transition statement — Let us show the SMIT fast path.
Uempty
# smit alt_clone
Clone the rootvg to an Alternate Disk
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Target Disk(s) to install [hdisk1] +
Phase to execute all +
image.data file [] /
Exclude list [] /
Bundle to install [update_all] +
-OR-
Fileset(s) to install []
Fix bundle to install []
-OR-
Fixes to install []
Directory or Device with images [/dev/cd0]
(required if filesets, bundles or fixes used)
installp Flags
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
ACCEPT new license agreements? no +
Customization script [] /
Set bootlist to boot from this disk
on next reboot? yes +
Reboot when complete? no +
Verbose output? no +
Debug output? no +
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe the SMIT fast path for alternate disk rootvg cloning.
Details — Keep it brief.
Additional information —
Transition statement — Let us show how to remove an alternate disk installation.
Uempty
Original hdisk0
• rootvg (AIX 7.1 TL01)
Notes:
• Removing the alternate rootvg
If you created an alternate rootvg with alt_disk_mksysb or alt_disk_copy, but no longer want
to use it, first boot your system from the original disk (in the example, hdisk0) then use
alt_rootvg_op.
When running lsvg to list the volume groups in the system, the alternate rootvg is shown with
the name altinst_rootvg.
To remove the alternate rootvg, do not use the exportvg command. Run the command:
# alt_rootvg_op -X
This command removes the altinst_rootvg definition from the ODM database.
If exportvg is run by accident, you must re-create the /etc/filesystems file before rebooting
the system. The system will not boot without a correct /etc/filesystems.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
Additional information —
Transition statement — Let us now look at saving non-rootvg volume groups.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Topic 2 objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
multibos overview
IBM Power Systems
Notes:
Overview
The main purpose of using multibos is to have the type of alternate BOS (base operating system)
capabilities that are available with the alternate disk technology, without having to use another disk.
The operating system file sets do not occupy enough space to justify allocating another entire disk
for that purpose. With multibos, you can have the two BOS versions on the same disk.
This task is accomplished by creating copies of the affected (by an OS update) base operating
system logical volumes (active BOS) with a different file name path. These copies are in the only
rootvg.
Another advantage to multibos is that it does not need as much space as the cloning operation,
since it does not need to clone all the LVs in the rootvg.
After you created the alternate BOS, changes, such as applying maintenance, can be made to
these copies, without changing the AIX version in the active BOS. In addition to applying
maintenance, you can access and make configuration changes to the standby BOS through two
Uempty techniques: mounting the standby BOS and starting an interactive shell (chroot) for the standby
BOS.
When you would like to test the standby BOS, you reboot by using the standby copy of the boot
logical volume (BLV). If there is a problem with the changes that were made, configure the bootlist
to use the original BLV and a reboot returns you to the original version of the BOS.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide an overview of multibos function and purpose.
Details —
Additional information —
Transition statement — Let us first look at the file system structure of the alternate BOS, when
created.
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)
© Copyright IBM Corporation 2009, 2015
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the structure of the standby BOS.
Details —
Additional information —
Transition statement — Next, look at how to create a standby BOS with the multibos command.
Uempty
• multibos –s –X
• Pre-validate that there is sufficient rootvg free space!
• Uses default image.data (can customize with –i)
• Special logical volumes and file systems that are created for the standby
OS:
– bos_<lvname>
– /bos_inst/<mount point>
Notes:
• multibos space prerequisite
Since the multibos needs sufficient space in rootvg to replicate the BOS logical volumes, you
must ensure that there is enough free space in the rootvg. Display the current space that is
used by these BOS logical volumes. Remember that user-defined LVs, even if in the rootvg is
not cloned. Then, check that there is enough space in the rootvg disk. The clone, by default,
uses the default /image.data file. So, the cloned LVs, are placed on the same disk as the
source LVs. If you need to obtain space by extending the VG, then you need to customize the
image.data file that is used.
The creation of the standby BOS (multibos -s command) requires extra space in the active
BOS during the operation. You should allow the multibos command to increase the size of file
systems as needed (by using the -X flag).
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• image.data customization
To change characteristics of the cloned rootvg logical volumes or file systems, create a copy of
the image.data file, edit the copy, and then direct multibos to use your edited copy (by using
the -i flag).
For example, if you want the cloned logical volumes to be placed on a disk that was added to
the rootvg, follow these steps:
i. Run the mkszfile command to obtain a current capture of the characteristics.
ii. Copy the created /image.data file to a different name, and edit it to specify that the
cloned logical volumes should be placed on the additional disk.
iii. Point to the new file by running the command: multibos -i <image.data copy> -Xs
• Which LVs are cloned?
The multibos facility does not clone all the LVs in the rootvg, unlike the alternate disk facility.
Some of the system defined logical volumes and all user-defined logical volumes are accessed
in common between the active BOS and the standby BOS.
The logical volumes that are cloned are:
- /dev/hd5 (BLV)
- /dev/hd4 (root file system)
- /dev/hd2 (/usr)
- /dev/hd9var (/var)
- /dev/hd10opt (/opt)
• Tasks of multibos standby BOS creation
The multibos command, when requested to create a standby BOS, will:
- Collect the meta information about the rootvg
- Create and define the standby logical volumes and file systems
- Use the backup and restore commands to copy the files from the active BOS file systems
to the standby file systems
- Set the bootlist to have the standby BOS BLV first and the active BLV second
- Run a post-creation customization script, if provided by the administrator
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• Customizing standby BOS
You can use the multibos customization operation, with the -c flag, to update the standby
BOS. The customization operation requires a source for the fix file sets (-l device or directory
flag) and at least one installation option (installation by bundle, installation by fix, or
update_all).
The customization operation performs the following steps:
1.The standby BOS file systems are mounted, if not already mounted.
2.If you specify an installation bundle with the -b flag, the installation bundle is installed by
using the geninstall utility. The installation bundle syntax should follow geninstall
conventions. If you specify the -p preview flag, geninstall does a preview operation.
3.If you specify a fix list, with the -f flag, the fix list is installed by using the instfix utility. The
fix list syntax should follow instfix conventions. If you specify the -p preview flag, then
instfix does a preview operation.
Uempty 4.If you specify the update_all function, with the -a flag, it is done by using the
install_all_updates utility. If you specify the -p preview flag, then install_all_updates
does a preview operation.
Note
It is possible to do one, two, or all three of the installation options during a single
customization operation.
5.The standby boot image is created and written to the standby BLV by using the AIX bosboot
command. You can block this step with the -N flag. You should use the -N flag only if you
are an experienced administrator and have a good understanding the AIX boot process.
6.Upon exit, if standby BOS file systems were mounted in Step 1, they are unmounted.
• Mounting and unmounting standby BOS
It is possible to access and modify the standby BOS by mounting its file systems over the
standby BOS file system mount points. The multibos mount operation, by using the -m flag,
mounts all standby BOS file systems in the appropriate order.
The multibos unmount operation, with the -u flag, unmounts all standby BOS file systems in
the appropriate order.
• Standby BOS shell
You can start a limited interactive chroot shell with standby BOS file systems by using the
multibos -S command. This shell accesses to standby files by using standard paths. For
example, /bos_inst/usr/bin/ls maps to /usr/bin/ls within the shell. The active BOS files
are not visible outside of the shell, unless they are mounted over the standby file systems. Limit
shell operations to changing data files, and do not make persistent changes to the kernel,
process table, or other operating system structures. Use the BOS shell only if you are
experienced with the chroot environment.
The multibos shell operation performs the following steps:
1.The standby BOS file systems are mounted, if they are not already.
2.The chroot utility is called to start an interactive standby BOS shell. The shell runs until an
exit occurs.
3.If standby BOS file systems were mounted in step 1, they are unmounted.
• Alternate boot
The bootlist command supports multiple BLVs. As an example, to boot from disk hdisk0 and
BLV bos_hd5, you would enter the command:
# bootlist –m normal hdisk0 blv=bos_hd5
After the system is rebooted from the standby BOS, the standby BOS logical volumes are
mounted over the usual BOS mount points, such as /, /usr, /var. The set of BOS objects, such
as the BLV, logical volumes, file systems that are currently booted are considered the active
BOS, regardless of logical volume names. The previously active BOS becomes the standby
BOS in the existing boot environment.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Some facilities are blocked from alternating the BLV. When they tried to set the bootlist to the
standby BLV, they would receive the following error:
0514-226 bootlist: Invalid attribute value for blv
This error is an indication that either the BLV is corrupted or the ODM entry for it is corrupted. A
suggested solution is to rebuild the standby BLV. This solution requires a special bosboot flag:
# bosboot -sd /dev/ipldevice -M standby -l bos_hd5
• Removing standby BOS
The remove operation, by using the -R flag, deletes all standby BOS objects, such as BLV,
logical volumes, file systems.
You can use the remove operation to make room for a new standby BOS, or to clean up a failed
multibos installation. The remove operation performs standby tag verification on each object
before removing it. The remove operation act only on BOS objects that multibos created,
regardless of name or label. You always have the option of removing extra BOS objects by
using standard AIX utilities, such as rmlv, rmfs, and rmps.
The multibos remove operation does the following steps:
1.All boot references to the standby BLV are removed.
2.The bootlist is set to the active BLV. You can skip this step by using the -t flag.
3.Any mounted standby BLVs are unmounted.
4.Standby file systems are removed.
5.Remaining standby logical volumes are removed.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
Transition statement —
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Checkpoint
IBM Power Systems
Notes:
Checkpoint solutions
IBM Power Systems
Additional information —
Transition statement — Now, let us do an exercise.
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Exercise
IBM Power Systems
Topic 2: multibos
• Clone the active BOS
• Alternate boot between different
levels
• Apply a new service pack (optional)
Notes:
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit summary
IBM Power Systems
Notes:
• Alternate disk installation techniques are available:
- Installing a mksysb onto an alternate disk
- Cloning the current rootvg onto an alternate disk
• Alternate BOS can be created and apply maintenance
© Copyright IBM Corp. 2009, 2015 Unit 19. Advanced install techniques 19-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Uempty
Appendix A. Survey of additional AIX facilities
Estimated time
00:45
Reference
Online AIX Version 7.1 Command Reference volumes 1-6
Online AIX Version 7.1 Operating System and Device
Management
Online AIX Version 7.1 Installation and Migration
Note: References listed as Online above are available at the following
address:
http://publib.boulder.ibm.com/infocenter/systems
SG24-5765 AIX 5L Differences Guide: V 5.2 Edition (Redbook)
SG24-7463 AIX 5L Differences Guide: V 5.3 Edition (Redbook)
SG24-7414 AIX 5L Differences Guide: V 5.3 Addendum (Redbook)
SG24-7559 IBM AIX Version 6.1 Differences Guide (Redbook)
SG24-7910 IBM AIX Version 7.1 Differences Guide (Redbook)
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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 (AU18).
• 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).
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Provide a brief survey of AIX performance statistics commands.
Details — It is assumed they are already familiar with UNIX performance management, and if they
are not, we do not have time in this class to teach them this skill. If they have that background, this
visual is to assure them that those skills are transferable to AIX. Even if they have that 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, they should attend additional training that
focuses on AIX and POWER performance to build a better understanding of AIX and POWER
system performance management issues.
Additional information —
Transition statement — Let us next discuss print subsystems.
Uempty
Printing
IBM Power Systems
Notes:
• 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
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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 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.
• IBM’s Infoprint Manager (or similar advanced print management system)
Infoprint Manager provides serialization and filtering, plus it adds extra capabilities of security,
customization, and control not provided by either System V printing or AIX printing. For
additional information, refer to the Infoprint Manager website:
http://www.printers.ibm.com/INTERNET/wwsites.nsf/vwwebpublished/ipmaix_ww
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Scheduling
IBM Power Systems
Notes:
• 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 con.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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Survey AIX support for cron daemon scheduling.
Details — Keep it very brief - they should already be familiar with cron. Just let them know that AIX
supports it. The location of the files can differ but the function is basically the same.
Additional information —
Transition statement — Let us next look at how AIX supports memory paging.
Uempty
Paging space
IBM Power Systems
Notes:
• AIX paging space
When the system runs low on free memory frames, memory is scanned to locate those memory
page frames that are least-recently used (LRU). When one is located (and the data it contains
cannot be moved to a permanent home in file system space), a 4 KB block or page of disk
space is allocated and the data from the page frame is moved to a special area on disk. This
area on disk is called paging space.
• Default paging space (hd6)
Paging space is created during AIX installation using logical volume hd6. The initial hd6 paging
space size is determined according to the following standards:
- If RAM is greater than or equal to 256 MB, paging space is 512 MB. If RAM is less than 256
MB, paging space is twice the size of RAM.
- hd6 cannot be reduced to less than 64 MB.
- Total paging space can use no more than 20% of total disk space.
• The /etc/swapspaces file
The file /etc/swapspaces contains a list of the paging space areas that are activated at
system startup.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• The lsps command
The lsps command lists detailed information regarding the paging spaces on the system,
including whether they are in use at the time and, if so, what percentage of their total space is
allocated.
Another useful option available with the lsps command is the -s option, which specifies the
summary characteristics of all paging spaces. The information consists of the total size of the
paging spaces (in MBs) and the percentage of paging spaces currently used.
• Using the mkps command
To add extra paging space volumes to the system, you can use SMIT (mkps fastpath) or the
mkps command.
When using the mkps command, the syntax and options are:
mkps [-a] [-n] [-t Type] -s NumLPs Vgname [Pvname]
Vgname The volume group within which to create the paging space.
Pvname Specifies the physical volume of the volume group.
Uempty -s NumLPs Sets the size of the new paging space in logical partitions.
-a Activate the paging space at the next restart (adds it to
/etc/swapspaces).
-n Activate the paging space immediately.
-t Type Specifies the type of paging space (lv or nfs).
• Activating a paging space volume
Inactive paging spaces can be activated dynamically once they have been defined. To do this
enter: swapon /dev/pagingnn
Note
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Survey the available AIX commands for managing paging space.
Details — The visual is mainly for reference. The rmps command requires that the specified
paging space volume be inactivated first, but the required swapoff command can be run
dynamically (provided that there is enough remaining paging space to handle the pages currently
stored in paging space). Note that most operations can be done dynamically.
Additional information —
Transition statement — Our final topic is a survey of AIX security and how it compares to
traditional UNIX security.
Uempty
• Traditional authentication:
– Users and groups (root superuser)
– Password rules and expiration
– Can centrally define using LDAP or NIS
Notes:
• Traditional UNIX security
By default, AIX uses the traditional UNIX security mechanisms. Files have owners who control
the access permissions using permission bits for themselves (owner), for members of group
associated with the file, and for the rest of the world (other). The ownership, related group and
permission bits are controlled through traditional UNIX commands:
- chown
- chgrp
- chmod
- umask
• User authentication
User authentication uses /etc/passwd and its shadow file /etc/security/passwd (where
the encrypted password is actually stored). The user attributes can define rules for passwords
and expiration limits (force them to periodically change the password). The authentication can
be directed to use a remote server, either NIS or LDAP. Also, alternate authentication methods
can be defined.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Security logs
IBM Power Systems
Notes:
• The sulog file
The sulog file is an ASCII text file that can be viewed with more or pg. In the file, the following
information is recorded: date, time, terminal name and login name. The file also records whether
the login attempt was successful (and indicates a success by a + and a failed login by a -).
• The utmp and wtmp files
The /etc/utmp file contains a record of users logged in to the system, and the /var/adm/wtmp
file contains connect-time accounting records. To obtain information from either file use the who
command with the file name. The who command normally examines the /etc/utmp file, but you
can specify either one of the files just mentioned as an argument to the command.
• The last command
The last command can also be used to display, in reverse chronological order, all previous
logins and logoffs still recorded in the /var/adm/wtmp file. The /var/adm/wtmp file collects
login and logout records as these events occur and holds them until the records are processed
by the accounting commands.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Survey the security log files and their locations.
Details — 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 them 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).
Additional information —
Transition statement — 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
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
/etc/security/user file
IBM Power Systems
Notes:
• 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.
• 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.
Uempty • 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
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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• 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
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.
Uempty • minage
Defines the minimum number of weeks between password changes. Default is 0. Range: 0 to 52.
• maxage
Defines the maximum number of weeks a password is valid. The default is 0, which is
equivalent to unlimited. 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 -1, which is equivalent to unlimited. 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 0. Range: 0
to 8.
• minother
Defines the minimum number of non-alphabetic characters in a password. The default is 0.
Range: 0 to 8.
• minlen
Defines the minimum length of a password. The default is 0. Range: 0 to 8. Note that the
minimum length of a password is determined by minlen and/or "minalpha + minother", whichever is
greater. "minalpha + minother" should never be greater than 8. If "minalpha + minother" is greater
than 8, then minother is reduced to "8 - minalpha".
• 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
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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Survey the type of attributes that can either be defaulted or set on a user by user basis.
Details — Emphasize the use of SMIT to manage these attributes, or at least the chuser command
rather than editing the file. The exception is modifying the default stanza. You can use this
emphasis on SMIT or the chuser command as a segue into the next visual.
Cover the general categories of attributes provided (for example, access control or password rules).
Discussion of details of individual attributes is generally avoided since there are so many, but
depending on the interest of the student and the time factors of the class, the instructor might want
to cover some selected attributes.
Additional information —
Transition statement — Let us look at AIX commands used to manage the users and groups.
Uempty
or use SMIT
© Copyright IBM Corporation 2009, 2015
Notes:
• 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
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Trusted execution
– Periodically audit system for tampering of commands or files
– Block execution of commands that are compromised
Notes:
• Overview
AIX6 introduced many major security enhancements. For a complete training on AIX security,
including the use of these new enhancements, it is suggested that the AIX Security course
(AU47) be attended.
• 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:
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Trusted AIX
– Label-based access control versus discretionary access control
• AIXpert
– Predefined or customized levels of system hardening
• PowerSC
– Trusted Logging: Store log in real time in VIOS
– Trusted Network Connect and Patch Management: Detect if
connecting system has required security patches
– Trusted Boot: Validates boot image, OS, and software
– Trusted Firewall: VIOS bridge acts as firewall, avoiding need to use
external switch.
• For training, see the AIX Security course (AN57)
Notes:
• Trusted AIX
Trusted AIX replaces the traditional UNIX Discretionary Access Controls (DAC) with a
combination of both DAC and Mandatory Access Controls (MAC). While traditional UNIX DAC
is based on file permission bits set by the owner, Trusted AIX MAC uses multi-level label based
security that is controlled by a system defined convention and goes beyond file control to
include network packets, processes and interprocess communications (IPC) objects. The
label-based security provides for a combination of security level (for example, secret) plus
compartmentalization (for example, you only have access to the Antarctic activities files,
regardless of security level).
The Mandatory Access Controls is a necessary part of the Common Criteria Labeled Security
Protection Profile (LSPP).
The details of Trusted AIX MAC implementation is beyond the scope of this course.
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 6.1
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.
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — continue discussion of security enhancements
Details —
Additional information —
Transition statement — Let’s review some of what we have discussed with some checkpoint
questions.
Uempty
Checkpoint (1 of 2)
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of this unit.
Details — A suggested approach is to give the students about five minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
Checkpoint solutions (1 of 2)
IBM Power Systems
Additional information —
Transition statement — We have a few more questions.
Uempty
Checkpoint (2 of 2)
IBM Power Systems
4. True or False: AIX allows you to use standard UNIX security or use
enhanced security facilities.
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose —
Details —
Additional information —
Checkpoint solutions (2 of 2)
IBM Power Systems
4. True or False: AIX allows you to use standard UNIX security or use
enhanced security facilities.
The answer is true.
Transition statement — This completes the unit, let us review what we covered.
Uempty
Unit summary
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix A. Survey of additional AIX facilities A-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — This is the end of the course; I hope you have enjoyed and benefited from
the training.
Uempty
Appendix B. Printers and queues
Estimated time
00:40
References
Online AIX 7.1 System Management Guide
Online AIX 5L Version 5.3 Guide to Printers and Printing
Note: References listed as Online above are available at the following
address:
http://publib.boulder.ibm.com/infocenter/systems/index.jsp
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Unit objectives
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• Print subsystems:
– AIX print subsystem
– System V print subsystem
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Give an overview of printing under AIX 5L and later, putting System V and AIX in
context. You also give a little advertisement for Infoprint Manager.
Details — More detail is provided in the System V print subsystem appendix. If a student is
interested in this print subsystem, the appendix has all the details and an exercise if they want to
test out the features.
Additional information — 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.
Transition statement — Now, let us look at the strengths of the AIX print subsystem.
Uempty
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — List the advantages of the AIX print subsystem.
Details — In summary, the main advantages of AIX printing are flexibility and ease of use. AIX
printing and System V are tightly integrated into SMIT and the Web-based System Manager.
Additional information —
Transition statement — Now, let us look at the strengths of the System V print subsystem.
Uempty
• Compatibility
• Availability of interface programs
• Security
• Support for forms
• Standard PostScript filters
• Long term strategy
Notes:
• 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, 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Concepts of queues
IBM Power Systems
file1
Queue1
file1
file2
.
file2 .
file3
/dev/lp0
Queue2
file3
file4
file4
/dev/lp1
© Copyright IBM Corporation 2009, 2015
Notes:
• Purpose for queues
The purpose of the queuing system is to maintain a queue of jobs that are waiting for their turn
to run (that is, use some system resource, like a printer or the CPU). The AIX 6.1 queuing
system performs this function.
• Benefits of queues
The queues also give control to the system administrator over the queuing mechanism.
Therefore, the system administrator can perform tasks like canceling jobs on queues, changing
priorities of jobs, and so forth.
A queue enables the sharing of resources in an ordered fashion.
The diagram in the visual illustrates three important issues:
• One print queue can point to a number of printers (and it is the job of the qdaemon to
determine the next available printer to print on), for example, Queue1.
• Users can submit their jobs to a number of different queues.
• A printer can have a number of different queues pointing to it, for example, the printer
/dev/lp1 is accessed by both Queue1 and Queue2.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
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
© Copyright IBM Corporation 2009, 2015
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the flow of a print job using the queuing system.
Details — Review the flow of the queuing system as it is shown in the visual. The student notes
provide detailed information on what happens when a print request is made.
The student notes also refer to 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.
Additional information —
Transition statement — 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
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — List the files involved in the queuing/spooling process, while the queuing flow is still
fresh in their minds.
Details — This is provided as a reference for students who want to know which files are involved in
printing.
Do not attempt to discuss in detail how virtual printers work. Most users never work directly with
virtual printers.
Additional information —
Transition statement — Having looked at the files involved in queuing, let us review the role of the
qdaemon.
Uempty
qdaemon
IBM Power Systems
• Manages queues
• Is started in the /etc/inittab file
• Invokes the back-end programs
• Optionally records accounting data
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Describe the functions of the qdaemon.
Details — 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.
Additional information —
Transition statement — The queue-to-device relationships are held in the /etc/qconfig file.
Let us look at the format of this file.
Uempty
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Some of the attributes that can be found in the queue stanza include:
Attribute Definition Default Other
Identifies the symbolic name that refers to the device
device
stanza
discipline Defines the queue serving algorithm fcfs sjn
Identifies the file used to save print accounting
acctfile false filename
information
up Defines the state of the queue TRUE 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:
Attribute Description Default Other
Identifies the special file where the output of
back-end is to be redirected
file FALSE
FALSE indicates no redirection and that the file name
is /dev/null.
Specifies the full path name of the back-end,
backend optionally followed by the flags and parameters to be
passed to it
both (used for
Specifies the type of access the back-end has to the modems or
access file specified by the file field This field is ignored if write backends
the file field has the value, FALSE. needing read
capability)
Specifies whether a header page prints before each
header never always group
job or group of jobs
Specifies whether a trailer page prints after each job
trailer never always group
or group of jobs
Specifies either the number of separator pages to
print when the device becomes idle or the value
feed never integer
never, which indicates that the back-end is not to
print separator pages
Specifies whether the back-end sends a form-feed
align FALSE TRUE
control before starting the job, if the printer was idle
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
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Printer menu
IBM Power Systems
# smit spooler_choice
Print Spooling
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# smit spooler
AIX Print Spooling
Move cursor to desired item and press Enter.
Notes:
• SMIT AIX printer menu
The SMIT fastpath to this menu is smit spooler. Printers and print queues can also be
managed using the Web-based System Manager.
The options on this menu are:
- Start a Print Job
This option starts a print job by submitting the job to a print queue.
- Manage Print Jobs
This option opens a submenu which enables you to cancel jobs, show the status of jobs,
prioritize jobs, hold and release jobs, and move jobs between print queues. List All Prinul3t
Uempty Queues
This option displays a list of all the print queues and their associated printers.
• Manage Print Queues
You can start and stop print queues, show the status of print queues and change the
system's default print queue.
• Add a Print Queue
This option adds a print queue to the system configuration and creates the associated
queue device and printer device definition, if needed.
• Add an Additional Printer to an Existing Print Queue
This option adds another printer to an existing queue.
• Change/Show Print Queue Characteristics
This option will provide access to screens that enable you to change the printer setup,
default print job attributes, accounting file setup, and queuing discipline.
• Change/Show Printer Connection Characteristics
This option changes or shows printer communication and startup characteristics.
• 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
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show the options available from the SMIT AIX Print Spooling menu.
Details — Explain each option briefly. Remind the students that this is actually quite a simple
procedure and try not to overwhelm them at this point with the many options. Many of these options
will be covered in this unit.
Additional information —
Transition statement — 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
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the different attachment types.
Details — In AIX V4, the SMIT menus were modified so that both the printer and the queue can be
configured in one operation.
Note that this menu will always be presented to the user, regardless of whether they are adding a
new printer, or a queue, to an existing printer.
Point out that this menu supports definitions for printers attached in a variety of ways. Many
installations these days use network-attached printers. To define this type of printer, choose either
hpJetDirect, ibmNetPrinter, or ibmNetColor.
You can also configure just the printer device without any queues through SMIT. This is useful in
instances where the application is responsible for the print job and utilizes its own control
mechanisms.
Additional information —
Transition statement — Once the attachment type is defined, the printer manufacturer has to be
specified.
Uempty
Printer Type
Move cursor to desired item and press Enter.
Bull
Canon
Dataproducts
Hewlett-Packard
IBM
Lexmark
OKI
Printronix
QMS
Texas Instruments
Other (select this if your printer is not listed above)
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Choose the printer manufacturer.
Details — This screen is also presented to the user regardless of whether they are adding a queue
to a new device or to an existing one.
Additional information —
Transition statement — Assuming that you select IBM from this menu, the next screen is a list of
all the IBM supported printers. Let us view the list.
Uempty
Printer Type
Move cursor to desired item and press Enter.
[MORE...8]
ibm2391-2 IBM 2391 Plus printer (Model 2)
ibm3112 IBM 3112 Page Printer
ibm3116 IBM 3116 Page Printer
ibm3130 IBM 3130 LaserPrinter
ibm3812-2 IBM 3812 Model 2 Page Printer
ibm3816 IBM 3816 Page Printer
ibm4019 IBM 4019 LaserPrinter
ibm4029 IBM 4029 LaserPrinter
ibm4037 IBM 4037 LP printer
ibm4039 IBM 4039 LaserPrinter
[MORE...49]
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the supported printer type.
Details — Having selected IBM from the previous menu, the system next presents the user with a
list of all the supported IBM printers. Once the printer is selected, the system then prompts the user
to create a separate queue for each mode the printer is capable of supporting.
If the printer selected from this menu does not have device support installed, the user is prompted
to install the support at this time. With AIX 6.1, no printer drivers are installed by default. However,
the AIX installation media contains the device support for many printers. Also, many OEM printers
are delivered along with the necessary printer support software.
Additional information —
Transition statement — The next section deals with how the printer is physically connected to the
server.
Uempty
Printer attachment
IBM Power Systems
Printer Interface
Move cursor to desired item and press Enter.
parallel
rs232
rs422
Parent Adapter
Move cursor to desired item and press Enter.
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Choose the printer attachment.
Details — If you are adding a queue to an existing printer, then before the two menus are displayed
as shown on the visual, an extra menu is displayed which reads:
Add a new printer or select existing printer from below.
Let us assume that you already have an IBM 4029 printer configured on the system. Having just
selected IBM from the first menu and IBM 4029 from the second printer type menu, the system at
this point is not sure whether you are trying to add a queue to the printer which already exists or
whether you are trying to configure yet another IBM 4029 printer for your system. That is why it will
ask for clarification by displaying the screen with the above message.
In the visual, we are assuming that there are no printers configured yet, or at least not one of the
type that we have selected, so the two screens are displayed. We are assuming that the printer is
connected to the parallel port.
Additional information —
Transition statement — Once information about the printer has been defined, the next menu asks
for information about the new print queues.
Uempty
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define why there can be multiple instances of queue names required.
Details — There are many variations on the naming of print queues and print devices. It is
recommended that they are kept short and simple without loosing the unique description required
by the users.
Once these initial print queues are created, more queues and queue customization can be done. It
is this procedure that creates the print and queue relationships and subsequently updates the
/etc/qconfig file. It is highly recommended that you do not edit the /etc/qconfig file directly.
Use SMIT whenever possible, because of the implications with the ODM updates.
In our example, you have chosen to create just two queues for our IBM 4029 printer. Take the time
to point out the two queues (ps and asc as shown in the student notes) that were created as a
result of having a printer which is capable of multiple modes. More often than not, this is probably
going to be the case. Also, point out that the /etc/qconfig file has a stanza construct added, that
will point two queues, to a single printer.
Additional information —
Transition statement — Now that the printer infrastructure is in place, let us talk about remote
printing.
Uempty
Remote printing
IBM Power Systems
host1 client1
lp1
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain the step for setting up remote printing.
Details — Keep this discussion simple. This is not a discussion on networking or TCP/IP. This
visual assumes that networking is already configured. Most users operate in a networking
environment and network printing is very common.
There are different techniques to set up remote printing. Here, you are showing how to take an AIX
system with a local printer, and turn it into a print server. This does not require much discussion of
the network itself. All the user needs to know is what the names (or IP addresses) are of the client
machines.
There are other ways to set up remote printing. For example, HP Jet Direct cards are very common.
If the students are using these, then the AIX system is a client rather than a host. We address that
in a moment.
Additional information — These SMIT screens can be found in Print Spooling > Manager Print
Server.
Transition statement — Let us take a look a the screen to define the client systems.
Uempty
Client authorization
IBM Power Systems
# smit mkhostslpd
[Entry Fields]
* Name of REMOTE CLIENT [client1]
(Hostname or dotted decimal address)
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to set up client authorization.
Details — Enter the name or IP address. A plus (+) symbol gives access to all machines. The
entries are added to the /etc/hosts.lpd file.
Additional information —
Transition statement — Let us see how to start the print server.
Uempty
Start lpd
IBM Power Systems
# smit mkitab_lpd
Start the Print Server Subsystem
[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
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to start the lpd daemon.
Details — Keep this simple. The screen's defaults are all that is needed to start the lpd daemon
and turn the AIX system into a print server.
Additional information —
Transition statement — Now that the server is running, let us see how to configure a client
machine for remote printing.
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
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show what to pick from SMIT to set up a remote print queue.
Details — Each attachment type will ask for different information. Let us show what information is
needed to set up the remote queue.
Be sure to mention there will be one more screen that follows this. It is used to pre-process a job.
Selecting Standard Processing will leave all processing to the printer server.
Additional information —
Transition statement — Let us see what is needed to complete the process.
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 []
Notes:
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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Complete the remote queue set up.
Details — Focus on the first three lines.
Name of QUEUE to add is the name of the queue on the client side. Users logged in to the client
machine, send their jobs to this queue.
The hostname and the name of the queue on the host must be added.
Additional information — 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.
Transition statement — Let us do a quick review.
Uempty
Let us review
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of the first part of this unit.
Details — A suggested approach is to give the students about five minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
2. To set up remote printing, what daemons are needed, and do they run on the
server, the client, or both?
The answer is qdaemon and lpd on the server; qdaemon only on the client.
4. What does discipline mean in reference to the /etc/qconfig file? What are
its possible values?
The answers are discipline is read by qdaemon to determine the sorting
order for jobs in the queue. The values supported are fcfs (first come first
server) and sjn (shortest job next).
Additional information —
Transition statement — Now, let us look at how to submit print jobs.
Uempty
$ lp -d queuename filename
- OR-
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
• 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
• 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
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
For example:
$ qchk
Queue Dev Status Job Files User PP % Blks Cp Rnk
ps lp0 DOWN QUEUE 569
/etc/motd root 1 1 1
Notes:
• Checking status with the qchk command
Many of the print job control tasks require the user to supply a job number. The job number,
along with other queue status information is available by checking the status of print jobs.
The fields from the qchk command are as follows:
Queue Queue name.
Dev Logical device name for the queue.
Status Status of the queue (READY, DOWN, WAITING, RUNNING, and so forth).
Job The job number assigned by the qdaemon.
Files Files sent to the queue.
User User who sent the print request.
PP Number of pages printed.
% Percent completed.
Uempty Blks The number of 512-byte blocks the print job has been split into.
Cp Copies of each job to be printed.
Rnk Order on that queue.
• Other viewing commands
Other commands that can be used to view printer status include:
lpstat Shows status of all queues.
lpq Shows status of the default queue.
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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — How to list the jobs in a queue.
Details — Explain 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.
All the attributes have been defined in the student notes.
Additional information —
Transition statement — Let us look at more tools that enable you to manage your print queues.
Uempty
# smit chpq
1. Printer Setup
2. Default Print Job Attributes
3. Accounting File
4. Queuing Discipline
Notes:
To modify print queue attributes use the smit fastpath:
# smit chpq
• Attributes for Printer Setup option
After selecting 1. Printer Setup, the following attributes can be changed or shown:
- Automatic mode switching to PostScript
- Paper size in trays and the manual feeder
- Envelope size
- ID of the font cards
- Paper trays for header and trailer pages
- Formatting flags for the header and trailer pages
- Users to get the intervention messages
- Flags prohibited for all print files
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Removing a queue
IBM Power Systems
# smit rmpq
[Entry Fields]
Print queue to remove ps:lp0
Local printer device /dev/lp0
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Managing queues
IBM Power Systems
# smit pqmanage
Notes:
To manage the print queues use the smit fastpath:
# smit pgmanage
• SMIT Managing Queues options
The following actions can be performed:
- Show Status of Print Queue gives output similar to qchk and lpstat
- Stop a Print Queue runs the disable command
- Start a Print Queue runs the enable command
- Set the System's Default Print Queue reorders the /etc/qconfig file to ensure the
default queue is the first queue in the file
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Notes:
• 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.
Uempty • 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
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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Define the different queue states.
Details — Explain each of the values, not in too much detail, using the student notes.
Additional information —
Transition statement — Let us see how to bring a queue up and down.
Uempty
# lpstat
Queue Dev Status Job Files User PP % Bks Cp Rnk
draft lp0 DOWN
QUEUED 132 /etc/motd team01 1 1 1
Quality lp0 READY
Notes:
• 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>
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Show how to bring up a queue after a problem is resolved or down for system
administration purposes.
Details — 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. These are the queue names that will be
used in the machine exercises.
Additional information —
Transition statement — Let us turn our focus to jobs and how to manage them.
Uempty
# smit jobs
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Discuss the SMIT screen that is used to manage print requests.
Details — Do not go into too much detail at this point for each option. We have already discussed
the menu item Show the Status of Print Jobs. The other options will be discussed next.
Additional information —
Transition statement — Let us look at these tasks one at a time.
Uempty
# smit qcan
[Entry
Fields]
PRINT QUEUE containing job [ ] +
(required for remote jobs)
* Print JOB NUMBER [ ] +#
Notes:
• 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:
- # qccel 127
To cancel all jobs queued on printer lp0, you can use either of the following two commands:
- # qcan -X -Plp0
- # cancel lp0
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — How to cancel a job in a queue.
Details — 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.
Note the two examples in the student notes. 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 -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.
Additional information — You might want to mention 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.
Transition statement — Let us see how the priority of print requests can be changed.
Uempty
# qchk -L
Queue Dev Status Job Name From To
______ ___ _______ Submitted Rnk Pri Blks Cp PP %
pslp0 DOWN
QUEUED 569 /etc/qconfig root root
1/07/03 09:39:25
1 15 2 1
/etc/qconfig
# qpri -#570 -a 25
# qchk -L
Queue Dev Status Job Name From To
______ ___ ______ Submitted Rnk Pri Blks Cp PP %
pslp0 DOWN
QUEUED 570 /etc/motd root root
1/07/03 09:40:15 1 25 1 1
/etc/motd
Notes:
• 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.
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
ps lp0 DEV_BUSY
QUEUED 1493 /etc/qconfig root 1 1 1
# qhld -#1493
# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
ps lp0 DEV_BUSY
HELD 1493 /etc/qconfig root 1 1 1
# qhld -r -#1493
# qchk
Queue Dev Status Job Files User PP% Blks Cp Rnk
ps lp0 DEV_BUSY
QUEUED 1493 /etc/qconfig root 1 1 1
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-77
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
# qchk -A
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-79
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
var
spool
lpd
qdaemon
qdir
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-81
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
NO YES
Check hardware Check software
Notes:
• 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
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-83
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Explain how to troubleshoot printing problems.
Details — Cover the visual in detail.
Make sure the students understand why performing a cat to direct a file to the printer helps to
pinpoint the problem area.
When checking cables, if using serial connection, be sure the pins have not been bent or broken.
Ask the students if /tmp or /var is full, what commands would be useful in determining what is filling
the file system?
Answer:
# df
# du -ax /tmp
# du -ax /var
Additional information — 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.
Transition statement — Let us take a look at some checkpoint questions.
Uempty
Checkpoint (1 of 2)
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-85
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of this unit.
Details — A suggested approach is to give the students about five minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
Checkpoint solutions (1 of 2)
IBM Power Systems
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.
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.
Additional information —
Transition statement — Continue with more checkpoint questions.
Uempty
Checkpoint (2 of 2)
IBM Power Systems
Notes:
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-87
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Review and test the students understanding of this unit.
Details — A suggested approach is to give the students about five minutes to answer the questions
on this page. Then, go over the questions and answers with the class.
Checkpoint solutions (2 of 2)
IBM Power Systems
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.
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.
Additional information —
Transition statement —
Uempty
Unit summary
IBM Power Systems
Notes:
• Queues can be added for local or remote printing.
• Queue characteristics can be changed either through SMIT or through high-level commands.
• Queues can be brought up and down by the system administrator.
• The following tasks were considered:
- Submit and cancel print jobs
- List the jobs in a queue
- Hold and release jobs in a queue
- Move a job from one queue to another
- Change priorities of a print job
© Copyright IBM Corp. 2009, 2015 Appendix B. Printers and queues B-89
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
Instructor notes:
Purpose — Summarize the unit.
Details —
Additional information —
Transition statement — This is the end of this unit.
AP
Appendix C. Quick reference: Solaris to AIX
Use this reference to contrast the AIX 5L and Solaris 8 operating systems.
The following tables contrast the structure of these two operating systems. Tasks are grouped
according to major categories that are listed below. Each major category is contained within a table.
Tables can also include location information of files or pertinent information that is related to the
category they contain.
This reference provides information on AIX and Solaris in the following categories:
• Packaging
• Booting and Shutting Down
• Installing and Upgrading Tasks
• User Management Tasks
• Device Management and Configuration
• Network Management and Configuration
• File System Management
• Virtual Disk Management
• Logical Volume Management
Packaging
The following information contrasts AIX and Solaris packaging details.
Units AIX Solaris
Smallest installable unit fileset package
Single installable image must be distrib- package package
uted and installed as a unit
Logical grouping of packages bundle software cluster
Logical grouping of packages and software Bundle offering, for example: Software configuration clusters, for exam-
clusters • App-Dev: Application Development ple:
Environment • Core: Required operating system files
• Client: • End-User System Support: Core plus
– Pers-Prod window environment
– DCE-Client • Developer System Support: End-User
– Media-Defined plus the development environment
• Entire Distribution: Developer System
plus enhanced features
• Entire Distribution Plus OEM: Entire
Distribution plus third-party hardware
drivers (on SPARC only)
© Copyright IBM Corp. 2009, 2015 Appendix C. Quick reference: Solaris to AIX C-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix C. Quick reference: Solaris to AIX C-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix C. Quick reference: Solaris to AIX C-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix C. Quick reference: Solaris to AIX C-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AP
Appendix D. Quick reference: HP-UX to AIX
Use this reference to contrast the AIX 5L and HP-UX operating systems.
The following tables contrast the structure of these two operating systems. Tasks are grouped
according to major categories that are listed below. Each major category is contained within a table.
Tables can also include location information of files or pertinent information that is related to the
category they contain.
This reference provides information on AIX and HP-UX in the following categories:
• Software Packaging
• Installing and Upgrading Tasks
• Booting and Shutting Down
• Device Management and Configuration
• Network Management and Configuration
• File System Management
• Logical Volume Management
Packaging
The following information contrasts AIX and HP-UX packaging details.
Units AIX HP-UX
Smallest installable unit fileset fileset
Single installable image must be package Product
distributed and installed as a unit
Logical grouping of packages bundle bundle
Logical grouping of packages and Bundle offering, for example:
software clusters • App-Dev: Application
Development Environment
• Client:
- Pers-Prod
- DCE-Client
- Media-Defined
© Copyright IBM Corp. 2009, 2015 Appendix D. Quick reference: HP-UX to AIX D-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix D. Quick reference: HP-UX to AIX D-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
© Copyright IBM Corp. 2009, 2015 Appendix D. Quick reference: HP-UX to AIX D-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide
AP
Appendix E. Checkpoint solutions
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
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 answers are Applied state and Commit state.
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
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 DIX).
3. True or False: The core TCP/IP daemons are typically started by /etc/rc.tcpip
at system restart.
The answer is true.
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.
Checkpoint solutions
IBM Power Systems
2. Which AIX feature can be used to stop and start subsystems and
groups of daemons?
The answer is the System Resource Controller (SRC).
Checkpoint solutions
IBM Power Systems
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.
The answers are maximum for the upper limit, minimum for the lower limit, and 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.
3. What is the minimum amount of memory for an AIX V5.3 (or later) partition?
The answer is the recommendation is 512 MB. What firmware enforces is:
128 MB, or if the LMB size of the partition is 256 MB, then the minimum would be
256 MB.
Checkpoint solutions
IBM Power Systems
1. AIX 7 can be installed from which of the following? (Select all that are
correct.)
a. 8 mm tape
b. CD-ROM
c. NIM server
The answers are CD-ROM and NIM server.
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
2. Does the size of the file system change when the size of the logical volume it
is on is increased?
The answer is no.
3. If you remove a file system, is the logical volume on which it sits removed as
well?
The answer is yes.
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
Checkpoint solutions
IBM Power Systems
Checkpoint solutions (1 of 2)
IBM Power Systems
Checkpoint solutions (2 of 2)
IBM Power Systems
Checkpoint solutions
IBM Power Systems
Checkpoint solutions (1 of 2)
IBM Power Systems
1. 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.
Checkpoint solutions (2 of 2)
IBM Power Systems
Checkpoint solutions
IBM Power Systems
2. Your system stops booting with LED 557. What are some
reasons for this problem?
The answers are corrupted JFS log or damaged file system.
Checkpoint solutions
IBM Power Systems
1. If your system has less than 4 GB of main memory, what is the default
primary dump device? Where do you find the dump file after reboot?
The answers are the default primary dump device is /dev/hd6. The
default dump file is /var/adm/ras/vmcore.x, where x indicates the
number of the dump.
3. If the copy directory is too small, will the dump (which is copied during
the reboot of the system) be lost?
The answer is if the force copy flag is set to TRUE, a special menu is
shown during reboot. From this menu, you can copy the system dump
to portable media.
Checkpoint solutions
IBM Power Systems
glos
Glossary
Note: See: This refers the reader to multiple-word terms
that have the same last word.
The entries in this glossary were developed a See also: This refers the reader to terms that have a
number of years ago and indicate the use of various related, but not synonymous, meaning.
terms at a particular point in UNIX history. Hence, 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,
which is defined in its proper place in the glossary.
current UNIX implementations such as AIX 6, and
some other statements in the entries might not be
current. However, this glossary still provides
valuable information regarding the historical use of A
the terms listed here.
access mode A matrix of protection information
This glossary includes terms and definitions from: stored with each file specifying who can do what to
a file. Three classes of users (owner, group, all
• The American National Standard Dictionary for others) are allowed or denied three levels of
Information Systems, ANSI X3.172-1990, access (read, write, execute).
copyright 1990 by the American National access permission See access mode.
Standards Institute (ANSI). Copies can be access privilege See access mode.
purchased from the American National
address space The address space of a process is
Standards Institute, 11 West 42nd Street, New the range of addresses available to it for code and
York, New York 10036. Definitions are identified data. The relationship between real and perceived
by the symbol (A) after the definition. space depends on the system and support
hardware.
• The ANSI/EIA Standard— 440-A, Fiber Optic
AIX Advanced Interactive Executive. IBM's
Terminology. Copies can be purchased from the implementation of the UNIX Operating System.
Electronic Industries Association, 2001
AIX Family Definition IBM's definition for the
Pennsylvania Avenue, N.W., Washington, DC common operating system environment for all
20006. Definitions are identified by the symbol members of the AIX family. The AIX Family
(E) after the definition. Definition includes specifications for the AIX Base
• The Information Technology Vocabulary, System, User Interface, Programming Interface,
Communications Support, Distributed Processing,
developed by Subcommittee 1, Joint Technical and Applications.
Committee 1, of the International Organization
alias The command and process of assigning a new
for Standardization and the International name to a command.
Electrotechnical Commission (ISO/IEC
ANSI American National Standards Institute. A
JTC1/SC1). Definitions of published parts of this standards organization. The United States liaison
vocabulary are identified by the symbol (I) after to the International Standards Organization (ISO).
the definition; definitions taken from draft application program A program used to perform an
international standards, committee drafts, and application or part of an application.
working papers being developed by ISO/IEC argument An item of information following a
JTC1/SC1 are identified by the symbol (T) after command. It might, for example, modify the
the definition, indicating that final agreement has command or identify a file to be affected.
not yet been reached among the participating ASCII American Standard Code for Information
National Bodies of SC1. Interchange. A collection of public domain
• The Network Working Group Request for character sets considered standard throughout the
computer industry.
Comments: 1208.
awk An interpreter, included in most UNIX operating
The following cross-references are used in this systems, that performs sophisticated text pattern
glossary: matching. In combination with shell scripts, awk
Contrast with: This refers to a term that has an can be used to prototype or implement applications
opposed or substantively different meaning. far more quickly than traditional programming
Synonym for: This indicates that the term has the methods.
same meaning as a preferred term, which is
defined in its proper place in the glossary.
Synonymous with: This is a backward reference
from a defined term to all other terms that have the
same meaning.
make use of work already done by other mount A logical (that is, not physical) attachment of
programmers. UNIX operating systems often one file directory to another. “remote mounting”
include separate libraries for communications, allows files and directories that reside on physically
window management, string handling, math, and separate computer systems to be attached to a
so forth. local system.
line editor An editor which processes one line at a mouse A device that allows you to select objects
time by the issuing of a command. Usually and scroll the display screen by means of buttons.
associated with sequential only terminals such as a move Relinking a file or directory to a different or
teletype. additional directory. The data (if any) is not moved,
link An entry in an AIX directory specifying a data only the links.
file or directory and its name. Note that files and multiprogramming Allocation of computer
directories are named solely by virtue of links. A resources among many programs. Used to allow
name is not an intrinsic property of a file. A file is many users to operate simultaneously and to keep
uniquely identified only by a system generated the system busy during delays occasioned by I/O
identification number. mechanical operations.
lint A program for removing “fuzz” from C code. multitasking Capability of performing two or more
Stricter than most compilers. Helps former Pascal computing tasks, such as interactive editing and
programmers sleep at night. complex numeric calculations, at the same time.
Local Area Network (LAN) A facility, usually a AIX and OS/2 are multi-tasking operating systems;
combination of wiring, transducers, adapter DOS, in contrast, is a single-tasking system.
boards, and software protocols, which multiuser A computer system which allows many
interconnects workstations and other computers people to run programs “simultaneously” using
located within a department, building, or multiprogramming techniques.
neighborhood. Token-Ring and Ethernet are local
area network products.
login Identifying oneself to the system to gain N
access.
named pipe See FIFO.
login directory See home directory. Network File System (NFST) A program developed
login name The name by which a user is identified by SUN Microsystems, Inc. for sharing files among
to the system. systems connected via TCP/IP. IBM's AIX, VM, and
logout Informing the system that you are through MVS operating systems support NFS.
using it. NFST See Network File System.
NIST National Institute of Science and Technology
(formerly the National Bureau of Standards).
M
node An element within a communication network.
mail The process of sending or receiving an
electronically delivered message within an AIX • Computer
system. The message or data so delivered. • Terminal
make Programming tool included in most UNIX • Control Unit
operating systems that helps “make” a new null A term denoting emptiness or nonexistence.
program out of a collection of existing subroutines
and utilities, by controlling the order in which those null device A device used to obtain empty files or
programs are linked, compiled, and executed. dispose of unwanted data.
map The process of reassigning the meaning of a null string A character string containing zero
terminal key. In general, the process of reassigning characters.
the meaning of any key.
memory Storage on electronic memory such as
random access memory, read only memory, or O
registers. See storage. object-oriented programming Method of
programming in which sections of program code
message Information displayed about an error or and data are represented, used, and edited in the
system condition that might or might not require a form of “objects”, such as graphical elements,
user response.
window components, and so forth, rather than as
motd “Message of the day”. The login “billboard” strict computer code. Through object-oriented
message. programming techniques, toolkits can be designed
MotifT The graphical user interface for OSF, that make programming much easier. Examples of
incorporating the X Window System. Behavior of object-oriented programming languages include
this interface is compatible with the IBM/Microsoft Pareplace Systems, Inc.'s Smalltalk-80T, AT&T's
Presentation Manager user interface for OS/2. Also C++T, and Stepstone Inc.'s Objective-CR.
called OSF/Motif. oem original equipment manufacturer. In the context
of AIX, OEM systems refer to the processors of a
heterogeneous computer network that are not programs linked together into larger routines by
made or provided by IBM. pipes. The “piping” of the list directory command to
Open Software FoundationT (OSF) A non-profit the word count command is ls | wc. The passing of
consortium of private companies, universities, and data by a pipe does not (necessarily) involve a file.
research institutions formed to conduct open When the first program generates enough data for
technological evaluations of available components the second program to process, it is suspended
of UNIX operating systems, for the purpose of and the second program runs. When the second
assembling selected elements into a complete program runs out of data it is suspended and the
version of the UNIX operating system available to first one runs.
those who want to license it. IBM is a founding pipe fitting Connecting two programs with a pipe.
sponsor and member of OSF. pipeline A sequence of programs or commands
operating system The programs and procedures connected with pipes.
designed to cause a computer to function, enabling portability Desirable feature of computer systems
the user to interact with the system. and applications, referring to users' freedom to run
option A command argument used to specify the application programs on computers from many
details of an operation. In AIX an option is normally vendors without rewriting the program's code. Also
preceded by a hyphen. 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
of the recent surge in popularity of UNIX operating
OSFT See Open Software Foundation. systems.
output redirection Passing a programs standard port A physical I/O interface into a computer.
output to a file.
POSIX “Portable Operating Systems for Computer
owner The person who created the file or his Environments”. A set of open standards for an
subsequent designee. operating system environment being developed
under the aegis of the IEEE.
P preprocessor The macro generator preceding the
C compiler.
packet switching The transmission of data in small, process A unit of activity known to the AIX system,
discrete switching “packets” rather than in streams, usually a program.
for the purpose of making more efficient use of the
physical data channels. Employed in some UNIX process 0 (zero) The scheduler. Started by the
system communications. “boot” and permanent. See init.
page To move forward or backward on screen full of process id A unique number (at any given time)
data through a file usually referring to an editor identifying a process to the system.
function. process status The process's current activity.
parallel processing A computing strategy in which • Non existent
a single large task is separated into parts, each of
which then runs in parallel on separate processors. • Sleeping
• Waiting
parent The process emerging from a Fork with a
non#zero return code (the process ID of the child • Running
process). A directory which points at a specified • Intermediate
directory. • Terminated
password A secret character string used to verify • Stopped.
user identification during login. profile A file in the users home directory which is
PATH A variable which specifies which directories executed at login to customize the environment.
are to be searched for programs and shell files. The name is .profile.
path name A complete file name specifying all prompt A displayed request for information or
directories leading to that file. operator action.
pattern-matching character Special characters protection The opposite of permission, denying
such as * or ? that can be used in a file access to 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
pipes UNIX operating system routines that connect character. A backslash (\) “quotes” the next
the standard output of one process with the character only.
standard input of another process. Pipes are
central to the function of UNIX operating systems,
which generally consist of numerous small
elegant than sockets, particularly for interprocess termcap A file containing the description of several
communication. hundred terminals. For use in determining
string A linear collection of characters treated as a communication protocol and available function.
unit. termlib A set of C programs for using termcap.
subdirectory A directory which is subordinate to tools Compact, well designed programs to perform
another directory. specific tasks. More complex processes are
subtree That portion of an AIX file system performed by sequences of tools, often in the form
accessible from a given directory below the root. of pipelines which avoid the need for temporary
files.
suffix A character string attached to a file name that
helps identify its file type. two-digit display Two seven-segment light-emitting
diodes (LEDs) on the operating panel used to track
superblock Primary information repository of a file the progress of power-on self-tests (POSTs).
system (location of i-nodes, free list, and so forth).
superuser The system administration; a user with
unique privileges such as upgrading execution U
priority and write access to all files and directories. UNIX Operating System A multi-user, multi-tasking
superuser authority The unrestricted ability to interactive operating system created at AT&T Bell
access and modify any part of the Operating Laboratories that has been widely used and
System. This authority is associated with the user developed by universities, and that now is
who manages the system. becoming increasingly popular in a wide range of
commercial applications. See Kernel, Shell,
SVID System V Interface Definition. An AT&T Library, Pipes, Filters.
document defining the standard interfaces to be
used by UNIX System V application programmers user interface The component of the AIX Family
and users. Definition that describes common user interface
functions for the AIX PS/2, AIX/RT, and AIX/370
swap space (disk) That space on an I/O device
operating systems.
used to store processes which have been
swapping out to make room for other processes. /usr/grpR One of the oldest, and still active, user
groups for the UNIX operating systems. IBM is a
swapping The process of moving processes member of /usr/grp.
between main storage and the “swapping device”,
usually a disk. uucp A set of AIX utilities allowing
symbolic debugger Program for debugging other • Autodial of remote systems
programs at the source code level. Common • Transfer of files
symbolic debuggers include sdb, dbx, and xdbx. • Execution of commands on the remote system
sync A command which copies all modified blocks • Reasonable security.
from RAM to the disk.
system The computer and its associated devices V
and programs. vi Visual editor. A character editor with a very
system unit The part of the system that contains powerful collection of editing commands optimized
the processing unit, the disk drive and the disk, and for ASCII terminals; associated with BSD versions
the diskette drive. of the UNIX operating system.
System V AT&T's recent releases of its UNIX visual editor An optional editor provided with AIX in
operating system are numbered as releases of which changes are made by modifying an image of
“UNIX System V”. the file on the screen, rather than through the
exclusive use of commands.
T W
TCP Transmission Control Protocol. A facility for the
creation of reliable bytestreams (byte-by-byte, wild card A metacharacter used to specify a set of
end#to#end transmission) on top of unreliable replacement characters and thus a set of file
datagrams. The transmission layer of TCP/IP is names. For example "*" is any zero or more
used to interconnect applications, such as FTP, so characters and "?" is any one character.
that issues of re-transmission and blocking can be window A rectangular area of the screen in which
subordinated in a standard way. See TCP/IP. the dialog between you and a given application is
TCP/IP Transmission Control Protocol/Internet displayed.
Protocol. Pair of communications protocol working directory The directory from which file
considered de facto standard in UNIX operating searches are begun if a complete pathname is not
system environments. IBM TCP/IP for VM and IBM specified. Controlled by the cd (change directory)
TCP/IP for MVS are licensed programs that command.
provide VM and MVS users with the capability of
participating in networks using the TCP/IP protocol workstation A device that includes a keyboard from
suite. which an operator can send information to the
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
Back page