Sei sulla pagina 1di 1042

V10.

cover

IBM Training Front cover


Instructor Guide

AIX Jumpstart for UNIX Professionals


Course code AN14G ERC 5.0
Instructor Guide

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.

August 2015 edition


The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.

© Copyright International Business Machines Corporation 2009, 2015.


This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
V10.1
Instructor Guide

TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

Instructor course overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
AIX overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Additional AIX capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Logical partition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Typical Power system layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
HMC and LPAR capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
The HMC (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
The HMC (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Virtualization example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
AIX administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
SMIT main menu (text-based) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Dialog screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Output screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
SMIT log and script files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
IBM Systems Director Console for AIX (pconsole) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Console interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Console management view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Console applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
AIX media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Software packaging definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Software bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
AIX software levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
What is my AIX version? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Software installation and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Software repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19

© Copyright IBM Corp. 2009, 2015 Contents iii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Software states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21


Software listing and versioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-23
lslpp, filesets and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25
Installing new software using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-27
Installing software using command line: Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-29
RedHat Package Manager filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
Applying patches to the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-35
Applying patches, apply, commit, reject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37
Listing fixes (APAR's) installed on the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39
Interim fix management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41
Removing installed software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43
Recovering from broken or inconsistent states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45
Service update management assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-47
SUMA base configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
SUMA command line execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-51
Fix Central website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-54
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-56
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-58
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-60

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
System configuration and device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
prtconf (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
prtconf (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8
lscfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10
lsdev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
lsattr and chdev commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14
Device states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-16
/dev directory, device configuration, and control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18
Device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-20
Physical location code examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-22
Virtual location codes example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-25
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-28
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-30
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-32

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2
Ethernet adapters and interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4
How is TCP/IP configured on AIX? (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7
How is TCP/IP configured on AIX? (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-10
SMIT, ODM, and the kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-12
TCP/IP startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-15
Command line TCP/IP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-17
Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-19
Network file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-22
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-29

iv AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Start-up modes for AIX (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Start-up modes for AIX (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
AIX partition activation (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
AIX partition activation (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
/etc/inittab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
/etc/inittab management and run levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
System resource controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
Listing subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
SRC control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
AIX partition shutdown (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
AIX partition shutdown (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-28
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-35

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Creating partitions and profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Memory and processor allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Adapter allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Create Logical Partition wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
Create Logical Partition wizard steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Installation methods for AIX 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
AIX installation in a partition: DVD or CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
Installing AIX from DVD (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
Installing AIX from DVD (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
Installation and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
Installation and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
Method of installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
Installation disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Set Primary Language Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-21
Security Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-23
Software install options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-26
Install summary and installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-28
Accept License Agreements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-30
AIX installation: Post steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-32
AIX installation in a partition using NIM: NIM overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-34
AIX installation in a partition using NIM: Configuration steps . . . . . . . . . . . . . . . . . . . . . . . 8-37
Network boot (1 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-39
Network boot (2 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-41
Network boot (3 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-43
Network boot (4 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-45
Network boot (5 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-47

© Copyright IBM Corp. 2009, 2015 Contents v


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Network boot (6 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-49


Network boot (7 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-51
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-53
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-55
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-57

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2
Logical Volume Manager components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-4
Uses of logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-7
Benefits of the AIX Logical Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
SMIT Volume Groups menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-15
Adding a volume group to the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-17
Adding a scalable volume group to the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-19
Listing volume groups and VG attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-21
Listing PVs in a VG and VG contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-23
Change a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-26
Extend and reduce a VG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-28
Remove a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-31
Activate and Deactivate a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-33
Logical storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-35
LVM, RAID, and SAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-37
LVM options and recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-40
Reorganize logical volumes in a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-44
SMIT Logical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-46
Adding a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-48
Show LV characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-50
Add Copies to a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-53
Increasing the size of a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-55
Remove a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-57
List all logical volumes by volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-59
Mirroring volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-61
Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-63
SMIT Physical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-65
List physical volume information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-67
List logical volumes on a physical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-69
Add or remove a physical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-72
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-74
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-76
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-78

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-2
Journaled file system support in AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-4
Advantages of enhanced JFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-6
Listing i-node and block size information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-8
Creating a JFS2 file system (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-10
Creating a JFS2 file system (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-12
Mounting a file system and the /etc/filesystems file . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-14
JFS2 logging options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-16

vi AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

TOC Creating a file system on a previously defined logical volume . . . . . . . . . . . . . . . . . . . . . 10-18


Changing the size of a JFS2 file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20
Removing a JFS2 file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
File system space management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Data managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
ODM components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6
Configuration manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
Basic device object classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11
How ODM classes act together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
ODM and high-level device commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19
ODM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
Changing attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25
Additional device object classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28
ODM repositories and software-related objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31
Software vital product data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-34
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-37
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-39
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
LVM identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
LVM metadata locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
LVM-related ODM objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
Exporting a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
Importing a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
importvg and duplicate names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21
How LVM interacts with ODM and VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-24
Fixing ODM problems with user volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27
Fixing ODM problems with rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-30
Intermediate-level ODM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-33
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-36
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-38
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-40

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Disk replacement: Starting point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-6
Procedure 1: Disk mirrored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9
Procedure 2: Disk still working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12
Procedure 2: Special steps for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
Procedure 3: Disk in missing or removed state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18
Stale partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-22
VGDA count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-24
Quorum not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-26

© Copyright IBM Corp. 2009, 2015 Contents vii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Nonquorum volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-29


Physical volume states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-32
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-35
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-37
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-39

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-2
Backup and restore technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-4
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-8
Backup by file name and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-10
Backup and restore by i-node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-13
Topic 2 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-18
JFS2 snapshot (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-20
JFS2 snapshot (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-22
Creating snapshots (external) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-25
Creating snapshots (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-28
Listing snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-31
Using a JFS2 snapshot to recover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-34
Using a JFS2 snapshot to backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-36
Topic 3 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-40
System image backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-42
Creating a mksysb image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-45
image.data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-48
bosinst.data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-51
mksysb tape image format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-54
Restoring a mksysb from tape device (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-57
Restoring a mksysb from tape device (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-59
Restoring a mksysb from a NIM server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-62
Back up and restore a user volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-64
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-68
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-70
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-72
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-74

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-2
Error logging components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-6
Generating an error report using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-9
The errpt command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-12
A summary report (errpt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-15
A detailed error report (errpt -a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-17
Types of disk errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-20
LVM error log entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-23
Maintaining the error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-25
ODM-based error notification: errnotify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-30
Redirecting messages between syslog and error log . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-34
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-37
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-39
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-41

viii AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

TOC Unit 16. System initialization - I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2
How does an AIX system boot? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
Working with bootlists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8
AIX 7: bootlist pathid enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-11
Starting System Management Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-13
Working with bootlists in SMS (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-16
Working with bootlists in SMS (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-19
Boot device alternatives (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-24
Boot device alternatives (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-27
Accessing a system that will not boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-29
Booting in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-32
Working in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-35
How to fix a corrupted BLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-38
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-41
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-43
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-45
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-47

Unit 17. System initialization - II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-2
System software initialization overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-4
Contents of the boot logical volume (hd5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7
rc.boot summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-10
The alog command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-15
Fixing corrupted file system logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-18
Boot problem management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-21
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-24
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-26
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-28

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


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2
Types of dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4
When a dump occurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-7
The sysdumpdev command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-9
Dedicated dump device (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15
Dedicated dump device (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-18
dumpcheck utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-20
Methods of starting a dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-23
Copying a system dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-27
Working with AIX support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-30
Capturing system data with snap command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-33
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-37
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-39
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-41

Unit 19. Advanced install techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2
Topic 1 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6
Alternate disk installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8

© Copyright IBM Corp. 2009, 2015 Contents ix


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Alternate mksysb disk installation (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-11


Alternate mksysb disk installation (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-14
Alternate disk rootvg cloning (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-16
Alternate disk rootvg cloning (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-19
Removing an alternate disk installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-21
Topic 1 Checkpoint: Alternate disk installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-24
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-26
Topic 2 objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-30
multibos overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-32
Active and standby BOS logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-35
Setting up a standby BOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-37
Other multibos operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-40
Topic 2 Checkpoint: multibos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-44
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-46
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-48
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-50

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

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

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

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

Appendix E. Checkpoint solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1

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

x AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Trademarks xi


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

xii AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Instructor course overview xiii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

xiv AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

© Copyright IBM Corp. 2009, 2015 Course description xv


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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).

xvi AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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)

© Copyright IBM Corp. 2009, 2015 Agenda xvii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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

xviii AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 1. Introduction to AIX and IBM Power
Systems

Estimated time
00:35

What this unit is about


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

What you should be able to do


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

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


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

© Copyright IBM Corporation 2009, 2015

Figure 1-1. Unit objectives AN14G5.0

Notes:

1-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


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

© 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

• IBM’s proprietary operating system based on UNIX System V.


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

LPAR:
AIX2

LPAR:
AIX3

© Copyright IBM Corporation 2009, 2015

Figure 1-2. AIX overview AN14G5.0

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).

1-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce AIX and its role in today’s POWER technology.
Details — Provide an overview to set the tone and put the technology into perspective. Differentiate
the generic term partition with the more specific term of logical partition. It is important that students
understand right from the beginning that, today, most AIX OSs live in LPARs. This is a key
message.
Additional information —
Transition statement — Let us provide an overview of additional AIX capabilities.

© 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

Additional AIX capabilities


IBM Power Systems

• 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

© Copyright IBM Corporation 2009, 2015

Figure 1-3. Additional AIX capabilities AN14G5.0

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

1-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

1-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Logical partition overview


IBM Power Systems

• An LPAR is the allocation of system resources to create logically


separate systems within the same physical footprint.
• The resource allocation and isolation for a logical partition is
implemented in firmware that is called Power Hypervisor.
– Provides configuration flexibility
• Each partition has its own:
– Operating system
– Resources: Processors, memory, devices (defined in a profile)
• Partitions can consist of physical (real) or virtual devices.
– Or a combination of both

sys1 sys2 sys3 sys4


04:42 14:42 11:42 19:42

LPAR 1 LPAR 2 LPAR 3 LPAR 4

Power Hypervisor
System Hardware (memory, processors, devices)

© Copyright IBM Corporation 2009, 2015

Figure 1-4. Logical partition overview AN14G5.0

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.

1-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Typical Power system layout


IBM Power Systems

• LPAR configuration and control are completed through the Hardware


Management Console (HMC).
• The HMC connects to the service processors and the LPARs.
– A private network usually connects HMC and service processors.

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

LPAR 2
Primary HMC Public/open SAN
network LPAR 3

LPAR 4

NIM Server Images

© Copyright IBM Corporation 2009, 2015

Figure 1-5. Typical Power system layout AN14G5.0

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.

1-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

HMC and LPAR capabilities


IBM Power Systems

• HMC centralizes system and LPAR management:


– Non-disruptive firmware updates
– Central service point for problem reporting and management
– Control LPAR status and resource allocation
– Access to LPAR system consoles
• Better resource utilization:
– Dynamic LPAR resource allocation
– Shared or dedicated processor pools
– Shared or dedicated network adapters
– Shared or dedicated storage adapters
– Shared or dedicated memory
• Workload relocation (entire LPAR):
– Live Partition Mobility
• Static Partition Mobility

© Copyright IBM Corporation 2009, 2015

Figure 1-6. HMC and LPAR capabilities AN14G5.0

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.

1-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

The HMC (1 of 2)
IBM Power Systems

• An appliance for the management of POWER processor-


based servers
– IBM provided Intel based server (desktop or rack mount) running a
web-based application on a customized version of Linux
• Access through https (GUI) and SSH (command line)

• Acts as a focal point for collecting and servicing managed


system serviceable events
– Can be configured to call home to IBM for parts and service
© Copyright IBM Corporation 2009, 2015

Figure 1-7. The HMC (1 of 2) AN14G5.0

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.

1-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the HMC.
Details — This page introduces the HMC. The most important points on this page are that the HMC
is needed for Power Systems that runs LPARs, and that the HMC is an independent system.
The first diagram supports the bullet “Access is through https …”
The second diagram supports the bullet “Acts as a focal point...”
Additional information —
Transition statement — Let us see the main HMC interface.

© 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

LPARs Proc and


running MEM
AIX resources
Navigation
area
Task
Pad

© Copyright IBM Corporation 2009, 2015

Figure 1-8. The HMC (2 of 2) AN14G5.0

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.

1-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the main interface.
Details — Describe the major parts of the HMC interface as shown in the visual.
Additional information —
Transition statement — Let us provide an example of virtualization technology.

© 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

AIX Virtual I/O Server


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

SCSI, SAS, FC physical disks


or logical volumes

© Copyright IBM Corporation 2009, 2015

Figure 1-9. Virtualization example AN14G5.0

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.

1-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Virtual I/O Server (VIOS)


The IBM Virtual I/O Server software enables the creation of partitions that use the I/O resources of
another partition. In this way, it helps to maximize the utilization of physical resources on Power
Systems. Partitions can have dedicated I/O, virtual I/O, or both. Physical resources are assigned to
the Virtual I/O Server partition in the same way physical resources are assigned to other partitions.
The virtual I/O server then provides access to these physical resources from the virtual client
LPARs.
While not shown in the visual, it is also possible to define virtual Fibre Channel (FC) adapters.
These allow the client LPAR to access the SAN through a physical FC in the Virtual I/O Server. The
Client LPAR virtual FC has its own unique port number (WWPN) to which the SAN can zone LUNs.
The Virtual I/O Server is a separate software product and is included as part of the PowerVM
Editions. It supports AIX Version 5.3, 6.1, 7.1, Linux, and IBM i as virtual I/O clients.

© 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.

1-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. What is the name of the device that creates and controls


LPARs?

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


an HMC?

3. True or False: An AIX operating system can run in an


environment that has no real devices allocated.

© Copyright IBM Corporation 2009, 2015

Figure 1-10. Checkpoint AN14G5.0

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

1. What is the name of the device that creates and controls


LPARs?
The answer is the HMC.

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


an HMC?
The answer is the Managed System.

3. True or False: An AIX operating system can run in an


environment that has no real devices allocated.
The answer is true.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

1-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

Introduction to AIX and IBM


Power Systems

© Copyright IBM Corporation 2009, 2015

Figure 1-11. Exercise AN14G5.0

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 —

1-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


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

© Copyright IBM Corporation 2009, 2015

Figure 1-12. Unit summary AN14G5.0

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.

1-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 2. AIX system management tools

Estimated time
00:40

What this unit is about


This unit describes the system management tools available in AIX, with a
particular focus on SMIT and the IBM Systems Director Console.

What you should be able to do


After completing this unit, you should be able to:
• Describe the benefits of the system management tools available with AIX
• Discuss the functionality of SMIT and IBM Systems Director Console for
AIX
• Explain how system management activity is logged
• Use SMIT (or equivalent function in IBM Systems Director Console)

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Describe the benefits of the system management tools
available with AIX
• Discuss the functionality of SMIT and IBM Systems Director
Console for AIX
• Explain how system management activity is logged
• Use SMIT (or equivalent function in IBM Systems Director
Console)

© Copyright IBM Corporation 2009, 2015

Figure 2-1. Unit objectives AN14G5.0

Notes:

2-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — After completing this unit, you should be able to:
• Describe the benefits of the system management tools available with AIX
• Discuss the functionality of SMIT, and the new IBM Systems Director Console for AIX
• Explain how system management activity is logged
• Use SMIT (or equivalent function in IBM Systems Director Console)
Details —
Additional information —
Transition statement — Let us start by looking at a hierarchy of AIX system components and
tools.

© 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

Designed to make administration on AIX simple

System IBM
Management Systems Director
Interface Tool Console for AIX
(smit) (pconsole)

Text-based Web Interface

High-level commands

Low-level Intermediate-level
commands commands

System
System Kernel Resource Object Data ASCII
calls services Controller Manager files

© Copyright IBM Corporation 2009, 2015

Figure 2-2. AIX administration AN14G5.0

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.

2-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Highlight the available options.
Details — Provide your own thoughts and views on the tools available. This unit focuses on SMIT
and pconsole.
The basic idea behind both tools is that they present the system administrator with a menu-driven
front end, with built-in help information and lists. The tools can be used to carry out most system
administrative tasks.
Depending on the menus that are selected and the options that are entered, the tools build the
high-level command with all the correct options, and then execute the command when the user
specifies this action.
High-level commands, in turn, call lower-level commands, which interact directly with the system,
that is, the ODM, kernel, and so forth.
Additional information — WebSM is a Java-based GUI tool that was introduced in AIX 5.1. Some
users are familiar with the WebSM user interface if they have used version three to six of an HMC.
WebSM is no longer supported in AIX 7.1 and later versions of AIX. Because WebSM is based on
Java, there were difficulties in using it. The system admin needed to install a special client
application on a PC platform and keep its level synchronized with the level of the WSM server is
inconvenient. Its performance was also less than optimal. As a result, it was not used very much,
except when required, such as when the system administrator needs graphical access to an HMC
before version 7. The strategic replacement for WebSM is the IBM Systems Director Console for
AIX. Therefore, the course does not go into the details of administering or using WSM.
Transition statement — Let us look at SMIT.

© 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

• An interactive application that simplifies virtually every aspect


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

Figure 2-3. SMIT AN14G5.0

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.

2-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — To introduce SMIT.
Details — Introduce SMIT, which is by far the most popular system management tool in AIX.
Additional information —
Transition statement — Let us have a look at the main menu.

© 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 main menu (text based)


IBM Power Systems

# smit
System Management

Move cursor to desired item and press Enter.

Software Installation and Maintenance


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

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


F9=Shell F10=Exit Enter=Do

© Copyright IBM Corporation 2009, 2015

Figure 2-4. SMIT main menu (text-based) AN14G5.0

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.

2-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty General syntax:


smit [-options] [ FastPath ]
Start ASCII version:
# smitty
or
# smit –C
Log, but do not actually run, commands:
# smit -x
Redirect the log file and script file:
# smit -s /u/team1/smit.script –l /u/team1/smit.log
# smit -s /dev/pts/1 -l /dev/pts/2

© 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.

2-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Dialog screen
IBM Power Systems

# smit date
Change / Show Day and Time

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
YEAR (00-99) [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

© Copyright IBM Corporation 2009, 2015

Figure 2-5. Dialog screen AN14G5.0

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.

2-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show a simple SMIT panel for command execution.
Details — Feel free to perform a live demonstration of more interesting SMIT functions.
This is a dialog screen and not a selector screen, as there is more than one option that is listed on
the screen.
Go through each symbol, as documented in the student notes, and ensure that all students are
clear about the symbols such as *, #, and so forth.
Also, go through all the function keys one at a time, explaining the uses of each one.
Other helpful hints that should be mentioned are that items of a list can sometimes be obtained with
the Tab key. Also, on a screen that holds more than one page of information, the <Ctrl-v> and
<Esc-v> key sequences are used to move up and down a page.
Ensure that all the key points in the student notes are covered.
Additional information —
Transition statement — When you press Enter, what happens?

© 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

Before command completion, additional instructions may appear below.

Wed 8 Oct 11:23:06 2014

Standard Output
following command
execution
(Stdout)

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


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

© Copyright IBM Corporation 2009, 2015

Figure 2-6. Output screen AN14G5.0

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.

2-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Review the output panels of the SMIT command.
Details — Go through the output on the screen.
Additional information — You might want to tell some amusing anecdotes about the running
person in the graphical version.
Transition statement — A useful aspect of SMIT is the log feature; let us take a look.

© 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 and script files


IBM Power Systems

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.

© Copyright IBM Corporation 2009, 2015

Figure 2-7. SMIT log and script files AN14G5.0

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.

2-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • The smit.transaction file


SMIT since AIX 5.2 has a file, smit.transaction. This file logs all the executed commands
similar to smit.script. The smit.script logs all commands, while smit.transaction logs
only command_to_executes, see smit.log file.
For example, the user backs up the system by using SMIT.
• smit.script file
#
# [Oct 13 2014, 20:00:19]
#
/usr/bin/mksysb '-i' '-A' /mnt/nm_sysb_13Oct14
• smit.transaction file
#=--------------------------------------------
# DATE: Oct 13 2014, 20:00:19
# DESCRIPTION: Back Up the System
#=--------------------------------------------
/usr/bin/mksysb '-i' '-A' /mnt/nm_sysb_13Oct14

© 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.

2-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

IBM Systems Director Console for AIX (pconsole)


IBM Power Systems

• Web-based management interface (starting with AIX 6.1)


• Enables converged consoles consistent with IBM Systems
Director:
– Integrated solutions console
– Lightweight infrastructure
• Includes links to SMIT tasks
How to check
• Requires Java v5 that it is
running
• Installed by default

# lssrc -s pconsole
Subsystem Group PID Status
pconsole pconsole 737388 active

# netstat -a |grep 5336


tcp 0 0 *.5336 *.* LISTEN

© Copyright IBM Corporation 2009, 2015

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

• Lightweight Infrastructure (lwi.runtime)


The Lightweight Infrastructure (LWI) is a small footprint, simple to configure, a secure
infrastructure for hosting web applications, web services, and other application-related
components. The LWI is based on Open Services Gateway Initiative (OSGi) architecture and is
derived from WebSphere Everyplace Deployment 6.0 (WED). The LWI consists of the base
OSGi/Eclipse service platform plus extra custom components and bundles that support web
applications, web services, and the building of components.
• filesets installed to support pconsole
The filesets that support the pconsole capability are:
- sysmgt.pconsole.rte
- sysmgt.pconsole.apps.wdcem
- sysmgt.pconsole.apps.wrbac
- sysmgt.pconsole.apps.wsmit
- lwi.runtime

2-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview of pconsole.
Details — Do not try to explain all aspects of the Console, just give them the essentials and a feel
for the tool.
Additional information — It is the same interface structure and code that IBM uses for Systems
Director and WPAR Manager.
Transition statement — Let us look at the interface.

© 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

• Web browser-based access


– https://<hostname (or IP)>:5336/ibm/console (Defaults to SSL. Use 5335 for non-SSL.)

© Copyright IBM Corporation 2009, 2015

Figure 2-9. Console interface AN14G5.0

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)?

2-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

2-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Console management view


IBM Power Systems

• Easy graphic interface Define


Toolbar start-up
Navigation pages
area

Work area

© Copyright IBM Corporation 2009, 2015

Figure 2-10. Console management view AN14G5.0

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.

2-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the management options and how they can create start-up pages.
Details — It might be a good idea to run a live demonstration of this overview.
Additional information —
Transition statement — Let us briefly overview the task categories that are initially provided by
pconsole.

© 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

• OS Management (new SMIT-based tasks)


• Portlets/modules
– For example, system health
• Classical SMIT
– Classic-style SMIT menus for those who prefer a more traditional look
and feel
• Distributed Command Execution Manager (DCEM)
– Used to run commands on multiple systems in parallel
– Based on the standard UNIX dsh function
• On AIX, this is part of the Distributed System Management (DSM) product,
dsm.dsh, which is not installed by default but is on the base installation
media.
– Supports groups of systems
– Supports rsh and ssh authentication
© Copyright IBM Corporation 2009, 2015

Figure 2-11. Console applications AN14G5.0

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.

2-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Distributed Command Execution Manager (DCEM)


This is a graphical wrapper around an existing UNIX dsh utility. It allows commands and scripts
to be executed on multiple hosts. For further information on dsh, see the AIX man page or IBM
Knowledge Center:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds2/dsh.htm?lan
g=en

Console logging and tracing


The Systems Director Console log files are stored in html format in the /var/log/pconsole/logs
directory.
# ls /var/log/pconsole/logs
error-log-0.html error-log-4.html trace-log-2.html
error-log-0.html.lck error-log-5.html trace-log-3.html
error-log-1.html trace-log-0.html trace-log-4.html
error-log-2.html trace-log-0.html.lck trace-log-5.html
error-log-3.html trace-log-1.html
• Error log file
The system appends log messages to a single log file. A new log file is created each time when
you start Integrated Solutions Console. Logging messages are written to the file
error-log-0.html of the /logs subdirectory of the console installation. This file is always
locked by the console to write log messages.
• Trace log file
The system appends trace messages to a single log file. A new trace file is created each time
when you start Integrated Solutions Console. Trace messages are written to the file
trace-log-0.html of the /logs subdirectory of the console installation. This file is always
locked by the console to write trace messages.
Classical SMIT logs are similar in nature to regular AIX SMIT. The letter w is prefixed to the
standard SMIT log file names to differentiate these pconsole logs from the standard AIX SMIT logs.
There is no equivalent smit.transaction log produced through pconsole.

Classical SMIT logs


Classical SMIT logs are similar in nature to regular AIX SMIT. The letter w is prefixed to the
standard SMIT log file names to differentiate these pconsole logs from the standard AIX SMIT logs.
There is no equivalent smit.transaction log produced through pconsole.

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.
------------------------------------------------------------

2-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Go through the applications that are available.
Details — Provide highlights of the main applications.
Additional information — Starting with AIX V7.1, the Cluster Systems Management (CSM)
software will no longer ship with AIX media. CSM is not supported by AIX V7.1. The csm.dsh fileset
is one of the filesets that were removed from AIX.
Starting with AIX 6.1 TL3 a new package is shipped with the base media called Distributed System
Management (DSM). In AIX 7.1 this new DSM package replaces the Cluster Systems Management
package (CSM), which is no longer available on AIX 7.1. Commands such as dcp and dsh are not
available on AIX 7.1 without installing the DSM package, which is not installed by default but is on
the base installation media. The DSM package is in the filesets dsm.core and dsm.dsh. For more
detail, refer to http://www.redbooks.ibm.com/redbooks/pdfs/sg247910.pdf, page 161 and 192.
The dsh command is a DSM Distributed Shell Utility.
Transition statement — OK, it is time to wrap up with the checkpoint questions.

© 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

1. List the two main system management tools available on


AIX.

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

© Copyright IBM Corporation 2009, 2015

Figure 2-12. Checkpoint AN14G5.0

Notes:

2-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

Checkpoint solutions
IBM Power Systems

1. List the two main system management tools available on


AIX.
The answers are SMIT and IBM Systems Director console
for AIX.

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


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

© Copyright IBM Corporation 2009, 2015

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

© Copyright IBM Corporation 2009, 2015

Figure 2-13. Exercise AN14G5.0

Notes:

2-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Describe the benefits of the system management tools
available with AIX
• Discuss the functionality of SMIT and IBM Systems Director
Console for AIX
• Explain how system management activity is logged
• Use SMIT (or equivalent function in IBM Systems Director
Console)

© Copyright IBM Corporation 2009, 2015

Figure 2-14. Unit summary AN14G5.0

Notes:

2-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement — End of unit.

© 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

2-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 3. AIX software installation and maintenance

Estimated time
01:15

What this unit is about


This unit describes how to perform software installation and maintenance.

What you should be able to do


After completing this unit, you should be able to:
• Define the package definitions and naming conventions
• Explain AIX software levels and states
• Determine the current installed level of the OS and individual filesets
• Install and manage software products and updates
• Recover from broken and inconsistent software states
• Explain how to download fixes by using Fix Central and SUMA

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Define the package definitions and naming conventions
• Explain AIX software levels and states
• Determine the current installed level of the OS and individual
filesets
• Install and manage software products and updates
• Recover from broken and inconsistent software states
• Explain how to download fixes by using Fix Central and
SUMA

© Copyright IBM Corporation 2009, 2015

Figure 3-1. Unit objectives AN14G5.0

Notes:

3-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the unit objectives.
Details —
Additional information —
Transition statement — Let us start by seeing what AIX media is available.

© 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 Base (DVD or CD)


+ update CDs

AIX Expansion Pack

AIX InfoCenter

AIX Toolbox for Linux

Mozilla Firefox Browser

© Copyright IBM Corporation 2009, 2015

Figure 3-2. AIX media AN14G5.0

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

3-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

3-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Software packaging definitions


IBM Power Systems

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’

© Copyright IBM Corporation 2009, 2015

Figure 3-3. Software packaging definitions AN14G5.0

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.

3-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the packaging terminology.
Details — Ensure that everyone understands the association of each of the definitions.
• fileset: Smallest individual installable unit
• Package: Collection of filesets built to form one installable image, for example, bos.net
• LPP: One or more packages that are bundled together, for example, bos
Additional information —
Transition statement — Now we understand LPPs, some are grouped together as bundles. Let us
take a look.

© 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

• A bundle is a collection of packages and filesets that are suited for a


particular environment.

• There are many predefined system bundles in AIX, which include:


– AllDevicesKernels
– Alt_Disk_Install
– openssh_client and openssh_server

• Full list is in /usr/sys/inst.data/sys_bundles. Example:

# 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

© Copyright IBM Corporation 2009, 2015

Figure 3-4. Software bundles AN14G5.0

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.

3-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce how LPPs can be grouped together into bundles.
Details — The standard bundle definitions that control what selections appear in SMIT or the
web-based System Manager are stored in /usr/sys/inst.data/sys_bundles. The following are
examples of predefined bundles:
• Application Development Bundle (App-Dev)
- A collection of software packages that are used for developing application programs.
• Media-Defined Bundle (Media-Defined)
- filesets from the installation media.
• Other predefined system bundles are:
- CDE
- GNOME
- KDE
- devices
- wsm_remote
Additional information — Explain to students how to create bundles if they ask; this is a useful
feature of AIX – especially when driving a NIM server.
Transition statement — Now we understand LPPs and bundles, let us define AIX software levels.

© 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

AIX software levels


IBM Power Systems

• 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)

© Copyright IBM Corporation 2009, 2015

Figure 3-5. AIX software levels AN14G5.0

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.

3-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

3-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

What is my AIX version?


IBM Power Systems

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

# 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.

© Copyright IBM Corporation 2009, 2015

Figure 3-6. What is my AIX version? AN14G5.0

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?

3-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Software installation and maintenance


IBM Power Systems

• All aspects of software installation and maintenance can be


performed from SMIT, the command-line, or systems
director console.
• Command-line interaction:
– lslpp: Lists installed software
– installp: Traditional AIX command for installing and maintaining
LPP packages
– rpm: RedHat Linux command for installing and maintaining rpm
filesets (part of the AIX Linux affinity)
– geninstall: A generic installer that installs software of various
package formats: installp, RPM, and ISMP

© Copyright IBM Corporation 2009, 2015

Figure 3-7. Software installation and maintenance AN14G5.0

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.

3-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Software repository
IBM Power Systems

• A location on disk, which contains AIX software


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

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

© Copyright IBM Corporation 2009, 2015

Figure 3-8. Software repository AN14G5.0

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.

3-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Software states
IBM Power Systems

• The base installation of software is always in a committed


state.
– Committed is a permanent state.
• When updates are installed, they can be either applied or
committed.
– Applied software can be rejected or committed later.
7.1.0.1
bos.perf.tools Action: Install and Commit
Committed
7.1.0.1

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

Figure 3-9. Software states AN14G5.0

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.

3-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Software listing and versioning


IBM Power Systems

• Software listing is done with the lslpp command.


# lslpp -L bos.net.tcp.client
Fileset Level State Type Description(Uninstaller)
-------------------------------------------------------------------
bos.net.tcp.client 7.1.3.16 C F TCP/IP Client
Support

Version Release Modification Fix


State codes:
A -- Applied. AIX Migration smit update_all
B -- Broken.
C -- Committed.
E -- EFIX Locked.
O -- Obsolete. (partially migrated to newer version) C & F are State
? -- Inconsistent State...Run lppchk -v. and Type
codes.
Type codes:
F -- Installp Fileset
P -- Product
C -- Component
T -- Feature
R -- RPM Package
E -- Interim Fix

© Copyright IBM Corporation 2009, 2015

Figure 3-10. Software listing and versioning AN14G5.0

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.

3-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

lslpp, filesets, and files


IBM Power Systems

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


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

© Copyright IBM Corporation 2009, 2015

Figure 3-11. lslpp, filesets and files AN14G5.0

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.

3-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Installing new software using SMIT


IBM Power Systems

• smit install_all
Install and Update from ALL Available Software

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

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

© Copyright IBM Corporation 2009, 2015

Figure 3-12. Installing new software using SMIT AN14G5.0

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.

3-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

© Copyright IBM Corporation 2009, 2015

Figure 3-13. Installing software using command line: Examples AN14G5.0

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.

3-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to install software on AIX by using the command line.
Details — Go through the installp and geninstall examples in the visual.
The first installp example assumes that the current working directory is a software repository
(notice the use of the dot as the first argument). That example is installing one particular fileset
(second argument). The second installp example is explicitly identifying the /TL03_SP04 directory
as the software repository to use and to install all filesets in that repository (they are likely part of the
TL03 SP4 fixpack). The geninstall examples are for doing the same two installs.
Be sure to explain that the geninstall has logic to handle non-installp formatted software such as
RPMs.
Additional information —
Transition statement — Let us introduce RPM.

© 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

RedHat Package Manager filesets


IBM Power Systems

• IBM provides strong Linux affinity within AIX.


• Many useful packages for AIX come in RPM format:
– Developed by Red Hat, now used in many Linux flavors
– Examples (included within the Linux Toolbox for AIX):
• cdrecord
• mkisofs
• apache
• Bash
List
packages
Remove
package
– # rpm –qa
# rpm –qa
– # rpm -e cairo-1.0.2-6
# rpm -e cairo-1.0.2-6
Install
– # rpm -i bash-3.2-1.aix.ppc.rpm
package
# rpm -i bash-3.2-1.aix.ppc.rpm

© Copyright IBM Corporation 2009, 2015

Figure 3-14. RedHat Package Manager filesets AN14G5.0

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>

3-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • To remove/deinstall: rpm -e <packagename> (As in foo, not foo.ppc.rpm)


• To query an installed package: rpm -q <packagename>
• To query all installed packages: rpm -qa
• To list files in a package: rpm -ql <packagename>
• To list requirements for a package: rpm -q --requires
• To find package providing requirements: rpm -q --whatprovides
• To query an uninstalled RPM: rpm -qp <packagefilename>
• To get help: rpm –help

© 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.

3-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Applying patches to the system


IBM Power Systems

• 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
[...]

• Updates can first be applied and then committed later.


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

© Copyright IBM Corporation 2009, 2015

Figure 3-15. Applying patches to the system AN14G5.0

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.

3-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Applying patches, apply, commit, reject


IBM Power Systems

• 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

# installp –r cluster.doc.en_US.es.pdf Reject


(-r)
# lslpp -L |grep -i cluster |grep pdf
cluster.doc.en_US.es.pdf 5.4.0.0 C F HAES PDF Documentation

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

© Copyright IBM Corporation 2009, 2015

Figure 3-16. Applying patches, apply, commit, reject AN14G5.0

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.

3-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Listing fixes (APARs) installed on the system


IBM Power Systems

• TLs and SPs apply fixes (APARs) to AIX.


• You can list these fixes with the instfix command.
– instfix is useful for listing and searching through applied updates on the
system.
# instfix –i
All filesets for IV00149 were found.
All filesets for IV00151 were found.
All filesets for IV00152 were found.
All filesets for IV00153 were found.
All filesets for IV00154 were found.
…… Lines were removed for clarity ……

# instfix -ik IV00149


All filesets for IV00149 were found.

• Interim fixes between services packs, including service advisories, is


now done through interim fix management.
– emgr command
© Copyright IBM Corporation 2009, 2015

Figure 3-17. Listing fixes (APAR's) installed on the system AN14G5.0

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?

3-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Interim fix management


IBM Power Systems

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


Installation
…. Lot of output is produced, removed for clarity!
EPKG NUMBER LABEL OPERATION RESULT
=========== ============== ================= ==============
1 744A_610 INSTALL PREVIEW SUCCESS

# emgr -e 744A_610.071105.epkg.Z Install


ifix
# emgr -l List
installed
ID STATE LABEL INSTALL TIME ABSTRACT
ifixes
=== ===== ========== ================== ======================================
1 *Q* 744A_610 10/10/08 23:30:49 Kernel fix for 0744A_610

# emgr –r –L 744A_610 Remove


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

EFIX NUMBER LABEL OPERATION RESULT


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

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


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

Return Status = SUCCESS

© Copyright IBM Corporation 2009, 2015

Figure 3-18. Interim fix management AN14G5.0

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.

3-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Removing installed software


IBM Power Systems

• # smit remove
Remove Installed Software

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

• Removing software from the command line


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

– (Preview) Remove all X11 software with associated prerequisites


# installp -upg X11*

© Copyright IBM Corporation 2009, 2015

Figure 3-19. Removing installed software AN14G5.0

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.

3-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Recovering from broken or inconsistent states


IBM Power Systems

• To list broken or inconsistent filesets, use the lppchk


command.
# lslpp -L |grep Firefox.base.rte
Firefox.base.rte 1.5.0.12 ? F Firefox Web Browser
Look for ?
or B.
# lppchk -v
lppchk: The following filesets need to be installed or corrected to bring
the system to a consistent state:
Display
Firefox.base.rte 1.5.0.12 (APPLYING) inconsistent
filesets.

# installp -C

installp: Cleaning up software for: Perform a clean-up


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

© Copyright IBM Corporation 2009, 2015

Figure 3-20. Recovering from broken or inconsistent states AN14G5.0

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.

3-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Service update management assistant


IBM Power Systems

• Excellent tool for downloading fixes:


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

© Copyright IBM Corporation 2009, 2015

Figure 3-21. Service update management assistant AN14G5.0

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.

3-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

SUMA base configuration


IBM Power Systems

• Base configuration
– # smit suma_config_base
Base Configuration

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

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

© Copyright IBM Corporation 2009, 2015

Figure 3-22. SUMA base configuration AN14G5.0

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.

3-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

SUMA command-line execution


IBM Power Systems

• SUMA command-line examples: Request type =


service pack
– Download specific service pack:
# /usr/sbin/suma -x -a RqType=SP -a Action=Download \
-a RqName='7100-03-04-1441'

– Download technology level 9 for AIX 6.1 on Wednesday at 11:00 PM:


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

– Download latest fixes for the currently installed AIX TL:


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

© Copyright IBM Corporation 2009, 2015

Figure 3-23. SUMA command line execution AN14G5.0

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.

3-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show SUMA tasks that is driven from the command line.
Details — Go through the examples in the visual.
Additional information — SUMA is an easy tool to drive. Feel free to demonstration further
examples and SMIT screens.
Transition statement — If you do not want to use SUMA, or cannot, then you can obtain software
maintenance directly from the IBM website. Let us examine what we would see at that website.

© Copyright IBM Corp. 2009, 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

Fix Central website


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 3-24. Fix Central website AN14G5.0

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.

3-54 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce Fix Central for downloading fixes.
Details — Introduce Fix Central website.
One of the useful Fix type categories is Fix Recommendations. FLRT is web-driven tool that
enables you to select your machine type and software components and levels. It then produces an
easy to read report, which provides recommendations, notices, and status compliance. It covers not
only AIX levels but also System Firmware, HMC, VIOS, PowerHA levels, and more.
Additional information —
Transition statement — Let us go over some checkpoint questions.

© 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

2. What command is used to list all installed software on your system?

3. Which of the following can you install as an entity?


a. Ifix
b. LPP
c. Package
d. Bundle
e. All of the above

© Copyright IBM Corporation 2009, 2015

Figure 3-25. Checkpoint AN14G5.0

Notes:

3-56 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

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.

2. What command is used to list all installed software on your system?


The answer is lslpp –l or –L.

3. Which of the following can you install as an entity?


a. Ifix
b. LPP
c. Package
d. Bundle
e. All of the above
The answer is all of the above.

© Copyright IBM Corporation 2009, 2015

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

© Copyright IBM Corporation 2009, 2015

Figure 3-26. Exercise AN14G5.0

Notes:

3-58 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Define the package definitions and naming conventions
• Explain AIX software levels and states
• Determine the current installed level of the OS and individual
filesets
• Install and manage software products and updates
• Recover from broken and inconsistent software states
• Explain how to download fixes by using Fix Central and
SUMA

© Copyright IBM Corporation 2009, 2015

Figure 3-27. Unit summary AN14G5.0

Notes:

3-60 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement — End of unit.

© 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

3-62 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 4. System configuration and devices

Estimated time
00:45

What this unit is about


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

What you should be able to do


After completing this unit, you should be able to:
• Explain device terminology
• Display the system configuration
• Use common device commands
• Explain device configuration and control
• Identify device locations
- Interpret physical and virtual location codes

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Explain device terminology
• Display the system configuration
• Use common device commands
• Explain device configuration and control
• Identify device locations
– Interpret physical and virtual location codes

© Copyright IBM Corporation 2009, 2015

Figure 4-1. Unit objectives AN14G5.0

Notes:

4-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the unit objectives.
Details —
Additional information —
Transition statement — Let us start by explaining key device terminology.

© 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

System configuration and device overview


IBM Power Systems

• Understanding the configuration of the system is important.


– The configuration should be documented and updated regularly.
• All devices have attributes, some of which can be changed.
– lsattr lists device attributes.
– chdev changes device attributes.
• AIX devices can be physical or virtual.
– An AIX partition does not need to have any physical devices!
• Most devices within AIX are self-configured through cfgmgr.
• Device states can be controlled using mkdev and rmdev
commands.
– This includes virtual devices.

© Copyright IBM Corporation 2009, 2015

Figure 4-2. System configuration and device overview AN14G5.0

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.

4-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview into system configuration and devices.
Details — This visual provides an introduction into the rest of the unit.
Additional information —
Transition statement — Let us introduce our audience to the commands that are used to list and
document the system configuration, starting with prtconf.

© 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

• Shell script that collects system information


# prtconf
System Model: IBM,8233-E8B
Machine Serial Number: 100603P
Processor Type: PowerPC_POWER7
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat
Number Of Processors: 2
Processor Clock Speed: 3000 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
Some items were
LPAR Info: 15 sys304_118_MA
removed for
Memory Size: 1024 MB
Good Memory Size: 1024 MB
clarity.
Platform Firmware level: AL710_099
Firmware Version: IBM,AL710_099 Output is
continued on the
Network Information next page.
Host Name: sys304_118
IP Address: 10.6.52.118
Sub Netmask: 255.255.255.0
Gateway: 10.6.52.254

Paging Space Information


Total Paging Space: 512MB
Percent Used: 10%

© Copyright IBM Corporation 2009, 2015

Figure 4-3. prtconf (1 of 2) AN14G5.0

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.

4-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show students how to list and view the system configuration in one simple command.
Details — Let us start with the big picture and then drill down into the details.
Additional information — This can also be invoked with the command lsconf.
Solaris also has a prtconf command that provides a similar service.
Transition statement — Let us now see the continuation of the prtconf command.

© 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

The following resources are installed on the machine.


+/- = Added or deleted from Resource List. Device listing
* = Diagnostic support not available. including “physical
location codes” Second half of
Model Architecture: chrp
Model Implementation: Multiple Processor, PCI bus
the output is
identical to
+ sys0 System Object lscfg
+ sysplanar0 System Planar
* pci6 U78A0.001.DNWHNC6-P1 PCI Bus
+ usbhc0 U78A0.001.DNWHNC6-P1 USB Host Controller (33103500)
+ usbhc1 U78A0.001.DNWHNC6-P1 USB Host Controller (33103500)
+ usbhc2 U78A0.001.DNWHNC6-P1 USB Enhanced Host Controller (3310e000)
* pci2 U5877.001.00H0301-P1 PCI Express Bus
+ ent4 U5877.001.00H0301-P1-C5-T1 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
+ ent5 U5877.001.00H0301-P1-C5-T2 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
* pci1 U5877.001.00H0301-P1 PCI Express Bus
+ fcs2 U5877.001.00H0301-P1-C3-T1 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet0 U5877.001.00H0301-P1-C3-T1 Fibre Channel Network Protocol Device
+ fscsi1 U5877.001.00H0301-P1-C3-T1 FC SCSI I/O Controller Protocol Device
+ hdisk4 U5877.001.00H0301-P1-C3-T1-W500507680140581E-L4000000000000 MPIO IBM 2145 FC Disk
+ hdisk5 U5877.001.00H0301-P1-C3-T1-W500507680140581E-L5000000000000 MPIO IBM 2145 FC Disk
+ fcs3 U5877.001.00H0301-P1-C3-T2 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet1 U5877.001.00H0301-P1-C3-T2 Fibre Channel Network Protocol Device
+ fscsi2 U5877.001.00H0301-P1-C3-T2 FC SCSI I/O Controller Protocol Device
* vio0 Virtual I/O Bus
* vscsi0 U8233.E8B.100603P-V15-C35-T1 Virtual SCSI Client Adapter
* hdisk3 U8233.E8B.100603P-V15-C35-T1-L8400000000000000 Virtual SCSI Disk Drive
* hdisk2 U8233.E8B.100603P-V15-C35-T1-L8300000000000000 Virtual SCSI Disk Drive
* hdisk1 U8233.E8B.100603P-V15-C35-T1-L8200000000000000 Virtual SCSI Disk Drive
* hdisk0 U8233.E8B.100603P-V15-C35-T1-L8100000000000000 Virtual SCSI Disk Drive
* ent1 U8233.E8B.100603P-V15-C2-T1 Virtual I/O Ethernet Adapter (l-lan)
* vsa0 U8233.E8B.100603P-V15-C0 LPAR Virtual Serial Adapter
* vty0 U8233.E8B.100603P-V15-C0-L0 Asynchronous Terminal

© Copyright IBM Corporation 2009, 2015

Figure 4-4. prtconf (2 of 2) AN14G5.0

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

4-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show the rest of the prtconf command output.
Details — Highlight that the second half of prtconf is the lscfg command. However, in reality, you
really want the VPD information in case you need to log a call with an IBM hardware engineer. Tell
the students that they can edit the ksh script as shown in the notes.
At this stage, the meaning of the location code is not important, only that it exists and points to the
physical location of that device. The interpretation of the code will be explained later in the unit.
Additional information —
Transition statement — Let us now look at the lscfg command.

© 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

© Copyright IBM Corporation 2009, 2015

Figure 4-5. lscfg AN14G5.0

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.

4-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview and insight into the lscfg command.
Details —
Additional information —
Transition statement — Let us look at the lsdev command.

© 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 displays device information that is including the device


state. Software (AIX)
location codes
# lsdev |grep ent
ent0 Available 02-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent1 Available 02-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent2 Available Virtual I/O Ethernet Adapter (l-lan)
ent3 Available Shared Ethernet Adapter

# lsdev -Cc disk


hdisk0 Available 03-08-01-8,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 01-00-02 MPIO Other FC SCSI Disk Drive
hdisk2 Available 00-08-00 SAS Disk Drive
-Cc : list by class
# lsdev -Cl proc2 -Cl : list by device name
proc2 Available 00-02 Processor

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

Device state
Locating the
# lsdev –Cl cd1 –F parent parent
ide0 device

© Copyright IBM Corporation 2009, 2015

Figure 4-6. lsdev AN14G5.0

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

4-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview and insight into the lsdev command.
Details —
Additional information —
Transition statement — Now let us see how to list and change device attributes.

© 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

lsattr and chdev commands


IBM Power Systems

• Use lsattr to view and chdev change device attribute data.


# lsattr -El rmt0

block_size 1024 BLOCK size (0=variable length) True


compress yes Use data COMPRESSION True Current block
density_set_1 71 DENSITY setting #1 True size = 1KB
density_set_2 38 DENSITY setting #2 True
extfm yes Use EXTENDED file marks True
mode yes Use DEVICE BUFFERS during writes True
ret no RETENSION on tape change or reset True True indicates
ret_error no RETURN error on tape change or reset True that the attribute
size_in_mb 36000 Size in Megabytes False is user settable

• To display a specific attribute:


– lsattr –E –l rmt0 -a block_size
• Tapes cannot be read when the tape device has a different block size.
– Changing the value to 0 (variable) can help overcome this problem.
# chdev -l rmt0 -a block_size=0 Set block
rmt0 changed size to 0

# lsattr -El rmt0 -a block_size Block size


block_size 0 BLOCK size (0=variable length) True was changed

© Copyright IBM Corporation 2009, 2015

Figure 4-7. lsattr and chdev commands AN14G5.0

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.

4-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to list and change device attributes.
Details — Provide an overview and insight into the lsattr and chdev commands.
Additional information —
Transition statement — Now that we have covered the essential commands, let us explore device
states.

© 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.

• The mkdev and cfgmgr commands make devices available


for use.
• The rmdev command can make devices unavailable for use
and completely remove them from the system.

© Copyright IBM Corporation 2009, 2015

Figure 4-8. Device states AN14G5.0

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.

4-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain device states.
Details — It is important that students understand that whenever a device is configured by using
the mkdev and cfgmgr commands, it is Defined or Available. When a device is made available, the
device driver is loaded into the kernel. The rmdev command without the -d option is used to take a
device from the Available to the Defined state (unloading the device driver). When using the -d
option, the rmdev command removes the device from ODM.
In the next visual, we will see these commands in action.
Additional information — The stopped device state is rarely seen. Few devices support this state.
In this case, the device resides in the customized database and the device driver is loaded, but the
application cannot use the device.
Transition statement — Let us walk through an example of how to apply these commands.

© 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

/dev directory, device configuration, and control


IBM Power Systems

• On UNIX platforms, access to devices is provided through special


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

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

# rmdev -l rmt0
rmt0 Defined
Minor number.
# 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

© Copyright IBM Corporation 2009, 2015

Figure 4-9. /dev directory, device configuration, and control AN14G5.0

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.

4-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show cfgmgr, /dev, and major/minor numbers. Also, show rmdev and mkdev
commands in action.
Details — Go through the information in the visual and notes. Students will probably notice in place
of a file size there are two numbers: major and minor numbers. Provide them with a simple
explanation.
Additional information — The major identifies the kernel driver that is used to communicate with
the device. The minor number can have different functions such as which instance of the device,
and maybe special handling. In LVM storage, the major number represents the VG and minor
number the LV.
Transition statement — Let us explain device addressing.

© 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

• The address of a device allows you to identify its location.


• Physical location codes uniquely identify a specific component in a
server or accessed by a server.
– Assigned by the system firmware.
• Example hdisk0: U78A0.001.DNWGGRX-P2-D5 (SAS drive)

• Operating system location codes uniquely identify a component only


within an AIX instance.
– Assigned by AIX.
– Not as useful or meaningful as physical codes on POWER5 or later systems.
– Virtual devices do not have AIX location codes.
– Note: Address conventions differ between models and types (adapters, SCSI,
non-SCSI).
• Example: hdisk0: 00-08-00 (SAS drive)

• Both physical and AIX codes can be seen side by side with:
– lsdev –CHF "name, status, physloc, location"

© Copyright IBM Corporation 2009, 2015

Figure 4-10. Device addressing AN14G5.0

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

Virtual devices do not have OS location codes.

4-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain device addressing.
Details — Compare an AIX location code to a physical location code. Use the example to point out
the portion of the physical location code that contains the machine type, model, and serials number
(dot delimited).
OS codes are not that useful with today's technology, so ensure that the focus is on physical
addressing. The physical address needs to be understood in order to locate a failing device.
Additional information — AIX location codes were developed to identify physical locations before
POWER4 appeared. AIX internal device management is still dependent on this code structure so it
will not go away.
Transition statement — Let us examine and explain some physical location code examples.

© 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

Physical location code examples


IBM Power Systems

• Physical location code format


– Unit_type.Model_no.Serial_no-additional device information
• Examples:
hdisk0 U78A0.001.DNWGGRX-P2-D5 SAS Disk Drive

SAS Planar (P2), Device slot reference 5, disk is in the CEC

ent1 U78A0.001.DNWGGRX-P1-C4-T2 2-Port 10/100/1000 PCI-X Adapter

System planar (P1), Card slot No 4, 2nd port, adapter is in the CEC

hdisk0 U7311.D20.6516D3C-P1-C04-T2-L8-L0 16 Bit LVD SCSI Disk

Planar 1 (P1), PCI slot No 4, 2nd port, SCSI ID 8,0, disk is in an attached SCSI 7311-D 20
I/O Drawer.

hdisk5 U78A0.001.DNWGGRX-P1-C3-T1-W500507630E801223-L4011402700000000 FC SCSI Disk

System planar (P1), Card slot No 3, Port 1, W = WW unique name of an FC adapter (where
the FC adapter is in a remote storage subsystem), L = LUN ID. The disk is a logical
device (identified by the LUN ID) in the remote storage subsystem.

© Copyright IBM Corporation 2009, 2015

Figure 4-11. Physical location code examples AN14G5.0

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.

4-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Power hardware-specific terminology


• Central electronics complex (CEC) is the main system unit that contains system processors,
memory, and remote I/O connections.
• System planar is the main component of the CEC where all processor cards, memory dimms,
and I/O attachments are interconnected together.
• RIO and 12X provide high-speed connectivity between the system enclosure (contains the
CEC) and any I/O drawer enclosures. RIO and 12X are comprised of special cables, adapters,
and protocols, which allow the I/O drawers to effectively act as extensions of the system
enclosure’s internal buses. An I/O drawer can consist of PCI slots/adapters, disks, or both,
depending on the type of I/O drawer. The I/O drawers connect to the system enclosure through
either a RIO or 12X GX adapter, which sits on the system enclosure’s GX+ bus.
• System Ports are the two serial ports on the system planar. In an operating system
environment, the two system ports become host virtual system ports and are only available for
specific limited functions. For example, the two integrated system ports on a p550 are limited to
serial connected TTY console functionality and IBM approved call-home modems. These
system ports do not support other general serial connection uses, such as UPS, PowerHA
heartbeat, printers, mice, If you need multi-purpose serial port functions, optional PCI adapters
are available.
• GX+: Each POWER6 processor provides a GX+ bus, which is used to connect to an I/O
subsystem or Fabric Interface card.
• IVE: The POWER6 and higher processor-based servers extend the virtualization technologies
that are introduced in POWER5 by offering the Integrated Virtual Ethernet (IVE) adapter. IVE,
also called Host Ethernet Adapter (HEA) in other documentation, enables an easy way to
manage the sharing of the integrated high-speed Ethernet adapter ports. It is a standard set of
features that are part of POWER6 and early POWER7 processor-based servers. IVE is
discontinued in new models POWER7 processor-based servers.
• PCI, which stands for Peripheral Component Interconnect, is an industry-standard bus for
attaching peripherals to computers.

© 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.

4-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Virtual location codes example


IBM Power Systems

– Client (AIX) partition Virtual devices are easily


recognized by the virtual ID
reference. This value is the LPAR
# uname –L ID as shown with the uname
2 sys124_v1_T1 command.

vscsi0 U8204.E8A.652ACD2-V2-C12-T1 Virtual SCSI Client Adapter


hdisk1 U8204.E8A.652ACD2-V2-C12-T1-L810000000000 Virtual SCSI Disk Drive

Virtual client disk, Virtual (LPAR) ID 2, virtual card slot 12.

– VIOS HMC profile


Virtual SCSI adapter definition

Note: In this example, the HMC profile is required


to show the client-server virtual disk relationship.

– 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

© Copyright IBM Corporation 2009, 2015

Figure 4-12. Virtual location codes example AN14G5.0

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.

4-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an example of virtual location codes.
Details — The visual is not intended to provide a lesson in virtualization, but to enable students to
identify and interpret a virtual location code. Go through the example provided. Point out how one
can recognize a virtual device by using the physical location code. In this example, the virtual SCSI
adapter HMC definition from the VIOS is required to show the mapping between the client disk and
adapter in the client partition, to the server adapter in the VIOS partition.
Additional information — Do not get stuck here explaining virtualization beyond basic concepts.
Focus solely on the location code explanation. Virtual devices and virtualization are generally
beyond the scope of this class. Some students are going to be curious here and might want to ask
many questions. If so, point them towards the LPAR classes.
Transition statement — Let’s see who has been listening. It is time for the checkpoint.

© 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

1. What does the following location code mean?


fcs0 U78A0.001.DNWGGRX-P1-C3-T1 4Gb FC PCI Express Adapter

2. True or False: cfgmgr is a binary executable that runs at


system initialization time to configure devices on the
system.

© Copyright IBM Corporation 2009, 2015

Figure 4-13. Checkpoint AN14G5.0

Notes:

4-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

Checkpoint solutions
IBM Power Systems

1. What does the following location code mean?


fcs0 U78A0.001.DNWGGRX-P1-C3-T1 4Gb FC PCI Express Adapter

The answer is port 1 of a 4 Gb Fibre Card, which is


connected to planar 1, card slot 3, in Power 550 CEC
(U78A0).

2. True or False: cfgmgr is a binary executable that runs at


system initialization time to configure devices on the
system.
The answer is true.

© Copyright IBM Corporation 2009, 2015

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

© Copyright IBM Corporation 2009, 2015

Figure 4-14. Exercise AN14G5.0

Notes:

4-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Explain device terminology
• Display the system configuration
• Use common device commands
• Explain device configuration and control
• Identify device locations
– Interpret physical and virtual location codes

© Copyright IBM Corporation 2009, 2015

Figure 4-15. Unit summary AN14G5.0

Notes:

4-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement — End of unit.

© 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

4-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 5. TCP/IP networking

Estimated time
00:40

What this unit is about


This unit describes the essential Transmission Control Protocol/Internet
Protocol (TCP/IP) and networking concepts that are required in order to work
with and configure TCP/IP in AIX.

What you should be able to do


After completing this unit, you should be able to:
• Describe the TCP/IP startup flow on AIX
• Configure TCP/IP basic functions on AIX
• Explain the difference between ODM and bsdnet methods

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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

After completing this unit, you should be able to:


• Describe the TCP/IP startup flow on AIX
• Configure TCP/IP basic functions on AIX
• Explain the difference between ODM and bsdnet methods

© Copyright IBM Corporation 2009, 2015

Figure 5-1. Unit objectives AN14G5.0

Notes:

5-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of the unit.
Details —
Additional information —
Transition statement — Let us start with a discussion of network interface cards, specifically the
most common type of adapter - Ethernet adapter.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Ethernet adapters and interfaces


IBM Power Systems

• Each adapter (entX) has two interfaces (enX and etX).


– enX interface uses the ‘standard DIX’ Ethernet frame format.
• Originally designed by Digital, Intel, and Xerox
– etX interface uses IEEE802.3 frame format.
Network Adapter Card port Interface: en0
adapter device: ent0 Interface: et0
(Layer 1 and 2 physical device) (Layer three logical devices)

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.

en0 Available 01-08 Standard Ethernet Network Interface


et0 Defined 01-08 IEEE 802.3 Ethernet Network Interface

© Copyright IBM Corporation 2009, 2015

Figure 5-2. Ethernet adapters and interfaces AN14G5.0

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

5-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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 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?

5-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

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


IBM Power Systems

• 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 +

© Copyright IBM Corporation 2009, 2015

Figure 5-3. How is TCP/IP configured on AIX? (1 of 2) AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Desirable items are:


• DNS parameters (namserver and domain name):
- This information populates the /etc/resolv.conf file, as follows:
nameserver 10.47.1.33
domain lpar.co.uk
- This does not update the name server with your machine’s information. Contact the name
server administrator to have your IP address and host name added.
CABLE Type is generally not required and can be left as N/A. START Now refreshes or starts, the
TCP/IP subsystems.

Note

The TCP/IP subsystems should already be running!

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.

5-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce smitty mktcpip as a one stop shop for TCP/IP configuration.
Details — Use the visual to explain how to use smit mktcpip to configure TCP/IP on AIX.
Introduce most of the options in the panels.
Additional information — You might get questions on active dead gateway detection as shown in
the SMIT screen. Explain that we do not have time to cover multipath routing and dead gateway
detection in this course. These are covered in the AIX TCP/IP course: AN21.
Transition statement — What about multi-homed boxes?

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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


IBM Power Systems

• smit mktcpip should be used only for the first adapter


• Subsequent adapters should be configured with:
# smit chinet
Change / Show a Standard Ethernet Interface

[Entry Fields]
Network Interface Name en1
INTERNET ADDRESS (dotted decimal) [192.168.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 +

© Copyright IBM Corporation 2009, 2015

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

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.

5-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Clarify how to add IP configuration to a server with multiple adapters.
Details — Talk through the options that are highlighted in blue. The interface specific network
options (ISNO) are beyond the scope of this course. Do not forget to point out that the adapter state
is down by default. Most people miss this.
Additional information —
Transition statement — Let us look at what the SMIT panel is doing, under the covers.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

SMIT, ODM, and the kernel


IBM Power Systems

SMIT ODM database

interface objects
chdev /etc/rc.net
inet0 object (bootup_option=no)
mkdev
rmdev

netinet kernel
extension

ifconfig Interface ifconfig


configuration
route route
Route table
hostname hostname
Host name
value

netstat or ifconfig

© Copyright IBM Corporation 2009, 2015

Figure 5-5. SMIT, ODM, and the kernel AN14G5.0

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

5-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-13


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 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.

5-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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)

init runs rc.tcpip starts selected network daemons:


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

© Copyright IBM Corporation 2009, 2015

Figure 5-6. TCP/IP startup AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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.

5-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Command line TCP/IP configuration


IBM Power Systems

• There are two ways to configure network resources:


– AIX ODM (chdev or SMIT)
– Directly, using BSD UNIX commands: hostname, ifconfig, route (valid until
reboot, unless coded in startup script)

• Setting the hostname:


– ODM: # chdev –l inet0 –a hostname=sys1
– Directly: # hostname sys1

• Defining an IP address for an adapter:


– ODM: # chdev -l en0 -a netaddr=192.168.0.1 –a \
netmask=255.255.255.0 -a state=up
– Directly: # ifconfig en0 192.168.0.1 255.255.255.0 up

• 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)

• Can use hostname and ifconfig for display of values


© Copyright IBM Corporation 2009, 2015

Figure 5-7. Command line TCP/IP configuration AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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 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.

5-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Name resolution
IBM Power Systems

• Name resolution methods: Local, DNS, NIS, and LDAP.


• Local - /etc/hosts file (edit or smit hosts):
127.0.0.1 loopback localhost
10.10.1.1 system1 nimserver
10.10.1.2 system2

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


domain lpar.co.uk
nameserver 10.47.1.33

• The name resolution order is:


– Default order: bind (DNS), NIS=auth, local
– Override with /etc/netsvc.conf, append:
• hosts = local, bind
– Override both with environment variable NSORDER:
• # export NSORDER=local,bind
• Display resolution with: # host <name or IP addr>
© Copyright IBM Corporation 2009, 2015

Figure 5-8. Name resolution AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-19


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Default name resolution


The existence of /etc/resolv.conf determines how a system resolves host names and IP
addresses within a domain or flat network.
• If /etc/resolv.conf exists, the system attempts to query a DNS server.
• If /etc/resolv.conf does not exist, the system checks to see whether NIS is being used and if
the server is available. NIS is authoritative. This means, that if the NIS client subsystem is
running, and it is not successful in obtaining an answer, then the process stops.
• Finally, the local /etc/hosts file is checked.
Overriding the default name resolution
The default name resolution can be overwritten in two ways:
• Append to the /etc/netsvc.conf file and specify host ordering. Use the hosts attribute
followed by the name of the resource to use. The resources that are listed depend on what
name resolution processes are running on the network.
• Create an environment variable NSORDER. NSORDER overrides any name resolution that is
specified in the /etc/netsvc.conf file.

5-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how name resolution works on AIX.
Details — Explain how name resolution can be achieved on AIX, the default order, and how it can
be changed.
Additional information — Changing the order differs between UNIX implementations. It is
generally a good idea if name resolution order is changed, to set both /etc/netsvc.conf and
NSORDER just in case the environment table gets cleared.
Do not get too involved with DNS, NIS, and LDAP topics. These are beyond the scope of the class.
Transition statement — Finally, let us look at the support for the NFS facility.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-21


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Network file system


IBM Power Systems

• 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

– Export directory trees


• /usr/sbin/mknfsexp or smit mknsfexp
/etc/exports exportfs -a /etc/xtab rpc.mountd
© Copyright IBM Corporation 2009, 2015

Figure 5-9. Network file system AN14G5.0

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

5-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-23


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 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.

5-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. When you use smit mktcpip, SMIT updates:


a. Only the ODM
b. Only the kernel
c. /etc/rc.net
d. Both the ODM and the kernel

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

3. True or False: The core TCP/IP daemons are typically started by


/etc/rc.tcpip at system restart.

4. True or False: You can choose to bypass the ODM and use BSD
commands in a startup script by setting the inet0 bootup_option
attribute to yes.

© Copyright IBM Corporation 2009, 2015

Figure 5-10. Checkpoint AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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 —

Checkpoint solutions
IBM Power Systems

1. When you use smit mktcpip, SMIT updates:


a. Only the ODM
b. Only the kernel
c. /etc/rc.net
d. Both the ODM and the kernel
The answer is both the ODM and the kernel.

2. True or False: You can choose to configure either en0 or et0 since they both map
to the same Ethernet adapter port.
The answer is false. You must configure the interface whose protocol matches the
other hosts on your network (likely en0 using 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.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

5-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

TCP/IP
implementation

© Copyright IBM Corporation 2009, 2015

Figure 5-11. Exercise AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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 —

5-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Describe the TCP/IP startup flow on AIX
• Configure TCP/IP basic functions on AIX
• Explain the difference between ODM and bsdnet methods

© Copyright IBM Corporation 2009, 2015

Figure 5-12. Unit summary AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 5. TCP/IP networking 5-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 — End of unit.

5-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 6. System startup and shutdown

Estimated time
01:00

What this unit is about


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

What you should be able to do


After completing this unit, you should be able to:
• Describe the logical partition and AIX startup process
• Activate the AIX partitions
• Describe the AIX startup modes
• Describe the role of the System Resource Controller and how to manage
subsystems
• Explain how to shut down the AIX partitions

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Describe the logical partition and AIX startup process
• Activate the AIX partitions
• Describe the AIX startup modes
• Describe the role of the System Resource Controller and how
to manage subsystems
• Explain how to shut down the AIX partitions

© Copyright IBM Corporation 2009, 2015

Figure 6-1. Unit objectives AN14G5.0

Notes:

6-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of this unit.
Details —
Additional information —
Transition statement — Let us start with the different modes of AIX startup.

© 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

Startup modes for AIX (1 of 2)


IBM Power Systems

• The two most popular start-up modes are:


– SMS mode (the firmware menu)
– Normal mode

• SMS mode is used for:


– Selecting the boot device or setting remote IPL parameters
– Booting into Service (Maintenance) mode, for example:
• To fix a machine that will not boot
• Recover root password

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

© Copyright IBM Corporation 2009, 2015

Figure 6-2. Start-up modes for AIX (1 of 2) AN14G5.0

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.

6-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the startup modes for AIX.
Details — There are several startup modes for AIX. However, most of the time, the system is
booted in normal mode. To build the system, or to boot into maintenance mode to fix problems, it is
often necessary to boot into SMS mode (the system firmware). The others boot options are rarely
used.
Give an overview of SMS booting and why one would want to do it.
Additional information —
Transition statement — Let us continue with normal mode and the other options.

© 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

Startup modes for AIX (2 of 2)


IBM Power Systems

• Normal mode
– AIX boots into multi-user mode (run level 2).
– Users can log in, the system can be configured, and applications can
start.
– The bootlist command can change the start-up boot device list.

# bootlist -m normal -o Displays the current


hdisk0 blv=hd5 boot device (hdisk0)

# bootlist –m normal hdisk0 hdisk1


Changes the current
normal bootlist to boot
from hdisk1 if hdisk0 is
• Other less common start-up modes: not available or bootable
– Diagnostic with default boot list
• Boot to service mode that uses default boot list (has optical drive first)
– Diagnostic with stored boot list
• Boot to service mode that uses a user customized bootlist
– Open firmware
• Open firmware prompt; used by service/support personnel to obtain low-level
debug information

© Copyright IBM Corporation 2009, 2015

Figure 6-3. Start-up modes for AIX (2 of 2) AN14G5.0

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.

6-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Continuation of startup modes.
Details — Cover normal mode booting. Briefly mention that they can display or modify the bootlist.
But that topic will be covered thoroughly in a later unit.
Briefly highlight the other boot options, and explain that we will cover them more completely later in
the course. They are only listed at this point for completeness. They are not used as often these
days as one would typically boot into SMS, and then just select the boot device.
Additional information — The bootlist command can include a network adapter, but then must
also provide network parameters. The only situation where this would be used is if needing to
network boot that uses a boot server such as a NIM server. More often these network boots are
controlled though an SMS configuration (covered later in the AIX Installation unit). An example of
using bootlist to identify a network adapter and the associated network parameters is:
# bootlist -m normal ent0 bserver=10.47.1.33 client=10.47.1.101
Transition statement — Let us look at how we start a partition from the HMC.

© 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

AIX partition activation (1 of 2)


IBM Power Systems

# ssh hscroot@<hmc> chsysstate -m <ms_name> -r lpar \


-o on -n <lpar> -f <profile name> -b sms

To activate
into SMS

© Copyright IBM Corporation 2009, 2015

Figure 6-4. AIX partition activation (1 of 2) AN14G5.0

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.

6-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how an AIX partition is activated.
Details — Go through the visual and explain how to start an AIX partition.
Additional information —
Transition statement — Let us continue with our examination of partition activation.

© 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 partition activation (2 of 2)


IBM Power Systems

AIX Version 7
Copyright IBM Corporation, 1982, 2013
Console login:

© Copyright IBM Corporation 2009, 2015

Figure 6-5. AIX partition activation (2 of 2) AN14G5.0

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.

6-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how an AIX partition is activated (continued).
Details — Following the activate action, the profile must be chosen to boot from. In the visual, there
is just one profile (and most cases) the profile is already selected, shown as an02. Explain to
students that it is the profile that contains the attributes, such as processing units, memory, and
devices. Mention also the Advanced button, which shows the boot mode options that are
mentioned earlier.
Once the partition is running, we can log in, either remotely (tn, ssh, and so on) or by using a virtual
console session as shown on the visual.
Additional information —
Transition statement — In a normal boot, control is eventually passed to the init process, which
runs the programs that are listed in the /etc/inittab file. Let us look at how AIX uses this common
UNIX facility.

© 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

Format of the line: id:runlevel:action:command[#comment]


init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1 Default runlevel 2
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1 is multiuser mode
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
rcemgr:23456789:once:/usr/sbin/emgr -B > /dev/null 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
cron:23456789:respawn:/usr/sbin/cron SRC master is
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon parent to many
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
subsystems
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3 SRC subsystem
l4:4:wait:/etc/rc.d/rc 4 start example
l5:5:wait:/etc/rc.d/rc 5 Support for
l6:6:wait:/etc/rc.d/rc 6
[ . . . ]
rc.d scripts

© Copyright IBM Corporation 2009, 2015

Figure 6-6. /etc/inittab AN14G5.0

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.

6-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty - Action: How to treat the process. Valid actions are:


• respawn: If the process does not exist, start it. If the process dies, then restart it.
• wait: Start the process and wait for it to finish before reading the next line.
• once: Start the process and immediately read the next line. Do not restart it if it stops.
• sysinit: These commands are to be run before trying to access the console.
• off: Do not run the command.
• Command: Use the AIX command to run to start the process.
• Run levels
AIX uses a default run level of 2. This is the normal multi-user mode. You might want to perform
maintenance on your system without having other users logged in. The command shutdown -m
places your machine into a single user mode and terminates all logins. Once the machine
reaches the single user mode, you are prompted to enter the root password. When you are
ready to return to normal mode, type telinit 2.
• System resource controller
Many of the daemons that start at boot time are defined to the system resource controller
(SRC). Before these subsystems can be started, the SRC master process (srcmstr) must be
started by the init process. After the SRC master is started, the subsystems are started by
entries in the inittab (either directly or through startup scripts such as rc.tcpip), which invoke
the SRC master to start specific subsystems.
• Support for rc.d scripts
Traditionally, AIX invoked scripts directly out of the inittab. AIX provided an ability (common in
other UNIX operating systems) to invoke start (S) and stop (K) scripts that are stored under the
/etc/rc.d directory.

© 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?

6-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

/etc/inittab management and run levels


IBM Power Systems

• Run levels on AIX:


– 0 and 1: Reserved for future use
– 2 Multi-user mode (default level of init entry)
– 3 through 9: Free to be defined by the administrator

• Best practice: Use high-level commands to edit the inittab


– mkitab, chitab, rmitab

• The telinit command accepts an argument to control init:


– A run level to switch to
– S, s, M, m, results in the system to entere single user mode
– Q, q, re-examines and processes the /etc/inittab file on request

• /etc/rc.d scripts are supported:


– Few AIX system facilities currently use this
• Two examples are ssh and WPARs
– Part of Linux affinity environment

© Copyright IBM Corporation 2009, 2015

Figure 6-7. /etc/inittab management and run levels AN14G5.0

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

6-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

6-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

System resource controller


IBM Power Systems

• Provides a single interface to control subsystems


• Controls individual subsystems or groups of subsystems
# ps -ef |grep src SRC
UID PID PPID C STIME TTY TIME CMD Master
root 172178 1 0 18 Sep - 0:00 /usr/sbin/srcmstr process
# ps -T 172178
PID TTY TIME CMD Parent
172178 - 0:00 srcmstr PID = init
151672 - 0:01 |\--syslogd
163968 - 0:00 |\--inetd
303160 - 0:00 | \--rlogind
Subsystem
512170 pts/0 0:00 | \--ksh
463024 pts/0 0:00 | \--ps
168088 - 0:00 |\--portmap
180418 - 0:00 |\--IBM.ServiceRMd
188650 - 1:24 |\--rmcd
Subserver
200856 - 3:47 |\--clstrmgr
204904 - 0:00 |\--tftpd
176288 - 0:00 | \--tftpd
213102 - 0:00 |\--sshd
221334 - 0:00 |\--snmpdv3ne
254124 - 0:00 |\--IBM.DRMd
262276 - 0:59 |\--IBM.CSMAgentRMd
417800 - 0:00 \--ctcasd

© Copyright IBM Corporation 2009, 2015

Figure 6-8. System resource controller AN14G5.0

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.

6-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Listing subsystems
IBM Power Systems

• The lssrc command is used to list subsystems.


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

…. Removed for clarity …..

# lssrc –g tcpip |grep active


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

© Copyright IBM Corporation 2009, 2015

Figure 6-9. Listing subsystems AN14G5.0

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.

6-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

Not all subsystems support


being refreshed

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

© Copyright IBM Corporation 2009, 2015

Figure 6-10. SRC control AN14G5.0

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.

6-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

AIX partition shutdown (1 of 2)


IBM Power Systems

• The shutdown command, by default:


– Warns users and waits one minute (default) before proceeding.
– Runs /etc/rc.shutdown and /etc/rc.d K scripts.
– Signals SRC subsystems to stop and then kills remaining processes.
– Synchronizes disks and unmounts file systems.
– Halts the operating system.
Do a fast shutdown,
# shutdown -Fr
bypassing the
messages to users,
SHUTDOWN PROGRAM and reboot the
Thu 9 Oct 20:15:49 2014 system.
0513-044 The sshd Subsystem was requested to stop.
Wait for 'Rebooting...' before stopping.
Oct 9 2014 20:15:50 /usr/es/sbin/cluster/utilities/clstop: called with
flags -f -y -s -N -S
0513-004 The Subsystem or Group, clinfoES, is currently inoperative.
Error logging stopped...
Advanced Accounting has stopped...
Process accounting stopped...
Stopping NFS/NIS Daemons

Connection closed.

© Copyright IBM Corporation 2009, 2015

Figure 6-11. AIX partition shutdown (1 of 2) AN14G5.0

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

Shutting down to single-user mode


Use the following command to shut down the system to single-user mode:
# shutdown -m
Creating a customized shutdown sequence
If you need a customized shutdown sequence, you can create a file that is called
/etc/rc.shutdown. If this file exists, it is called by the shutdown command and is run first, “that is
before normal shutdown processing begins.” This is useful if, for example, you need to close a
database before a shutdown. If rc.shutdown fails (nonzero return code value), the shutdown is
terminated.

6-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — To describe how to shut down an AIX partition.
Details — Describe the syntax and use of the shutdown command. Other flavors of UNIX handle
this differently.
Additional information — In some cases, the other UNIX systems have a shutdown command
only in newer versions of the system and even then the functionality is not the same. For example,
in HP/UX, you need to first set the run level to 0 and then run shutdown. Run level 0 dependent
systems often depend upon the /etc/rc.d scripts to handle the termination of the subsystems and
applications.
Even if a Solaris admin had migrated to a version that uses the shutdown command, they might still
be using the traditional halt command. In some cases, the shutdown command can be used for a
normal shutdown, but the reboot command is used to achieve a reboot. The reboot command
should not be used in AIX unless you are in a state with no activity (such as maintenance mode with
no active task or disk I/O).
Transition statement — Now we understand how to shut down AIX from the command line. Let us
see how we can do this from the HMC.

© 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

AIX partition shutdown (2 of 2)


IBM Power Systems

• AIX shutdown can also be initiated from the HMC.


# ssh hscroot@<hmc> chsysstate -o osshutdown

Do a fast
shutdown:
shutdown -F

© Copyright IBM Corporation 2009, 2015

Figure 6-12. AIX partition shutdown (2 of 2) AN14G5.0

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

6-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

6-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. When starting a partition with an operating system that


lacks a correctly configured network interface, how can you
log in to the system?

2. Which AIX feature can be used to stop and start


subsystems and groups of daemons?

3. True or False: The reboot command can be used


interchangeably with the shutdown –Fr command.

© Copyright IBM Corporation 2009, 2015

Figure 6-13. Checkpoint AN14G5.0

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

1. When starting a partition with an operating system that lacks a


correctly configured network interface, how can you log in to the
system?
The answer is at the HMC Activate Logical Partition – Advanced
panel, specify that a virtual terminal be started as part of the
activation process. When the system finishes booting, a login prompt
will appear in the virtual terminal window.

2. Which AIX feature can be used to stop and start subsystems and
groups of daemons?
The answer is the System Resource Controller (SRC).

3. True or False: The reboot command can be used interchangeably


with the shutdown –Fr command.
The answer is false.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

6-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

System startup and


shutdown

© Copyright IBM Corporation 2009, 2015

Figure 6-14. Exercise AN14G5.0

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 —

6-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Describe the logical partition and AIX startup process
• Activate the AIX partitions
• Describe the AIX startup modes
• Describe the role of the System Resource Controller and how
to manage subsystems
• Explain how to shut down the AIX partitions

© Copyright IBM Corporation 2009, 2015

Figure 6-15. Unit summary AN14G5.0

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.

6-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 7. Basics of configuring logical partitions

Estimated time
00:20

What this unit is about


This unit describes the basic resource configuration rules for partitions.

What you should be able to do


After completing this unit, you should be able to:
• Describe the following partition concepts:
- Partition type
- Partition ID and partition name
- Partition profiles
• Describe basic processor and memory configuration options
• Define Minimum, Maximum, and Desired settings for memory and
processors
• Describe I/O concepts and the Required and Desired settings
• Use the Create Partition wizard to create a basic partition and a default
profile

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Describe the following partition concepts:
– Partition type
– Partition ID and partition name
– Partition profiles
• Describe basic processor and memory configuration options
• Define Minimum, Maximum, and Desired settings for memory
and processors
• Describe I/O concepts and the Required and Desired settings
• Use the Create Partition wizard to create a basic partition and
a default profile

© Copyright IBM Corporation 2009, 2015

Figure 7-1. Unit objectives AN14G5.0

Notes:
The objectives list what you should be able to do at the end of this unit.

7-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the objectives for this unit.
Details — This unit describes basic things that you need to know to configure a basic partition.
Additional information —
Transition statement — First, let us look at what is required to define an LPAR.

© 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

Creating partitions and profiles


IBM Power Systems

• 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.

© Copyright IBM Corporation 2009, 2015

Figure 7-2. Creating partitions and profiles AN14G5.0

Notes:

Partitions and profiles


A partition has a name and an ID number that is stored in a table. Partition profiles are like a
configuration file that lists resource configurations and attributes.
System profiles are different. System profiles are a list of partitions and the partitions’ profiles to
provide an easy way to either validate that all of the partitions can run simultaneously with no
resource contention issues, or to easily start a certain set of partitions.

7-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the basic components of a logical partition definition.
Details —
Additional information —
Transition statement — One of the most important aspects of the partition definition is the profile,
which defines the resources that are seen by the operating system. Let us look at the types of
resources and how to configure them in the profile.

© Copyright IBM Corp. 2009, 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 and processor allocation


IBM Power Systems

• 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

© Copyright IBM Corporation 2009, 2015

Figure 7-3. Memory and processor allocation AN14G5.0

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.

7-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

Minimum, desired, and maximum


For processor and memory allocations, you specify three values. These are used to determine what
the actual partition allocation will be.
• Desired
Desired is the most important of the values. The system attempts to allocate the desired amount
when the partition is activated. If it cannot allocate the desired amount, then it allocates as much
as it can up to the desired amount.
• Minimum
The minimum is also important in the activation of the partition. The system must be able to
allocate the minimum amount or the partition will not start.
For partitions that support dynamic partitioning, allocation cannot be reduced to below the
minimum amount.
• Maximum
The maximum is the largest amount of processors or memory that the partition can have if you
add the resource dynamically. The maximum memory amount is also used to determine the size
of the hardware page table. If the maximum amount of memory is configured unnecessarily
large, then the size of the hardware page table will be unnecessarily large, wasting memory that
is dedicated to the Hypervisor.

© 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.

7-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Adapter allocation
IBM Power Systems

• Allocation by individual slots:


– Entire adapter dedicated to LPAR
– All adapter ports assigned to the one LPAR
– All accessed devices assigned to the one LPAR

• Slot allocation can be Required or Desired.

• Adapters can be virtual:


– Virtual Ethernet adapters (on server’s virtual Ethernet)
– Virtual SCSI adapters (access VIOS storage)
– Virtual FC (use VIOS physical FC using NPIV)

© Copyright IBM Corporation 2009, 2015

Figure 7-4. Adapter allocation AN14G5.0

Notes:

Physical I/O resources


What is allocated to a partition for I/O device access is the adapter slot and the slot is where the
adapter is connected to the PCI bus. Examples of adapters include: an IDE controller with a
CD-drive, an Ethernet adapter, and a Fibre Channel storage adapter. When a storage adapter is in
the allocated slot, the LPAR has dedicated access to the storage devices that are connected to that
adapter. For example: You cannot take a single SCSI controller with three disks on the SCSI bus
and allocate each disk to a different LPAR. Whichever partition is allocated the adapter is the
partition that has access to the disks on that bus. The same applies to a single HBA connected to
the SAN.

Required versus desired


The partition starts only if all of the required slots are available and it attempts to assign those that
are desired. Slots that are required cannot be dynamically removed or moved from the partition.

© 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.

Virtual SCSI adapter


Virtual SCSI is a type of virtual device in which a Virtual I/O Server is configured to allow other
partitions to use its disks or optical devices. The client LPAR sees a vscsi device that acts almost
exactly like a real physical SCSI adapter. The virtual SCSI device that appears under the vscsi
adapter looks and acts just like a SCSI device. The actual devices that are controlled by the VIOS
do not need to be SCSI type devices; for example, the optical media drive can be an IDE type
device or the disk drive might be a LUN in the SAN accessed over a Fibre Channel adapter. The
disks can be whole disks or logical volumes on the Virtual I/O Server. When the client views the
devices from its operating system, it appears as a regular hdisk, rmt, or cd device.
The VIOS and its clients communicate over a pair of virtual SCSI adapters through the Hypervisor:
a server adapter at the VIOS and a client adapter at the client LPAR. When allocating the client
virtual SCSI adapter, you need to specify which VIOS partition and what server adapter to connect
to.

Virtual Ethernet adapter


Virtual Ethernet adapters can be configured in multiple partitions on the same server and these
adapters appear as ent devices to the AIX operating system. The Power Hypervisor acts as a
virtual Ethernet switch to support communication between the virtual Ethernet adapters. The Power
Hypervisor can support multiple VLANs and the virtual Ethernet adapter allocation includes the
specification of what VLAN to use, through a VLAN ID. To connect this virtual Ethernet to an outside
network, a bridge can be configured in a Virtual I/O Server that is called a Shared Ethernet adapter.

Virtual Fibre Channel adapter


A client Virtual Fibre Channel adapter can be configured on a client LPAR with a matching server
virtual FC on a VIOS that in turn is related to a physical FC adapter allocated to that VIOS. This
provides the client LPAR with access to the SAN, where the virtual FC has its own unique WWPN
and can have LUNS zoned directly to it. The client virtual FC appears to be another port in an
N-port ID Virtualization (NPIV) configuration.

7-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain LPAR adapter allocations.
Details — Point out that they will be using virtual adapters in the lab. For the virtual Ethernet, we
will have all partitions defined on the same VLAN and they will specify a VLAN ID of 1. For the
virtual SCSI, explain that while there is a client/server relationship between the VIOS and the client
LPAR, they will only build the client side of this. There will only be one VIOS to choose from and we
will provide them with the adapter ID of server side adapter ID.
Additional information —
Transition statement — Having covered some basic concepts, let us see how we use the HMC to
define the LPAR using the Create Logical Partition wizard.

© Copyright IBM Corp. 2009, 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

Create Logical Partition wizard


IBM Power Systems

Select a server and run:


Configuration > Create Partition > AIX or Linux

© Copyright IBM Corporation 2009, 2015

Figure 7-5. Create Logical Partition wizard AN14G5.0

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.

7-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to use the HMC GUI interface to launch the Create Logical Partition
wizard for a selected managed system.
Details —
Additional information —
Transition statement — Once the wizard is started, you are presented with a series of panels. Let
us see what kind of information is requested on these panels.

© 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

Create Logical Partition wizard steps


IBM Power Systems

• The Create Logical Partition wizard presents a series of


panels prompting for information:
– Partition ID (can accept default) and Partition Name
– Profile name (often set to default or normal)
– Shared versus Dedicated processors
– Processor allocation amount
– Memory allocation amount
– Select adapter slots to allocate
– Create virtual adapters
– Allocate Logical Host Ethernet Adapter or SR-IOV ports (depending on
the model)
– Optional settings (such as boot mode)

© Copyright IBM Corporation 2009, 2015

Figure 7-6. Create Logical Partition wizard steps AN14G5.0

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.

7-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Partition profile name


A partition must have at least one partition profile, which contains the resource configuration
information. When you create a partition, you create the default profile.
Set processor type
The first question about processors to answer in the wizard program is whether the partition will use
shared or dedicated processors. What you are prompted for next depends upon your answer.
Dedicated processors
Dedicated processors are allocated in whole numbers from one to the total number of physical
processor cores.
Shared processors
Configure the quantity of processing units for this partition. For this course, we will leave all of the
advanced processor options (virtual processors and uncapped status and weight) at the default
values.
Allocate memory
Set the minimum, desired, and maximum settings. The granularity for setting the memory amount is
the LMB size. If the server is configured with a shared memory pool, the first question will be
whether you want to use physical or shared memory.
Allocating I/O slots
All of the installed the buses and slots are displayed for the system. To allocate slots to the partition,
select a slot and click either Add as required or Add as desired.
Configuring virtual adapters
On the Virtual Adapters screen, use the Actions menu to create a new virtual adapter.
• The virtual Ethernet adapter is on a virtual Ethernet that is specified with a VLAN ID for which
the Hypervisor acts as the network switch. If the Virtual I/O Server is configured with a special
bridge device called the Shared Ethernet adapter, then the internal server virtual Ethernet traffic
can be bridged to an external network.
• The virtual SCSI client adapter is associated with a matching virtual SCSI server adapter on the
Virtual I/O Server. This allows storage that is allocated to the VIOS to be provisioned to client
LPARs.
• The virtual Fibre Channel client adapter is associated with a virtual FC adapter on the Virtual I/O
Server. This allows client LPARs to access LUNs on a SAN subsystem.
Logical Host Ethernet Adapter (LHEA)
This LHEA is the integrated physical Ethernet adapter on most POWER6 processor-based servers
and some POWER7 processor-based servers. This adapter can be shared with up to 16 or 32
partitions depending on the LHEA model. Each partition configures a logical port, which is
associated to a physical port. All partitions that are assigned to the same physical port share the
bandwidth of that port. You will not work with the LHEA in this course.
SR-IOV
The Shared Root I/O Virtualization adapter functions basically like the LHEA with minor differences.
It is available on some POWER7+ and POWER8 processor-based servers.

© 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.

7-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the sequence of wizard panels.
Details — The details in the visual are intentionally sparse. Cover each bullet but keep the
description very brief. This is effectively a lab introduction visual. The exercise instructions provide
details with screen captures for most of the panels.
Point out that we will use shared processors and virtual adapters (Ethernet and SCSI). They will not
allocate LHEA ports.
Once they create the new LPARs, they will install AIX in those LPARs as part of the next unit’s
exercise.
Additional information —
Transition statement — Let us review some of what we covered with checkpoint questions.

© 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

1. Match the terms Minimum, Desired, and Maximum to the proper


description:
a. This is the upper limit of processors or memory that cannot be exceeded when
using dynamic operations.
b. This is the lower limit of processors or memory when using dynamic operations.
c. This is the amount of processors or memory that a partition receives if there are
more than enough resources on the system when the partition is activated
(starts).

2. True or False: The amount of desired processors must always be


greater than or equal to the amount of minimum processors.

3. What is the minimum amount of memory that is recommended for an


AIX V5.3 (or later) partition?

© Copyright IBM Corporation 2009, 2015

Figure 7-7. Checkpoint AN14G5.0

Notes:

7-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Check students’ understanding of concepts in this unit.
Details — Give the students 5 minutes to complete both pages of Checkpoint questions. Solution:

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.

© Copyright IBM Corporation 2009, 2015

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

Configuring logical partitions

© Copyright IBM Corporation 2009, 2015

Figure 7-8. Exercise AN14G5.0

Notes:

7-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Practice the skills that were learned in this unit.
Details — Have the students open to the exercise for this unit in the Exercise Guide.
Additional information — Check the instructor notes in the exercise to see whether you need to
provide any information such as logins, passwords, or IP addresses for the activities.
Transition statement — Let us summarize what we learned in this unit.

© 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

Having completed this unit, you should be able to:


• Describe the following partition concepts:
– Partition type
– Partition ID and partition name
– Partition profiles
• Describe basic processor and memory configuration options
• Define Minimum, Maximum, and Desired settings for memory
and processors
• Describe I/O concepts and the Required and Desired settings
• Use the Create Partition wizard to create a basic partition and
a default profile

© Copyright IBM Corporation 2009, 2015

Figure 7-9. Unit summary AN14G5.0

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

7-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Review each objective and check in with the students that they feel that they have met
these objectives.
Details —
Additional information — Review Questions: Review questions are used at the beginning of each
class day to review concepts that were learned during the previous day.
You can use the following questions as review for this unit:
1. What is the minimum amount of memory that you can configure in an AIX or Linux partition?
Answer: The HMC enforces a minimum of 128 MB, but at least 512 MB is required for a small
AIX installation to boot.
2. What are the minimum and maximum memory settings used for?
Answer: These are the lower and upper bounds for DLPAR operations. The maximum amount
also sets the page table size for the partition. The minimum amount must be met when the
partition activates or the activation fails.
Transition statement — The next unit covers installing AIX into a logical partition.

© 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

7-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 8. AIX installation

Estimated time
01:20

What this unit is about


This unit describes the process of installing the AIX 7.1 operating system.

What you should be able to do


After completing this unit, you should be able to:
• List the installation methods for AIX
• List the steps necessary to install the AIX base operating system
• Install and understand all the options when installing AIX from optical
media
• Carry out post installation tasks

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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

After completing this unit, you should be able to:


• List the installation methods for AIX
• List the steps necessary to install the AIX base operating
system
• Install and understand all the options when installing AIX from
optical media
• Carry out post installation tasks

© Copyright IBM Corporation 2009, 2015

Figure 8-1. Unit objectives AN14G5.0

Notes:

8-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — After completing this unit, you should be able to:
• List the installation methods for AIX
• List the steps necessary to install the AIX base operating system
• Install and understand all the options when installing AIX from optical media
• Carry out post installation tasks
Details —
Additional information —
Transition statement — Let us start by defining the installation methods for AIX.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Installation methods for AIX 7


IBM Power Systems

• Pre-installation option (for a new system order)


• DVD
– Use physical media that are loaded in physical optical drive that is
allocated to the AIX partition
– Use physical media that are loaded in physical optical drive that is
allocated to a VIOS partition, and mapped to the AIX partition as a virtual
optical drive
• Physical media can be obtained from IBM, or created by downloading an ISO image
from ESS and burning to blank media
– Place an ISO image into a virtual media repository then load it in a virtual
optical device that is mapped to the client partition.
• ISO image can be downloaded from ESS, or created from copying physical media
• Network
– Network Installation Manager (NIM)
– Details are covered in IBM training course: AIX Installation Management
(AN22G)
© Copyright IBM Corporation 2009, 2015

Figure 8-2. Installation methods for AIX 7 AN14G5.0

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.

8-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Installation options for AIX.
Details — The preinstall option is a good choice to ensure that the hardware is working when the
machines are delivered. Most customers choose to configure the systems upon delivery.
Additional information — Talk briefly about NIM and be prepared to answer any questions. The
focus of this unit is install through optical media.
AIX base ISO images can be obtained by contacting Entitled Software Support (ESS) at
1-800-879-2755 option 2, option 2. The representatives should be able to verify entitlement and
guide customers on how to download the ISO image.
After the AIX ISO image is downloaded, the image can be stored in the /home/padmin directory of
the VIO server.
• The URL of “How to download ISO images of AIX install media”:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power%20Syste
ms/page/How%20to%20download%20ISO%20images%20of%20AIX%20install%20media
• The URL of “How to configure a VIOS Media Repository/Virtual Media Library (example, AIX
Install/Restore)”:
https://www-304.ibm.com/support/docview.wss?uid=isg3T1013047
Transition statement — Let us see how to build an AIX system from optical media.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

AIX installation in a partition (DVD)


IBM Power Systems

• 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.

• Note, the partition must either:


– Have PCI slot that controls a drive, which reads CD-ROMs.
OR
– Be allocated a CD-ROM device though a VIOS server (as a virtual
optical SCSI device).

© Copyright IBM Corporation 2009, 2015

Figure 8-3. AIX installation in a partition: DVD or CD AN14G5.0

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.

8-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce how to install AIX from optical media.
Details — Go through the details in the visual and student notes. Obviously, in a multi-partitioned
environment, it is not feasible to install from optical media.
Additional information — Mention, at a high level, only that in a virtual environment, the CD or
ISO image can be made available to clients.
Transition statement — Let us go through the details of installing from optical media.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Installing AIX from DVD (1 of 2)


IBM Power Systems

• Boot partition into SMS mode and select DVD.


PowerPC Firmware
Version SF240_338
SMS 1.6 (c) Copyright IBM Corp. 2000,2005 All rights reserved.
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load) #then select the adapter & IP Parameters
3. Change SCSI Settings
4. Select Console
5. Select Boot Options

Multiboot
1. Select Install/Boot Device

Select Device Type


3. CD/DVD

Select Media Type


9. List All Devices Select the CD-ROM
drive from the list.
Select Device
Device Current Device
Number Position Name
1. - SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )

© Copyright IBM Corporation 2009, 2015

Figure 8-4. Installing AIX from DVD (1 of 2) AN14G5.0

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.

8-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Installing AIX from optical media – selecting the boot device from SMS.
Details — Go through the example in the visual.
Additional information —
Transition statement — Let us proceed to SMS, page 2.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Installing AIX from DVD (2 of 2)


IBM Power Systems

Select Task

SCSI CD-ROM
( loc=U8204.E8A.65BF831-V11-C11-T1-W8200000000000000-L0 )

1. Information
2. Normal Mode Boot
3. Service Mode Boot

Are you sure you want to exit System Management Services?


1. Yes
2. No

• The system will now boot from the DVD.


******* Please define the System Console. *******

Type a 1 and press Enter to use this terminal as the


system console.

>>> 1 Type 1 and press Enter to have English during install.

© Copyright IBM Corporation 2009, 2015

Figure 8-5. Installing AIX from DVD (2 of 2) AN14G5.0

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.

8-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Installing AIX from DVD/CD, selecting the boot device from SMS.
Details — Go through the example in the visual.
Additional information —
Transition statement — Let us see the install main menu.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Installation and Maintenance


IBM Power Systems

• Main Installation and Maintenance menu


Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Configure Network Disks (iSCSI)

88 Help ?
99 Previous Menu

>>> Choice [1]: 2

• Best practice, always look first at the install options (2)

© Copyright IBM Corporation 2009, 2015

Figure 8-6. Installation and Maintenance AN14G5.0

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.

8-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the Installation and Maintenance main menu.
Details — The first option starts the installation by using the default settings. If you want to view or
alter the current settings, then you need to select the second option, which is discussed in this unit.
The third option allows for maintenance tasks such as going into a maintenance shell, copying the
system dump, carrying out an image backup.
Additional information —
Transition statement — Let us see the menu options following the selection of option 2.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Installation and Settings


IBM Power Systems

• Installation and Settings menu


Installation and Settings

Either type 0 and press Enter to install with current settings, or type the
number of the setting you want to change and press Enter.

1 System Settings:
Method of Installation.............New and Complete Overwrite
Disk Where You Want to Install.....hdisk0

2 Primary Language Environment Settings (AFTER Install):


Cultural Convention................English (United States)
Language ..........................English (United States)
Keyboard ..........................English (United States)
Keyboard Type......................Default

3 Security Model.......................Default

4 More Options (Software install options)

>>> 0 Install with the current settings listed above.

+-----------------------------------------------------
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]:

• Let’s explore each option in more detail.


© Copyright IBM Corporation 2009, 2015

Figure 8-7. Installation and Settings AN14G5.0

Notes:
The Installation and Settings menu enables you to set the key options and configuration settings to
be deployed during installation.

8-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — View the Installation and Settings menu.
Details — Use this visual as a springboard to the following visuals, which show how the system
settings (Option 1), the primary language environment (Option 2), the security model (Option 3),
and More Options (Option 4) can be changed.
Additional information —
Transition statement — Let us first consider Option 1, the different methods of installation.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Method of installation
IBM Power Systems

• Choose option 1 for a fresh installation.


Change Method of Installation

Type the number of the installation method and press Enter.

>>> 1 New and Complete Overwrite


Overwrites EVERYTHING on the disk selected for installation.
Warning: Only use this method if the disk is totally empty or if there
is nothing on the disk you want to preserve.

2 Preservation Install
Preserves SOME of the existing data on the disk selected for
installation. Warning: This method overwrites the usr (/usr),
variable (/var), temporary (/tmp), and root (/) file systems. Other
product (applications) files and configuration data will be destroyed.

3 Migration Install
Upgrades the Base Operating System to the current release.
Other product (applications) files and configuration data are saved.

88 Help ?
99 Previous Menu

>>> Choice [1]:

© Copyright IBM Corporation 2009, 2015

Figure 8-8. Method of installation AN14G5.0

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.

8-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Migration Install


Use the Migration Install method to upgrade from one version and release of AIX to a different
version and release, while preserving the existing root volume group. For example, when
migrating from AIX 6.1 to an AIX 7.1. This method preserves all file systems except /tmp, as
well as the logical volumes and system configuration files. Obsolete or selective fix files are
removed.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-17


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 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.

8-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Installation disks
IBM Power Systems

• Select disks to be used for the installation.


Change Disk(s) Where You Want to Install

Type one or more numbers for the disk(s) to be used for installation and press
Enter. To cancel a choice, type the corresponding number and Press Enter.
At least one bootable disk must be selected. The current choice is indicated
by >>>.

Name Location Code Size(MB) VG Status Bootable

>>> 1 hdisk0 none 6528 rootvg Yes Note: Some SAN


2 hdisk1 none 6528 rootvg Yes
3 hdisk2 none 6528 none Yes
disks might appear
4 hdisk3 none 6528 none Yes non-bootable. If so,
change the setting
on the disk
>>> 0 Continue with choices indicated above subsystem for the
55 More Disk Options LUNs.
66 Devices not known to Base Operating System Installation
77 Display More Disk Information
88 Help ?
99 Previous Menu
Name Device Adapter Connection Location
>>> Choice [0]:
or Physical Location Code
>>> 1 hdisk0 U9113.550.65F2E7F-V11-C2-T1-L810000000000
2 hdisk1 U9113.550.65F2E7F-V11-C2-T1-L820000000000
3 hdisk2 U9113.550.65F2E7F-V11-C6-T1-L830000000000
4 hdisk3 U9113.550.65F2E7F-V11-C6-T1-L810000000000

© Copyright IBM Corporation 2009, 2015

Figure 8-9. Installation disks AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-19


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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.

8-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Set Primary Language Environment


IBM Power Systems

• Default language environment is en_US (US English).


Set Primary Language Environment

Type the number for the Cultural Convention (such as date, time, and
money), Language, and Keyboard for this system and press Enter, or type
159 and press Enter to create your own combination.

Cultural Convention Language Keyboard

1 C (POSIX) C (POSIX) C (POSIX)


2 Albanian English (United States) Albanian
3 Arabic (Algeria) English (United States) Arabic (Algeria)
4 Arabic (Bahrain) English (United States) Arabic (Bahrain)
5 Arabic (Egypt) English (United States) Arabic (Egypt)
6 Arabic (Jordan) English (United States) Arabic (Jordan)
7 Arabic (Kuwait) English (United States) Arabic (Kuwait)
8 Arabic (Lebanon) English (United States) Arabic (Lebanon)
9 Arabic (Morocco) English (United States) Arabic (Morocco)
>>> 10 MORE CHOICES...

88 Help ?
99 Previous Menu

>>> Choice [10]:

© Copyright IBM Corporation 2009, 2015

Figure 8-10. Set Primary Language Environment AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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 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.

8-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Security Models
IBM Power Systems

• These settings are beyond the scope of this class.


– Covered in course: Implementing AIX Security Features
• Security models are all set to NO by default.
Security Models

Type the number of your choice and press Enter.

1. Trusted AIX............................................. No

2. Other Security Options (Trusted AIX and Standard)


Security options vary based on choices.
LSPP, SbD, CAP/CCEVAL, TCB
1. Secure by Default....................................... No

2. CAPP and EAL4+ Configuration Install.................... No

3. Trusted Computing Base Install.......................... No

>>> 0 Continue to more software options.

88 Help ?
99 Previous Menu

>>> Choice [0]:

© Copyright IBM Corporation 2009, 2015

Figure 8-11. Security Models AN14G5.0

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:

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-23


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

• Log in and password controlled system and network access


• User, group, and world file access permissions
• Access control lists (ACLs)
• Audit subsystem
• Role-based Access Control (RBAC)
Trusted AIX builds upon these primary AIX operating system security features to further enhance
and extend AIX security into the networking subsystems.
Type <2> and press Enter to continue to other security options. For Trusted AIX, the choice is
LSPP/EAL4+ configuration. For standard AIX, the choices are Secure by Default, CAPP/EAL4+,
and Trusted Computing Base.

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).

8-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the security options available during AIX installation.
Details — This section is for advanced users. You should cover the details only briefly, if at all!
Additional information — Some additional information that might be of help if you get questions:
For a detailed guide into Trusted AIX, see
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.security/trusted_aix.htm
.
LSPP: Labeled Security Protection Profile (LSPP) is a protection profile within the common criteria.
It is a set of security, functional, and assurance requirements for IT products. The LSPP
requirements are derived from the B1 class of the US Department of Defense security standard
called Trusted Computer System Evaluation Criteria (TCSEC), which was originally published in
1985.
EAL4: (Methodically Designed, Tested, and Reviewed). EAL4 permits a developer to gain
maximum assurance from positive security engineering based on good commercial development
practices that, though rigorous, do not require substantial specialist knowledge, skills, and other
resources. EAL4 is the highest level at which it is likely to be economically feasible to retrofit an
existing product line. Therefore, eAL4 is applicable in those circumstances where developers or
users require a moderate to high level of independently assured security in conventional commodity
TOEs and are prepared to incur additional security-specific engineering costs. Commercial
operating systems that provide conventional, user-based security features are typically evaluated at
EAL4.
Secure by Default is a minimal install with high security settings applied.
CAPP/EAL4+ install is a minimal install, which controls access to the system.
Trusted Computing Base adds the trusted path, and enables the trusted shell and system integrity
checking.
If students are interested in security, point them to AN57.
Transition statement — Let us look at the software install options.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-25


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Software install options


IBM Power Systems

• Further install and software options

Install Options

1. Graphics Software................................................ Yes


2. System Management Client Software................................ Yes
3. Create JFS2 File Systems......................................... Yes
4. Enable System Backups to install any system...................... Yes
(Installs all devices)

>>> 5. Install More Software

Install More Software

1. Firefox (Firefox CD).............................. No


2. Kerberos_5 (Expansion Pack)....................... No
3. Server (Volume 2)................................. No

0 Install with the current settings listed above.

88 Help ?
99 Previous Menu

© Copyright IBM Corporation 2009, 2015

Figure 8-12. Software install options AN14G5.0

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.

8-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide additional information on the Install options.
Details — Go through the details on the visual and notes.
Additional information — The file sets included in the Server (Volume 2) option are:
• Networking
bos.net.nfs.server
bos.net.nis.server
• Performance Tools
bos.perf.diag_tool
bos.perf.tools
perfagent.tools
bos.sysmgt.trace
bos.sysmgt.quota
bos.terminfo.print.data
• Accounting Services
bos.acct
Transition statement — That is all the options. Let us see the summary page before the actual
install.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-27


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Install summary and installation


IBM Power Systems

Overwrite Installation Summary


Disks: hdisk0
Cultural Convention: en_GB
Language: en_US
Keyboard: en_GB
JFS2 File Systems Created: Yes
Graphics Software: Yes
System Management Client Software: Yes
Enable System Backups to install any system: Yes

Optional Software being installed:

>>> 1 Continue with Install


+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [1]:

Installing Base Operating System

Please wait...

Approximate Elapsed time


% tasks complete (in minutes)

3 0 Making logical volumes

© Copyright IBM Corporation 2009, 2015

Figure 8-13. Install summary and installation AN14G5.0

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.

8-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — To introduce the install summary page and BOS install.
Details — As per the material.
Additional information —
Transition statement — What happens post install?

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-29


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Accept License Agreements


IBM Power Systems

Software License Agreements

Show Installed License Agreements


Accept License Agreements

Accept License Agreements

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
ACCEPT Installed License Agreements yes +

Software Maintenance Agreement

View Software Maintenance Terms and Conditions


Accept Software Maintenance Terms and Conditions

Accept Software Maintenance Terms and Conditions

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
ACCEPT Software Maintenance Agreements? yes +

© Copyright IBM Corporation 2009, 2015

Figure 8-14. Accept License Agreements AN14G5.0

Notes:
When AIX installation is complete, the user must accept both Software and Maintenance License
agreements, as shown in the visual.

8-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Accepting license agreements.
Details — They must be accepted, as per the examples that are shown in the visual.
Additional information —
Transition statement — Once we finished the installation, we want to do some minimal
configuration of the system.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-31


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

AIX installation: Post steps


IBM Power Systems

• Post-install tasks:
– Accept the license agreement.

– Optional: Using the installation assistant:


• Set root password
• Set date and time
• Configure network

– Exit from installation assistant.

– Update for the operating system to the latest TL and SP level.

© Copyright IBM Corporation 2009, 2015

Figure 8-15. AIX installation: Post steps AN14G5.0

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

8-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the post installation steps.
Details — Go through the details in the visual and notes.
Additional information —
Transition statement — Now that we finished a walk-through of the entire install process (starting
with boot from installation media), let us see how the process differs if using a NIM server.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-33


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

AIX installation in a partition by using NIM: NIM


overview
IBM Power Systems

• What is NIM?
– Centralized Installation and Management of AIX over a network

Client
systems

LPAR 1

Public/Open LPAR 2
NIM Server network

NIM resources LPAR 3


lpp_source
SPOT LPAR 4

Client definitions
LPAR1
LPAR2

Actions:
• Resources are allocated to clients
• Clients are set for a BOS operation

© Copyright IBM Corporation 2009, 2015

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.

8-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • NIM resources


All operations on clients in the NIM environment require one or more resources. At a minimum,
in order to perform a BOS installation on a client, you must define two resources.
- SPOT includes everything that a client machine requires in a /usr file system, such as the
AIX kernel, executable commands, libraries, and applications. The SPOT is created,
controlled, and maintained from the master, even though the SPOT can be located on
another system.
- An lpp_source resource represents a directory in which software installation images are
stored. NIM uses an lpp_source for an installation operation by first mounting the
lpp_source on the client machine. The installp commands are then started on the client
by using the mounted lpp_source as the source for installation images. When the
installation operation completed, NIM automatically unmounts the resource. In addition to
providing images to install machines, lpp_source resources can also be used to create and
update SPOT resources.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-35


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 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.

8-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
AIX installation in a partition by using NIM:
Configuration steps
IBM Power Systems

• Assume that a partition and partition profile have been created.


– Set up and configure the NIM master to support a BOS installation
of your machine.
– Activate the partition by using SMS boot mode.
– Specify the IP parameters for a network boot.
– Configure the partition to boot from the network adapter.
– Interact with AIX installation menus, if required (depends on NIM
configuration).

• Note:
– Subsequent installs and updates for the same partition can be
initiated from the NIM master.
– A mksysb restore example is provided in a later unit (Backup and
Restore).
© 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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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 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.

8-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Network boot (1 of 7)
IBM Power Systems

1. Select the Setup Remote IPL option:

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
-------------------------------------------------------

© Copyright IBM Corporation 2009, 2015

Figure 8-18. Network boot (1 of 7) AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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 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.

8-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Network boot (2 of 7)
IBM Power Systems

2. Choose the network adapter:

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

Figure 8-19. Network boot (2 of 7) AN14G5.0

Notes:
NIC adapter
Select which network interface to use. The example in the visual shows two ports on the integrated
Ethernet controller.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-41


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 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.

8-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Network boot (3 of 7)
IBM Power Systems

3. Select the network service:

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
---------------------------------------------------------

© Copyright IBM Corporation 2009, 2015

Figure 8-20. Network boot (3 of 7) AN14G5.0

Notes:
Select the Network service: BOOTP.
Note that older firmware levels might not provide an ISCSI option.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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 network service selection.
Details —
Additional information —
Transition statement — The visual displays the menu where you specify the network parameters
and the network adapter configuration.

8-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Network boot (4 of 7)
IBM Power Systems

4. Set up the IP parameters, the adapter configuration options,


then perform the ping test:

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

Figure 8-21. Network boot (4 of 7) AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-45


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 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.

8-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

Figure 8-22. Network boot (5 of 7) AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-47


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 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.

8-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

Figure 8-23. Network boot (6 of 7) AN14G5.0

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.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-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 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.

8-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Network boot (7 of 7)
IBM Power Systems

5. When remote IPL is configured, perform the ping test:


– If ping is unsuccessful:
• Is NIM server on network?
• Check IP Parameters screen for mistakes.
– Is gateway correct and available?
• Try again.
6. Return to SMS Select Boot Options menu:
– Select the network adapter as the Install/Boot Device
7. Exit from SMS initiates network boot.
8. AIX Install and Maintenance menu processing is the same
as previously described.
9. NIM can have an unattended installation with no console
interaction.

© Copyright IBM Corporation 2009, 2015

Figure 8-24. Network boot (7 of 7) AN14G5.0

Notes:
Ping test
This option pings the NIM server. If it fails, suspect your IP configuration or the network.

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-51


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 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.

8-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
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

2. True or False: A preservation installation preserves all data


on the disks.

3. What is the console used for during the installation process?

© Copyright IBM Corporation 2009, 2015

Figure 8-25. Checkpoint AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-53


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

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.

2. True or False: A preservation installation preserves all data on the


disks.
The answer is false. It preserves some of the existing data on the disk
that is selected for installation. This method overwrites the user
(/usr), variable (/var), temporary (/tmp), and root (/) file systems.
Other product application files and configuration data are destroyed.

3. What is the console used for during the installation process?


The answer is the console is used to display all the system messages
and to interact with the installation.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

8-54 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

AIX
installation

© Copyright IBM Corporation 2009, 2015

Figure 8-26. Exercise AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-55


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 —

8-56 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• List the installation methods for AIX
• List the steps necessary to install the AIX base operating
system
• Install and understand all the options when installing AIX from
optical media
• Carry out post installation tasks

© Copyright IBM Corporation 2009, 2015

Figure 8-27. Unit summary AN14G5.0

Notes:

© Copyright IBM Corp. 2009, 2015 Unit 8. AIX installation 8-57


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.

8-58 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 9. Working with Logical Volume Manager

Estimated time
01:30

What this unit is about


This unit describes how to work with logical volumes, physical volumes, and
volume groups.

What you should be able to do


After completing this unit, you should be able to:
• Explain how to work with the Logical Volume Manager
• Add, change, and delete:
- Volume groups
- Logical volumes
- Physical volumes
• Describe logical volume definition options
• Mirror the rootvg
• Migrate data between disks in a volume group

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Explain how to work with the Logical Volume Manager
• Add, change, and delete:
– Volume groups
– Logical volumes
– Physical volumes
• Describe logical volume definition options
• Mirror the rootvg
• Migrate data between disks in a volume group

© Copyright IBM Corporation 2009, 2015

Figure 9-1. Unit objectives AN14G5.0

Notes:

9-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of this unit.
Details —
Additional information — This unit provides all the basic information a system administrator
needs to know to work with the AIX LVM. Where appropriate, SMIT screens are used and are
accompanied by the corresponding command.
Transition statement — Let’s begin our discussion of the LVM by defining the LVM components.

© 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

Logical Volume Manager components


IBM Power Systems

Volume group (VG)


Physical
Logical
Partitions (PPs)
Partitions (LPs)

1
2
3
4
write(data);
5
6
x
y
Application
z

Logical Volume (LV)


Physical Volumes
(PVs)
© Copyright IBM Corporation 2009, 2015

Figure 9-2. Logical Volume Manager components AN14G5.0

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).

9-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Physical partition (PP)


All of the physical volumes in a volume group are divided into physical partitions (PP). These
physical partitions are the unit of allocation when defining logical volumes. It is this use of PPs
that gives LVM storage allocation its flexibility. All the physical partitions within a volume group
are the same size, although different volume groups can have different PP sizes.
• Logical volume (LV)
Within each volume group, one or more logical volumes (LV) are defined. Logical volumes are
groups of information that is located on physical volumes. Data on logical volumes appears to
be contiguous to the user, but can be non-contiguous on the physical volume, or can even be
located on several physical volumes. While some logical volumes can be accessed in a raw
mode (usually by database software), most logical volumes are organized as file systems, and
the applications access the logical volumes indirectly through the kernels file system services.
• Logical partition (LP)
Each logical volume consists of one or more logical partitions (LP). Logical partitions are the
same size as the physical partitions within a volume group. Each logical partition is mapped to
at least one physical partition. Although the logical partitions are numbered consecutively, the
underlying physical partitions are not necessarily consecutive or contiguous.
This allows file systems, paging space, and other logical volumes to be resized or relocated, to
span multiple physical volumes, and to have their contents that are replicated for greater
flexibility and availability in the storage of data.

© 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.

9-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Uses of logical volumes


IBM Power Systems

• A logical volume can contain one of the following:


– Journaled (JFS) or enhanced journaled (JFS2) file system
– Journal log (/dev/hd8)
– Paging space (/dev/hd6)
– Boot logical volume (/dev/hd5)
– Dump device
– Application definable structure (raw logical volume)

• Examples of JFS or JFS2 logical volumes:


/dev/hd1 /home
/dev/hd2 /usr
/dev/hd3 /tmp
/dev/hd4 /
/dev/hd9var /var
/dev/hd10opt /opt
/dev/hd11admin /admin
/dev/lv00 /myfilesystem

© Copyright IBM Corporation 2009, 2015

Figure 9-3. Uses of logical volumes AN14G5.0

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.

9-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Define the uses of LVs.
Details — LVs can contain a number of different types of entities, the most common being the
journaled file system (JFS), or enhanced journaled file system (JFS2).
Encourage the students to recognize standard system-defined LV names. For example, /dev/hd6
always contains one of the paging spaces.
Do not explain in detail each of the named LVs.
This visual is meant to be a transition to an overview of the file system. What you are trying to
accomplish is to show the connection between a logical volume and a file system early in the
storage discussion. Once students see this connection, the rest of the concepts should make more
sense to them.
Discussion items - Ask if anyone has set up raw LVs and if so, for what?
Raw LVs are usually used by databases that require empty devices for them to place and manage
the data on. Databases usually use their own data structures and do not use an AIX file system.
Additional information —
Transition statement — Let us summarize the benefits of the AIX Logical Volume Manager.

© 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

Benefits of the AIX Logical Volume Manager


IBM Power Systems

• Data can be noncontiguous and span disks


• Allocation locations and amount can be adjusted
• Provides logical mirroring and striping
• New disks are easily added, removed, or replaced
• Integrated backup and restore mechanisms
• Methods for migrating disk groups to other systems
• LVM (data) statistics can be collected

These tasks can be performed dynamically!

© Copyright IBM Corporation 2009, 2015

Figure 9-4. Benefits of the AIX Logical Volume Manager AN14G5.0

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.

9-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the benefits of the Logical Volume Manager so students understand the
important role it plays in AIX.
Details — Tell the students what the benefits are of the Logical Volume Manager (LVM) and how it
makes the life of the system administrator so much easier. If you have any stories you can share
with students on the difference in time it takes to reorganize partitions and disk space in a traditional
UNIX environment versus an AIX environment, do so. Real life experiences can really bring home
the benefits the facility brings to UNIX.
Be sure to mention that the benefits listed on the visual can all be accomplished while users are on
the system!
Additional information —
Transition statement — Having provided a brief overview of LVM, let us look at its components in
detail. The first component that we will look at is the volume group.

© 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

• Volume group types:


Volume Group Max Max LVs Max PPs per Max PP
– Original Type PVs VG Size
– Big
Original 32 256 32512 1 GB
– Scalable (1016 * 32)

Big 128 512 130048 1 GB


(1016 * 128)
• Limits Scalable 1024 4096 2097152 128 GB

• AIX contains one mandatory volume group: rootvg


– rootvg is created on system installation
– Contains the AIX operating system
• Why create new volume groups?
– Separate user data from operating system files rootvg datavg
– Disaster recovery
PV1 PV2 PV3
– Data portability
– Data integrity and security

© Copyright IBM Corporation 2009, 2015

Figure 9-5. Volume groups AN14G5.0

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.

9-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

9-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

SMIT Volume Groups menu


IBM Power Systems

Volume Groups

Move cursor to desired item and press Enter.

List All Volume Groups


Add a Volume Group
Set Characteristics of a Volume Group
List Contents of a Volume Group
Remove a Volume Group
Activate a Volume Group
Deactivate a Volume Group
Import a Volume Group
Export a Volume Group
Mirror a Volume Group
Unmirror a Volume Group
Synchronize LVM Mirrors
Back Up a Volume Group
Remake a Volume Group
Preview Information about a Backup
Verify the Readability of a Backup (Tape only)
View the Backup Log
List Files in a Volume Group Backup
Restore Files in a Volume Group Backup

© Copyright IBM Corporation 2009, 2015

Figure 9-6. SMIT Volume Groups menu AN14G5.0

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.

9-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Adding a volume group to the system


IBM Power Systems

# smit mkvg mkvg –y datavg hdisk1 hdisk2


Add a Volume Group

Move cursor to desired item and press Enter.

Add an Original Volume Group


Add a Big Volume Group
Add a Scalable Volume Group

Add an Original Volume Group

[Entry Fields]
VOLUME GROUP name [datavg]
Physical partition SIZE in megabytes +
* PHYSICAL VOLUME names [hdisk1 hdisk2] +
Force the creation of a volume group? no +
Activate volume group AUTOMATICALLY yes +
at system restart?
Volume Group MAJOR NUMBER [] +#
Create VG Concurrent Capable? no +
Infinite Retry Option no +

© Copyright IBM Corporation 2009, 2015

Figure 9-7. Adding a volume group to the system AN14G5.0

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.

9-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Adding a scalable volume group to the system


IBM Power Systems

# smit mkvg mkvg –S –y db2_vg hdisk3

Add a Scalable Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[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 +

© Copyright IBM Corporation 2009, 2015

Figure 9-8. Adding a scalable volume group to the system AN14G5.0

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.

9-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Listing volume groups and VG attributes


IBM Power Systems
# lsvg
rootvg
datavg
db2_vg

# 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

© Copyright IBM Corporation 2009, 2015

Figure 9-9. Listing volume groups and VG attributes AN14G5.0

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.

9-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Listing PVs in a VG and VG contents


IBM Power Systems

# 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

Figure 9-10. Listing PVs in a VG and VG contents AN14G5.0

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

• Number of logical partitions (LPs)


• Number of physical partitions (PPs)
• Number of physical volumes (PVs)
• Logical volume state (LV STATE)
• Mount point (MOUNT POINT), if the logical volume contains a journaled file system

9-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to list the PV and LV information of a volume group.
Details — Go through the details in the visual and in the notes.
Additional information — Ask the students if there are any mirrored logical volumes in the
example that is shown on the visual. The answer is no because the number of PPs and the number
of LPs are same for all LVs.
Transition statement — Now that you can create VGs, let us see how you can change a VG.

© 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

Change a Volume Group


IBM Power Systems

# smit chvg chvg –a n –Q n datavg

Change a Volume Group

[Entry Fields]
* VOLUME GROUP name datavg
* Activate volume group AUTOMATICALLY no +
at system restart?
* A QUORUM of disks required to keep the volume no +
group on-line ?
Concurrent Capable? no +
Change to big VG format? no +
Change to scalable VG format? no +
LTG Size in kbytes 256 +
Set hotspare characteristics n +
Set synchronization characteristics of stale n +
partitions
Max PPs per VG in units of 1024 32 +
Max Logical Volumes 256 +
Mirror Pool Strictness +
Infinite Retry Option no +

© Copyright IBM Corporation 2009, 2015

Figure 9-11. Change a Volume Group AN14G5.0

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

9-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an example of how to change the characteristics of a volume group.
Details — Go through the example in the visual and provide a brief explanation of the options one
can change.
The LTG option would rarely be used. It is set automatically during varyon to the maximum transfer
size that the disk can support. It is a legacy option for older versions of AIX (see additional
information, below).
Additional information —
LTG: When LVM receives a request for an I/O, it breaks down the I/O into logical track group (LTG)
sizes before it passes the request down to the device driver of the underlying disks. The LTG is the
maximum transfer size of a logical volume, and is common to all the logical volumes in the volume
group, since it is a volume group attribute.
If you require further information, see the man page for chvg.
Transition statement — Let us see how we can expand and reduce VGs.

© 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

Extend and reduce a VG


IBM Power Systems

# extendvg -f rootvg hdisk2


# lsvg -p rootvg | awk ‘{print $1, $2}’
rootvg:
PV_NAME PV STATE
hdisk0 active
hdisk1 active hdisk2
hdisk2 active

hdisk0 hdisk1

# reducevg -d rootvg hdisk1


# lsvg -p rootvg | awk ‘{print $1, $2}’
rootvg:
PV_NAME PV STATE
hdisk0 active hdisk1
hdisk2 active

© Copyright IBM Corporation 2009, 2015

Figure 9-12. Extend and reduce a VG AN14G5.0

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,

9-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

9-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Remove a Volume Group


IBM Power Systems

# smit reducevg2 reducevg -df db2_vg hdisk2 hdisk3

Remove a Volume Group

Type or select a value for the entry field.


Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name [db2_vg] +

© Copyright IBM Corporation 2009, 2015

Figure 9-13. Remove a Volume Group AN14G5.0

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.

9-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Activate and Deactivate a Volume Group


IBM Power Systems

# smit varyonvg varyonvg datavg


Activate a Volume Group

[Entry Fields]
* VOLUME GROUP name [datavg] +
RESYNCHRONIZE stale physical partitions? yes +
Activate volume group in SYSTEM no +
MANAGEMENT mode?
FORCE activation of the volume group? no +
Warning--this may cause loss of data integrity.
Varyon VG in Concurrent Mode? no +
Synchronize Logical Volumes? no +

# smit varyoffvg varyoffvg datavg


Deactivate a Volume Group

[Entry Fields]
* VOLUME GROUP name [datavg] +
Put volume group in SYSTEM no +
MANAGEMENT mode?

© Copyright IBM Corporation 2009, 2015

Figure 9-14. Activate and Deactivate a Volume Group AN14G5.0

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.

9-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

Logical Volume Manager

1 2 3 4 1 2 3 4 Logical
partitions
Logical Logical
volume volume
© Copyright IBM Corporation 2009, 2015

Figure 9-15. Logical storage AN14G5.0

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.

9-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

LVM, RAID, and SAN


IBM Power Systems

• LVM supports software RAID (intended for attached JBOD):


– RAID 0, Striping across multiple PVs in the volume group
• Can set stripe unit size and stripe width PVs
LV
– RAID 1, Mirroring (up to three copies):
• Each LP maps to multiple PPs
• Default policies ensure strictness
– RAID 10 or 1 + 0, Striping + Mirroring

• AIX also supports Storage Area Networks (SAN):


– AIX sees LUNs as physical disks
– unique_id attribute identifies the LUN
– Path management through AIX MPIO or OEM software
– SAN disk arrays implement hardware RAID
– Redundant RAID (LVM and SAN) is generally not advised
– AIX can learn of LUN size increases:
# chvg -g datavg

© Copyright IBM Corporation 2009, 2015

Figure 9-16. LVM, RAID, and SAN AN14G5.0

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

9-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce RAID support in LVM.
Details — Introduce RAID level support in LVM. Most datavgs today, are held within SAN
environments. Point out that AIX LVM is software RAID whereas RAID support in SAN technology
is implemented at the hardware layer. This generally has better performance and greater flexibility.
One should ideally not mix the two.
Additional information —
Transition statement — When we define a logical volume, we have options, which control how the
logical partitions are mapped to the physical partitions and how we manage any software RAID that
we chose to implement. Let us examine some of these options and how they might affect
performance.

© 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

LVM options and recommendations


IBM Power Systems

• Inter-policy and intra-policy: Middle Inner-edge


– Logical volume placement on disks Inner-
Center
– Prefer maximum spread and middle band middle
• Scheduling policy: Edge
– Parallel writes and reads to mirror copies perform best
– LVM mirroring on top of SAN striping: use parallel writes and sequential
reads to avoid disrupting storage array read-ahead
• Mirror write consistency (MWC):
– Ensures mirrored PPs are consistent after system crash
– Uses passive MWC for Big VGs
– For active MWC, place logical volume on outer edge of disk
• Write verify:
– Verifies all writes with a read operation
– Default is no. Value of yes impacts write performance
• SAN: Use defaults without LVM mirroring or LVM striping

© Copyright IBM Corporation 2009, 2015

Figure 9-17. LVM options and recommendations AN14G5.0

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

9-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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).

9-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce LVM options that affect performance.
Details — Go through the details on the visual. Do not go into a lot of detail. Most of the students
have systems where the high disk activity is to a data caching storage subsystem, in which case
they should just keep all of the defaults. If the students want more detail, they have the additional
student notes.
Additional information —
Transition statement — If you care about the intra-policy and the inter-policy for your logical
volumes and the data is not in your preferred location, then you can move the data to that location
(dynamically). Let us briefly look at the reorgvg command.

© 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

Reorganize logical volumes in a volume group


IBM Power Systems

• reorgvg moves physical partition allocations for logical


volumes to more closely match the policies of those LVs.
hdisk3 hdisk4
datavg

1 2 3 4
empty
5 6 7 8

• # chlv –e x mylv (set to maximum number of disks)


• # reorgvg datavg mylv
hdisk3 hdisk4
datavg

1 3 5 7 2 4 6 8

© Copyright IBM Corporation 2009, 2015

Figure 9-18. Reorganize logical volumes in a volume group AN14G5.0

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.

9-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how data in a volume group can be reorganized.
Details — The reorgvg command can be used to change the allocation of logical volumes in a
volume group, based on the allocation policy set on the logical volume. This command tries to place
the specified logical volume in the new place, or as close to the requested place as possible. This
command is only successful if there is space to maneuver.
Additional information —
Transition statement — Having explained some of the options we have when defining a logical
volume, let us look at the detail of how we define them, using either SMIT or the command line.

© 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 Logical Volumes menu


IBM Power Systems

# smit lv

Logical Volumes

Move cursor to desired item and press Enter.

List All Logical Volumes by Volume Group


Add a Logical Volume
Set Characteristic of a Logical Volume
Show Characteristics of a Logical Volume
Remove a Logical Volume
Copy a Logical Volume

© Copyright IBM Corporation 2009, 2015

Figure 9-19. SMIT Logical Volumes menu AN14G5.0

Notes:
This is the top-level SMIT menu for logical volumes. The next few pages discuss these items.

9-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Define the SMIT Logical Volumes screen.
Details — At a high level, review each of the items in turn.
Additional information —
Transition statement — Let us first see how to create an LV.

© 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

Add a logical volume


IBM Power Systems

# smit mklv mklv –y datalv –t jfs2 –c 2 datavg 10 hdisk2 hdisk3


Add a Logical Volume

[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 +

© Copyright IBM Corporation 2009, 2015

Figure 9-20. Adding a logical volume AN14G5.0

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.

9-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to add a logical volume.
Details — Go through and highlight/explain each attribute.
Additional information —
Transition statement — Now we can create LVs, let us see how to view their characteristics.

© 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

© Copyright IBM Corporation 2009, 2015

Figure 9-21. Show LV characteristics AN14G5.0

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.

9-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

9-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Add copies to a logical volume


IBM Power Systems

# smit mklvcopy mklvcopy -k datalv 3 hdisk4

Add Copies to a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[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 [] +

© Copyright IBM Corporation 2009, 2015

Figure 9-22. Add Copies to a Logical Volume AN14G5.0

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.

9-54 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Increasing the size of a logical volume


IBM Power Systems

# smit extendlv extendlv datalv 20

Increase the Size of a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* LOGICAL VOLUME name 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 []

© Copyright IBM Corporation 2009, 2015

Figure 9-23. Increasing the size of a logical volume AN14G5.0

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.

9-56 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Remove a Logical Volume


IBM Power Systems

# smit rmlv rmlv –f datalv2

Remove a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
LOGICAL VOLUME name [datalv2] +

© Copyright IBM Corporation 2009, 2015

Figure 9-24. Remove a Logical Volume AN14G5.0

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.

9-58 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

List all logical volumes by volume group


IBM Power Systems

# 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

© Copyright IBM Corporation 2009, 2015

Figure 9-25. List all logical volumes by volume group AN14G5.0

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.

9-60 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Mirroring volume groups


IBM Power Systems

• Mirroring rootvg is important.


# smit mirrorvg mirrorvg rootvg hdisk1
Mirror a Volume Group Can be used to
mirror any VG
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name rootvg
Mirror sync mode [Foreground] +
PHYSICAL VOLUME names [hdisk1] +
Number of COPIES of each logical 2 +
partition
Keep Quorum Checking On? no +
Create Exact LV Mapping? no +

# bosboot -a -d /dev/hdisk1
Extra steps are
required for
# bootlist -m normal hdisk0 hdisk1
rootvg

© Copyright IBM Corporation 2009, 2015

Figure 9-26. Mirroring volume groups AN14G5.0

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.

9-62 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

Figure 9-27. Physical volumes AN14G5.0

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.

9-64 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

SMIT Physical Volumes menu


IBM Power Systems

# smit pv
Physical Volumes

Move cursor to desired item and press Enter.

List All Physical Volumes in System


Add a Disk
Change Characteristics of a Physical Volume
List Contents of a Physical Volume
Move Contents of a Physical Volume

© Copyright IBM Corporation 2009, 2015

Figure 9-28. SMIT Physical Volumes menu AN14G5.0

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.

9-66 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

List physical volume information


IBM Power Systems

• List all physical volumes in the system.


# lspv
hdisk0 00cf2e7ff02c5fc4 rootvg active
hdisk1 00cf2e7f713ca357 None
hdisk2 00cf2e7fea693331 datavg active
hdisk3 00cf2e7fea6a26e0 datavg active
hdisk4 00cf2e7fea6a3189 datavg active

• List the attributes of a PV.


# lspv hdisk3
PHYSICAL VOLUME: hdisk3 VOLUME GROUP: datavg
PV IDENTIFIER: 00cf2e7fea6a26e0
VG IDENTIFIER 00cf2e7f00004c000000011d68130bea
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 4 megabyte(s) LOGICAL VOLUMES: 1
TOTAL PPs: 511 (2044 megabytes) VG DESCRIPTORS: 1
FREE PPs: 481 (1924 megabytes) HOT SPARE: no
USED PPs: 30 (120 megabytes) MAX REQUEST: 256K
FREE DISTRIBUTION: 103..72..102..102..102
USED DISTRIBUTION: 00..30..00..00..00
MIRROR POOL: None

© Copyright IBM Corporation 2009, 2015

Figure 9-29. List physical volume information AN14G5.0

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.

9-68 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

List logical volumes on a physical volume


IBM Power Systems

# 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

© Copyright IBM Corporation 2009, 2015

Figure 9-30. List logical volumes on a physical volume AN14G5.0

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

9-70 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List the contents of the disk by listing the logical volumes on it.
Details — Review the details in the visual.
Additional information —
Transition statement — Let us see how we can move our data from one disk to another,
non-disruptively.

© 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

Add or remove a physical volume


IBM Power Systems

• 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

– Free it from the volume group:


• reducevg VGname PVname
# reducevg datavg hdisk1

– Remove it from the ODM:


• rmdev -dl PVname
# rmdev –d –l hdisk1

© Copyright IBM Corporation 2009, 2015

Figure 9-31. Add or remove a physical volume AN14G5.0

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.

9-72 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Discuss how to add a disk to the system, and move the contents of it from one disk to
the other.
Details — To configure disks to AIX, all one needs to do is run cfgmgr. For SCSI and SAS disk, the
drivers are already part of the BOS. For higher end IBM FC storage solutions, EMC and Hitachi
disks device driver software (including multi-pathing software), must be loaded onto the system first
before configuration.
Additional information —
Transition statement — Let us do some checkpoint questions.

© 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

1. True or False: A logical volume can span more than one


physical volume.

2. True or False: A logical volume can span more than one


volume group.

3. True or False: The contents of a physical volume can be


divided between two volume groups.

© Copyright IBM Corporation 2009, 2015

Figure 9-32. Checkpoint AN14G5.0

Notes:

9-74 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

Checkpoint solutions
IBM Power Systems

1. True or False: A logical volume can span more than one


physical volume.
The answer is true.

2. True or False: A logical volume can span more than one


volume group.
The answer is false.

3. True or False: The contents of a physical volume can be


divided between two volume groups.
The answer is false.

© Copyright IBM Corporation 2009, 2015

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

Working with Logical


Volume Manager

© Copyright IBM Corporation 2009, 2015

Figure 9-33. Exercise AN14G5.0

Notes:

9-76 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Explain how to work with the Logical Volume Manager
• Add, change, and delete:
– Volume groups
– Logical volumes
– Physical volumes
• Describe logical volume definition options
• Mirror the rootvg
• Migrate data between disks in a volume group

© Copyright IBM Corporation 2009, 2015

Figure 9-34. Unit summary AN14G5.0

Notes:

9-78 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement — End of unit.

© 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

9-80 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 10. File systems administration

Estimated time
01:05

What this unit is about


This unit covers important concepts and procedures that are related to AIX
file systems.

What you should be able to do


After completing this unit, you should be able to:
• Identify the components of an AIX file system
• Work with enhanced journaled file systems
- Add, list, change, and delete
• Manage file system growth and control growing files

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Identify the components of an AIX file system
• Work with enhanced journaled file systems
– Add, list, change, and delete
• Manage file system growth and control growing files

© Copyright IBM Corporation 2009, 2015

Figure 10-1. Unit objectives AN14G5.0

Notes:

10-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Cover objectives of the unit.
Details — After completing this topic, students should be able to:
• Identify the components of an AIX file system
• Work with enhanced Journaled file systems
- Add, list, change, and delete
• Manage file system growth and control growing files
Additional information — JFS2 will be the main focus of this unit.
Transition statement — Let us start by providing an overview of journaled file systems.

© 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

Journaled file system support in AIX


IBM Power Systems

• Two types are supported:


– Journaled file system (JFS)
– Enhanced JFS, commonly referred to as JFS2
• JFS is the original AIX file system.
• Enhanced JFS (JFS2) was introduced in AIX 5.1 and is now
the default file system.
• Journaling:
– Before writing actual data, a journaling file system logs the metadata to
a circular JFS log on disk.
– When an OS crash occurs, journaling restores consistency by
processing the information in the JFS log file.
• There is no easy migration path from JFS to JFS2.
– Conversion can be achieved only through backup and restore.

© Copyright IBM Corporation 2009, 2015

Figure 10-2. Journaled file system support in AIX AN14G5.0

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.

10-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an introduction to JFS.
Details — Introduce JFS file systems.
Go through the basic introduction points in the visual. Students might wonder what a journaled file
system is as opposed to a regular file system. Provide an overview of journaling. Point out that only
the file system metadata is journaled to a JFS log on disk.
Additional information —
Transition statement — Let us address the advantages of JFS2.

© 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

Advantages of enhanced JFS


IBM Power Systems

• 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

© Copyright IBM Corporation 2009, 2015

Figure 10-3. Advantages of enhanced JFS AN14G5.0

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.

10-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Highlight the JFS2 advantages over regular JFS.
Details — Using the visual and notes, provide an overview of the advantages of JFS2 over JFS.
Additional information —
Transition statement — Let us see how we can examine the metadata for a file system and for the
files within the 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

Listing i-node and block size information


IBM Power Systems

• To view i-node information:


# ls -li
total 3
12309 -rw-r----- 1 adminusr security 119 25 May 19:23 datafile1
12307 -rwxr----- 1 adminusr security 254 27 Jan 18:19 .profile
12308 -rw------- 1 adminusr security 156 28 Jan 14:31 .sh_history

# 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

Last updated: Mon May 25 19:23:27 CET 2015


Last modified: Mon May 25 19:23:27 CET 2015
Last accessed: Mon May 25 19:23:23 CET 2015

• To view file system block size information:


# lsfs –cq /data
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct Block size.
/data:/dev/fslv00:jfs2:::204800:rw:no:no
(lv size 204800:fs size 204800:block size 4096
(Some output
removed for
clarity.)

© Copyright IBM Corporation 2009, 2015

Figure 10-4. Listing i-node and block size information AN14G5.0

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.

10-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to view i-node information and block size for a particular file system.
Details — Go through the examples on the visual. While the ls command is common to all UNIX
operating systems, the istat command is unique to AIX. Focus appropriately.
Additional information — There are many ways to view file system information. The fsdb
command is the most comprehensive way to view the file system structure and data. However, this
command is beyond the scope of this class.
Transition statement — Let us look at how we can create a JFS2 file system.

© 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

Creating a JFS2 file system (1 of 2)


IBM Power Systems

# smit crfs_j2
# crfs -v jfs2 -g datavg -a size=1G –m /data

Add an Enhanced Journaled File System

[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 []

© Copyright IBM Corporation 2009, 2015

Figure 10-5. Creating a JFS2 file system (1 of 2) AN14G5.0

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.

10-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to create a JFS2 file system.
Details — This visual shows how to create an enhanced journaled file system. The logical volume
is automatically created.
Walk through the command and the SMIT options in blue. Cover any further options at your
discretion.
Additional information — It might be prudent to provide a demonstration to students of the
high-level FS and JFS2 SMIT panels. Log in to an AIX system and briefly show them:
• smitty fs
• smitty jfs2
Transition statement — Let us see this command in action, as it would be used by a system
administrator.

© 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

Creating a JFS2 file system (2 of 2)


IBM Power Systems

• When the file system is created, the lsfs command displays


the characteristics of the file system.
# crfs -v jfs2 -g datavg -a size=1G -m /data
File system created successfully.
1048340 kilobytes total disk space.
New File System size is 2097152

# 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

JFS log automatically created, 1 LP in size


(if one does not already exist) for the VG.

© Copyright IBM Corporation 2009, 2015

Figure 10-6. Creating a JFS2 file system (2 of 2) AN14G5.0

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.

10-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show the creation of a JFS2 file system, its characteristics, and the underlying logical
volumes.
Details — This visual shows the actual creation of a JFS2 file system. Explain the details that are
provided in the notes.
Additional information —
Transition statement — After creating a file system, we must mount it to make it available. Let us
see this process and the associated stanza in /etc/filesystems.

© 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

Mounting a file system and the /etc/filesystems


file
IBM Power Systems

• When a file system is created, the device and mount point


information is stored in the /etc/filesystems file.
# grep -p /data /etc/filesystems
/data:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = false
account = false

The mount command reads the


stanza in the /etc/filesystems
file, therefore only the mount point
# mount /data is required.

# mount |egrep '/data|node'


node mounted mounted over vfs date options
/dev/fslv00 /data jfs2 13 Feb 10:32 rw,log=/dev/loglv00

© Copyright IBM Corporation 2009, 2015

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.

10-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to make a file system available for use.
Details — Explain the stanza in the /etc/filesystems file for the /data file system, and how the
file system is mounted.
Additional information —
Transition statement — Let us define the JFS logging options for JFS2 file systems.

© 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

JFS2 logging options


IBM Power Systems

• For JFS2 file systems, there are three logging options:


– Use the global JFS log for the volume group.
– Create a specific JFS log logical volume for each file system.
• 1 LP in size
• Format the log using the logform command
# mklv –y my_jfs2_log –t jfs2log datavg 1

# logform /dev/my_jfs2_log
logform: destroy /dev/rmy_jfs2_log (y)?y

# crfs -v jfs2 -g datavg -a size=1G -m /data -a logname=my_jfs2_log

– Create an inline log inside the file system.


• 0.4% of the file system space is reserved for this option.
# crfs -v jfs2 -g datavg -a size=1G -m /data -a logname=INLINE \
-a logsize=<value in MB>

© Copyright IBM Corporation 2009, 2015

Figure 10-8. JFS2 logging options AN14G5.0

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.

10-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the three JFS logging options for JFS2 file systems.
Details — Go through the examples in the visual and details in the notes. You might want to go
back to the create file system SMIT screen, and highlight the JFS logging fields.
Additional information —
Transition statement — Now let us look at creating a JFS2 file system on top of an existing LV.

© 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

Creating a file system on a previously defined


logical volume
IBM Power Systems

# smit crfs_j2
# crfs -v jfs2 –d lv_for_data –m /data2 –A yes

Add an Enhanced Journaled File System

[Entry Fields]
* LOGICAL VOLUME name lv_for_data +
* MOUNT POINT [/data2]
Mount AUTOMATICALLY at system restart? yes +
PERMISSIONS read/write +
Mount OPTIONS [] +
Block Size (bytes) 4096 +
Logical Volume for Log +
Inline Log size (MBytes) [] #
Extended Attribute Format +
ENABLE Quota Management? no +
Enable EFS? no +
Allow internal snapshots? No +
Mount GROUP []

© Copyright IBM Corporation 2009, 2015

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.

10-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to add a JFS2 file system on an existing logical volume.
Details — This visual shows the SMIT menu for creating a standard enhanced journaled file
system on a previously defined logical volume.
Walk through the command and the SMIT options in blue. Cover any further options at your
discretion.
Additional information —
Transition statement — Now that we can create and mount file systems, let us see how we can
both increase and shrink a file system size.

© 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

Changing the size of a JFS2 file system


IBM Power Systems

• To increase the size of a file system:


# chfs -a size=+1G /data2
Filesystem size changed to 2179072

• To shrink the size of a file system:


# chfs -a size=-500M /data2
Filesystem size changed to 1155072

• Using SMIT: # smit chjfs2


Change / Show Characteristics of an Enhanced Journaled File System

[Entry Fields]
File system name /data2
NEW mount point [/data2]
SIZE of file system
Unit Size Gigabytes +
Number of units [10] #

Note: Advanced options are removed.

© Copyright IBM Corporation 2009, 2015

Figure 10-10. Changing the size of a JFS2 file system AN14G5.0

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.

10-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to dynamically increase and shrink a JFS2 file system.
Details — Refer to the visual and student notes.
Additional information —
Transition statement — Now that we looked at creating and modifying our file systems, let us look
at how we remove them.

© 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

Removing a JFS2 file system


IBM Power Systems

• The file system must be unmounted first.

• Using SMIT: # smit rmfs2 # rmfs /data2

Remove an Enhanced Journaled File System

[Entry Fields]
* FILE SYSTEM name /data2 +
Remove Mount Point no +

© Copyright IBM Corporation 2009, 2015

Figure 10-11. Removing a JFS2 file system AN14G5.0

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.

10-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to remove a file system.
Details — This operation is supported through SMIT. You can specify removal of the mount point
(the directory) as well. However, this is only possible if the directory is empty.
Additional information —
Transition statement — Let us talk about file system space management issues.

© 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

File system space management


IBM Power Systems

• File system expand upon notice, not automatically.


• To keep from running into problems, use AIX Tools:
– Monitor file system growth df –m and du commands
– Determine causes your knowledge and skill
– Increase file system size chfs –a size=+1 /myfs
– Control user disk usage disk quota system
– Change the block size backup, rmfs, kfs, restore
– Control growing files, remove trash files, run skulker, do manual
cleanup
• Security logs
– /var/adm/sulog, /var/adm/wtmp, /etc/security/failedlogin
• Print subsystem spooling and cron logs (/var/adm)
• Management tool logs in home directory (smit.log, smit.script)

© Copyright IBM Corporation 2009, 2015

Figure 10-12. File system space management AN14G5.0

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.

10-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Specifying du output by file


By default, du gives information by directory. With the -a option, output is displayed by file,
rather than by directory.
• The du -x flag
The -x flag/option is also useful. When you use du -ax, the report shows information only from
the specified file system. This is the best way to determine what file is filling a particular file
system.
• Managing files that grow
Growing files should be monitored and cleaned out periodically. Some of the files that grow are
listed on the visual.
• Records of login activity
The files /var/adm/wtmp, /etc/security/failedlogin, and /var/adm/sulog are needed
because they contain historical data regarding login activity. Thus, these files should always
contain a few days of login activity. If accounting is turned on, /var/adm/wtmp is kept to a
reasonable size. If accounting is not turned on, to capture the data to archive it, use who -a on
/var/adm/wtmp and /etc/security/failedlogin and redirect the output to a save file. Then,
the log file can be purged by overwriting it with a null string. Two ways of overwriting a log file in
this way are illustrated in the following examples:
- Example 1:
# cat /dev/null > /var/adm/wtmp
- Example 2:
# > /etc/security/failedlogin
The file /var/adm/sulog can be edited directly.
• The /var/spool directory
The directory /var/spool contains cron entries, the mail, and other items that grow on an
ongoing basis, along with printer files. If there is a problem with the printer files, you can try to
clear the queuing subsystem by running the following commands:
# stopsrc -s qdaemon
# rm /var/spool/lpd/qdir/*
# rm /var/spool/lpd/stat/*
# rm /var/spool/qdaemon/*
# startsrc -s qdaemon
• Records of SMIT activity
Files such as smit.log in the home directory of the root user, and other system administration
accounts, can also become large. This file needs to be monitored regularly and managed
appropriately.
• Function of the skulker command
The shell script /usr/sbin/skulker includes a series of entries that contain commands that
remove unwanted or obsolete files of various types. To analyze the commands that are
executed by each entry, print out or view the contents of the /usr/sbin/skulker file.

© 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.

10-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. What command displays the i-node information for a file?

2. Does the size of the file system change when the size of the
logical volume it is on is increased?

3. If you remove a file system, is the logical volume on which it


sits removed as well?

4. A file system is 2 GB. How would you do the following?


a. Add 1 GB.
b. Set the size to 5 GB.

© Copyright IBM Corporation 2009, 2015

Figure 10-13. Checkpoint AN14G5.0

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

1. What command displays the i-node information for a file?


The answer is istat.

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.

4. A file system is 2 GB. How would you do the following?


a. Add 1 GB: The answer is chfs –a size=+1G <file system>
b. Set the size to 5 GB: The answer is chfs –a size=5G <file system>
The answers are chfs –a size=+1G<file system> and chfs –a
size=+5G<file system>.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

10-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

File systems
administration

© Copyright IBM Corporation 2009, 2015

Figure 10-14. Exercise AN14G5.0

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 —

10-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Identify the components of an AIX file system
• Work with enhanced journaled file systems
– Add, list, change, and delete
• Manage file system growth and control growing files

© Copyright IBM Corporation 2009, 2015

Figure 10-15. Unit summary AN14G5.0

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.

10-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 11. The Object Data Manager

Estimated time
00:45

What this unit is about


This unit describes the structure of the Object Data Manager (ODM). It
shows the use of the ODM command-line interface and explains the role of
the ODM in device configuration. Specific information regarding the function
and content of the most important ODM files is also presented.

What you should be able to do


After completing this unit, you should be able to:
• Describe the structure of the ODM
• Use the ODM command-line interface
• Explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Describe the structure of the ODM
• Use the ODM command line interface
• Explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

© Copyright IBM Corporation 2009, 2015

Figure 11-1. Unit objectives AN14G5.0

Notes:

Importance of this unit


The ODM is a important component of AIX and is one major feature that distinguishes AIX from
other UNIX systems. This unit describes the structure of the ODM and explains how you can work
with ODM files by using the ODM command-line interface.
It is also important that you, as an AIX system administrator, understand the role of the ODM during
device configuration. Thus, explaining the role of the ODM in this process is another major objective
of this unit.

11-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Present the objectives of this unit.
Details — Explain that a good understanding of the ODM is important and can help in analyzing
problems. Point out that the ODM is mainly used for device configuration and that this is a major
focus in this unit.
Additional information — None.
Transition statement — Let us start looking at how the ODM database is used.

© 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

Data managed by the ODM


IBM Power Systems

Devices Software

System
SMIT menus
Resource ODM and panels
Controller

TCP/IP Error Log,


NIM
configuration Dump

© Copyright IBM Corporation 2009, 2015

Figure 11-2. Data managed by the ODM AN14G5.0

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.

11-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the use of the ODM database.
Details — While the detailed discussion of the ODM database is not until much later in the course,
it is difficult to avoid references to the ODM in the earlier material. No need to go into much detail
here. Just the basic idea that the ODM acts as a central repository for much of the system
configuration information.
Additional information —
Transition statement — Let’s look at the structure of the ODM.

© 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

uniquetype attribute deflt values

tape/scsi/scsd block_size none 0-2147483648,1

disk/scsi/osdisk pvid none

tty/rs232/tty login disable enable, disable, ...

© Copyright IBM Corporation 2009, 2015

Figure 11-3. ODM components AN14G5.0

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.

11-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Define the basic components of ODM.
Details — Complete the visual during the lesson. ODM components are:
• Object Classes
The ODM consists of many database files, where each file is called an object class.
• Objects
Each object class consists of objects. Each object is one record in an object class.
• Descriptors
The descriptors describe the layout of the objects. They determine the name and data type of
the fields that are part of the object class.
Additional information — This visual shows an extraction out of the ODM class PdAt. Do not
explain the meaning of PdAt or the different fields on this page. Concentrate on the components of
the ODM.
Transition statement — It is also important to understand how the terms predefined device
information and customized device information are used when discussing the ODM.

© Copyright IBM Corp. 2009, 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

Predefined Plug and Play


PdDv

PdAt

PdCn

Config_Rules
cfgmgr

Customized Methods
CuDv Define
Device Load
CuAt Configure
Driver
CuDep Change

CuDvDr Unload Unconfigure

CuVPD Undefine
© Copyright IBM Corporation 2009, 2015

Figure 11-4. Configuration manager AN14G5.0

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

11-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

11-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Basic device object classes


IBM Power Systems

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" ...
...

© Copyright IBM Corporation 2009, 2015

Figure 11-5. Basic device object classes AN14G5.0

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.

11-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

11-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

11-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

How ODM classes act together


IBM Power Systems

# cfgmgr

PdDv: CuDv:
type = "14106902" name = "ent1"
class = "adapter" status = 1
subclass = "pci" chgstatus = 2
prefix = "ent" ddins = "pci/goentdd"
... location = "02-08"
DvDr = "pci/goentdd" parent = "pci2"
Define = /usr/lib/methods/define_rspc" connwhere = "8“
Configure = "/usr/lib/methods/cfggoent" PdDvLn = "adapter/pci/14106902"
...
uniquetype = "adapter/pci/14106902"

# chdev -l ent1 -a jumbo_frames=yes

PdAt: CuAt:
uniquetype = "adapter/pci/14106902" name = "ent1"
attribute = "jumbo_frames" attribute = "jumbo_frames"
deflt = "no" value = "yes"
values = "yes,no" type = "R"
... ...

© Copyright IBM Corporation 2009, 2015

Figure 11-6. How ODM classes act together AN14G5.0

Notes:

Interaction of ODM device classes


The visual and the notes summarize how ODM classes act together.
• For a particular device to be defined in AIX, the device type must be predefined in ODM class
PdDv.
• A device is defined with either the cfgmgr (if the device is detectable), or by the mkdev
command. Both commands use the define method to generate an instance in ODM class CuDv.
The configure method is used to load a specific device driver and to generate an entry in the
/dev directory.
Notice the link PdDvLn from CuDv back to PdDv.
• Default attribute values are only in PdAt which, in the example of a gigabit Ethernet adapter,
means you might not use jumbo frames (default is no). If you change the attributes, for example,
jumbo_frames to yes, you get an object with the nondefault value in CuAt.

© 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.

11-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

ODM and high-level device commands


IBM Power Systems

• Listing objects in the Predefined and Customized classes:


– List PdDv object class:
# lsdev –P [ -c <class> | -s <subclass> | -t <type> ]

– List CuDv object class:


# lsdev –C [ -l <device name> | -c <class> | -s <subclass> | -t <type> ]

• Listing default and effective attributes:


– List default attributes from PdAt object class:
# lsattr –D –c <class> -s <subclass> -t <type> [ -a <attribute> ]
# lsattr –D –l <device name> [ -a <attribute> ]
– List an enumeration or range of acceptable attribute values:
# lsattr –R –l <device name> -a <attribute name>

– List effective attributes (PdAt and overrides in CuAt):


# lsattr –E –l <device name> [ -a <attribute> ]

© Copyright IBM Corporation 2009, 2015

Figure 11-7. ODM and high-level device commands AN14G5.0

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.

11-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Relate the high-level device commands to the device-related ODM objects.
Details —
Additional information —
Transition statement — Let us look at the intermediate ODM commands.

© 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

Object class: odmcreate, odmdrop

Descriptors: odmshow

uniquetype attribute deflt values

tape/scsi/scsd block_size none 0-2147483648,1

disk/scsi/osdisk pvid none

tty/rs232/tty login disable enable, disable, ...

Objects: odmadd, odmchange, odmdelete, odmget


© Copyright IBM Corporation 2009, 2015

Figure 11-8. ODM commands AN14G5.0

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.

11-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

11-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Changing attribute values


IBM Power Systems

# odmget -q"uniquetype=tape/scsi/scsd and attribute=block_size" PdAt > file

# 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

# odmchange -o PdAt -q"uniquetype=tape/scsi/scsd and attribute=block_size" file


- OR -
# odmdelete -o PdAt -q"uniquetype=tape/scsi/scsd and attribute=block_size"
# odmadd file

© Copyright IBM Corporation 2009, 2015

Figure 11-9. Changing attribute values AN14G5.0

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.

The final operation is to add the file into the ODM.


• Need to use ODM commands
The ODM objects are stored in a binary format; that means you need to work with the ODM
commands to query or change any objects.
• Possible queries
As with any database, you can perform queries for records that are matching certain criteria.
The tests are on the values of the descriptors of the objects. A number of tests can be
performed:
= equal
!= not equal
> greater
>= greater than or equal to
< less than
<= less than or equal to
like similar to; finds patterns in character string data
For example, to search for records where the value of the lpp_name attribute begins with
bosext1., you would use the syntax lpp_name like bosext1.*
Tests can be linked together by using normal boolean operations, as shown in the following
example:
uniquetype=tape/scsi/scsd and attribute=block_size
In addition to the * wildcard, a ? can be used as a wildcard character.

11-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe some ODM commands that are used to manage objects.
Details — Go through the example to show how the commands are used. Make sure that the
students understand the purpose of each command. For example, state that the odmget command
is used to retrieve a specific object from an object class to either view it or change it in some way.
The following example can be used to illustrate the use of the odmget, odmadd, and odmdelete
commands:
Assume that you are manipulating the PdAt object class, which has an entry for the 8 mm tape
drive with attribute block_size set to 1024. Assume that you want to modify the default blocksize
value to 512.
The odmget command extracts the block size record into a file.
If there is more than one entry that are matching the pattern, then information that is regarding each
will be retrieved.
When you have the record, use vi (or your favorite editor) to edit that record and overtype the new
number.
Ask the students what potential problem they would encounter if you run the odmadd command now.
(They would have duplicate instances of the block_size attribute, as the original record would not
be overwritten.) So, to overcome this problem, run the odmdelete command before the odmadd
command. If there are duplicate objects, only the first is recognized.
If multiple records match the search pattern, the odmdelete command deletes all of them. So, be
specific with your search.
Now you can run the odmadd command.
Notice that, with this command, all you specify is the temporary file where the new information is
held. You do not specify the object class name where the record is to go. Ask the students how the
odmadd command knows which object class this entry is to go to. The answer is that saved in the file
is the name of the object class from where the record was obtained. The stanza labels in the input
file contains this information, in this case PdAt.
Additional information — None.
Transition statement — Let us look at some more of the device-related ODM object classes.

© 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

Additional device object classes


IBM Power Systems

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"

© Copyright IBM Corporation 2009, 2015

Figure 11-10. Additional device object classes AN14G5.0

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.

11-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

11-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

ODM repositories and software-related objects


IBM Power Systems

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

/etc/objrepos /usr/lib/objrepos /usr/share/lib/objrepos

© Copyright IBM Corporation 2009, 2015

Figure 11-11. ODM repositories and software-related objects AN14G5.0

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.

11-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the different directories that hold ODM data.
Details — Describe what ODM files reside in /etc/objrepos, /usr/lib/objrepos, and
/usr/share/lib/objrepos.
Explain the meaning of the / (root), /usr, and /usr/share part of a software product and identify
that /usr/lib/objrepos and /usr/share/lib/objrepos can be shared in a network.
Additional information —
Transition statement — Let us look at the software-related ODM object classes.

© 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

Software vital product data


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 11-12. Software vital product data AN14G5.0

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)

11-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Applying (state = 2)


• Applied (state = 3)
• Committing (state = 4)
• Committed (state = 5)
• Rejecting (state = 6)
• Broken (state = 7)
• SWVPD classes
The Software Vital Product Data is stored in the following ODM classes:
lpp The lpp object class contains information about the installed software
products, including the current software product state and description.
inventory The inventory object class contains information about the files that are
associated with a software product.
product The product object class contains product information about the installation
and updates of software products and their prerequisites.
history The history object class contains historical information about the
installation and updates of software products.

© 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.

11-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. In which ODM class do you find the physical volume IDs of


your disks?

2. What is the difference between the states: defined and


available?

© Copyright IBM Corporation 2009, 2015

Figure 11-13. Checkpoint AN14G5.0

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

1. In which ODM class do you find the physical volume IDs of


your disks?
The answer is CuAt.

2. What is the difference between the states: defined and


available?
The answer is when a device is defined, there is an entry in
ODM class CuDv. When a device is available, the device
driver is loaded. The device driver can be accessed by the
entries in the /dev directory.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Let us look at reinforcing what we covered by playing with the ODM in the
exercise.

11-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

The Object Data Manager

• Review of device configuration Object


Data Manager (ODM) classes
• (optional) Modifying a device default
attribute

© Copyright IBM Corporation 2009, 2015

Figure 11-14. Exercise AN14G5.0

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 —

11-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Describe the structure of the ODM
• Use the ODM command line interface
• Explain the role of the ODM in device configuration
• Describe the function of the most important ODM files

© Copyright IBM Corporation 2009, 2015

Figure 11-15. Unit summary AN14G5.0

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.

11-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 12. LVM metadata

Estimated time
00:50

What this unit is about


This unit explains concepts important for understanding and working with the
logical volume manager (LVM).

What you should be able to do


After completing this unit, you should be able to:
• Explain where LVM information is stored
• Move a volume group from one system to another
• Solve ODM-related LVM problems

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Explain where LVM information is stored
• Move a volume group from one system to another
• Solve ODM-related LVM problems

© Copyright IBM Corporation 2009, 2015

Figure 12-1. Unit objectives AN14G5.0

Notes:

Purpose of this unit


Basic LVM concepts are introduced in the Basic System Administration course.
In this unit, you will review these basic concepts and expand your knowledge of LVM.

12-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Present the objectives of this unit.
Details — The AIX Storage Management Redbook that is listed under References was published in
1994, but it is still useful.
Transition statement — Let us start with a review of LVM terms.

© 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

Goal: Unique worldwide identifiers for:


volume groups, hard disks, and logical volumes

# lsvg rootvg | grep IDENT


... VG IDENTIFIER: 00c35ba000004c00000001157f54bf78

# lspv 32 bytes long


hdisk0 00c35ba07b2e24f0 rootvg active
32 bytes long
# lsattr –El hdisk# -a unique_id (16 are shown)
unique_id
3321360050768019102C0F000000000006E2904214503IBMfcp

# lslv hd4 | grep IDENT


LV IDENTIFIER: 00c35ba000004c00000001157f54bf78.4 ...
... VGID.minor number

# uname -m
00C35BA04C00
© Copyright IBM Corporation 2009, 2015

Figure 12-2. LVM identifiers AN14G5.0

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

12-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

12-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

LVM metadata locations


IBM Power Systems

• Volume Group Descriptor Area (VGDA):


– VGDA count
– LVIDs, LVnames, and # copies (when mirrored)
– PVIDs, PV states, and LP to PP mapping
• Volume Group Status Area (VGSA)
– Tracks the state of mirrored copies
• Logical Volume Control Block (LVCB)
– Contains LV attributes (policies and number of copies)
– Scalable VGs: The information is merged into VGDA
• ODM database
– Physical volumes, volume groups, and logical volumes are
represented as devices

© Copyright IBM Corporation 2009, 2015

Figure 12-3. LVM metadata locations AN14G5.0

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

• VGSA for scalable volume groups


The VGSA for scalable VGs consists of three areas: PV missing area (PVMA), mirror write
consistency dirty bit area (MWC_DBA), and PP status area (PPSA).
- PV missing area: The PVMA tracks if any of the disks are missing.
- MWC dirty bit area: The MWC_DBA holds the status for each LV if passive mirror write
consistency is used.
- PP status area: The PPSA logs any stale PPs.
The overall size that is reserved for the VGSA is independent of the configuration parameters of
the scalable VG and stays constant. However, the size of the contained PPSA changes in
proportion to the configured maximum number of PPs.
• LVCB-related considerations
For standard VGs, the LVCB resides in the first block of the user data within the LV. Big VGs
keep additional LVCB information in the VGDA. The LVCB structure on the first LV user block
and the LVCB structure within the VGDA are similar but not identical. With scalable VGs, logical
volume control information is no longer stored on the first user block of any LV. So, no
precautions need to be taken when using raw logical volumes because there is no longer a
need to preserve the information that is held by the first 512 bytes of the logical device.
• LVM information that is stored in the ODM
Physical volumes, volume groups, and logical volumes are handled as devices in AIX. Every
physical volume, volume group, and logical volume is defined in the customized object classes
in the ODM.

12-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the disk control blocks.
Details — Explain by using the information in the student notes.
Additional information — None.
Transition statement — Let us take a closer look at where LVM metadata is stored in the ODM.

© 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

LVM-related ODM objects


IBM Power Systems

• Physical volumes: descriptor name=hdisk#


– CuDv: Status and location of the disk
– CuAt: Various attributes including: pvid
• Volume groups: descriptor name=<vgname>
– CuDv: Status of the volume group
– CuAt: Various attributes including:
• vgserial_id
• One object per physical volume in the VG (pv=<physical volume ID>)
– CuDep: One object per LV dependency
• Logical volumes: descriptor name=<lvname>
– CuDv: Status and parent volume group
– CuAt: Various attributes including: lvserial_id
• Device drivers: CuDvDr
– Physical volumes: descriptor value3=hdisk#
– Volume groups: descriptor value3=<volume group name>
– Logical volumes: descriptor value3=<logical volume name>
© Copyright IBM Corporation 2009, 2015

Figure 12-4. LVM-related ODM objects AN14G5.0

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.

12-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Following is an example of CuDv objects for a disk:


# odmget -q "name like hdisk[02]" CuDv

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 entries for volume groups


Information indicating the existence of a volume group is stored in CuDv, which means all
volume groups must have an object in this class.
Following is an example of a CuDv object for a volume group:
# odmget -q "name=rootvg" CuDv
CuDv:
name = "rootvg"
status = 0
chgstatus = 1
ddins = ""
location = ""
parent = ""
connwhere = ""
PdDvLn = "logical_volume/vgsubclass/vgtype"
• CuAt entries for volume groups
One of the most important pieces of information about a volume group is the VGID. This
information is stored in CuAt. Remember that the PVID is a 32-number field, where the last 16
numbers are set to zeros.
Also, a PV attribute object exists for each disk that belongs to a volume group.
Following is an example of a CuAt object for a volume group:
# odmget -q "name=rootvg" CuAt
CuAt:
name = "rootvg"
attribute = "vgserial_id"
value = "00c35ba000004c00000001157f54bf78"
type = "R"
generic = "D"
rep = "n"
nls_index = 637
CuAt:
name = "rootvg"
attribute = "pv"
value = "00c35ba07b2e24f00000000000000000"
type = "R"
generic = ""
rep = "sl"
nls_index = 0
...

12-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • CuDep entries for a volume group’s logical volumes


The ODM class CuDep (customized dependencies) stores dependency information for logical
devices. For example, the following example indicates that the logical volume hd2 is contained
in the rootvg volume group.
# odmget -q "dependency=hd2" CuDep
CuDep:
name = "rootvg"
dependency = "hd2"
• CuDV entries for logical volumes
The CuDv object class contains an entry for each logical volume. Following is an example of a
CuDv object for a logical volume:
# odmget -q "name=hd2" CuDv

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"

Here is an example of a CuDvDr object for a logical volume:


# odmget -q "value3=hd2" CuDvDr

CuDvDr:
resource = "devno"
value1 = "10"
value2 = "5"
value3 = "hd2"

12-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide information to help locate all the LVM-related ODM objects.
Details — While the details of the odmget-retrieved objects are in the notes, avoid getting into
details. The descriptors that are needed to retrieve, delete, or change an ODM object are provided
in the visual. For example, the odmget command can be qualified with name=hdisk3 to retrieve
either the related CuDv or CuAt object for that disk.
The intent is to support for procedures such as the rvgrecover procedure that is covered later. Use
that procedure as an example of using this information. Note that the rvgrecover procedure
replaces only the VG and LV related objects; it does not work with the physical volume related
objects.
Note: While in many cases a device name and attribute name combination of qualifying descriptors
uniquely identifies an object in the CuAt. For the PVID attribute of a volume group, this combination
might not be unique. There can be multiple PDIV attribute objects for a single volume group, one for
each disk in the volume group.
Additional information —
Transition statement — If we want to move disks from one system to another (with the data
intact), what is the procedure to ensure that the related metadata is cleaned from the ODM on the
source system and established in the ODM on the target system?

© 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

Exporting a volume group


IBM Power Systems

moon myvg To export a volume group:


hdisk9
1. Unmount all file systems
from the volume group:
# umount /dev/lv10
# umount /dev/lv11

exportvg: 2. Vary off the volume group:


Removes metadata # varyoffvg myvg
from ODM
3. Export volume group:
# exportvg myvg

The complete volume group


is removed from the ODM.

© Copyright IBM Corporation 2009, 2015

Figure 12-5. Exporting a volume group AN14G5.0

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.

12-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Procedure to export a volume group


Do the following steps to export the volume group:
1. Unmount all file systems from the volume group. In the example, there are three logical
volumes in myvg; lv10, lv11, and loglv01. The loglv01 logical volume is the JFS log
device for the file systems in myvg, which is closed when all file systems are unmounted.
2. When all logical volumes are closed, use the varyoffvg command to vary off the volume
group.
3. Finally, export the volume group, by using the exportvg command. After this point, the
complete volume group (including all file systems and logical volumes) is removed from the
ODM.
After exporting the volume group, the disks in the volume group can be transferred to another
system.
SMIT can also be used to run this command:
# smit exportvg

© 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.

12-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Importing a volume group


IBM Power Systems

To import a volume group:

1. Configure the disk.

2. Import the volume group:


importvg: # importvg -y myvg hdisk3
Stores
metadata 3. Mount the file systems:
in ODM # mount /dev/lv10
mars # mount /dev/lv11

The complete volume group is


hdisk3 added to the ODM.
myvg

© Copyright IBM Corporation 2009, 2015

Figure 12-6. Importing a volume group AN14G5.0

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.

12-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

importvg and duplicate names


IBM Power Systems

• Avoid duplicate LV names and FS names between systems:


– Avoid default names such as fslv00 and lv01.
– Use functionally meaningful names such as db2pay00.

• importvg generates a new LV name for a duplicate.


importvg: changing LV name lv10 to fslv00

• importvg does not create an /etc/filesystems entry for


a duplicate label (mount point).
Warning: mount point /home/michael already exists in
/etc/filesystems

– Edit /etc/filesystems to create a new entry with a unique mount


point.

© Copyright IBM Corporation 2009, 2015

Figure 12-7. importvg and duplicate names AN14G5.0

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

• Duplicate file system names and /etc/filesystems stanzas


Normally, the importvg command creates new stanzas in /etc/filesystems for file systems in
the imported volume group. If importvg finds that the new file system’s label duplicates the
label of an existing stanza, it does not create the new stanza and provides an error message to
that effect.
If you need both file systems (the imported and the one that already exists) mounted at the
same time, you must create a new stanza in /etc/filesystems. For example, you can create a
second stanza for the imported logical volume, /home/michael_moon. The fields in the new
stanza might be:
- dev specifies the logical volume, for example, /dev/lv24.
- vfs specifies the file system type, for example, jfs2.
- log specifies the JFS log device for the file system.
- mount specifies whether this file system should be mounted by default. The value false
specifies no default mounting during boot. The value true indicates that a file system
should be mounted during the boot process.
- options specifies that this file system should be mounted with read and write access.
- account specifies whether the file system should be processed by the accounting system.
A value of false indicates no accounting.
Before mounting the file system /home/michael_moon, the corresponding mount point must be
created.
• Using umount and mount
If you do not need to have both file systems that are mounted at the same time, you can
unmount one and then mount the other. But without an entry in /etc/filesystems, you need to
provide all of the required options.
Options that you would provide, on the mount command, are:
a. Log device, for example, -o log=/dev/lvlog01
b. Logical volume name, for example, /dev/lv24
c. Mount point, for example, /home/michael
d. The file system type, for example, -V jfs2
If you do not have documentation on the file system logical volumes and file system types, you
might need to retrieve that information by using the lsvg and lslv commands.

12-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the problems and solutions that are related to duplicate names when using
importvg.
Details —
Additional information —
Transition statement — Since metadata is maintained on both the disk control blocks (such as the
VGDA) and in the ODM, how are there kept synchronized and is it possible for them to have
problems being kept up to date? Let us look at this issue.

© Copyright IBM Corp. 2009, 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

How LVM interacts with ODM and VGDA


IBM Power Systems

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
...

© Copyright IBM Corporation 2009, 2015

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.

12-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • The importvg and exportvg commands


The visual shows two important commands. The command importvg imports a complete new
volume group based on a VGDA and LVCB on a disk. The command exportvg removes a
complete volume group from the ODM.
• VGDA and LVCB corruption
The focus in this course is on situations where the ODM is corrupted and we assume that the
LVM control data (for example, the VGDA or the LVCB) is correct. If an attempted execution of
LVM commands (for example: lsvg, varyonvg, reducevg) results in a failure with core dump
that might be an indication that the LVM control data on one of the disks has become corrupted.
In this situation, do not attempt to resync the ODM by using the procedures that are
covered. In most cases, you need to recover from a volume group backup. If recovery from
backup is not a viable option, it is suggested that you work with AIX Support in dealing with the
problem. Attempting to use the procedures that are covered in this unit does not solve the
problem. Even worse, you will likely propagate the corruption to other disks in the volume group,
thus making the situation even worse.
• Normal functioning of high-level commands
As already mentioned, most of the time administrators use high-level commands to create or
update volume groups or logical volumes. These commands use signal handlers to set up a
proper cleanup in case of an interruption. Additionally, LVM commands use a locking
mechanism to block other commands while a change is in progress.
• Causes of problems
The signal handlers that are used by high-level LVM commands do not work with a kill -9, a
system shutdown, or a system crash. You might end up in a situation where the VGDA has
been updated, but the change has not been stored in the ODM.
Problems might also occur because of the improper use of low-level commands or hardware
changes that are not followed by correct administrator actions.
Another common problem is ODM corruption when performing LVM operations when the root
file system (which contains /etc/objrepos) is full. Always check the root file system free space
before attempting LVM recovery operations.

© 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?

12-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Fixing ODM problems with user volume groups


IBM Power Systems

If the ODM problem is not in the rootvg, for example in volume group
homevg, do the following:

# varyoffvg homevg

# exportvg homevg Remove complete volume


group from the ODM.
# importvg -y homevg hdiskX

Import volume group and


create new ODM objects.

© Copyright IBM Corporation 2009, 2015

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.

12-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to fix ODM problems in non-rootvg volume groups.
Details — Explain the student material.
Additional information — None.
Transition statement — Sometimes you cannot use exportvg and importvg to fix a problem.
Instead, you need to directly work with the ODM by using the ODM commands (for example,
odmdelete and odmget). Let us look at how this is done when there are LVM metadata problems
involving the rootvg.

© 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

Fixing ODM problems with rootvg


IBM Power Systems

If the ODM problem is in the rootvg, try using the rvgrecover procedure:

PV=hdisk0
VG=rootvg
cp /etc/objrepos/CuAt /etc/objrepos/CuAt.$$
cp /etc/objrepos/CuDep /etc/objrepos/CuDep.$$
cp /etc/objrepos/CuDv /etc/objrepos/CuDv.$$
cp /etc/objrepos/CuDvDr /etc/objrepos/CuDvDr.$$

lqueryvg -Lp $PV | awk '{print $2}' | while read LVname;


do
odmdelete -q "name=$LVname" -o CuAt
odmdelete -q "name=$LVname" -o CuDv
odmdelete -q "value3=$LVname" -o CuDvDr
Done
odmdelete -q "name=$VG" -o CuAt • Uses odmdelete
odmdelete -q "parent=$VG" -o CuDv to export rootvg
odmdelete -q "name=$VG" -o CuDv
odmdelete -q "name=$VG" -o CuDep
odmdelete -q "dependency=$VG" -o CuDep • Uses importvg to
odmdelete -q "value1=10" -o CuDvDr import rootvg
odmdelete -q "value3=$VG" -o CuDvDr

importvg -y $VG $PV # ignore lvaryoffvg errors


varyonvg $VG

© Copyright IBM Corporation 2009, 2015

Figure 12-10. Fixing ODM problems with rootvg AN14G5.0

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

12-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

12-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Intermediate-level ODM commands


IBM Power Systems

• High-level LVM commands might not be a viable option:


– ODM corruption might prevent high-level commands from running.
– varyoffvg and exportvg disrupt availability.

• redefinevg –d <hdisk#> <vgname>


– Identifies and re-enters PV data for the VG in the ODM.
– Checks for inconsistencies between LVM data areas and ODM.
– Recovers some, but not all of the LV data.

• 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

Figure 12-11. Intermediate-level ODM commands AN14G5.0

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).

12-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the use of LVM intermediate-level commands.
Details —
Additional information — The man page entries (and corresponding entries in the AIX 7.1
Commands Reference) for redefinevg and synclvodm are brief but helpful.
Transition statement — Let us review what we covered with some checkpoint questions.

© 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

1. True or False: All LVM information is stored in the ODM.

2. True or False: You detect that a physical volume hdisk1


that is contained in your rootvg is missing in the ODM.
This problem can be fixed by exporting and importing the
rootvg.

© Copyright IBM Corporation 2009, 2015

Figure 12-12. Checkpoint AN14G5.0

Notes:

12-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Discuss the checkpoint questions.
Details — A Checkpoint Solution is given below:

Checkpoint solutions
IBM Power Systems

1. True or False: All LVM information is stored in the ODM.


The answer is false. Information is also stored in other AIX
files and in disk control blocks (like the VGDA and LVCB).

2. True or False: You detect that a physical volume hdisk1 that


is contained in your rootvg is missing in the ODM. This
problem can be fixed by exporting and importing the rootvg.
The answer is false. Use the rvgrecover procedure
instead. This script creates a complete set of new rootvg
ODM entries.

© Copyright IBM Corporation 2009, 2015

Additional information — None.


Transition statement — Let us try some of this in an exercise.

© 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

LVM metadata issues


• Part 1: Using intermediate LVM commands
• Part 2: Using exportvg and importvg
• Part 3 (optional): importvg messages
• Part 4 (optional): Fixing LVM ODM problems using
exportvg and importvg
• Part 5 (optional): Fixing LVM ODM problems using the
rvgrecover procedure

© Copyright IBM Corporation 2009, 2015

Figure 12-13. Exercise AN14G5.0

Notes:

Goals for this exercise


At the end of this part of this exercise, you should be able to:
• Fix an LVM-related ODM problem that is associated with a user volume group.
• Fix an LVM-related ODM problem that is associated with the rootvg.

12-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Transition to the exercise.
Details — Explain the goals of this part of the exercise.
Additional information — None.
Transition statement — Let us summarize this unit.

© 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

Having completed this unit, you should be able to:


• Explain where LVM information is stored
• Move a volume group from one system to another
• Solve ODM-related LVM problems

© Copyright IBM Corporation 2009, 2015

Figure 12-14. Unit summary AN14G5.0

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.

12-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Summarize key points from the unit.
Details — Present the highlights from the unit.
Additional information — None.
Transition statement — Let us continue with the next unit.

© 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

12-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 13. Disk management procedures

Estimated time
01:10

What this unit is about


This unit describes different disk management procedures:
• Disk replacement procedures
• Failed disks procedures that are related to quorum

What you should be able to do


After completing this unit, you should be able to:
• Replace a disk under various circumstances
• Manage volume group quorum issues

How you will check your progress


Accountability:
• Checkpoint questions
• Exercises

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

After completing this unit, you should be able to:


• Replace a disk under various circumstances
• Manage volume group quorum issues

© Copyright IBM Corporation 2009, 2015

Figure 13-1. Unit objectives AN14G5.0

Notes:

Introduction
This unit presents many disk management procedures that are important for any AIX system
administrator.

13-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Present the objectives of this unit.
Details —
Additional information —
Transition statement — Let us start with the disk replacement procedures.

© 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

13-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 13.1.Disk replacement techniques

Instructor topic introduction


What students will do — The students will identify how to replace a disk under different
conditions.
How students will do it — Through lecture, exercise, and checkpoint questions.
What students will learn — Students will:
• Identify how to replace a disk under different conditions
• Recover from a total volume group failure
How this will help students on their job — Replacing a disk is not always an easy job. System
administrators must know the procedures to replace a disk without corrupting the systems.

© 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

Disk replacement: Starting point


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 13-2. Disk replacement: Starting point AN14G5.0

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.

13-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

13-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Procedure 1: Disk mirrored


IBM Power Systems

1. Remove all copies from disk:


# unmirrorvg vg_name hdiskX

2. Remove disk from volume group:


# reducevg vg_name hdiskX Mirrored
3. Remove disk from ODM:
# rmdev -l hdiskX -d

4. Provide a replacement disk.


If a new disk, discover and configure
# cfgmgr

6. Add new disk to volume group:


# extendvg vg_name hdiskY

7. Create new copies:


# mirrorvg vg_name hdiskY

© Copyright IBM Corporation 2009, 2015

Figure 13-3. Procedure 1: Disk mirrored AN14G5.0

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

• The goal and how to do it


The goal of each disk replacement is to remove all logical volumes from a disk.
1. Remove all logical volume copies from the disk. Use either the SMIT fast path smit
unmirrorvg or the unmirrorvg command as shown in the visual. This will unmirror each
logical volume that is mirrored on the disk.
If you have more unmirrored logical volumes on the disk, you must either move them to
another disk (migratepv), or remove them if the disk cannot be accessed (rmlv).
2. If the disk is empty, remove the disk from the volume group. Use SMIT fast path smit
reducevg or the reducevg command.
3. After the disk is removed from the volume group, you can remove it from the ODM. Use the
rmdev command as shown in the visual.
4. Use a hot-swap procedure to replace the failed or failing disk. (In older machines, disk
replacement would effectively require the system to be shut down for the procedure). Run
cfgmgr to discover and configure the new disk.
5. Add the new disk to the volume group. Use either the SMIT fast path
smit extendvg or the extendvg command.
6. Finally, create new copies for each logical volume on the new disk. Use either the SMIT fast
path smit mirrorvg or the mirrorvg command. If synchronization was suppressed
during mirroring, then remember to eventually synchronize the volume group (or each
logical volume), by using the syncvg command.

13-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain Procedure 1.
Details —
Additional information — When you read the student notes, you might think the following:
• Removing a logical volume from a disk that fails is not possible! The important thing is: it is
possible, but it requires the disk to be either in a missing or removed state. If the disk is active,
the LVM does not allow you to unmount a file system or remove a logical volume from the failing
disk.
• Now the problem is: how do you bring a disk into the missing or removed state? The answer is
that you must do a reducevg -d or to force a new varyonvg, either in a normal or a forced
mode. Because you cannot do a varyoffvg when file systems are mounted (and you cannot
unmount them from the failing disk), the only way to recover from this bad situation is to reboot
your system. Reboot might cause other problems if the failing disk is in rootvg and the quorum
is not disabled in a two-disk volume group.
There is an alternative procedure to the one taught in this visual. The alternative procedure uses
the replacepv command. This procedure is described in the AIX Operating System and Device
Management manual. That manual explains that the replacepv-based procedures can be used
only under tightly defined circumstances. If these prerequisites cannot be met, they say to use the
procedure taught in this visual. The prerequisites are:
• The volume group that is containing the failed PV is not rootvg.
• The replacement PV can be added to the volume group that is containing the failed PV (this
might not be possible depending on the PV size and volume group characteristics, such as
MAX PPs per PV).
• The replacement PV must be able to be configured into the system at the same time as the
failing PV.
• The replacement PV’s name can differ from the failed PV’s name.
• The size of the replacement PV must be at least the size of the failed PV.
• The volume group that is containing the failed PV must not be a snapshot volume group or have
a snapshot volume group.
Transition statement — Let us describe Procedure 2.

© 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

Procedure 2: Disk still working


IBM Power Systems

1. Connect new disk to system.

Volume group
2. Add new disk to volume group:
# extendvg vg_name hdiskY

3. Migrate old disk to new disk: (*) hdiskY


# migratepv hdiskX hdiskY

4. Remove old disk from volume group:


# reducevg vg_name hdiskX

5. Remove old disk from ODM:


# rmdev -l hdiskX -d

(*) : Is the disk in rootvg?


See next visual for further considerations!
© Copyright IBM Corporation 2009, 2015

Figure 13-4. Procedure 2: Disk still working AN14G5.0

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.

13-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

13-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Procedure 2: Special steps for rootvg


IBM Power Systems

rootvg 1…
hdiskX 2…
hdiskY

3. Disk contains hd5?


# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
1. Connect new disk to system. # chpv -c hdiskX
# bootlist -m normal hdiskY
2. Add new disk to volume
group.
Migrate old disk to new disk:
3. # migratepv hdiskX hdiskY

4. Remove old disk from


volume group. 4…

5. Remove old disk from ODM. 5…


© Copyright IBM Corporation 2009, 2015

Figure 13-5. Procedure 2: Special steps for rootvg AN14G5.0

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

13-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the special considerations for rootvg.
Details — Describe as provided in the student material.
Additional information —
Transition statement — Let us describe Procedure 3.

© 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

Procedure 3: Disk in missing or removed state


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 13-6. Procedure 3: Disk in missing or removed state AN14G5.0

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.

13-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Procedure steps


If the failing disk is in a missing or removed state, start the procedure:
1.Identify all logical volumes and file systems on the failing disk. Use commands like lspv, lslv,
or lsfs to provide this information. These commands will work on a failing disk.
2.If there are mounted file systems on logical volumes on the failing disk, you must unmount
them. Use the umount command.
3.Remove all file systems from the failing disk by using smit rmfs or the rmfs command. If you
remove a file system, the corresponding logical volume and stanza in /etc/filesystems is
removed as well.
4.Remove the remaining logical volumes (the logical volumes that are not associated with a file
system) from the failing disk by using smit rmlv or the rmlv command.
5.Remove the disk from the volume group, by using the SMIT fast path
smit reducevg or the reducevg command.
6.Remove the disk from the ODM and from the system by using the rmdev command.
7.Add the new disk to the system and extend your volume group. Use the SMIT fast path smit
extendvg or the extendvg command.
8.Re-create all logical volumes and file systems that were removed due to the disk failure. Use
smit mklv, smit crfs, or the commands directly.
9.Due to the total disk failure, you lost all data on the disk. This data must be restored, either by
the restore command or any other tool you use to restore data (for example, Tivoli Storage
Manager) from a previous backup.

© 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.

13-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 13.2.Failed disks and quorum

Instructor topic introduction


What students will do — Learn how to manage quorum issues and manage disk states after disk
recovery.
How students will do it — Through lecture and exercise.
What students will learn — When to use quorum enforcement and how to manage situation
where a VG is force online.
How this will help students on their job — The students will be better prepared to deal with disk
outages.

© 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

hdisk2 Stale partition

After repair of hdisk2:


• varyonvg VGName (calls syncvg -v VGName).
• Only stale partitions are updated.

© Copyright IBM Corporation 2009, 2015

Figure 13-7. Stale partitions AN14G5.0

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.

13-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain what stale partitions are.
Details — Explain by using the information in the student notes. The prerequisite course discusses
stale partitions as a stage in the creation of mirroring. Remind them that this can also happen as a
result of disk failure. Once a disk is recovered, the syncvg command needs to be run to
resynchronize the copies.
Additional information — Explain that using varyonvg is better than using syncvg directly. The
varyonvg command works if the VG is already varied on and if the VG is the rootvg.
Transition statement — Let us look at how the requirement that we maintain multiple valid copies
of the VGDA is implemented and how it is affected by the loss of a physical volume.

© 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

Two-disk volume group

Loss of PV1: Only 33% VGDAs available


(No quorum)

Loss of PV2: 66% of VGDAs available


PV1 PV2 (Quorum)

Three-disk volume group


Loss of 1 PV: 66% of VGDAs still available
(Quorum)

PV1 PV2 PV3

© Copyright IBM Corporation 2009, 2015

Figure 13-8. VGDA count AN14G5.0

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.

13-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how VGDAs are stored on disks in a volume group and how these VGDAs
are involved in determining whether quorum exists.
Details — Use the information in the student material to guide your presentation.
Additional information — None.
Transition statement — Let us discuss what happens if a quorum is not available.

© 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

Quorum not available


IBM Power Systems

datavg

Two VGDAs One VGDA

hdisk1 hdisk2

If hdisk1 fails, datavg has no quorum!

# varyonvg datavg Closed during operation:


• No more access to LVs
• LVM_SA_QUORCLOSE
FAILS!!! in error log
© Copyright IBM Corporation 2009, 2015

Figure 13-9. Quorum not available AN14G5.0

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

13-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

13-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Nonquorum volume groups


IBM Power Systems

• With single mirroring, always disable the quorum:


– chvg -Qn datavg

• Additional considerations for rootvg:


– chvg -Qn rootvg
– bosboot -ad /dev/hdiskX

• Turning off the quorum checking:


– Requires 100% VGDAs for normal varyonvg
– Allows volume group to stay active if quorum is lost

© Copyright IBM Corporation 2009, 2015

Figure 13-10. Nonquorum volume groups AN14G5.0

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

• Recommendations for rootvg


When turning off the quorum checking for rootvg, you must do a bosboot (or a savebase), to
reflect the change in the ODM in the boot logical volume. In versions of AIX before AIX 6, you
need to then reboot the machine to have the change take effect. It occurs at varyonvg.
• Varying on a nonquorum volume group
It is important that you know that turning off the quorum checking does not allow a varyonvg
without a quorum. It just prevents the closing of an active volume group when losing its quorum.

13-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe nonquorum volume groups.
Details — Cover the material in the student notes.
Additional information — None.
Transition statement — Let us look at the different states of the physical volumes when dealing
with disk failure recovery.

© 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

Physical volume states


IBM Power Systems

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

Figure 13-11. Physical volume states AN14G5.0

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.

13-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Recovery after repair


If you are able to repair the disk (for example, after a power failure), running a varyonvg alone
does not bring the disk back into the active state. It maintains the removed state.
At this stage, you must announce the fact that the failure is over by using the following
command:
# chpv -va hdiskX
This defines the disk hdiskX as active.
You must do a varyonvg VGName afterwards to synchronize any stale partitions.
• The chpv -r command
The opposite of chpv -va is chpv -vr that brings the disk into the removed state. This works
only when all logical volumes are closed on the disk that is defined as removed. Additionally,
chpv -vr does not work when the quorum will be lost in the volume group after removing the
disk.

© 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.

13-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. Although everything seems to be working fine, you detect


error log entries for disk hdisk0 in your rootvg. The disk is
not mirrored to another disk. You decide to replace this disk.
Which procedure would you use to migrate this disk?

2. You detect an unrecoverable disk failure in volume group


datavg. This volume group consists of two disks that are
completely mirrored. Because of the disk failure, you are not
able to vary on datavg. How do you recover from this
situation?

© Copyright IBM Corporation 2009, 2015

Figure 13-12. Checkpoint AN14G5.0

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

1. Although everything seems to be working fine, you detect


error log entries for disk hdisk0 in your rootvg. The disk is
not mirrored to another disk. You decide to replace this disk.
Which procedure would you use to migrate this disk?
The answer is procedure 2: Disk still working. There are
some additional steps necessary for hd5 and the primary
dump device hd6. You detect an unrecoverable disk failure
in volume group datavg.
2. You detect an unrecoverable disk failure in volume group
datavg. This volume group consists of two disks that are
completely mirrored. Because of the disk failure, you are not
able to vary on datavg. How do you recover from this
situation?
The answer is forced varyon: varyonvg -f datavg. Use
Procedure 1: Disk mirrored.
© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Now, let us do an exercise.

13-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

Disk management procedures


• Disk replacement
• (optional) Export and import a volume
group and working with import messages
• (optional) Quorum issues

© Copyright IBM Corporation 2009, 2015

Figure 13-13. Exercise AN14G5.0

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.

13-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Replace a disk under various circumstances
• Manage volume group quorum issues

© Copyright IBM Corporation 2009, 2015

Figure 13-14. Unit summary AN14G5.0

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.

13-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 14. Backup and restore

Estimated time
01:30

What this unit is about


This unit covers how to back up and restore volume groups and file systems
by using the facilities that are built into the AIX operating system.

What you should be able to do


After completing this unit, you should be able to:
• Use AIX file system backup commands: backup and restore
• Use JFS2 snapshots to back up and restore file system data
• Back up and restore volume groups (both rootvg and user volume
groups)

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Use AIX file system backup commands: backup and
restore
• Use JFS2 snapshots to back up and restore file system data
• Back up and restore volume groups (both rootvg and user
volume groups)

© Copyright IBM Corporation 2009, 2015

Figure 14-1. Unit objectives AN14G5.0

Notes:

14-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of the unit.
Details —
Additional information —
Transition statement — Let us start by providing an overview of backup technologies.

© 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

Backup and restore technologies


IBM Power Systems

• AIX provided backup and restore facilities:


– backup and restore commands
– JFS2 snapshots
– mksysb backup and restore of the rootvg
– savevg backup and restore of user volume groups
– Traditional UNIX commands, for example:
• tar, cpio, pax, dd, compress, zcat, gzip, and more

• SAN level snapshots

• Enterprise storage solutions such as Tivoli Storage Manager


(TSM)

© Copyright IBM Corporation 2009, 2015

Figure 14-2. Backup and restore technologies AN14G5.0

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.

14-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

14-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 14.1.File and file system backups

Instructor topic introduction


What students will do — Learn how to back up files and file systems.
How students will do it — Classroom discussion and exercises.
What students will learn — How to use the AIX backup and restore commands.
How this will help students on their job — They will be able to back up file systems on a more
frequent basis then they would run system 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

After completing this topic, you should be able to:


• Create a file system backup by name
• Create a file system backup by i-node
• Restore from a file system backup
• Identify standard UNIX utilities, supported by AIX, for
backing up data

© Copyright IBM Corporation 2009, 2015

Figure 14-3. Topic 1 objectives AN14G5.0

Notes:

14-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of this topic.
Details —
Additional information —
Transition statement — Let us first go over using the backup command to back up a collection of
individual files.

© 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

Backup by file name and restore


IBM Power Systems

• File names are read from standard input.


# cat listfile
/home/aix/file1
/home/aix/file2
/home/aix/file3 Absolute paths
# backup -iqvf /dev/rmt0 < listfile

# find /home/aix | backup -iqvf /dev/rmt0


Relative paths

# cd /home/aix
# find . | backup -iqvf /backup/aix.backup
List files

# restore -Tvf /backup/aix.backup


Extract
# restore -xvf /backup/aix.backup (restore) files

Extract
# restore -xvf /backup/aix.backup ./file1 individual file

© Copyright IBM Corporation 2009, 2015

Figure 14-4. Backup by file name and restore AN14G5.0

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!

14-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Popular backup flags


-q: Media is ready.
-i: Specifies that files be read from standard input and archived by file name.
-v: Verbose - display file names during backup.
-f: Device.
• Popular restore flags
-T: List files.
-x: Extract files.
For further information, see the man pages.

© 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.

14-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Backup and restore by i-node


IBM Power Systems

• Only supported if file systems are unmounted!


# backup -u -0 -f /tmp/databkup_21May_level0 /data

# backup -u -1 -f /tmp/databkup_21May_level1 /data Full


backup

# 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

# restore -rqvf /tmp/databkup_21May_level0

# restore -rqvf /tmp/databkup_21May_level1

Must restore first to the last


level 0 then followed by each
incremental…

© Copyright IBM Corporation 2009, 2015

Figure 14-5. Backup and restore by i-node AN14G5.0

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.

• Popular backup by i-node flags


-u: Update /etc/dumpdates will backup transaction history.
-0-9: Backup level, 0 is full, 1…9 represents incremental change since level n-1.
-f: Device.
• Popular restore by i-node flags
-r: Restore files.

© 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

For further information, see the man pages.


When restoring file system archives, the restore command creates and uses a file that is named
restoresymtable. This file is created in the current directory. The file is necessary for the restore
command to do incremental file system restores. Do not remove the restoresymtable file if you
perform incremental file system backups and restores.

14-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to back up and restore by i-node.
Details — Go through the examples in the visual. Ensure that students are fully aware of
/etc/dumpdates and when restoring increments. It must be done in order!
Additional information — In reality, incremental backups are performed by storage solutions such
as TSM – not by using backup by i-node!
Transition statement — Let us next look at a special JFS2 capability to take a snapshot of a file
system.

© 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

14-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 14.2.Using JFS2 snapshots

Instructor topic introduction


What students will do — Learn how to enable, create and use JFS2 snapshots.
How students will do it — Discussion and exercises.
What students will learn — How to create snapshots and use them to recover either individual
files or entire file systems.
How this will help students on their job — JFS2 file system is a fairly low overhead method to
capture a consistent state of a file system at a point in time.

© 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

After completing this topic, you should be able to:


• Create either an internal or external JFS2 snapshot
• List existing JFS2 snapshots
• Recover lost or corrupted files from a JFS2 snapshot
• Remove a JFS2 snapshot
• Increase the size of an external JFS2 snapshot

© Copyright IBM Corporation 2009, 2015

Figure 14-6. Topic 2 objectives AN14G5.0

Notes:

14-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of the topic.
Details —
Additional information —
Transition statement — Let us start with a definition of a JFS2 snapshot and why we would use it.

© 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

• A point-in-time image of a JFS2 file system:


– Source file system is called the snapped file system (snappedFS).
– Snapshot creation is quick and requires little space.
– It can have multiple snapshots for a single snappedFS, each taken at a
different point in time.

• A snapshot image of a JFS2 file system can be used to:


– Restore files from a known point in time.
– Access files or directories as they were at the time of the snapshot.
– Back up a mounted snapshot to tape, DVD, or a remote server.

© Copyright IBM Corporation 2009, 2015

Figure 14-7. JFS2 snapshot (1 of 2) AN14G5.0

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.

14-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — To describe the JFS2 snapshot function.
Details —
Additional information —
Transition statement — Let us see how to create a JFS2 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

• Snapshot stays stable while snappedFS is changing.


• Using snapshot reduces application downtime:
– Automatically freezes I/O while snapshot is created.
– If intolerant of fuzzy backups, briefly quiesce the application.
• A snapshot typically needs 2% - 6% of snappedFS space
requirements. There are two options:
– Separate logical volume (ppsize unit of allocation).
– Allocate space out of snappedFS (called an internal snapshot).
• At snapshot creation, only structure information is included.
• When a write or delete occurs in the snappedFS, the affected
blocks are copied into existing snapshots.

© Copyright IBM Corporation 2009, 2015

Figure 14-8. JFS2 snapshot (2 of 2) AN14G5.0

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.

14-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Space requirements for a snapshot


Typically, a snapshot needs 2-6% of the space that is needed for the snappedFS. In the case of
a highly active snappedFS, this estimate might rise to 15%. This space is needed if a block in
the snappedFS is either written to or deleted. If this happens, the block is copied to the
snapshot. Therefore, any blocks associated with new files written after the snapshot was taken
will not be copied to the snapshot, as they were not current at the time of the snapshot and not
relevant.
If the snapshot runs out of space, all snapshots that are associated with the snappedFS is
discarded and an entry is made in the AIX error log. If a snapshot file system fills up before a
backup is taken, the backup is not complete. And it has to be rerun from a new snapshot, with
possibly a larger size, to allow for changes in the snappedFS.

© 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.

14-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Creating snapshots (external)


IBM Power Systems

# snapshot -o snapfrom=snappedFS -o size=<Size>


# snapshot -o snapfrom=/home/myfs -o size=16M
-OR-

# 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] #

Creating a snapshot as part of the mount option:


# mount –o snapto=/dev/mysnaplv /home/myfs
© Copyright IBM Corporation 2009, 2015

Figure 14-9. Creating snapshots (external) AN14G5.0

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.

14-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to create a JFS2 snapshot.
Details —
Additional information —
Transition statement — Let us look at how you create a JFS2 internal snapshot.

© 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

Creating snapshots (internal)


IBM Power Systems

# snapshot -o snapfrom=snappedFS –n snapshotName


# snapshot -o snapfrom=/home/myfs –n mysnap
-OR-
# smit crintsnapj2
Create Snapshot for an Enhanced Journaled File System in File
System
Entry Fields]
File System Name /home/myfs
* Snapshot Name [mysnap]
Internal snapshot attribute must be set to yes on creation of the file
system:
# smit crfs
(dialog panel: Allow Internal Snapshots [yes])
-or-
# crfs –a isnapshot=yes

© Copyright IBM Corporation 2009, 2015

Figure 14-10. Creating snapshots (internal) AN14G5.0

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

14-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

14-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Listing snapshots
IBM Power Systems

# smit lssnap (and select file system from list)


-OR-
# snapshot -q /home/myfs2
Snapshots for /home/myfs2
Current Name Time
mysnap Tue 19 May 08:44:33 2015
mysnap2 Thu 21 May 09:33:33 2015
* mysnap3 Sun 24 May 14:03:18 2015

# snapshot -q /home/myfs

Snapshots for /home/myfs


Current Location 512-blocks Free Time
* /dev/fslv06 262144 261376 Wed May 6 18:15:11 2015

© Copyright IBM Corporation 2009, 2015

Figure 14-11. Listing snapshots AN14G5.0

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.

14-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to display snapshot information.
Details —
Additional information —
Transition statement — Let us look at how we can use an existing snapshot to recover files that
were inadvertently deleted or incorrectly modified.

© 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

Using a JFS2 snapshot to recover


IBM Power Systems

• Recover entire file system to point of snapshot creation:


# umount /home/myfs
# rollback /home/myfs /dev/mysnaplv (for external)
# rollback –n mysnap /home/myfs (for internal)

• Recover individual files from JFS2 snapshot image:


– Mount the snapshot (if external):
# mount -v jfs2 -o snapshot /dev/mysnaplv /mntsnapshot
– Change to the directory that contains the snapshot:
# cd /mntsnapshot
# cd /home/mfs/.snapshot/mysnap (if internal)
– Copy the accurate file to overwrite the corrupted one:
# cp myfile /home/myfs (Copies only the file named myfile)

© Copyright IBM Corporation 2009, 2015

Figure 14-12. Using a JFS2 snapshot to recover AN14G5.0

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.

14-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to use a JFS2 snapshot to recover data.
Details —
Additional information —
Transition statement — While using a snapshot directly to recover data is useful, it does not
address a situation in which the disk that is holding the snappedFS is lost, much less a site disaster
recovery situation. Let us look at how you can use a snapshot as a stable source for a backup to
media or to a network server.

© 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

Using a JFS2 snapshot to backup


IBM Power Systems

• The JFS2 snapshot can be a stable source for backup to


media.

• Mount the external snapshot and use relative path backup:


# mount -v jfs2 -o snapshot /dev/mysnaplv /mntsnapshot
# cd /mntsnapshot
# find . | backup –i –f /servermnt/backup52

• cd to internal snapshot and use relative path backup:


# cd /home/myfs/.snapshot/mysnap
# find . | backup –i –f /servermnt/backup52

• To create snapshot and backup in one operation:


# backsnap -m MountPoint -s Size BackupOptions snappedFS
# backsnap –n snapshotname BackupOptions snappedFS
# backsnap -m /mntsnapshot -s size=16M -i -f/dev/rmt0 \
/home/myfs
© Copyright IBM Corporation 2009, 2015

Figure 14-13. Using a JFS2 snapshot to backup AN14G5.0

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.

14-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to use an external snapshot with a backup utility.
Details —
Additional information —
Transition statement — The last topic that we need to discuss is the backup of entire volume
groups, especially the rootvg.

© 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

14-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 14.3.Volume group backups

Instructor topic introduction


What students will do — Learn how to backup the rootvg or user volume groups.
How students will do it — Discussion and exercises.
What students will learn — How to use the mksysb command to create a system image back, how
to recover by using a mksysb image, how to create a user volume group backup, and how to restore
from a user volume group backup.
How this will help students on their job — Backing up the system is essential to any information
system operation.

© 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

After completing this topic, you should be able to:


• Create a system backup
• Explain the role of customizing the bosint.data and the
image.data files
• Recover from a system backup
• Create a user volume group backup
• Recover from a user volume group backup

© Copyright IBM Corporation 2009, 2015

Figure 14-14. Topic 3 objectives AN14G5.0

Notes:

14-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the objectives of the topic.
Details —
Additional information —
Transition statement — Let us start with defining what a system image is.

© 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

System image backup


IBM Power Systems

• Backs up only rootvg using the mksysb command.


• Content of unmounted file systems is not backed up.
• If device selected is tape, bootable tape is created in backup
format.
• Can be completed over a network to a NIM server.
• Provides facilities for a non-interactive installation.
• Saves system-created paging space definitions.
• Saves LV policies and file system attributes.
• There should be minimal user and application activity.

© Copyright IBM Corporation 2009, 2015

Figure 14-15. System image backup AN14G5.0

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

14-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

14-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Creating a mksysb image


IBM Power Systems

• smit mksysb /usr/bin/mksysb -i /backups/my_mksysb


Back Up This System to Tape/File or UDFS capable media

* Backup DEVICE or FILE [/backups/my_mksysb] +/


Create MAP files? no +
Create backup using snapshots? no +
EXCLUDE files? no +
Exclude WPAR file systems? no Back up to tape, for +
example /dev/rmt0
Location of File System Exclusion List [] /
is also popular.
List files as they are backed up? no +
Verify readability if tape device? no +
Generate new /image.data file? yes +
EXPAND /tmp if needed? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
Number of BLOCKS to write in a single output [] #
(Leave blank to use a system default)
Location of existing mksysb image [] /
File system to use for temporary work space [] /
(If blank, /tmp will be used.)
Back up encrypted files? yes +
Back up DMAPI filesystem files? yes +

• SMIT also provides facilities to do a system backup to CD and


DVD, see smit sysbackup.
© Copyright IBM Corporation 2009, 2015

Figure 14-16. Creating a mksysb image AN14G5.0

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

• Verify readability if tape device?


Verifies the file header of each file on the backup tape, and reports any read errors as they
occur.
• Generate new /image.data file?
If you have already generated a new /image.data file and don't want a new file to be created,
change the default to no. The default value is yes (-i flag) on the command line.
• EXPAND /tmp if needed?
Choose yes if the /tmp file system can automatically expand if necessary during the backup.
• Disable software packing of backup?
The default is no, which means the files are packed before they are archived to tape. Files that
cannot be compressed are placed in the archive as is. Restoring the archive automatically
unpacks the files that are packed by this option. If the tape drive you are using provides packing
or compression, set this field to yes.
• Backup extended attributes?
By default, the mksysb, savevg, and backup utilities save any extended attributes. If you plan to
restore to a back-level system that does not understand the format with extended attributes,
then this option allows you to override that default behavior.
• Number of BLOCKS to write in a single output
This specifies the number of 512 bytes to write in a single output operation, referred to as the
block size. If a number is not specified, the backup command uses a default value appropriate
for the physical device selected. Larger values result in larger physical transfers to tape
devices. The block size must be a multiple of the physical block size of the device that is used.
• Location of existing mksysb image
Specifies the full path name to the location of a previously created mksysb image that can be
used to create a bootable tape backup.
• File system to be used for temporary work space
Specifies the full path name to the location of a directory or file system to be used as temporary
space to create a bootable tape backup. The file system that is used must have at least 100 MB
of available free disk space for the creation of the bootable image. If this field is left blank, the
/tmp file system is used.
• Back up encrypted files?
Specifies whether encrypted files should be backed up. AIX 6.1 introduces the ability to encrypt
files on a per file basis without the need of third-party tools.
• Back up DMAPI file system files?
Specifies if DMAPI file system files are to be backed up.

14-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to do a mksysb of the system.
Details — Explain how to do a mksysb of the system, reviewing each of the main options in turn.
Point out that the mksysb backup file as shown in the example should not be in rootvg. The best
method to use is NFS over the network to a NIM server.
Additional information —
Transition statement — Let us explain more about the image.data file.

© 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

• The image.data file contains information describing the image that is


installed during the BOS installation process. This includes:
– Sizes, names, maps, and mount points of logical volumes and file systems in
the root volume group
• It is a large file that is arranged in stanza format
– Is not recommended that the user modify the file, apart from the shrink field
• New image.data can be created during a mksysb operation or by
calling the mkszfile command.
image_data:
IMAGE_TYPE = bff
DATE_TIME = Thu Sep 25 20:01:58 CEDT 2014
UNAME_INFO = AIX sys304_p1 1 7 00F606034C00
LICENSE_INFO =
PRODUCT_TAPE = no
OSLEVEL = 7.1.3.15 The SHRINK field
OSLEVEL_R = 7100-03 can be set to yes.
CPU_ID = 00F606034C00
LPAR_ID = 2

logical_volume_policy:
SHRINK = no
EXACT_FIT = no

[ . . . ]

© Copyright IBM Corporation 2009, 2015

Figure 14-17. image.data file AN14G5.0

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

14-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

14-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

© Copyright IBM Corporation 2009, 2015

Figure 14-18. bosinst.data file AN14G5.0

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.

14-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the bosinsta.data file.
Details — Present the information in the visual and notes.
Focus on the key options that are highlighted in the visual (in blue).
Additional information —
Transition statement — Now let us see the format of a mksysb tape.

© 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

mksysb tape image format


IBM Power Systems

Blocksize = Blocksize = Blocksize = Tape drive


512 512 512 blocksize

BOS boot mkinsttape dummy rootvg


image image backup image
.toc
1st Section 2nd Section 3rd Section 4th Section
0 1 2 3

Kernel ./image.data Dummy TOC Backup


device drivers ./bosinst.data by name
./tapeblksz

• To list files in the backup image on a mksysb:


# lsmksysb –f /dev/rmt0
• To restore individual files from the mksysb:
# restorevgfiles –f /dev/rmt0 ./etc/inittab

© Copyright IBM Corporation 2009, 2015

Figure 14-19. mksysb tape image format AN14G5.0

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.

14-54 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • rootvg backup image


The rootvg backup image contains all the data from the backup. This data is saved by using the
backup command.
• Listing and extracting files in a tape mksysb image
The easiest way to list files or to restore individual files from any media (tape or optical) is to use
the generic list and restore commands:
- # lsmksysb -f <device>, where <device> might be /dev/rmt0 or /dev/cd0.
- # restorevgfiles -f <device> <file name>,
• <device> might be /dev/rmt0 or /dev/cd0.
• <file> can be one of more files such as /etc/inittab
For tape specific restores, a combination of tape control and AIX file system restore commands
can be used:
- # tctl -f /dev/rmt0 rewind
- # tctl -f /dev/rmt0.1 fsf 3
- # restore -Tvf /dev/rmt0
OR
- # restore -Tv –s4 -f /dev/rmt0
The tctl command can be used to rewind and fast forward the tape to the start of the fourth
section (third tape mark). Then, the restore command, as shown in the example can be
used to extract (-x) or list (-T) files on the tape. Alternatively, if the tape is already rewound,
then the restore command can be used directly to extract files from the fourth section
(-s4).
For further information regarding tape manipulation, see the tctl man page.

© 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.

14-56 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Restoring a mksysb from tape device (1 of 2)


IBM Power Systems

• 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

1 Start Install Now With Default Settings


2 Change/Show Installation Settings and Install
>> 3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)

1 Access A Root Volume Group


2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
>> 6 Install from a System Backup

Tape Drive Path Name


>> 1 tape/scsi/4mm/2GB /dev/rmt0

© Copyright IBM Corporation 2009, 2015

Figure 14-20. Restoring a mksysb from tape device (1 of 2) AN14G5.0

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.

14-58 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Restoring a mksysb from tape device (2 of 2)


IBM Power Systems

Welcome to Base Operating System


Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>.
1 Start Install Now With Default Settings
>> 2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)

System Backup Installation and Settings

Type the number of your choice and press Enter.

1 Disk(s) where you want to install hdisk0


Use Maps No
2 Shrink Filesystems No
0 Install with the settings listed above

Installing Base Operating System

Please wait...

Approximate Elapsed time


% tasks complete (in minutes)

3 0 Making logical volumes

© Copyright IBM Corporation 2009, 2015

Figure 14-21. Restoring a mksysb from tape device (2 of 2) AN14G5.0

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

• 3 Shrink File systems


- The option Shrink File systems installs the file systems that use the minimum required
space. The default is no. If yes, all file systems in rootvg are shrunk. So remember after the
restore, evaluate the current file system sizes. You might need to increase their sizes.
• 0 Install with the settings listed above
- At the end, select option 0, which installs by using the settings that are selected. Your
mksysb image is restored.
The system then reboots.
More options that you might see are:
• Import User Volume Groups
- You have the option to have user volume groups that are imported after the installation
completes. The default is yes.
• Recover devices
- BOS installation program attempts to re-create the devices the same way they were on the
machine the mksysb was created on. This is normal procedure for regular mksysb restores
on the same system. However, for cloning (installing the mksysb image on another system),
you might not want these devices configured this way, especially for network configuration.
The default is yes.

14-60 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show the remaining steps to complete the mksysb installation.
Details — Go through the example that is contained in the visual.
Additional information —
Transition statement — Let us look at restoring a mksysb from a NIM server.

© 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

Restoring a mksysb from a NIM server


IBM Power Systems

• Set up the NIM server with:


– mksysb and SPOT resources that are allocated to client machine.
– (optional) bosinst.data allocated to client.
– bosinst operation of type mksysb.
• Attend NIM course for details on NIM server setup.
• Network boot client by using SMS:
– As covered in AIX installation unit.
• If bosinst.data specified PROMPT=no:
– The installation proceeds automatically.
• Otherwise, respond to install utility menus:
– Review of target disks.
– Accept installation details to continue with recovery.

© Copyright IBM Corporation 2009, 2015

Figure 14-22. Restoring a mksysb from a NIM server AN14G5.0

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.

14-62 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to recover by using a mksysb image (NIM).
Details — Explain how to boot the machine from a NIM server. NIM server details are covered in
AN22.
Additional information —
Transition statement — Let us look at how you handle a user volume group.

© 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

Back up and restore a user volume group


IBM Power Systems

• smit savevg or savevg –f /tmp/datavg_svg -i datavg


Back Up a Volume Group to Tape/File or UDFS capable media

* Backup DEVICE or FILE [/tmp/datavg_svg] +/


* VOLUME GROUP to back up [datavg] +
List files as they are backed up? no +
Generate new vg.data file? yes +
. . .

• Before restoring the VG:


– Unmount all file systems that are part of that VG
– Varyoff and export the volume group
• smit restvg or restvg -q –f /tmp/datavg_svg

Remake a Volume Group


* Restore DEVICE or FILE [/tmp/datavg_svg] +/
SHRINK the filesystems? no +
Recreate logical volumes and filesystems only? no +
PHYSICAL VOLUME names [] +
(Leave blank to use the PHYSICAL VOLUMES listed
in the vgname.data file in the backup image)
Use existing MAP files? yes +
Physical partition SIZE in megabytes [] +#
(Leave blank to have the SIZE determined
based on disk size)
. . .

© Copyright IBM Corporation 2009, 2015

Figure 14-23. Back up and restore a user volume group AN14G5.0

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.

14-64 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty The example SMIT dialog panel is not shown in full. The full panel is:

Back Up a Volume Group to Tape/File or UDFS capable media

* Backup DEVICE or FILE [/tmp/datavg_bk_svg] +/


* VOLUME GROUP to back up [datavg] +
List files as they are backed up? no +
Generate new vg.data file? yes +
Create MAP files? no +
Create backup using snapshots? no +
EXCLUDE files? no +
Location of File System Exclusion List [] /
EXPAND /tmp if needed? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
Number of BLOCKS to write in a single output [] #
(Leave blank to use a system default)
Verify readability if tape device? no +
Back up Volume Group information files only? no +
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +

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:

Remake a Volume Group

* Restore DEVICE or FILE [/tmp/datav_bk_svg] +/


SHRINK the filesystems? no +
Recreate logical volumes and filesystems only? no +
PHYSICAL VOLUME names [] +
(Leave blank to use the PHYSICAL VOLUMES listed
in the vgname.data file in the backup image)
Use existing MAP files? yes +
Physical partition SIZE in megabytes [] +#
(Leave blank to have the SIZE determined
based on disk size)
Number of BLOCKS to read in a single input [] #
(Leave blank to use a system default)
Alternate vg.data file [] /
(Leave blank to use vg.data stored in
backup image)Remake a Volume Group

© 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

Standard out from the SMIT screen is shown below:


COMMAND STATUS
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
Will create the Volume Group: datavg
Target Disks: hdisk1
Allocation Policy:
Shrink File systems: no
Preserve Physical Partitions for each Logical Volume: no
datavg
loglv01
fslv00
New volume on /tmp/datavf_svg:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Fri 22 May 20:29:05 2015
Files are backed up by name.
The user is root.
x 11 ./tmp/vgdata/datavg/image.info
x 127 ./tmp/vgdata/vgdata.files598152
x 127 ./tmp/vgdata/vgdata.files
x 2444 ./tmp/vgdata/datavg/file systems
x 2481 ./tmp/vgdata/datavg/datavg.data
x 340 ./tmp/vgdata/datavg/backup.data
x 0 ./data
x 0 ./data/lost+found
x 1024 ./data/file1
x 1024 ./data/file2
x 1024 ./data/file3
The total size is 5530 bytes.
The number of restored files is 11.

14-66 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to create a backup of a non-rootvg VG.
Details — Go through the example in the visual.
Additional information —
Transition statement — Let us review what we have covered with some checkpoint questions.

© 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

1. What is the difference between the following two


commands?
a. find /home/fred | backup -ivf /dev/rmt0
b. cd /home/fred; find . | backup -ivf /dev/rmt0

2. True or False: JFS2 snapshots require little or no quiescing


of application activity to obtain a stable point in time image
of the snapped file system.

© Copyright IBM Corporation 2009, 2015

Figure 14-24. Checkpoint (1 of 2) AN14G5.0

Notes:

14-68 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

Checkpoint solutions (1 of 2)
IBM Power Systems

1. What is the difference between the following two


commands?
a. find /home/fred | backup -ivf /dev/rmt0
b. cd /home/fred find . | backup -ivf /dev/rmt0
The answer is the first command backs up the files by using the full
path names, whereas the second command backs up the file
names by using the relative path names. Therefore, the second
command’s files can be restored into any directory.

2. True or False: JFS2 snapshots require little or no quiescing


of application activity to obtain a stable point in time image
of the snapped file system.
The answer is true.

© Copyright IBM Corporation 2009, 2015

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

3. True or False: smit mksysb backs up all file systems,


provided they are mounted.

© Copyright IBM Corporation 2009, 2015

Figure 14-25. Checkpoint (2 of 2) AN14G5.0

Notes:

14-70 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —

Checkpoint solutions (2 of 2)
IBM Power Systems

3. True or False: smit mksysb backs up all file systems,


provided they are mounted.
The answer is false. The mksysb command backs up only
rootvg file systems. To back up other volume groups, you
must use the savevg command.

© Copyright IBM Corporation 2009, 2015

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

Backup and restore

© Copyright IBM Corporation 2009, 2015

Figure 14-26. Exercise AN14G5.0

Notes:

14-72 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Use AIX file system backup commands: backup and
restore
• Use JFS2 snapshots to back up and restore file system data
• Back up and restore volume groups (both rootvg and user
volume groups)

© Copyright IBM Corporation 2009, 2015

Figure 14-27. Unit summary AN14G5.0

Notes:

14-74 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement — End of unit.

© 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

14-76 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 15. Error monitoring

Estimated time
00:55

What this unit is about


This unit focuses on an overview of the AIX Error Log facility.

What you should be able to do


After completing this unit, you should be able to:
• Analyze error log entries
• Identify and maintain the error logging components
• Describe AIX error log notification methods

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Analyze error log entries
• Identify and maintain the error logging components
• Describe AIX error log notification methods

© Copyright IBM Corporation 2009, 2015

Figure 15-1. Unit objectives AN14G5.0

Notes:

15-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the topics to be covered in this unit.
Details — Use the student material to guide your presentation.
Additional information — None.
Transition statement — Let us discuss error logging first.

© 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

15-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 15.1.Working with the error log

Instructor topic introduction


What students will do — Identify the components of the error logging facility and create error
reports.
How students will do it — Through lecture, lab exercise, and checkpoint questions.
What students will learn — How to create and read an error report, and when and how to maintain
the error log.
How this will help students on their job — Being able to identify possible software and hardware
errors and solutions will enhance students' job performance and productivity.

© 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

Error logging components


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 15-2. Error logging components AN14G5.0

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)

15-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

Transition statement — SMIT can be used to generate an error report.

15-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Generating an error report by using SMIT


IBM Power Systems

# smit errpt
Generate an Error Report

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
CONCURRENT error reporting? no
Type of Report summary +
Error CLASSES (default is all) [] +
Error TYPES (default is all) [] +
Error LABELS (default is all) [] +
Error ID's (default is all) [] +
Resource CLASSES (default is all) []
Resource TYPES (default is all) []
Resource NAMES (default is all) []
SEQUENCE numbers (default is all) []
STARTING time interval []
ENDING time interval []
Show only Duplicated Errors [no]
Consolidate Duplicated Errors [no]
LOGFILE [/var/adm/ras/errlog]
TEMPLATE file [/var/adm/ras/errtmplt]
MESSAGE file []
FILENAME to send report to (default is stdout) []

© Copyright IBM Corporation 2009, 2015

Figure 15-3. Generating an error report using SMIT AN14G5.0

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.

15-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how an error report can be generated through SMIT.
Details —
Additional information — This option allows you to produce a detailed or summary report.
Examples of both will be given.
Mention all the different fields that can be used to generate specific searches and reports.
Note that the report can be sent to a file, which is defined by the last option.
The Show only Duplicated Errors option in the Generate an Error Report screen was
introduced in AIX 5L V5.1. Examples of duplicate errors might include external drive not ready or
Ethernet card unplugged.
Transition statement — Instead of using SMIT, you can also generate a report from the command
line. Let's see how this can be done.

© 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

The errpt command


IBM Power Systems

• 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

© Copyright IBM Corporation 2009, 2015

Figure 15-4. The errpt command AN14G5.0

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

15-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

15-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

A summary report (errpt)


IBM Power Systems

# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION

192AC071 1010130907 T O errdemon ERROR LOGGING TURNED OFF


C6ACA566 1010130807 U S syslog MESSAGE REDIRECTED FROM SYSLOG
A6DF45AA 1010130707 I O RMCdaemon The daemon is started.
2BFA76F6 1010130707 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 1010130707 T O errdemon ERROR LOGGING TURNED ON
192AC071 1010123907 T O errdemon ERROR LOGGING TURNED OFF
AA8AB241 1010120407 T O OPERATOR OPERATOR NOTIFICATION
C6ACA566 1010120007 U S syslog MESSAGE REDIRECTED FROM SYSLOG
2BFA76F6 1010094907 T S SYSPROC SYSTEM SHUTDOWN BY USER
EAA3D429 1010094207 U S LVDD PHYSICAL PARTITION MARKED STALE
EAA3D429 1010094207 U S LVDD PHYSICAL PARTITION MARKED STALE
F7DDA124 1010094207 U H LVDD PHYSICAL VOLUME DECLARED MISSING

Error type:
Error class:
• P: Permanent,
• H: Hardware
Performance, or Pending
• S: Software
• T: Temporary
• O: Operator
• I: Informational
• U: Undetermined
• U: Unknown

© Copyright IBM Corporation 2009, 2015

Figure 15-5. A summary report (errpt)

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.

15-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

A detailed error report (errpt –a)


IBM Power Systems

LABEL: LVM_SA_PVMISS
IDENTIFIER: F7DDA124

Date/Time: Wed Oct 10 09:42:20 CDT 2007


Sequence Number: 113
Machine Id: 00C35BA04C00
Node Id: rt1s3vlp2
Class: H
Type: UNKN
WPAR: Global
Resource Name: LVDD
Resource Class: NONE
Resource Type: NONE
Location:

Description
PHYSICAL VOLUME DECLARED MISSING

Probable Causes
POWER, DRIVE, ADAPTER, OR CABLE FAILURE

Detail Data
MAJOR/MINOR DEVICE NUMBER
8000 0011 0000 0001
SENSE DATA
00C3 5BA0 0000 4C00 0000 0115 7F54 BF78 00C3 5BA0 7FCF 6B93 0000 0000 0000 0000

© Copyright IBM Corporation 2009, 2015

Figure 15-6. A detailed error report (errpt -a) AN14G5.0

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.

15-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the information that is obtained from a detailed report.
Details — Explain by using the information in the student notes.
Additional information — None.
Transition statement — Disk errors are frequently seen in the error log. There are many different
types of disk errors. Let us identify the different types and find out the severity of each.

© 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

Types of disk errors


IBM Power Systems

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

Figure 15-7. Types of disk errors AN14G5.0

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.

15-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • DISK_ERR5 errors


A very infrequent error is DISK_ERR5. It is the catch-all (that is, the problem does not match any
of the above DISK_ERRx symptoms). You need to investigate further by running the diagnostic
programs that can detect and produce more information about the problem.

© 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.

15-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

LVM error log entries


IBM Power Systems

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.

Error classes: H = Hardware Error types: P = Permanent


S = Software T = Temporary

© Copyright IBM Corporation 2009, 2015

Figure 15-8. LVM error log entries AN14G5.0

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.

15-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Maintaining the error log


IBM Power Systems

# smit errdemon
Change / Show Characteristics of the Error Log

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
LOGFILE [/var/adm/ras/errlog]
*Maximum LOGSIZE [1048576] #
Memory Buffer Size [32768] #
...

# smit errclear
Clean the Error Log

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
Remove entries older than this number of days [30] #
Error CLASSES (default is all) [ ] +
Error TYPES (default is all) [ ] +
...
Resource CLASSES (default is all) [ ]
...

==> Use the errlogger command as a reminder <==


© Copyright IBM Corporation 2009, 2015

Figure 15-9. Maintaining the error log AN14G5.0

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

• Using errlogger to create reminders


Follow the suggestion at the bottom of the visual. Whenever an important system event takes
place, for example, the replacement of a disk, log this event by using the errlogger command.
• Full list of characteristics of the error log
The first SMIT screen that is shown in the visual is not the complete. The complete screen is:
LOGFILE [/var/adm/ras/errlog]
* Maximum LOGSIZE [1048576] #
Memory BUFFER SIZE [32768] #
Duplicate Error Detection [true] +
Duplicate Time Interval [10000] #
in milliseconds
Duplicate error maximum [1000] #

15-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce the errdemon and errclear commands.
Details — Explain by using the information in the student notes.
Additional information — The Change / Show Characteristics of the Error Log screen also
contains duplicate error options. If Duplicate Error Detection is set to true, Duplicate Time
Interval in milliseconds is used to set a threshold during which identical error log entries are
removed. The Duplicate error maximum sets the point at which an additional identical error is
considered a new error. For more information, see the AIX Commands Reference entry for
errdemon.
Transition statement — While it is good to know how to examine the AIX error log when you are
having a problem. It is often desirable to have a way to be automatically notified when a serious
problem is logged - in order to proactive in handling the problem.

© 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

15-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 15.2.Error notification

Instructor topic introduction


What students will do — Learn different ways to implement AIX error notification.
How students will do it — Lecture, exercise, and checkpoint questions.
What students will learn — The students will be able to describe different ways to implement error
notification.
How this will help students on their job — By using error notification students will be able to
capture errors and correct system problems faster.

© 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

ODM-based error notification: errnotify


IBM Power Systems

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"

© Copyright IBM Corporation 2009, 2015

Figure 15-10. ODM-based error notification: errnotify AN14G5.0

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.

15-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • List of descriptors


Here is a list of all descriptors for the errnotify object class:
en_alertflg Identifies whether the error is alertable. This descriptor is provided for
use by alert agents with network management applications. The
values are TRUE (alertable) or FALSE (not alertable).
en_class Identifies the class of error log entries to match. Valid values are H
(hardware errors), S (software errors), O (operator messages), and U
(undetermined).
en_crcid Specifies the error identifier that is associated with a particular error.
en_dup Identifies whether the kernel identified the error as a duplicate. TRUE
indicates that it is a duplicate error.
en_err64 Identifies the environment of the error. TRUE indicates that the error is
from a 64-bit environment.
en_label Specifies the label that is associated with a particular error identifier as
defined in the output of errpt -t (show templates).
en_method Specifies a user-programmable action, such as a shell script or a
command string, to be run when an error matching the selection
criteria of this Error Notification object is logged. The error notification
daemon uses the sh -c command to run the notify method.
The following keywords are passed to the method as arguments:
$1 Sequence number from the error log entry
$2 Error ID from the error log entry
$3 Class from the error log entry
$4 Type from the error log entry
$5 Alert flags from the error log entry
$6 Resource name from the error log entry
$7 Resource type from the error log entry
$8 Resource class from the error log entry
$9 Error label from the error log entry
en_name Uniquely identifies the object.
en_persistenceflg Designates whether the Error Notification object should be removed
when the system is restarted. 0 means removed at boot time; 1 means
persists through boot.
en_pid Specifies a process ID for use in identifying the Error Notification
object. Objects that have a PID specified should have the
en_persistenceflg descriptor set to 0.

© 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

15-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the errnotify ODM class.
Details — Explain the example that is shown, not all possible descriptors.
Additional information — Use odmadd and odmdelete to add and delete objects to and from
errnotify.
Transition statement — Some facilities will log to the AIX error log, while others will log to the
traditional UNIX syslog. Let us look at how we might redirect messages between these two
facilities.

© 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

Redirecting messages between syslog and error


log
IBM Power Systems

/etc/syslog.conf:

*.debug errlog Redirect all syslog


messages to error log

# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION


...
C6ACA566 0505071399 U S syslog MESSAGE REDIRECTED FROM SYSLOG
...

errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "errpt -l $1 | tail -1 | logger -t errpt -p
daemon.notice"

© Copyright IBM Corporation 2009, 2015

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).

15-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • The /etc/syslog.conf configuration file


When started, the syslogd reads a configuration file /etc/syslog.conf. Whenever you change
this configuration file, you need to refresh the syslogd subsystem:
# refresh -s syslogd
• Getting subsystems to log to syslog
Some software on the system can automatically log to the syslog facility. Others need to be
configured to log to the syslog facility. Others might not use syslog at all. Read the
documentation (such as the man page) for each subsystem to know how it behaves.
For example, the Internet super daemon (inetd) it needs to be started with a special option (-d)
that specifies that debug information should be generated and sent to the syslog facility.

© 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.

15-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
IBM Power Systems

1. Which command generates error reports? Which flag of this


command is used to generate a detailed error report?

2. Which type of disk error indicates bad blocks?

3. What do the following commands do?


a. errclear
b. errlogger

4. What does the descriptor en_method in errnotify


indicate?

© Copyright IBM Corporation 2009, 2015

Figure 15-12. Checkpoint AN14G5.0

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

1. Which command generates error reports? Which flag of this command


is used to generate a detailed error report?
The answers are errpt and errpt –a.

2. Which type of disk error indicates bad blocks?


The answer is DISK_ERR4.

3. What do the following commands do?


a. errclear
b. errlogger
The answers are errclear clears entries from the error log and
errlogger is used by root to add entries into the error log.

4. What does the descriptor en_method in errnotify indicate?


The answer is it specifies a program or command to be run when an
error matching the selection criteria is logged.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Let us practice working with the AIX Error Log facility with an exercise.

15-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

Error monitoring

Working with the AIX error log

© Copyright IBM Corporation 2009, 2015

Figure 15-13. Exercise AN14G5.0

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.

15-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Analyze error log entries
• Identify and maintain the error logging components
• Describe AIX error log notification methods

© Copyright IBM Corporation 2009, 2015

Figure 15-14. Unit summary AN14G5.0

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.

15-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 16. System initialization - I

Estimated time
01:05

What this unit is about


This unit describes the boot process up to the point of loading the boot logical
volume. It describes how the boot logical volume can be re-created if it is
corrupted.

What you should be able to do


After completing this unit, you should be able to:
• Update the customizable boot lists via System Management Services
• Describe the contents of the boot logical volume
• Recreate the boot logical volume on a system that fails to boot

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Update the customizable boot lists via System Management
Services
• Describe the contents of the boot logical volume
• Recreate the boot logical volume on a system that fails to
boot

© Copyright IBM Corporation 2009, 2015

Figure 16-1. Unit objectives AN14G5.0

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.

16-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor Notes:


Purpose — Present the objectives of this unit.
Details — Describe that boot errors are frequent errors. Fixing these problems requires a good
knowledge of the boot process.
Additional information —
Transition statement — Let us start with an overview about the AIX boot process.

© 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

How does a Power server or LPAR boot?


IBM Power Systems

Possible failures

Check and initialize


Hardware error (only for
the hardware
POST physical server power-on)

Locate boot image Unable to find any boot image


by using the boot list

Load and pass control to Boot image that is corrupted


boot image

Start AIX software


initialization

© Copyright IBM Corporation 2009, 2015

Figure 16-2. How does an AIX system boot? AN14G5.0

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

16-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

16-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 16.1.Unable to find boot image

Instructor topic introduction


What students will do — Learn how to control the boot sequence and how to boot to SMS mode.
How students will do it — Lecture, discussion, review questions, and exercises.
What students will learn — How to boot to SMS mode and fix bootlist problems.
How this will help students on their job — They will be better prepared to deal with problems
booting a system.

© 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

Working with bootlists


IBM Power Systems

• Normal bootlist
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0 blv=hd5 pathid=0
hdisk1 blv=hd5 pathid=0

• Customized service bootlist (numeric 6 key)


# bootlist -m service -o
hdisk0 blv=hd5 pathid=0

• Default bootlist (numeric 5 key)


> Hardcoded in firmware
cd0
hdisk0 blv=hd5
ent0

© Copyright IBM Corporation 2009, 2015

Figure 16-3. Working with bootlists AN14G5.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:

16-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty # bootlist -m service ent0 gateway=192.168.1.1 bserver=192.168.10.3


client=192.168.1.57
Using the service bootlist in this way, you can boot to maintenance or diagnostic using a NIM
server without having to use SMS to specify the network adapter as the boot device.
• Types of bootlists
The normal bootlist is used during a normal boot.
The default bootlist (hardcoded in the firmware) is called when numeric 5 is pressed during the
boot sequence. The default bootlist has the following devices: cd0, hdisk0, ent0.
Most machines, in addition to the default bootlist and the customized normal bootlist, allow for a
customized service bootlist. This is set by using mode service with the bootlist command.
The service bootlist is called when the numeric 6 key is pressed during boot.
For machines that are partitioned into logical partitions, the HMC is used to boot the partitions
and it provides for specifying boot modes, thus eliminating the need to time the pressing of
special keys. Since pressing either numeric 5 or numeric 6 keys causes a service mode boot
and since a service mode boot that uses a boot logical volume results in booting to diagnostics,
these options are referred to in the HMC as booting to diagnostic either with the default bootlist
or the stored (customizable) bootlist.
Here is a list that summarizes the boot modes and the manual keys that are associated with
them:
• Numeric 1: Start an SMS (System Management Services) mode boot.
• Numeric 5: Start a service mode boot that uses the default service bootlist.
The default service bootlist is:
cd0
hdisk0 blv=hd5
ent0
• Numeric 6: Start a service mode boot that uses the customized service bootlist.
You can find variations on the different models of AIX systems. Refer to your specific model at:
http://ibm.com/support/knowledgecenter. Look for your model under Power Systems.

© 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.

16-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

AIX 7: bootlist pathid enhancements


IBM Power Systems

• The bootlist command now allows specification of the


pathid of a device when setting the bootpath:
# bootlist -m normal hdisk0 blv=hd5 pathid=0

• The pathid argument can be repeated for multiple paths in


the desired order:
# bootlist -m normal hdisk0 blv=hd5 pathid=0 pathid=1
or
# bootlist -m normal hdisk0 blv=hd5 pathid=0,1

• The bootlist command now also displays the pathid with


the device:
# bootlist -m normal –o
hdisk0 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=1
© Copyright IBM Corporation 2009, 2015

Figure 16-4. AIX 7: bootlist pathid enhancements AN14G5.0

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.

16-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Starting System Management Services


IBM Power Systems

• During AIX partition activation


• Press numeric 1 or specify SMS on HMC activate

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

1 = SMS Menu 5 = Default Boot List


8 = Open Firmware Prompt 6 = Stored Boot List

Memory Keyboard Network SCSI


...

© Copyright IBM Corporation 2009, 2015

Figure 16-5. Starting System Management Services AN14G5.0

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

• SMS on LPAR systems


- To start SMS by using the Advanced Option for Power On:
Activate the partition by using the SMS boot mode. Do this action by clicking the Advanced
button when activating the partition. In the Boot Mode drop-down list, select SMS. Do not
forget to choose to open a terminal window, if one is not already opened. The partition stops
at the SMS menu.

16-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to start SMS.
Details —
Additional information — The notes describe how to start the SMS profile under POWER 5
systems and later. To start the SMS profile under a POWER4 HMC:
From the Server and Partition: Server Management application, select the profile for the partition
and change the boot mode to SMS. Then, activate the partition by using this profile. Be sure to
check the Open Terminal box when activating.
Transition statement — How do you change the bootlist in SMS?

© 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

Working with bootlists in SMS (1 of 2)


IBM Power Systems

System Management Services


Main Menu Multiboot
1. Select Language
2. Setup Remote IPL 1. Select Install/Boot Device
(Initial Program Load) 2. Configure Boot Device Order
3. Change SCSI Settings 3. Multiboot Startup <OFF>
4. Select Console
5. Select Boot Options ===> 2
===> 5
Select Device Type
Configure Boot Device Order 1. Diskette
1. Select 1st Boot Device 2. Tape
2. Select 2nd Boot Device 3. CD/DVD
3. Select 3rd Boot Device 4. IDE
4. Select 4th Boot Device 5. Hard Drive
5. Select 5th Boot Device 6. Network
6. Display Current Setting 7. None
7. Restore Default Setting 8. List All Devices
===> 1 ===> 8
© Copyright IBM Corporation 2009, 2015

Figure 16-6. Working with bootlists in SMS (1 of 2) AN14G5.0

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>

16-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

16-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Working with bootlists in SMS (2 of 2)


IBM Power Systems

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

Current Boot Sequence


===> 2
1. SAS 73407 MB Harddisk, part=2 (AIX 7.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )
2. None
3. None
4. None

© Copyright IBM Corporation 2009, 2015

Figure 16-7. Working with bootlists in SMS (2 of 2) AN14G5.0

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.

16-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Complete the walk-through of how to change a bootlist in SMS.
Details —
Additional information —
Transition statement — Even if we have a correct bootlist, there can be a problem with the boot
image on a selected device. Let us look at this issue for when the selected device is a rootvg with a
boot logical volume. To fix such a problem, we need to understand how to boot into an AIX
maintenance mode.

© 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

16-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 16.2.Corrupted boot logical volume

Instructor topic introduction


What students will do — The students learn to boot to maintenance mode, access the rootvg, and
repair a corrupted BLV.
How students will do it — Through lecture and exercise.
What students will learn — Students will:
• Learn how to boot a system in maintenance mode
• Learn how to select the correct disk to be accessed
• Learn how to rebuild the BLV.
How this will help students on their job — They learn how to fix situations where the system will
not boot due to a corrupted BLV.

© 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

Boot device alternatives (1 of 2)


IBM Power Systems

• Boot device is either:


– First device that is found with a boot image in the bootlist
– Device that is specified in SMS Select Install/Boot Device

• If the boot device is removable media (CD, DVD, tape):


– Boots to the Install and Maintenance menu

• If the boot device is a network adapter:


– Boot result depends on NIM configuration for client machine:
• nim –o bos_inst Install and Maintenance menu
• nim –o maint_boot Maintenance menu
• nim –o diag Diagnostic menu

© Copyright IBM Corporation 2009, 2015

Figure 16-8. Boot device alternatives (1 of 2) AN14G5.0

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.

16-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

16-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Boot device alternatives (2 of 2)


IBM Power Systems

• If the boot device is a disk:


– Boot depends on use of service mode:
• Normal mode boot - Boot to multiuser
• Service mode boot - Diagnostic menu
• Two types of service mode boots:
– Requesting default service bootlist (key 5)
– Requesting customized service bootlist (key 6)

• HMC advanced boot options support all of the above


– Normal boot
– Diagnostic with default bootlist
– Diagnostic with stored bootlist

© Copyright IBM Corporation 2009, 2015

Figure 16-9. Boot device alternatives (2 of 2) AN14G5.0

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.

16-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Accessing a system that will not boot


IBM Power Systems

HMC
Advance Activate options: Boot the system from
Default bootlist • BOS CD/DVD
• Tape
• Network device (NIM)

Select maintenance mode

Maintenance

1. Access a Root Volume Group


2. Copy a System Dump to Media Perform corrective actions
3. Access Advanced Maintenance
4. Install from a System Recover data
Backup

© Copyright IBM Corporation 2009, 2015

Figure 16-10. Accessing a system that will not boot AN14G5.0

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.

16-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Identify how to access a system that does not boot.
Details — Emphasize that what causes the system to boot into the Installation and Maintenance
menu is the fact that we booted from the installation media. It does not matter if the system is
booted in normal mode (that uses the normal bootlist) or service mode (that uses the default or
customizable service bootlists). It is only important to find bootable installation media (tape,
CD/DVD, or network server) in the bootlist before anything else (such as a BLV or a Diagnostic
CD/DVD). With some SMS facilities, you can specify a particular device to use and bypass the
bootlists entirely.
Additional information —
Transition statement — Let us show the maintenance mode menus that are available.

© 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

Booting in maintenance mode


IBM Power Systems

Welcome to Base Operating System


Define the Installation and Maintenance
System Console
Type the number of your choice and press Enter.
Choice is indicated by >>>.

1 Start Install Now with Default Settings


2 Change/Show Installation Settings and Install
>>> 3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)
5 Select Storage Adapters

>>> Choice [1]: 3

Maintenance

Type the number of your choice and press Enter.

>>> 1 Access a Root Volume Group


2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Erase Disks
5 Configure Network Disks (iSCSI)
6 Select Storage Adapters

>>> Choice [1]: 1

© Copyright IBM Corporation 2009, 2015

Figure 16-11. Booting in maintenance mode AN14G5.0

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

16-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

16-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Working in maintenance mode


IBM Power Systems

Access a Root Volume Group

Type the number for a volume group to display the logical volume information
and press Enter.

1) Volume Group 00c35ba000004c00000001153ce1c4b0 contains these disks:


hdisk1 70006 02-08-00 hdisk0 70006 02-08-00

Choice: 1

Volume Group Information

-----------------------------------------------------------------------------
Volume Group ID 00c35ba000004c00000001153ce1c4b0 includes the following
logical volumes:

hd5 hd6 hd8 hd4 hd2 hd9var


hd3 hd1 hd10opt
-----------------------------------------------------------------------------
Type the number of your choice and press Enter.
1) Access this Volume Group and start a shell
2) Access this Volume Group and start a shell before mounting filesystems
99) Previous Menu
Choice [99]: 1
© Copyright IBM Corporation 2009, 2015

Figure 16-12. Working in maintenance mode AN14G5.0

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

• Access this volume group and start a shell


When you choose this selection, the rootvg is activated (with the varyonvg command), and all
file systems that are belonging to the rootvg are mounted. A shell is started which can be used
to run any system recovery steps.
Typical scenarios where this selection must be chosen are:
- Changing a forgotten root password
- Re-creating the boot logical volume
- Changing a corrupted bootlist
• Access this volume group and start a shell before mounting file systems
When you choose this selection, the rootvg is activated, but the file systems that belong to the
rootvg are not mounted.
A typical scenario where this selection is chosen is when a corrupted file system needs repair by
the fsck command. Repairing a corrupted file system is only possible if the file system is not
mounted.
Another scenario might be a corrupted hd8 transaction log. Any changes that take place in the
superblock or i-nodes are stored in the log logical volume. When these changes are written to
disk, the corresponding transaction logs are removed from the log logical volume.
The logform command reinitializes a corrupted transaction log, which is only possible, when no
file systems are mounted. After initializing the log device, you need to do a file system repair for
all file systems that use this transaction log. You must explicitly specify the file system type: JFS
or JFS2:
# logform -V jfs2 /dev/hd8
# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# exit
Keep in mind that US keyboard layout is used but you can use the retrieve function by using the
commands set -o emacs or set -o vi.

16-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to access the rootvg.
Details —
Additional information — Describe that the logform command can result in data loss.
Transition statement — Let us look at how we can fix a corrupted boot logical volume (BLV).

© 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

How to fix a corrupted BLV


IBM Power Systems

1 Boot to maintenance 2 Select volume group


mode from bootable that contains hd5.
media:
CD/DVD, tape, or NIM

Maintenance

1 Access a Root Volume Group

# bosboot -ad /dev/hdisk0


3 Rebuild
# sync
BLV.
# sync
# reboot

© Copyright IBM Corporation 2009, 2015

Figure 16-13. How to fix a corrupted BLV AN14G5.0

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

16-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

16-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (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?

2. Your machine is booted and at the # prompt.


What is the command that displays the normal bootlist?
How might you change the normal bootlist?

© Copyright IBM Corporation 2009, 2015

Figure 16-14. Checkpoint (1 of 2) AN14G5.0

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.

2. Your machine is booted and at the # prompt.


What is the command that displays the normal bootlist?
How might you change the normal bootlist?
The answers are bootlist –m normal –o, and bootlist –m
normal device1 device2.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Now, let us do some more checkpoint questions.

16-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (2 of 2)
IBM Power Systems

3. How do you boot an AIX machine into maintenance mode?

4. What command is used to build a new boot image and


write it to the boot logical volume?

© Copyright IBM Corporation 2009, 2015

Figure 16-15. Checkpoint (2 of 2) AN14G5.0

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

3. How do you boot an AIX machine into maintenance mode?


The answer is you need to boot from an AIX CD/DVD,
mksysb, or NIM server.

4. What command is used to build a new boot image and


write it to the boot logical volume?
The answer is bosboot -ad /dev/hdiskx.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Now let us do an exercise.

16-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

System initialization - I

• Work with bootlists and identify information on


your system
• Repair a corrupted boot logical volume

© Copyright IBM Corporation 2009, 2015

Figure 16-16. Exercise AN14G5.0

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.

16-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Update the customizable boot lists via System Management
Services
• Describe the contents of the boot logical volume
• Recreate the boot logical volume on a system that fails to
boot

© Copyright IBM Corporation 2009, 2015

Figure 16-17. Unit summary AN14G5.0

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.

16-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 17. System initialization - II

Estimated time
00:45

What this unit is about


This unit describes the final stages of the boot process and outlines how
devices are configured for the system.
Common boot errors are described and how they can be analyzed to fix boot
problems.

What you should be able to do


After completing this unit, you should be able to:
• Identify the steps in system initialization from loading the boot image to
boot completion
• Analyze and solve boot problems

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Identify the steps in system initialization from loading the boot
image to boot completion
• Analyze and solve boot problems

© Copyright IBM Corporation 2009, 2015

Figure 17-1. Unit objectives AN14G5.0

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.

17-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Present the objectives of this unit.
Details — Explain that boot errors are frequent errors. Describe that fixing these problems requires
a good knowledge of the boot process.
Transition statement — Let us start with an overview about the AIX boot process.

© 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

System software initialization overview


IBM Power Systems

Load kernel and pass control

/
Restore RAM file system from
boot image etc dev mnt usr

Start init process Configure base


rc.boot 1 devices
(from RAMFS)

rc.boot 2
Activate rootvg

Configure remaining
Start "real" init process rc.boot 3 devices
(from rootvg)

/etc/inittab
© Copyright IBM Corporation 2009, 2015

Figure 17-2. System software initialization overview AN14G5.0

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.

17-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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).

17-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Contents of the boot logical volume (hd5)


IBM Power Systems

AIX Kernel RAMFS Reduced ODM

© Copyright IBM Corporation 2009, 2015

Figure 17-3. Contents of the boot logical volume (hd5) AN14G5.0

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:

Type of boot Contents of RAM file system


Programs and data necessary to access rootvg and bring
Boot from system hard disk up the rest of AIX. When booted from in service mode, it
will boot a diagnostics facility.

© 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

Type of boot Contents of RAM file system


Boot from the Installation Programs and data necessary to install AIX or perform
CD-ROM software maintenance.
Programs and data necessary to run stand-alone
Boot from Diagnostics CD-ROM
diagnostics.
• Reduced ODM
The boot logical volume contains a reduced copy of the ODM. During the boot process, many
devices are configured before hd4 is available. For these devices, the corresponding ODM files
must be stored in the boot logical volume.

17-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the components of the BLV.
Details — Introduce the different components as described in the student material. Describe that
the AIX kernel from the BLV is used during the boot process.
Additional information — Describe what the term reduced ODM means. Explain that device
support is available only for devices that are marked as base devices in PdDv.
The protofiles (in /usr/lib/boot and /usr/lib/boot/protoext) are used by the bosboot
command to determine which files should be put into the RAMFS image that is included in the boot
image.
Transition statement — Having built some basic concepts about the boot logical volume, let us
look at how it is used to boot AIX.

© Copyright IBM Corp. 2009, 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

Load and run kernel,


Load RAM FS and run RAMFS init
1 from BLV to RAM FS Restore base ODM
cfgmgr –f (base devices):
updates ODM and /dev

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

© Copyright IBM Corporation 2009, 2015

Figure 17-4. rc.boot summary AN14G5.0

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.

17-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • rc.boot phase 1 actions


The init process started from the RAM file system, runs the boot script rc.boot 1. If init fails
for some reason (for example, a bad boot logical volume), c06 is shown on the LED display. The
following steps are run when rc.boot 1 is called:
1.The restbase command is called which copies the ODM from the boot image into the RAM
file system. After this step, an ODM is available in the RAM file system. The LED shows 510
if restbase completes successfully; otherwise LED 548 is shown.
2.When restbase completed successfully, the configuration manager, cfgmgr, is run with the
option -f (first). cfgmgr reads the Config_Rules class and runs all methods that are stored
under phase=1. Phase 1 configuration methods results in the configuration of base devices
into the system, so that the rootvg can be activated in the next rc.boot phase.
3.Base devices are all devices that are necessary to access the rootvg. If the rootvg is stored
on a hdisk0, all devices from the system board to the disk itself must be configured to be
able to access the rootvg.
4.At the end of rc.boot 1, the system determines the last boot device (used to establish the
/dev/ipldevice link) by calling bootinfo -b. The LED shows 511, followed by 553.
• rc.boot phase 2 actions
rc.boot is run for the second time and is passed the parameter 2. The LED shows 551. The
following steps take part in this boot phase:
1.The rootvg is varied on with a special version of the varyonvg command that is designed to
handle rootvg. If ipl_varyon completes successfully, 517 is shown on the LED, otherwise
552, 554 or 556 are shown and the boot process stops.
2.fsck checks the root file system, hd4. The option -f means that the file system is checked
only if it was not unmounted cleanly during the last shutdown. This check improves the boot
performance. If the check fails, LED 555 is shown.
3.Afterward, /dev/hd4 is mounted directly onto the root (/) in the RAM file system. If the mount
fails, for example due to a corrupted JFS log, the LED 557 is shown and the boot process
stops.
4.Next, /dev/hd2 is checked and mounted (again with option -f, it is checked only if the file
system was not unmounted cleanly). If the mount fails, LED 518 is displayed and the boot
stops.
5.Then, the /var file system is checked and mounted. This check is necessary at this stage.
Because the copycore command checks if a memory dump occurred. If a memory dump
exists in a paging space device, it is copied from the dump device, /dev/hd6, to the copy
directory that is by default the directory /var/adm/ras. /var is unmounted afterward. If the
/var mount fails, LED 518 is displayed and the boot stops.
6.The primary paging space /dev/hd6 is made available.

• Special root syntax in RAMFS


Once the disk-based root file system is mounted over the RAMFS, special syntax is used in
rc.boot to access the RAMFS files:

© 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.

• rc.boot phase 3 actions


If rc.boot phase 2 completes as indicated by LED 553, you can assume that rc.boot phase 3
started. At this boot stage, the /etc/init process is started. It reads the /etc/inittab file and
runs the commands line by line. It runs rc.boot for the third time, passing the argument 3 that
indicates the last boot phase.
rc.boot 3 runs the following tasks:
1.The /tmp file system is checked and mounted.

17-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

17-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

The alog command


IBM Power Systems

User Boot Install


NIM
Applications Process Process

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

To view the boot log:

# alog –o –t boot

© Copyright IBM Corporation 2009, 2015

Figure 17-5. The alog command AN14G5.0

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

17-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the function of the alog facility.
Details — The alog is required to be a fixed-size log. The user can configure size through SMIT. A
mechanism must also be provided for viewing the log files. The alog program maintains a header
that is containing the size of the log file, and input and output pointers. However, the log file data
contains only the data piped to the program’s STDIN. The program does not write time stamps to
the log file. In addition, the alog program does not provide concurrency control. Therefore, if
multiple processes try to write to the same log at the same time, the contents of the log file are
unpredictable. The a in alog stands for AIX.
To record the current date and time in a log file that is named /tmp/mylog, enter:
# date | alog -f /tmp/mylog
Additional information — alog -L can be used to see the list of alogs available on the system.
Transition statement — One of the more common boot problems is the failure to mount the file
systems because of corruption. Let us look at how this is fixed.

© 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

Fixing corrupted file systems and logs


IBM Power Systems

• Boot to maintenance mode.


• Access rootvg without mounting file systems.
• Rebuild file system log and run fsck.

# logform -V jfs2 /dev/hd8


# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# fsck -y -V jfs2 /dev/hd11admin

© Copyright IBM Corporation 2009, 2015

Figure 17-6. Fixing corrupted file system logs AN14G5.0

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

17-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty For JFS2:


# logform -V jfs2 /dev/hd8
# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# fsck -y -V jfs2 /dev/hd11admin
exit
The logform command initializes a new JFS transaction log and this might result in loss of data
because JFS transactions might be destroyed. But, at least your machine will boot after the JFS
log has been repaired.
JFS log corruption typically happens when the system crashes or is taken down in a hard
manner by the administrator.
The JFS log recovery that is described does not ensure that disk updates in process are
completed. Determining what was processed and what needs reprocessing is the responsibility
of the applications by using their transaction logs and any checkpoint processing that was
completed.

© 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.

17-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Boot problem management


IBM Power Systems

Symptoms Possible causes User action


or LED code
AA060011 Bad bootlist Boot SMS, update bootlist.
message: Can’t Damaged BLV Boot to maintenance, Access the rootvg.
find OS Image Re-create the BLV:
# bosboot -ad /dev/hdiskx

551, 555, 557 File system or log corrupted Rebuild journal log and fsck the file systems.
rootvg locked (only if 551) Unlock rootvg (chvg –u rootvg)

552, 554, 556 File system superblock Rebuild journal log and fsck the file systems
corrupted Or recover superblock from secondary
Reduced ODM corrupted If that fails, recover from mksysb

553 Corrupt /etc/inittab Access the rootvg. Check /etc/inittab (empty,


/etc/environment missing, or corrupt?). Check /etc/environment

523 - 534 ODM files are missing ODM files are missing or inaccessible.
Restore missing files from a system backup

518, 517 Failed or hung file system Check /etc/filesystem.


mount ( /usr, /var, /tmp) Check network (if remote mount), file systems
(fsck), and hardware.

© Copyright IBM Corporation 2009, 2015

Figure 17-7. Boot problem management AN14G5.0

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

• Boot logical volume or boot record corrupted?


The next thing to try if your machine does not boot, is to check the boot logical volume.
To fix a corrupted boot logical volume, boot in maintenance mode and use the bosboot command:
# bosboot -ad /dev/hdisk0
• 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.
The logform command initializes a new JFS transaction log and this might result in loss of data
because JFS transactions might be destroyed. But, at least your machine will boot after the JFS
log has been repaired. The detailed procedure was covered on the previous visual.
• Superblock corrupted?
Another thing that you can try is to check the superblocks of your rootvg file systems. If you
boot in maintenance mode and you get error messages like Not an AIX file system or Not a
recognized file system type, it is probably due to a corrupted superblock in the file system.
Each file system has two super blocks. Running fsck should automatically recover the primary
superblock by copying from the backup superblock. The following steps are provided in case
you need to do this manually.
For JFS, the primary superblock is in logical block 1 and a copy is in logical block 31. To
manually copy the superblock from block 31 to block 1 for the root file system (in this example),
run the following command:
# dd count=1 bs=4k skip=31 seek=1 if=/dev/hd4 of=/dev/hd4
For JFS2, the locations are different. To manually recover the primary superblock from the
backup superblock for the root file system (in this example), run the following command:
# dd count=1 bs=4k skip=15 seek=8 if=/dev/hd4 of=/dev/hd4
• rootvg locked?
Many LVM commands place a lock into the ODM to prevent other commands from working at
the same time. If a lock remains in the ODM due to a crash of a command, this might lead to a
hanging system.
To unlock the rootvg, boot in maintenance mode and access the rootvg with file systems. Run
the following command to unlock the rootvg:
# chvg -u rootvg
• ODM files are missing?
If you see LED codes in the range 523 - 534, ODM files are missing on your machine. Use a
mksysb tape of the system to restore the missing files.
• Mount of /usr or /var failed?
An LED of 518 indicates that the mount of the /usr or /var file system failed. If /usr is mounted
from a network, check the network connection. If /usr or /var are locally mounted, use fsck to
check the consistency of the file systems. If this does not help, check the hardware by running
diagnostics from the Diagnostics CD.

17-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe some common causes of boot problems.
Details — Describe as explained in the student notes. Describe the meaning of 553 and 557 as
they are part of the exercise.
Additional information —
Transition statement — Let us use some checkpoint questions to review what we covered.

© 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

1. From where is rc.boot 3 run?

2. Your system stops booting with LED 557. What are some
reasons for this problem?

© Copyright IBM Corporation 2009, 2015

Figure 17-8. Checkpoint AN14G5.0

Notes:

17-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 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

1. From where is rc.boot 3 run?


The answer is from the /etc/inittab file in rootvg.

2. Your system stops booting with LED 557. What are some
reasons for this problem?
The answers are corrupted JFS log or damaged file system.

© Copyright IBM Corporation 2009, 2015

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

• Repair a corrupted log logical volume


• (optional) Analyze and fix a phase 3 boot
failure

© Copyright IBM Corporation 2009, 2015

Figure 17-9. Exercise AN14G5.0

Notes:
This exercise can be found in your Student Exercise Guide.

17-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Prepare the students for the exercise.
Details —
Additional information —
Transition statement — Let us summarize.

© 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

Having completed this unit, you should be able to:


• Identify the steps in system initialization from loading the boot
image to boot completion
• Analyze and solve boot problems

© Copyright IBM Corporation 2009, 2015

Figure 17-10. Unit summary AN14G5.0

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.

17-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — Let us continue with the next unit.

© 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

17-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 18. The AIX system dump facility

Estimated time
00:35

What this unit is about


This unit explains how to maintain the AIX system dump facility and how to
obtain a system dump.

What you should be able to do


After completing this unit, you should be able to:
• Explain what is meant by a system dump
• Determine and change the primary and secondary dump devices
• Create a system dump

How you will check your progress


Accountability:
• Checkpoint questions
• Exercise

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

After completing this unit, you should be able to:


• Explain what is meant by a system dump
• Determine and change the primary and secondary dump
devices
• Create a system dump

© Copyright IBM Corporation 2009, 2015

Figure 18-1. Unit objectives AN14G5.0

Notes:

Importance of this unit


If an AIX kernel crashes, routines that are used to create a system dump are started. This dump
can be used to analyze the cause of the system crash.
As an administrator, you need to know what a dump is, how the AIX dump facility is maintained, and
how a dump can be obtained.
You also need to know how to use the snap command to package the dump before sending it to
IBM.

18-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Present the objectives for this unit.
Details — Use the information in the student notes to emphasize the importance of this unit.
Also, be sure to set expectations regarding this unit: The purpose of this unit is to show the students
how to maintain/configure the system dump facility and obtain a system dump. You are not trying to
teach the students anything about analyzing a dump in this unit.
Additional information — None.
Transition statement — Let us start with an overview of the different types of dumps.

© 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

© Copyright IBM Corporation 2009, 2015

Figure 18-2. Types of dumps AN14G5.0

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.

18-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

18-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

When a dump occurs


IBM Power Systems

AIX Kernel CRASH!!!

hd6
/dev/hd6 Primary dump device

Next boot:
Copy dump into...

/var/adm/ras/vmcore.0 Copy directory


© Copyright IBM Corporation 2009, 2015

Figure 18-3. When a dump occurs AN14G5.0

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.

18-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

The sysdumpdev command


IBM Power Systems

# sysdumpdev -l List the current dump


primary /dev/hd6 settings
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
type of dump traditional

# 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

© Copyright IBM Corporation 2009, 2015

Figure 18-4. The sysdumpdev command AN14G5.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

• Flags for sysdumpdev command


Flags for the sysdumpdev command include the following:
-l Lists current values of dump-related settings.
-e Estimates the size of a dump.
-p Specifies primary dump device.
-s Specifies secondary dump device.
-P Makes change of primary or secondary dump device permanent.
-d directory Specifies the directory that the dump is copied to at system boot. If
the copy fails at boot time, the -d flag indicates that the system dump
should be ignored (force copy flag = FALSE).
-D directory Specifies the directory that the dump is copied to at system boot. If
the copy fails at boot time, by using the -D flag allows you to copy the
dump to external media (force copy flag = TRUE).
-K If your machine has a key mode switch, the reset button or the dump
key sequences force a dump with the key in the normal position, or
on a machine without a key mode switch. Note: On a machine
without a key mode switch, a dump cannot be forced with the key
sequence without this value set.
-f { disallow | allow | require } Specifies whether the firmware-assisted full memory system
dump is allowed, required, or not allowed. The -f has the
following variables:
•The disallow variable specifies that the full memory system
dump mode is not allowed (it is the selective memory mode).
•The allow variable specifies that the full memory system
dump mode is allowed but is performed only when operating
system cannot properly handle the dump request.
•The require variable specifies that the full memory system
dump mode is allowed and is always performed.
-t { traditional | fw-assisted } Specifies the type of dump to perform. The -t flag has the
following variables:
•The traditional variable specifies to perform traditional
system dump. In this dump type, the dump data is saved
before system restart.
•The fw-assisted variable specifies to perform
firmware-assisted system dump. In this dump type, the
dump data is saved in parallel with the system reboot.
You can use the firmware-assisted system dump only on PHYP
platforms with various restrictions on memory size. When the
fw-assisted system dump type is not allowed at configuration time, or
is not enforced at dump request time, a traditional system dump is

18-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty performed. In addition, because the scratch area is only reserved at


initialization, a configuration change from traditional system dump to
firmware-assisted system dump is not effective before the system is
rebooted.
-z Writes to standard output the string containing the size of the dump in
bytes and the name of the dump device, if a new dump is present.
• Dump status values
Status values, as reported by sysdumpdev -L, correspond to dump LED codes (listed in full
later) as follows:
0 = 0c0 Dump completed
-1 = 0c8 No primary dump device
-2 = 0c4 Partial dump
-3 = 0c5 Dump failed to start

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

• Display of extra dump information on TTY


During the creation of the system dump, AIX displays additional information on the console TTY
about the progress of the system dump, as illustrated in the following sample output:
# sysdumpstart -p
Preparing for AIX System Dump . . .
Dump Started .. Please wait for completion message
AIX Dump .. 23330816 bytes written - time elapsed is 47 secs
Dump Complete .. type=4, status=0x0, dump size:23356416 bytes
Rebooting . . .
• Verbose flag for sysdumpdev
Following a system crash, there exist scenarios where a system dump might crash or fail
without 1 byte of data that is written out to the dump device, for example, power off or disk
errors. For cases where a failed dump does not include the dump minimal table, it is useful to
save some trace back information in the NVRAM. Starting with AIX 5L V5.3, the dump
procedure is enhanced to use the NVRAM to store minimal dump information. In the case
where the dump fails, we can use the sysdumpdev -vL command (-v is the verbose flag) to
check the reason for the failure.
• System-initiated dumps
If a system dump is initiated through a kernel panic, the LED code that is displayed is 0c9 while
the dump is in progress, and then either an 888 or a steady 0c0.
• User-initiated dumps
For user-initiated system dumps to the primary dump device, the LED codes should indicate
0c2 for a short period, followed by 0c0 upon completion.
• Other common LED codes
Other common codes include the following:
0c1 An I/O error occurred during the dump.
0c4 Indicates that the dump routine ran out of space on the specified
device. It might still be possible to examine and use the data on the
dump device, but this tells you that you should increase the size of
your dump device.
0c5 Check the availability of the medium to which you are writing the
dump (for example, whether the tape is in the drive and write
enabled).
0c6 This code is used to indicate a dump request to the secondary
device.
0c7 A network dump is in progress, and the host is waiting for the server
to respond. The value in the three-digit display should alternate
between 0c7 and 0c2 or 0c9. If the value does not change, then the
dump did not complete due to an unexpected error.

18-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
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.

18-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Dedicated dump device (1 of 2)


IBM Power Systems

Servers with real memory > 4 GB have a dedicated


dump device that is created at installation time.
System memory size Dump device size
4 GB to, but not including, 12 GB 1 GB
12 GB to, but not including, 24 GB 2 GB

24 GB to, but not including, 48 GB 3 GB


48 GB and up 4 GB

© Copyright IBM Corporation 2009, 2015

Figure 18-5. Dedicated dump device (1 of 2) AN14G5.0

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

• Defining a dedicated dump device in a bosinst.data file


If you want to install systems with large dump devices automatically defined (regardless of the
memory size), you can specify this in the bosinst.data file.
The bosinst.data file contains stanzas that direct the actions of the Base Operating System
(BOS) installation program. After an initial installation, you can change many aspects of the
default behavior of the BOS installation program by editing the bosinst.data file and by using it
with your installation media.
• The large_dumplv stanza
The optional large_dumplv stanza in bosinst.data can be used to specify characteristics to
be used if a dedicated dump device is created. A dedicated dump device is only created for
systems with 4 GB or more of memory.
The following characteristics can be specified in the large_dumplv stanza:
- DUMPDEVICE: Specifies the name of the dedicated dump device.
- SIZEGB: Specifies the size of the dedicated dump device in gigabytes.
If the stanza is not present, the dedicated dump device is created when required, by using the
default values previously discussed.
Here are some example lines from a bosinst.data file:
...
control_flow:
CONSOLE = /dev/vty0
...
large_dumplv:
DUMPDEVICE = /dev/lg_dumplv
SIZEGB = 1

18-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain that a dedicated dump device is created for systems with more than
4 GB of main memory.
Details — Point out that the size of the dedicated dump device depends on the amount of physical
memory on this system and mention the default name of the dedicated dump device.
Additional information —
Transition statement — If the dump logical volume was defaulted to the paging space during
installation, and you later want a dedicated dump device, then you would manually configure one.
Let us look at how this is done.

© 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

Dedicated dump device (2 of 2)


IBM Power Systems

• Creating a dedicated dump device after installation:


– Define a rootvg logical volume of type sysdump:
• # mklv –y ded_dumplv –t sysdump rootvg 64

– Change the primary dump device to be the new logical volume:


• # sysdumpdev –P -p /dev/ded_dumplv

– Validate that your new device is now the primary dump device:
• # sysdumpdev –l

• Note: Use of an LVM mirrored dedicated dump LV is


supported, but not recommended due to performance issues.

© Copyright IBM Corporation 2009, 2015

Figure 18-6. Dedicated dump device (2 of 2) AN14G5.0

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.

18-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to configure a dedicated dump logical volume after installation.
Details —
Additional information — It is good to have a separate LV for the dump, instead of using the
paging space LV. By having a separate dump LV, it separates the dump LV issues from the paging
space issues. The bottom line is that while it is definitely good to mirror the paging space LV; it is not
recommended to do so for the dump LV.
A mirrored dump LV is supported. This is reflected in the use of the paging space as the default
dump device (unless large amounts of memory) and that the mirrorvg command automatically
mirrors the paging space, even when it is also acting as the dump LV.
On the other hand, mirroring the dump LV is not recommended, due to the resulting performance
impact when creating the dump and some complications in reading the dump.
Because of this recommendation, the mirrorvg command does not mirror the dump LV if there is a
separate LV for the dump (not using the paging space).
If the mirroring of the dump LV is not recommended, then how should we protect against the
scenario of the disk holding the dump LV being unavailable at the time of the dump? The
recommendation is to define a secondary dump device on a different disk than the primary dump
device.
Transition statement — It can be a problem if you have the system that is configured to use a
dump device that does not exist or is too small. Let us look at a utility that helps to identify any
potential problems in creating a dump before we are faced with a dump situation.

© Copyright IBM Corp. 2009, 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

• The dumpcheck utility does the following when enabled:


– Estimate the dump or compressed dump size using sysdumpdev -e
– Find dump logical volumes and copy directory using sysdumpdev -l
– Estimate the primary and secondary dump device sizes
– Estimate the copy directory free space
– Report any problems in the error log file

• Use sysdumpdev separately to report estimated dump size:


# sysdumpdev –e

0453-041 estimated dump size in bytes: 52428800

Use this information to size the /var file system.

© Copyright IBM Corporation 2009, 2015

Figure 18-7. dumpcheck utility AN14G5.0

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.

18-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Example of dumpcheck use


The following example illustrates use of the dumpcheck utility and shows sample output from
this command:
# /usr/lib/ras/dumpcheck -p
There is not enough free space in the file system containing the copy
directory to accommodate the dump.
File system name
/var/adm/ras
Current free space in kb
117824
Current estimated dump size in kb
161996
Since the -p flag was used in this example, the output from dumpcheck was written to stdout.
• Enabling and disabling dumpcheck
In order to be effective, the dumpcheck utility must be enabled. Verify that dumpcheck was
enabled by using the following command:
# crontab -l | grep dumpcheck
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
By default, it is set to run at 3 PM each afternoon.
Enable the dumpcheck utility by using the -t flag. This creates an entry in the root crontab if
none exists. In this example, the dumpcheck utility is set to run at 2 PM.:
# /usr/lib/ras/dumpcheck -t “0 14 * * *”
For best results, set dumpcheck to run when the system is heavily loaded. This setting identifies
the maximum size that the dump takes. As previously mentioned, the time is set for 3 PM by
default.
If you use the -p flag in the crontab entry, root is sent a mail message with the standard output
of the dumpcheck command.
• Sizing the /var file system
You should size the /var file system so that there is enough free space to hold the dump
information should your machine ever crash.
• Estimating the space that is needed to hold a system dump
The sysdumpdev -e command provides an estimate of the amount of disk space that is needed
for system dump information. The size of the dump device and of the copy directory that you
require are directly related to the amount of RAM on your machine. The more RAM on the
machine, the more space that is needed on the disk. Machines with 16 GB of RAM might need
2 GB of dump space.
• Dump compression
Starting with AIX 6.1, dumps are always compressed; thus the -C and -c flags to control
compression are no longer valid options of the sysdumpdev command.

© 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.

18-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Methods of starting a dump


IBM Power Systems

• Automatic invocation of dump routines by system


• Using the sysdumpstart command or SMIT
– Option: -p (send to primary dump device)
– Option: –s (send to secondary dump device)
– Option: –t (use traditional dump)
– Option: –f (select scope of dump)
• Using a special key sequence on the LFT
<Ctrl-Alt-NUMPAD1> (to primary dump device)
<Ctrl-Alt-NUMPAD2> (to secondary dump device)
• Using the Hardware Management Console (HMC)
– Restart LPAR with the Dump option
• Using the remote reboot facility

© Copyright IBM Corporation 2009, 2015

Figure 18-8. Methods of starting a dump AN14G5.0

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.

18-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the different methods that can be used to initiate a dump.
Details — A user-initiated dump is different from a dump that is initiated by an unexpected system
halt because the user can designate which dump device to use. When the system halts
unexpectedly, a system dump is initiated automatically to the primary dump device.
Here is some additional information about some of the methods that are listed on the visual:
• Command Line
This method uses the sysdumpstart command. However, this command is only available if you
install the Software Service Aids (bos.sysmgt.serv_aid) package.
You must have root authority to run this command. First, you might want to check the current
settings of your system dump devices by using the sysdumpdev -l command. Then, initiate the
dump with sysdumpstart -p (for the primary device) or -s (for the secondary device).
• Using SMIT
The SMIT screen is shown on a subsequent visual.
• Using special key sequence
If you have an LFT, you can initiate a dump either to the primary or the secondary device by
using one of the key sequences specified. The NUMPAD, which is referred to in the student
notes, is the set of number keys on the right-hand side of the keyboard.
Additional information — Details on the remote boot facility: The system is rebooted when the
reboot_string is received at the port. This facility is useful when the system does not otherwise
respond but can be servicing serial port interrupts. Remote reboot can be enabled on only one
native serial port at a time.
An important feature of the remote reboot facility is that it can be configured to obtain a system
dump before rebooting.
• Configuring the remote reboot facility
Two native serial port attributes control the operation of remote reboot:
- reboot_enable
- reboot_string
Use of these attributes is discussed in the following paragraphs.
reboot_enable
The value of this attribute (referred to as REMOTE Reboot ENABLE in SMIT) indicates whether
this port is enabled to reboot the machine by the remote reboot_string, and if so, whether to
take a system dump before rebooting:
- no: Indicates that remote reboot is disabled.
- reboot: Indicates that remote reboot is enabled.
- dump: Indicates that remote reboot is enabled, and, before rebooting, a system dump is
taken on the primary dump device.
reboot_string

© 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.

18-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Copying a system dump


IBM Power Systems

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

© Copyright IBM Corporation 2009, 2015

Figure 18-9. Copying a system dump AN14G5.0

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

• Insufficient space in /var/adm/ras


However, at bootup, if the system determines that there is not enough space to copy the dump
to /var, the /sbin/rc.boot script (which is run at bootup) calls the /lib/boot/srvboot script.
This script in turn calls on the copydumpmenu command, which is responsible for displaying the
following menu that might be used to copy the dump to removable media:
Copy a System Dump to Removable Media

The system dump is 583973 bytes and will be copied from /dev/hd6
to media inserted into the device from the list below.

Please make sure that you have sufficient blank, formatted media
before proceeding.

Step One: Insert blank media into the chosen drive.


Step Two: Type the number for that device and press Enter.

Device type Path Name

>>> 1 tape/scsi/8mm /dev/rmt0


2 Diskette Drive /dev/fd0

88 Help?
99 Exit

>>> Choice [1]


The copy dump menu will be displayed only if the sysdumpdev attribute of forced copy flag has a
value of TRUE.

18-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to capture the dump before using the paging space that holds it.
Details —
Additional information — None.
Transition statement — While we do not teach dump analysis in this course, it is useful to know
how to contact AIX Support and provide them with the dump for analysis.

© Copyright IBM Corp. 2009, 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

Working with AIX support


IBM Power Systems

• Have needed information ready:


– Name, phone #, customer #,
– Machine type model and serial #,
– AIX version, release, technology level, and service pack
– Problem description, including error codes
– Severity level: Critical, significant impact, some impact, minimal
• 1-800-IBM-SERV (1-800-426-7378)
• Level 1 collects information and assign PMR number
• Route to level 2 responsible for the product
• You might be asked to collect additional information to upload
– This information is likely a snap with any system dump included
• They might ask you to update to a specific TL or SP:
– APAR for your problem already addressed
– Need to have a standard environment for them to investigate

© Copyright IBM Corporation 2009, 2015

Figure 18-10. Working with AIX support AN14G5.0

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.

18-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

18-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Capturing system data with snap command


IBM Power Systems

• snap –a
– Gathers all system configuration information
– Is useful in identifying and resolving system problems
– Includes any dump that you collected
– Writes output to multiple files under /tmp/ibmsupt

• snap –c archives data collection into single pax file:


– /tmp/ibmsupt/snap.pax.Z
– Rename to PMR#.b<branch#>.c<country#>.snap.pax.Z

• Large snaps can be split into a series of smaller files:


– # snap –a -c –O <size of files>
– # snapsplit –s <size of files> -f <large snap file>
© Copyright IBM Corporation 2009, 2015

Figure 18-11. Capturing system data with snap command AN14G5.0

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.

18-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

18-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint
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?

2. What command can be used to initiate a system dump?

3. If the copy directory is too small, will the dump (which is


copied during the reboot of the system) be lost?

© Copyright IBM Corporation 2009, 2015

Figure 18-12. Checkpoint AN14G5.0

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.

2. What command can be used to initiate a system dump?


The answer is sysdumpstart.

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.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Let us switch over to the exercise.

18-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Exercise
IBM Power Systems

System dump
• Working with the AIX dump facility

© Copyright IBM Corporation 2009, 2015

Figure 18-13. Exercise AN14G5.0

Notes:

Objectives for this exercise


At the end of the exercise, you should be able to:
• Initiate a system dump
• (optional) Use the snap command

© 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.

18-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Explain what is meant by a system dump
• Determine and change the primary and secondary dump
devices
• Create a system dump

© Copyright IBM Corporation 2009, 2015

Figure 18-14. Unit summary AN14G5.0

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.

18-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Unit 19. Advanced install techniques

Estimated time
01:15

What this unit is about


This unit describes techniques to reduce the size of a maintenance window.
Specific techniques are taught for installing system updates.

What you should be able to do


After completing this unit, you should be able to:
• Use alternate disk installation techniques for applying AIX maintenance
• Use multibos to apply AIX maintenance

How you will check your progress


Accountability:
• Checkpoint questions
• Exercises

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

After completing this unit, you should be able to:


• Use alternate disk installation techniques for applying AIX
maintenance
• Use multibos to apply AIX maintenance

© Copyright IBM Corporation 2009, 2015

Figure 19-1. Unit objectives AN14G5.0

Notes:

19-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List this unit’s objectives.
Details —
Additional information —
Transition statement — Let s start with the mksysb command.

© 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

19-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 19.1.Alternate disk installation

Instructor topic introduction


What students will do — The students identify how alternate disk installation techniques can be
used.
How students will do it — Through lecture and exercises.
What students will learn — Students learn how to handle alternate disk installation techniques.
How this will help students on their job — Being able to work with alternate disk installation
allows students to handle the installation of large facilities. Systems can be installed over a longer
period while the systems are still running at the same version. The switchover can then happen at
the same time.

© 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

After completing this topic, you should be able to:


• Install a mksysb onto an alternate disk
• Clone an existing rootvg to an alternate disk
• Remove an alternate disk

© Copyright IBM Corporation 2009, 2015

Figure 19-2. Topic 1 objectives AN14G5.0

Notes:

19-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Cover the unit objectives.
Details —
Additional information —
Transition statement —

© 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

Alternate disk installation


IBM Power Systems

# smit alt_install

# smit alt_mksysb # smit alt_clone


-OR- -OR-
# alt_disk_mksysb # alt_disk_copy

Cloning the running


Installing a mksysb on
rootvg to another disk,
another disk can apply maintenance

Using alternate disk install to migrate to a


new version or release requires NIM
(nimadm)
© Copyright IBM Corporation 2009, 2015

Figure 19-3. Alternate disk installation AN14G5.0

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)

19-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • File sets


An alternate disk installation uses the following file sets:
- bos.alt_disk_install.boot_images must be installed for alternate disk mksysb
installations
- bos.alt_disk_install.rte must be installed for rootvg cloning and alternate disk
mksysb installations
• How to use alternate disk installation
All modes of alternate disk installations are available through the SMIT fast path:
smit alt_install.
To focus on installing a new image on an alternate disk, you can either use the SMIT fast path:
smit alt_mksysb or directly run the command: alt_disk_mksysb.
To focus on cloning an existing mksysb to an alternate disk, you can either use the SMIT fast
path: smit alt_clone or directly run the command: alt_disk_copy.

© 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 —

How current commands relate to the alt_disk_install command


Before AIX V5.3, all alternate disk functions were done through a single command:
alt_disk_install. The use of alt_disk_install command is still supported, but it now starts the
new replacement commands to do the actual work.
The following three commands were added in AIX 5L V5.3:
• alt_disk_copy creates copies of rootvg on an alternate set of disks
• alt_disk_mksysb installs an existing mksysb on an alternate set of disks
• alt_rootvg_op performs Wake, Sleep, and Customize operations
The alt_disk_install module continues to ship as a wrapper to the new modules. However, it
does not support any new functions, flags, or features.
The following table displays how the existing operation flags for alt_disk_install map to the
new modules. The alt_disk_install command calls the new modules after printing an
attention notice that it is obsolete. All other flags apply as currently defined.

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

Transition statement — Let Us discuss alternate mksysb disk installation.

19-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Alternate mksysb disk installation (1 of 2)


IBM Power Systems

hdisk0
• rootvg (AIX 6.1)

hdisk1
AIX 7.1
mksysb

# alt_disk_mksysb –m /dev/rmt0 –d hdisk1

Example installs an AIX 7.1 mksysb on hdisk1


• Bootlist is set to alternate disk (hdisk1)
• Changing the bootlist allows you to boot different AIX levels
(hdisk0 boots AIX 6.1, hdisk1 boots AIX 7.1)
© Copyright IBM Corporation 2009, 2015

Figure 19-4. Alternate mksysb disk installation (1 of 2) AN14G5.0

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

• Which disk does the system use to boot?


The alt_disk_mksysb command changes the bootlist by default. During the next reboot, the
system will boot from the new rootvg. If you do not want to change the bootlist, use the option
-B of alt_disk_mksysb.
By changing the bootlist, you determine which AIX version you want to boot.
• File sets within the mksysb being installed
The mksysb image that is used for the installation must be created on a system that has either:
- The same hardware configuration as the target system.
- All the device and kernel support that is installed for a different machine type or platform. In
this case, the following file sets must be contained in the mksysb:
- devices.*
- bos.mp
- bos.up
-bos.64bit
• alt_disk_mksysb options
The alt_disk_mksysb command has the following options:
-m device
-d target disks
-B (Do not change the bootlist)
-i image.data
-s script
-R resolve.conf
-p platform
-L mksysb_level
-n (Remain a nim client)
-P phase
-c console
-r (Reboot after install)
-k (Keep mksysb device customization)
-y (Import non-rootvg volume groups)

19-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Introduce alternate mksysb disk installation.
Details —
Additional information —
Transition statement — Let us introduce the SMIT interface.

© 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

Alternate mksysb disk installation (2 of 2)


IBM Power Systems

# smit alt_mksysb

Install mksysb on an Alternate Disk

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* Target Disk(s) to install [hdisk1] +
* Device or image name [/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 [] /

© Copyright IBM Corporation 2009, 2015

Figure 19-5. Alternate mksysb disk installation (2 of 2) AN14G5.0

Notes:

SMIT panel example


The alternate disk installation function can also be run from the SMIT dialog panel.

19-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe the SMIT interface for alternate mksysb disk installation.
Details — Keep it brief - show that it can be easily run from a SMIT dialog panel.
Additional information — The installation on the alternate disk is broken into three phases:
• Phase 1 creates the altinst_rootvg volume group, the alt_logical volumes, the /alt_inst file
systems and restores the mksysb data.
• Phase 2 runs any specified customization script and copies a resolv.conf file, if specified.
• Phase 3 unmounts the /alt_inst file systems, renames the file systems and logical volumes
and varies off the altinst_rootvg. It sets the bootlist and reboots, if specified.
Each phase can be run separately. Phase 3 must be run to get a usable rootvg volume group.
Transition statement — Let us describe alternate disk rootvg cloning.

© 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

Alternate disk rootvg cloning (1 of 2)


IBM Power Systems

hdisk0
• rootvg (AIX 7.1 TL01)

Clone

hdisk1
AIX AIX 7.1 TL03 • rootvg (AIX 7.1 TL03)

# alt_disk_copy -b update_all -l /dev/cd0 -d hdisk1

• Example creates a copy of the current rootvg on hdisk1


• Installs a technology level on the clone (AIX7.1 TL03)
• Changing the bootlist allows you to boot different AIX levels
(hdisk0 boots AIX 7.1 TL01, hdisk1 boots AIX 7.1 TL03)

© Copyright IBM Corporation 2009, 2015

Figure 19-6. Alternate disk rootvg cloning (1 of 2) AN14G5.0

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.

19-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • What is nimadm?


The nimadm command (Network Install Manager Alternate Disk Migration) creates a copy of
rootvg to a free disk (or disks) and simultaneously migrate it to a new version or release level of
AIX. The nimadm command uses NIM resources to perform this function.
• Advantages of nimadm
There are several advantages to using the nimadm command over a conventional migration:
- Reduced downtime. The migration is done while the system is up and functioning normally.
There is no requirement to boot from install media, and the most of processing occurs on
the NIM master.
- The nimadm command facilitates quick recovery when migration fails. Since the nimadm
command uses alt_disk_install to create a copy of rootvg, all changes are done to the
copy (altinst_rootvg). When a serious migration installation failure occurs, the failed
migration is cleaned up and there is no need for the administrator to take further action.
When a problem with the new (migrated) level of AIX occurs, the system can be quickly
returned to the pre-migration operating system by booting from the original disk.
- The nimadm command allows a high degree of flexibility and customization in the migration
process. This is done with the use of optional NIM customization resources: image_data,
bosinst_data, exclude_files, pre-migration script, installp_bundle, and
post-migration script.
Details of using NIM to do an alternate disk migration are not covered in this course.

© 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.

19-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Alternate disk rootvg cloning (2 of 2)


IBM Power Systems

# 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 +

© Copyright IBM Corporation 2009, 2015

Figure 19-7. Alternate disk rootvg cloning (2 of 2) AN14G5.0

Notes:

Example with SMIT


The SMIT fast path for alternate disk rootvg cloning is smit alt_clone.
The target disk in the example is hdisk1. That means the rootvg is copied to that disk. If you
specify a bundle, a file set or a fix, then the installation or the update takes place on the clone, not in
the original rootvg.
By default, the bootlist is set to the new disk.
Changing the bootlist lets you boot from the original rootvg or the cloned rootvg.

© 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.

19-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Removing an alternate disk installation


IBM Power Systems

Original hdisk0
• rootvg (AIX 7.1 TL01)

# bootlist -m normal hdisk0 hdisk1


# shutdown -Fr
Clone
# lsvg • rootvg (AIX 7.1 TL03)
rootvg
altinst_rootvg
# alt_rootvg_op -X

• alt_rootvg_op -X removes the


# bootlist -m normal hdisk1 ODM definition from the ODM
# shutdown -Fr
# lsvg • Do not use exportvg to
rootvg remove the alternate volume
old_rootvg group
# alt_rootvg_op –X old_rootvg

© Copyright IBM Corporation 2009, 2015

Figure 19-8. Removing an alternate disk installation AN14G5.0

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

• Removing the original rootvg


If you created an alternate rootvg with alt_disk_mksysb or alt_disk_copy, and no longer
want to use the original disk, first boot your system from the cloned disk and then use the
alt_rootvg_op command to remove it.
When running lsvg to list the volume groups in the system, the alternate rootvg is shown with
the name old_rootvg.
To remove the original rootvg, do not use the exportvg command. Run the command:
# alt_rootvg_op -X old_rootvg
This command removes the old_rootvg definition from the ODM database.
If exportvg 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.

19-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Describe how to remove an alternate disk installation.
Details —
Additional information —
Transition statement — You might have noted that, up to this point, we only talked about applying
maintenance to an existing version and release of AIX, but not about migrating to a new version
and release. To use the alternate disk capabilities with a migration install, you need to use NIM. Let
us look at this briefly.

© 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

Topic 1 checkpoint: Alternate disk installation


IBM Power Systems

1. Name the two ways alternate disk installation can be used.

2. What are the advantages of alternate disk rootvg cloning?

© Copyright IBM Corporation 2009, 2015

Figure 19-9. Topic 1 Checkpoint: Alternate disk installation AN14G5.0

Notes:

19-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Review and test the students understanding of this section.
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.

Topic 1 checkpoint solutions: Alternate disk


installation
IBM Power Systems

1. Name the two ways alternate disk installation can be used.


The answers are installing a mksysb image on another disk
and cloning the current running rootvg to an alternate disk.

2. What are the advantages of alternate disk rootvg cloning?


The answers are creates an online backup and allows
maintenance and updates to software on the alternate disk
that helps to minimize downtime.

© Copyright IBM Corporation 2009, 2015

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

Topic 1: Alternate disk install


• Clone the existing rootvg
• Apply a new service pack
• Alternate boot between different levels

© Copyright IBM Corporation 2009, 2015

Figure 19-10. Exercise AN14G5.0

Notes:

19-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

19-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 19.2.Using multibos

Instructor topic introduction


What students will do — The students learn how to set up and use multibos to work with an
alternate BOS.
How students will do it — Through lecture and exercise.
What students will learn — Students learn how to set up and use multibos to work with an
alternate BOS.
How this will help students on their job — An alternate BOS provides a tool for making AIX
system modification (such as applying a new technology level) without any effect on the
functionality of the active BOS. When the next maintenance window arrives, a quick reboot can be
used to switch over to the new technology level. If there is an unexpected problem, a quick reboot
returns the system to the prior state.

© 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

After completing this topic, you should be able to:


• Clone an active BOS to a standby BOS
• Customize a standby BOS
• Alternate boot between an active BOS and a standby
BOS
• Mount a standby BOS
• Start a standby BOS shell

© Copyright IBM Corporation 2009, 2015

Figure 19-11. Topic 2 objectives AN14G5.0

Notes:

19-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Cover the objectives for the topic.
Details —
Additional information —
Transition statement — Let us look at what multibos is and what it provides.

© 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

• Two alternate AIX base operating systems (BOS) in a single


rootvg

• Standby BOS created as copy of active BOS

• Modify standby BOS without affecting active BOS:


– Apply maintenance to standby BOS
– Mount and modify standby BOS
– Start an interactive shell that is working in standby BOS

• Can alternate on reboot which BOS is active

© Copyright IBM Corporation 2009, 2015

Figure 19-12. multibos overview AN14G5.0

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

19-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

19-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Active and standby BOS logical volumes


IBM Power Systems

Active BOS
/
BLV jfslog (hd4)
(hd5) (hd8)

Standby BOS
home opt usr var tmp bos_inst (if mounted)
(hd1) (hd10opt) (hd2) (hd9var) (hd3) (bos_hd4)

opt usr var


(bos_hd10opt) (bos_hd2) (bos_hd9var)

BLV jfslog
(bos_hd5) (bos_hd8)
© Copyright IBM Corporation 2009, 2015

Figure 19-13. Active and standby BOS logical volumes AN14G5.0

Notes:

Standby BOS structure


The standby BOS needs to mimic the structure of the live BOS file system structure, but not to
replace the active file systems. To handle this requirement, multibos creates a logical volume to
match each of the BOS logical volumes, including not only the file systems, but also the JFSlogs
and the boot logical volume. The names are modified by adding a prefix of bos_ to the front of the
standard logical volume names. For the standby BOS file systems, the file system mount point is
change to have a root path of /bos_inst/.
If you mount the standby BOS, then you use this modified path (beginning with /bos_inst). If you
use the chroot shell access or if you reboot to make the standby BOS the active BOS, then the
(formally standby BOS) file systems have a root path of /.

© 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.

19-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Setting up a standby BOS


IBM Power Systems

• 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>

• Copies BOS file systems – back up and restore


• Non-BOS logical volumes are shared
• Optional post-creation customization script
• Bootlist updated (-t will block):
– First: Standby BOS
– Second: Active BOS

© Copyright IBM Corporation 2009, 2015

Figure 19-14. Setting up a standby BOS AN14G5.0

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

19-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain how to set up a standby BOS by using the multibos command.
Details —
Additional information —
Transition statement — Let us briefly look at some of the operations that you can run after you
have a standby BOS created.

© 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

Other multibos operations


IBM Power Systems

• Customizing a standby BOS:


– multibos –c { -a | -b <bundle> | -f <fixlist> } –l device
– Can combine with standby BOS creation
• Mounting and unmounting a standby BOS:
– multibos –m
– Mounts to /bos_inst/
– multibos -u
• Standby BOS shell:
– multibos –S
– exit returns to active shell environment
• Booting to either standby BOS or active BOS:
– bootlist –m normal hdisk# blv#
– shutdown -Fr
• Removing a standby BOS
– multibos -R

© Copyright IBM Corporation 2009, 2015

Figure 19-15. Other multibos operations AN14G5.0

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.

19-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

19-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the various standby BOS operations.
Details — Provide a brief description of what each of these options provide and why they might
want to do them. Do not spend too much time here; they experience these first-hand in the
exercises.
Additional information —
Transition statement — Let us review what we covered with some checkpoint questions.

© 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

Topic 2 checkpoint: multibos


IBM Power Systems

1. True or False: multibos provides for booting between


alternate operating system environments within a single
rootvg.

2. True or False: New fix packs can be applied to a standby


BOS with only a performance impact to the active BOS
during the operation.

© Copyright IBM Corporation 2009, 2015

Figure 19-16. Topic 2 Checkpoint: multibos AN14G5.0

Notes:

19-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details
Details —

Topic 2 checkpoint solutions: multibos


IBM Power Systems

1. True or False: multibos provides for booting between


alternate operating system environments within a single
rootvg.
The answer is true.

2. True or False: New fix packs can be applied to a standby


BOS with only a performance impact to the active BOS
during the operation.
The answer is true.

© Copyright IBM Corporation 2009, 2015

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

1. Which two alternate disk installation techniques are


available?

2. True or False: multibos requires cloning of all the logical


volumes in the active rootvg.

© Copyright IBM Corporation 2009, 2015

Figure 19-17. Checkpoint AN14G5.0

Notes:

19-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty 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

1. Which two alternate disk installation techniques are


available?
The answers are installing a mksysb on another disk and
cloning the rootvg to another disk.

2. True or False: multibos requires cloning of all of the


logical volumes in the active rootvg.
The answer is false.

© Copyright IBM Corporation 2009, 2015

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)

© Copyright IBM Corporation 2009, 2015

Figure 19-18. Exercise AN14G5.0

Notes:

19-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose —
Details —
Additional information —
Transition statement —

© 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

Having completed this unit, you should be able to:


• Use alternate disk installation techniques for applying AIX
maintenance
• Use multibos to apply AIX maintenance

© Copyright IBM Corporation 2009, 2015

Figure 19-19. Unit summary AN14G5.0

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

19-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Summarize the unit.
Details — Present the highlights from the unit.
Additional information —
Transition statement — End of unit.

© 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

19-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Appendix A. Survey of additional AIX facilities

Estimated time
00:45

What this unit is about


This unit describes various aspects of AIX which do not justify a separate unit
in the course. Their treatment is brief given the background of the audience
(experienced UNIX professionals).

What you should be able to do


After completing this unit, you should be able to:
• Identify AIX supported performance monitoring commands
• Identify standard UNIX scheduling abilities in AIX
• Identify the print subsystems supported by AIX and describe the common
UNIX print management commands supported
• Describe the AIX paging space management commands
• Identify common UNIX security mechanisms used in AIX

How you will check your progress


Accountability:
• Checkpoint questions

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

After completing this unit, you should be able to:


• Identify AIX supported performance monitoring commands
• Identify standard UNIX scheduling abilities in AIX
• Identify the print subsystems supported by AIX and describe
the common UNIX print management commands supported
• Describe the AIX paging space management commands
• Identify common UNIX security mechanisms used in AIX

© Copyright IBM Corporation 2009, 2015

Figure A-1. Unit objectives AN14G5.0

Notes:

A-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List this unit’s objectives.
Details —
Additional information —
Transition statement — Let us start with AIX performance commands.

© 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

AIX performance commands


IBM Power Systems

• See AIX performance course (AN510)


Statistics Traditional UNIX with AIX unique
AIX enhancements
I/O iostat filemon, fileplace
Memory vmstat svmon

Network netstat, entstat, netpmon


nfsstat
Processor ps, sar tprof, curt,
lparstat, mpstat
All in one dynamic topas, nmon
display (ascii)

© Copyright IBM Corporation 2009, 2015

Figure A-2. AIX performance commands AN14G5.0

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).

A-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Memory statistics


The vmstat command provides statistics on free list depth, page scanning and stealing, and
paging space paging. The svmon command provides a complete picture of memory usage right
down to a page by page listing of the virtual memory segments. It can provide reports ranking
processes by usage of real memory, pinned memory, or paging space.
• Network statistics
The netstat command provides a variety of statistic reports at every layer of the network stack.
These layers include socket, transport (TCP, UDP), interface, IP, and adapter. The -v option of
netstat invokes the protocol specific statistics command for an adapter; for example entstat. For
example, this can be useful in identifying problems related to Ethernet collisions. The netpmon
report provides kernel trace based statistics of traffic at various layers, including a ranking of
processes based on % time spent in the kernel network service routines.
• Processor statistics
The ps command (commonly invoked with the aux flags) can identify CPU intensive processes
and show other processor related statistics. The sar command provides a variety of reports
including processing mode (user, system, wait, idle) on a processor by processor basis, and
interrupt statistics. The kernel trace based tprof command is a better way to identify the current
CPU intensive processes and can profile down to the which routines are using the most cycles
(without instrumenting the programs). The kernel trace based curt command has similar
abilities, but can provides both more extensive statistics (for example: interrupts, error
conditions, delay in returns from routines) and a more complete analysis of any single process’s
details.
The POWER server abilities to support simultaneous multi-threading and micro-partitioning of
processor capacity required modification of existing statistics reports and the creation of new
statistic reports. The processor mode statistic reports needed to be adjusted to show how much
of an LPAR’s entitled capacity was really being used. The new commands of lparstat and mpstat
are specifically designed to report on this environment, providing more detail - all the way down
to the Power Hypervisor interrupts and statistics on how successful the Power Hypervisor is in
maintaining processor affinity.

© 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.

A-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Printing
IBM Power Systems

• AIX supports two mutually exclusive subsystems:


– System V print subsystem
– AIX print (queuing) subsystem
• AIX print subsystem:
– Easily defined and managed through SMIT (fastpath: spooler)
– Local and remote printers
– Manage print jobs using AIX, BSD or System V commands:

Job task AIX BSD System V


submit qprt lpr lp
list qchk lpq lpstat
cancel qcan lprm cancel
hold qhld
move qmov
change priority qpri

© Copyright IBM Corporation 2009, 2015

Figure A-3. Printing AN14G5.0

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

A-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Survey the print subsystem options and the compatibility of the AIX print subsystem
with both BSD and System V commands.
Details —
Additional information —
Transition statement — Another facility with which you should be familiar is cron for scheduling.

© 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

• AIX supports scheduling with the cron daemon:


– Regular recurring jobs through crontab
– Queued jobs through the at and batch commands
– Access controlled through cron.deny and cron.allow
• Queued job control
– Supports both BSD and System V management commands

queued job control BSD System V


List queued jobs atq at -r
Remove queued job atrm at -l

© Copyright IBM Corporation 2009, 2015

Figure A-4. Scheduling AN14G5.0

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.

A-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Managing queued jobs


To list at jobs use the at -l command or the atq command. The root user can look at
another user's at jobs by using the command atq <user>. The listing provides the unique job
identified that is needed to cancel a specific job.
To cancel an at job use at -r or atrm followed by the job number. Use the command atrm -
(placing nothing after the - character) to cancel all of your jobs. The root user can cancel all jobs
for another user using atrm <user>.

© 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.

A-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Paging space
IBM Power Systems

• Allows more virtual memory then real memory


• Page frames are stolen using LRU algorithm
• Paged out to disk; paged back in, on demand
• Default paging space is hd6; size defaults to 512 MB
• Paging space definitions are stored in /etc/swapspaces
• Running short on paging space will kill processes
• You can dynamically add or remove paging spaces
• You can dynamically increase or decrease the size of paging
spaces

© Copyright IBM Corporation 2009, 2015

Figure A-5. Paging space AN14G5.0

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

• Results of low paging space


If your system runs low on paging space, a message is sent to the console and sometimes to
users as well. At this point, the system is unable to start any new processes until some running
processes are terminated or release allocated memory. The messages will either state explicitly
that paging space (or swap space) is low or the message will state that there is a problem with
forking new processes. This situation should obviously be avoided. If the low paging space
worsens, the system will start killing processes to free up paging space. If there is no paging
pace left and a critical kernel component needs memory, the system can hang or crash.
• Managing amount of paging space (dynamically)
If you display a high utilization of the available paging space, you can dynamically add
additional paging space volumes (additional logical volumes in addition to hd6) or you can
dynamically increase the size of existing paging space volumes.
When adding paging space volumes, it is recommended that they be spread across multiple
disks in the rootvg and that they be of the same size (this assumes that you are dealing with
direct attached disks rather than SAN storage).
If the problem is that you have too much paging space (not really problem, unless you are short
on disk storage and need to free up space), you can dynamically reduce the paging space
allocation by either dynamically deleting a paging space volume (after dynamically inactivating)
or dynamically reducing the size of a paging space volume.
The big rule is that you should never delete hd6. It is expected to be there in the logic of the
system boot routines.

A-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview of AIX paging space management.
Details — They should already be familiar with paging space concepts. The ability to manage
dynamically and the use of the hd6 logical volume are the major points to be made,
Additional information —
Transition statement — Let us looks at the commands used in AIX to manage the paging spaces.

© 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

Paging space details


IBM Power Systems

• To monitor paging space utilization:


– # lsps –a or # lsps -s
• To create an additional paging space:
– # mkps -s <#LPs> <vgname> <disk> or # smit mkps
• Can also specify to activate (now or at system reboot)
• To activate a paging space
– # swapon <device file name>
• To deactivate a paging space
– # swapoff <device file name>
• To remove a paging space (must be inactive):
– # rmps <device file name> or # smit mkps
• To increase the size of a paging space:
– # chps –s <#LPs> <paging space name> or # smit chps
• To decrease the size of a paging space:
– # chps –d <#LPs> <paging space name> or # smit chps

© Copyright IBM Corporation 2009, 2015

Figure A-6. Paging space details AN14G5.0

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.

A-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

This operation is supported through SMIT as well, fastpath pgsp.

• Deactivation of a paging space volume


Active paging spaces can be deactivated while the system is running using the swapoff
command or with the SMIT fastpath swapoff.
• Removal of a paging space
In order to delete paging space, it must be inactive (that is, not used by the kernel.)
To remove a paging space volume from the system, you can use SMIT (rmps fastpath) or the
rmps command.
When using the rmps command, the syntax is:
rmps PagingSpace
• Changing the size of a paging space volume
The sizes of paging space volumes can be increased or decreased dynamically. In both cases,
you would either use SMIT (fastpath chps) or use the chps command. The chps command can
also specify the state of the paging space volume at the next reboot.
When using the chps command, the syntax is:
chps [ -s #LogicalPartitions | -d #LogicalPartitions ] [ -a { y | n } ] PagingSpace

© 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.

A-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

AIX and traditional UNIX security


IBM Power Systems

• Traditional authentication:
– Users and groups (root superuser)
– Password rules and expiration
– Can centrally define using LDAP or NIS

• File access authorization:


– File permission bits (including SUID, SGID, SVTX)
– Commands: chmod, umask, chown, chgrp
– Access control lists (ACLs in either EAv1 or EAv2)
– Role-based Authorization (using enhanced RBAC)

• Supplemented by other AIX6 and AIX7 enhancements

© Copyright IBM Corporation 2009, 2015

Figure A-7. AIX and traditional UNIX security AN14G5.0

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

• File permission bits


The file permission bits are fairly standard. Note that SVTX (sticky bit) has no effect on an
ordinary file. It only has an effect on the ability of users who are sharing a directory to delete
files that they do not own. Also, AIX does not support using SUID on executable scripts; it can
only be used on compiled object modules.
In AIX 6 and later, RBAC is enabled by default. Many commands which traditionally use SUID
(to enable ordinary users to take actions that would normally require root authority) have RBAC
privileges which are authorized for any user (no role assignments are needed). This means that
these commands will still work for ordinary users, even if the SUID bit is cleared. This is part of
a design which can allow you to eventually eliminate the use of root and rely solely on
role-based authorization.
• Access control lists
AIX (as do other UNIX operating systems) supports i-node extensions which allow more flexible
control over file access. The most common use of i-node extensions is to list the exact
permissions for various users and groups. These are called Access Control Lists (ACLs).
Traditionally, AIX has used a format called Extended Attributes Version 1 (EAv1) to store ACLs.
If the system is acting as an NFS server using NFSv4 and its support for ACLs, then a different
format (EAv2) is required. Which extended attribute format is used is determined when creating
the JFS2 file system.
• Role-based access control
Another common UNIX feature these days is the ability to delegate authority by assigning roles,
rather than juggling various group memberships. AIX also has role-based access control. In AIX
6 and later, there is an enhanced RBAC which is tied to special command privileges. These
privileges effectively bypass the traditional permission bit file access control. Enhanced RBAC
is just one of the many security enhancements introduced in AIX6. The AIX6 security
enhancements are briefly discussed later in this unit.

A-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide an overview of AIX security.
Details — Again, the emphasis is on AIX support for the traditional UNIX security mechanisms,
with which they are already familiar. Point out some of the special variations (such as SUID not
being supported for scripts). Make them aware that AIX has much more function available to assist
in system security that we will list later in the unit.
Be aware that RBAC is not an AIX unique concept. Other UNIX operating systems have RBAC.
Examples are: Solaris, HP/UX, and Linux distributions which implement Security Enhanced Linux
(SELINUX) such as RedHat. The security documentation of some UNIX operating systems do not
even discuss delegation of administration through group membership and instead focus on the
RBAC implementation. So, while not traditional UNIX security, RBAC is certainly common in current
versions of the various varieties of UNIX.
If they do not already understand traditional UNIX security mechanisms, this is not the place to
teach them. If they want to know more details on the AIX6 security enhancements, again, this is not
the place to get into details. Make sure they know, at the very start of the security discussion, that
they should plan to attend the AIX security course (currently AU47) if they want to learn more about
AIX security.
Additional information —
Transition statement — Let us see where AIX keeps its security logs and how they are accessed.

© 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

/var/adm/sulog Audit trail of su activity

/var/adm/wtmp Log of successful logins

/etc/utmp List of users currently


logged in

/etc/security/failedlogin Information on failed


login attempts
© Copyright IBM Corporation 2009, 2015

Figure A-8. Security logs AN14G5.0

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.

A-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty For example:


# last root Displays all the recorded logins and logoffs by the user root.
# last reboot Displays the time between reboots of the system.
• The utmpd daemon
AIX 5L V5.2 introduced a new daemon called utmpd to manage the entries in the /etc/utmp
file. This daemon monitors the validity of the user process entries at regular intervals, and
removes entries which do not correspond to any current processes. The default interval time
would be 300 seconds.
The syntax of the command is:
/usr/sbin/utmpd [ Interval ]
To start utmpd from the /etc/inittab, add the following entry to the file:
utmpd:2:respawn:/usr/sbin/utmpd
• The failedlogin file
The /etc/security/failedlogin file maintains a record of unsuccessful login attempts.
The file can be displayed using the who command with the file as an argument.

© 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.

A-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Login sequence and security files


IBM Power Systems

getty process Spawned by inittab

Settings in
/etc/security/login.cfg
Login: userid and passwd

/etc/passwd
User verification check /etc/security/passwd

no
Login failed Valid?
yes
Log entry in: /etc/environment
/etc/security/failedlogin Set up the environment. /etc/security/limits
/etc/security/user

Display /etc/motd $HOME/.hushlogin

/etc/profile
Enter login shell $HOME/.profile

© Copyright IBM Corporation 2009, 2015

Figure A-9. Login sequence and security files AN14G5.0

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

• The $HOME/.profile and $HOME/.kshrc files


$HOME/.profile and $HOME/.kshrc can be customized by the user. The user can,
generally, overwrite any variable set in /etc/environment and /etc/profile.
• The /etc/environment file
/etc/environment is used to set variables. No commands should be placed in this file. Only
root can change this file. It effects the default environment of new processes including the initial
login shell of a user. It can be overruled by later customizations (for example /etc/profile or the
user’s shell customizations).
• The /etc/security directory
The /etc/passwd and /etc/group files have global read access to all users. A number of
other files control the attributes of users. These files are in the /etc/security directory,
which can only be accessed by root or the security group.
• /etc/security/passwd
/etc/security/passwd is the shadow file which contains the encrypted password and
update information for users. For example, this is where the ADMCHG flag is set when a user
passwords are reset, forcing the users to change the password the next time they login.
• /etc/security/user
/etc/security/user contains extended user attributes, including local or remote login
enablement and password enforcement rules (length, mixture of letter and numbers, password
reuse, and more).
• /etc/security/group
/etc/security/group contains extended group attributes. For example, it identifies a group
owner who can control the group membership. It can also identify this as being an
administrative group (members of the security group are blocked from administering this group.)
• /etc/security/limits
/etc/security/limits contains process resource limits for users.
• /etc/security/login.cfg
/etc/security/login.cfg is a configuration file for the login program. This file contains
security enhancements that limit the logins on a port, for example, the number of login attempts
and the valid login programs (shells). It is mostly customized to design the login prompt herald
which is seen when users connect to the system.

A-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide a survey of AIX security files and how they are used during login.
Details — Other UNIX operating systems either have the same files or something very close. The
names can differ. For example Solaris uses /etc/shadow for its shadow file, rather than
/etc/security/passwd. I am not aware of an equivalent to /etc/environment in Solaris.
Additional information —
Transition statement — Let us survey what user attributes can be set or modified by looking at the
configuration file where they are stored.

© Copyright IBM Corp. 2009, 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

default: * default continued ...


admin = false histsize = 0
login = true minage = 0
su = true maxage = 0
daemon = true maxexpired = -1
rlogin = true minalpha = 0
sugroups = ALL minother = 0
admgroups = minlen = 0
ttys = ALL mindiff = 0
auth1 = SYSTEM maxrepeats = 8
auth2 = NONE dictionlist =
tpath = nosak pwdchecks =
umask = 000 root:
expires = 0 admin = true
SYSTEM = "compat" SYSTEM = "compat"
logintimes = loginretries = 0
pwdwarntime = 0 account_locked = false
account_locked = false registry = files
loginretries = 0 admgroups =
histexpire = 0 . . .

© Copyright IBM Corporation 2009, 2015

Figure A-10. /etc/security/user file AN14G5.0

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.

A-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

A-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

A-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

User management commands


IBM Power Systems

mkuser – Define a new user


passwd – Set or change password
pwdadm – Change password or clear flags for a user

lsuser – List user attributes


chuser – Change user attributes
rmuser – Remove a user

mkgroup – Define a new group


lsgroup – List group attributes
chgroup – Change group attributes
rmgroup – Remove a group

or use SMIT
© Copyright IBM Corporation 2009, 2015

Figure A-11. User management commands AN14G5.0

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.

A-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Survey the available AIX user management commands.
Details — Again the other UNIX operating systems have similar user management commands, but
they have different names then what is used in AIX. This is just a reference for them to know how to
map their existing knowledge to the AIX set of commands. Encourage them to use SMIT for user
management if they are going to be setting different user attributes. Otherwise, a simple mkuser
<username> at the command prompt suffices.
One difference is the use for the ADMCHG flag and pwdadam command.
Additional information —
Transition statement — Let us finish up with a brief introduction to the security enhancements that
you can find in AIX6.

© 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

AIX 6 and AIX 7 security enhancements (1 of 2)


IBM Power Systems

• Enhanced RBAC and Domain RBAC:


– Command privileges authorized by user role
– Can avoid use of SUID or even root user
– Can control with which resources a user can use the authority

• Encrypted file systems


– User can request transparent encryption of selected files

• Trusted execution
– Periodically audit system for tampering of commands or files
– Block execution of commands that are compromised

• Secure by Default (requires RBAC)


– Install AIX with maximum hardening, loosen as needed
© Copyright IBM Corporation 2009, 2015

Figure A-12. AIX 6 and AIX 7 security enhancements (1 of 2) AN14G5.0

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:

A-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty - isso - Information System Security Officer


- sa - System Administrator
- so – System Operator
- AccountAdmin - User and Group Account Administration
- BackupRestore -Backup and Restore Administration
- DomainAdmin - Remote Domain Administration
- FSAdmin - File System Administration
- SecPolicy - Security Policy Administration
- SysBoot - System Boot Administration
- SysConfig - System Configuration
• Domain RBAC
With enhanced Resource-Based Access Control (RBAC), authorization for a particular function
but did not constrain with which instance of a resource it could be used. For example, the RBAC
role would permit modification file system attributes, but could not restrict which file systems
could be modified by the user. With Domain RBAC (introduced in AIX 7), the domain of an
ability can be defined. In the file system example, you could identify which users are allowed to
use their file system management abilities against particular file systems.
• Trusted Execution (TE)
The usual way for a malicious user to harm the system is to get access to the system and then
install Trojan horses, rootkits, or tamper with some security critical files such that the system
becomes vulnerable or exploitable. The central idea behind TE is to be able to prevent such
activities or at least be able to identify if any such thing happens to the system.
Selective critical files have their attributes (such as size, permissions, and checksums) recorded
in a Trusted Signature Database (TSD). The integrity of either individual files or all TSD defined
files can then be checked by comparing their current characteristics with what is in the TSD.
The integrity check can be done as an audit activity (periodically check the TSD defined files) or
as a runtime check which will prevent execution of a command that has been tampered with.
• Encrypted files system
The Encrypted Files System (EFS) feature, introduced in AIX 6.1, enables individual users on
the system to encrypt their data on a JFS2 file system using that user’s keystore file. Once
setup, the access and use of the encrypted files is transparent to the user and looks no different
than working with a non-encrypted file.
- Files are in an encrypted state only on disk. After creating an EFS file system, one can then
define encrypted file support either for a single file or set encryption inheritance at either the
file system level or at a directory level.
- Files can be backed up encrypted.
- Each file is encrypted separately.
- EFS is integrated into JFS2 processing.
- AIX commands have been modified to take encrypted file systems into account.

© 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.

A-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Provide a brief overview of AIX6 and AIX7 security enhancements.
Details — This is just to let the students know that there is a lot more to AIX security than just the
traditional UNIX security that the unit has reviewed up to this point. Point the students to the AIX
security course for a more complete treatment of thee topics.
Additional information —
Transition statement — Let us review what we have covered with a few checkpoint questions.

© 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

AIX 6 and AIX 7 security enhancements (2 of 2)


IBM Power Systems

• 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)

© Copyright IBM Corporation 2009, 2015

Figure A-13. AIX 6 and AIX 7 security enhancements (2 of 2) AN14G5.0

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.

A-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

A-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (1 of 2)
IBM Power Systems

1. Which performance statistics commands does AIX support?


a. iostat
b. vmstat
c. netstat
d. ps
e. All of the above

2. True or False: Use of the crontab commands allows you to set up


recurring job executions in AIX.

© Copyright IBM Corporation 2009, 2015

Figure A-14. Checkpoint (1 of 2) AN14G5.0

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

1. Which performance statistics commands does AIX support?


a. iostat
b. vmstat
c. netstat
d. ps
e. All of the above
The answer is all of the above.

2. True or False: Use of the crontab commands allows you to set up


recurring job executions in AIX.
The answer is true.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — We have a few more questions.

A-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (2 of 2)
IBM Power Systems

3. What can be done in AIX if paging space is filling up?


a. Stop and start programs with memory leaks
b. Dynamically increase the size of existing paging spaces
c. Dynamically define and activate a new paging space
d. Stop low priority programs
e. All of the above

4. True or False: AIX allows you to use standard UNIX security or use
enhanced security facilities.

© Copyright IBM Corporation 2009, 2015

Figure A-15. Checkpoint (2 of 2) AN14G5.0

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

3. What can be done in AIX if paging space is filling up?


a. Stop and start programs with memory leaks
b. Dynamically increase the size of existing paging spaces
c. Dynamically define and activate a new paging space
d. Stop low priority programs
e. All of the above
The answer is all of the above.

4. True or False: AIX allows you to use standard UNIX security or use
enhanced security facilities.
The answer is true.

© Copyright IBM Corporation 2009, 2015

Transition statement — This completes the unit, let us review what we covered.

A-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Identify AIX supported performance monitoring commands
• Identify standard UNIX scheduling abilities in AIX
• Identify the print subsystems supported by AIX and describe
the common UNIX print management commands supported
• Describe the AIX paging space management commands
• Identify common UNIX security mechanisms used in AIX

© Copyright IBM Corporation 2009, 2015

Figure A-16. Unit summary AN14G5.0

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.

A-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty
Appendix B. Printers and queues

Estimated time
00:40

What this unit is about


This unit describes the concepts behind the AIX print spooling mechanisms
in AIX.

What you should be able to do


After completing this unit, you should be able to:
• Describe the purpose and the benefits of a queuing system
• Identify the major components that are responsible for processing a print
request
• Add a printer queue and device under different circumstances
• Submit jobs for printing
• View the status of the print queue

How you will check your progress


Accountability:
• Checkpoint questions

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

After completing this unit, you should be able to:


• Describe the purpose and the benefits of a queuing system
• Identify the major components that are responsible for
processing a print request
• Add a printer queue and device under different circumstances
• Submit jobs for printing
• View the status of the print queue

© Copyright IBM Corporation 2009, 2015

Figure B-1. Unit objectives AN14G5.0

Notes:

B-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Set the students’ expectations for this unit.
Details —
Additional information —
Transition statement — Let us start by looking at an overview of the print subsystem.

© 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

AIX printing environments


IBM Power Systems

• Print subsystems:
– AIX print subsystem
– System V print subsystem

• Print directly to a local printer device.

• Print directly to a remote printer through a socket program.

• Infoprint Manager, or similar advanced print management


system

© Copyright IBM Corporation 2009, 2015

Figure B-2. AIX printing environments AN14G5.0

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.

B-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Print directly to a local printer device


This is the simplest form of printing. If your printer is directly attached to a serial or parallel port
on the local machine, it is possible to print by sending a file directly to the device. For example:
# cat /home/karlmi/myfile > /dev/lp0
In this approach, you lose the ability to serialize (spool) print requests. Only one user can print
at a time. On the other hand, if a printer is dedicated to one use, this can be a good solution.
Examples might be logging to a printer, or printing checks.
• Print directly to a remote printer through a socket program
This is similar to printing to a device driver, except that in this case, you are sending the output
to a program which makes a connection to the printer over the network.
• Print using the System V print subsystem
In this environment, files to be printed are sent to the System V print service daemon, lpsched,
using the lp or lpr commands. The print service daemon serializes the jobs, so they will be
printed in the order in which they were submitted. The print service can filter the file to format
the data so that it matches the types of data acceptable to the printer. The print service then
sends files, one at a time, to the interface program, which can do additional filtering before
sending the file to the local printer driver or network printing application.
• Print using the AIX print subsystem
In this environment, files to be printed are sent to the AIX print spooler daemon, qdaemon,
using any of the AIX print commands (enq, qprt, lp, or lpr). The spooler daemon serializes
the jobs. The spooler sends jobs, one at a time, to programs that can filter the data, before
sending it to the local printer driver or network printing application.
• Print using IBM’s Infoprint Manager (or similar advanced print management system)
Infoprint Manager provides serialization and filtering similar to the System V or AIX print
subsystems. In addition, 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 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.

B-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

AIX print subsystem: Advantages


IBM Power Systems

• Powerful and flexible printer drivers

• System management tools:


– Limits fields and options validation
– Easy printer customization
– Single step print device and queue creation

• Customizable spooling subsystem

© Copyright IBM Corporation 2009, 2015

Figure B-3. AIX print subsystem: Advantages AN14G5.0

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.

B-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

System V print subsystem: Advantages


IBM Power Systems

• Compatibility
• Availability of interface programs
• Security
• Support for forms
• Standard PostScript filters
• Long term strategy

© Copyright IBM Corporation 2009, 2015

Figure B-4. System V print subsystem: Advantages AN14G5.0

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

• Support for forms


If you are printing to preprinted forms, it is important that other users not be able to print while
the expensive forms are loaded on the printer. The System V print subsystem provides a
mechanism for mounting forms on printers, and allowing or denying, user access based on the
form which is mounted. To provide this capability under AIX printing, you must create multiple
queues and manage which queues are enabled while a form is mounted.
• Standard PostScript filters
The System V print subsystem includes a number of filters for converting different file formats to
PostScript. Some formatting and page selection capabilities are also included.
• Long-term strategy
IBM’s long-term printing strategy for AIX is to maintain compatibility with other UNIX systems.
This means that new features and functions are added to the System V print subsystem in later
releases, while the AIX print subsystem is supported, but not enhanced in future releases.

B-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List advantages of System V print subsystem.
Details — In summary, the main advantages of System V has to do with compatibility. This makes it
easy for system administrators from other UNIX variants to transition to AIX and it drives availability
of support for a larger number of printers on AIX.
System V also adds forms support and better security.
Additional information — Directory-enabled printing is supported beginning with
AIX 5L V5.2. System V printing on AIX uses LDAP (Lightweight Directory Access Protocol) as the
directory service.
A directory is an ordered list of objects, including details about each object. Obvious examples are
phone books or library card catalogs. Directories are a type of database. They differ from other
databases in that accesses are mostly reads, with only occasional writes. Directory protocols are
optimized to facilitate a high read environment.
Computer directories can be searched in many ways, making them a very powerful way to store
and manage information.
In the case of a printer directory, this might include searching for the name of a printer to get its
characteristics, searching for printers in a particular location, searching for printers with particular
features, and so forth. Directory enabled printing provides an easy way for users to search for a
printer that is close and has the features they require. If security or other control features are made
part of the directory, directory enabled printing facilitates easier management by system
administrators.
Transition statement — Now, let us look at traditional AIX printing and queues.

© 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

Figure B-5. Concepts of queues AN14G5.0

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.

B-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Explain the purpose and benefits of queuing versus printing directly to a device driver.
Details — A simple way of submitting jobs to the printer device is with the following command:
$ cat myfile > /dev/lp0
This prints the output from the cat command on the printer lp0. The printer device modifies the
data stream to ensure things like number of lines on a page, page ends, page ejects, and so forth. It
has certain characteristics like an 80-character line already set.
The major disadvantage of using the above method for printing is that you bypass the queue facility
and lose your ability to serialize print requests to a printer through the queuing system. Printing by
utilizing a queuing system, enables a user or an application to send a print job to a queue, and then
the queuing subsystem itself will drive the printers and share them among the applications and
users who want to access the printers.
Additional information — The motivation behind having two queues sharing the same printer is
the ability to have different types of data streams for the same printer. For example, one queue
might be straight ASCII while another queue might support PostScript printing.
Transition statement — Let us look at the actual data flow through the queuing system.

© 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

Printer data flow


IBM Power Systems

# qprt -Pps [-c] file


print request

lp lpr qprt
enq
copy of file (if requested)
Queue
Spool
monitors directory
qdaemon uses spool file
(if it exists)
starts
Backend Virtual Printer
(piobe) Definition

submits file to
printer

/dev/lp0
© Copyright IBM Corporation 2009, 2015

Figure B-6. Printer data flow AN14G5.0

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.

B-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty • Queuing system process


The flow of the queuing system shown in the visual:
- The printing command calls enq. enq checks to see if the requested queue name is a valid
queue and all of the parameters are correct. If so, it continues, if not, an error message is
returned to the user.
- An entry is made in the /var/spool/lpd/qdir directory identifying the job to be run. If
the printer command uses an option to indicate that a copy of the file is to be made, the copy
is placed in the spool directory /var/spool/qdaemon.
- The qdaemon is notified of a new job in its qdir directory.
- When the queue is ready for the job, the qdaemon reads information from the
/etc/qconfig file describing the queue.
- The qdaemon updates the /var/spool/lpd/stat file for the appropriate queue to show
that the queue is now working on a new job.
- The qdaemon starts the back-end program, passing the file names and appropriate options
on the command line.
- The back-end determines the correct data stream characteristics, and merges these with
the actual file. The data stream characteristics are stored as virtual printer definitions in the
/var/spool/lpd/pio/@local directory.
- The back-end program sends its data stream to the device driver for the appropriate printer.
• What happens when a file is spooled?
When a file is spooled, a copy of that file is sent to the print spool directory,
/var/spool/qdaemon. The copy remains in that directory until it is printed. This means that if
you spool a file to the printer, a user could continue to make revisions to the original since the
copy in the print spool directory will not be altered. This ensures that the file that is sent to the
printer gets printed in its original form, even if a user edits the original file that is on disk.
Spooled files take up disk space in /var until they are printed.
When a file is queued, one line of information is sent to the /var/spool/lpd/qdir directory
which points back to the original file on disk. If revisions are made to the file on disk before it is
pulled from the queue to print, the revised file is printed.

© 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.

B-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

System files associated with printing


IBM Power Systems

/etc/qconfig Queue configuration files

/var/spool/* Spooling directories

/var/spool/lpd/qdir/* Queue requests

/var/spool/qdaemon/* Temporary enqueued files

/var/spool/lpd/stat/* Line printer status information

/var/spool/lpd/pio/@local Virtual printer directories

© Copyright IBM Corporation 2009, 2015

Figure B-7. System files associated with printing AN14G5.0

Notes:

Print related files and directories


The system files and directories used for printing include:
• The /etc/qconfig file describes the queues and devices available for use by the printing
commands.
• The /var/spool directory contains files and directories used by the printing programs and
daemons.
• The /var/spool/lpd/qdir directory contains information about files queued to print.
• The /var/spool/qdaemon directory contains copies of the files that are spooled to print.
• The /var/spool/lpd/stat directory is where the information on the status of jobs is stored.
It is used by the qdaemon and backend programs.
• The /var/spool/lpd/pio/@local directory holds virtual printer definitions. This is where
the attributes of printers are paired with the attributes of corresponding data stream types.
It is recommended that SMIT be used to update these device-related files. In most cases, updating
standard system files is not recommended.

© 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.

B-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

qdaemon
IBM Power Systems

• Manages queues
• Is started in the /etc/inittab file
• Invokes the back-end programs
• Optionally records accounting data

© Copyright IBM Corporation 2009, 2015

Figure B-8. qdaemon AN14G5.0

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.

B-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

The /etc/qconfig file


IBM Power Systems

lp0: * One queue pointing to one device


device = lp0dev
up = TRUE
discipline = fcfs
lp0dev:
file = /dev/lp0
backend = /usr/lib/lpd/piobe
header = group
trailer = never
lpq: * One queue pointing to two devices
device = lpqdev1,lpqdev2
lpqdev1:
file = /dev/lp1
backend = /usr/lib/lpd/piobe
lpqdev2:
file = /dev/lp2
backend = /usr/lib/lpd/piobe
ps: * Two queues pointing to one device
device = psdev
psdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe
asc:
device = ascdev
ascdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe

© Copyright IBM Corporation 2009, 2015

Figure B-9. The /etc/qconfig file AN14G5.0

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

B-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Cover all the different relationships that queues and devices can have.
Details — The reason that it is recommended to use SMIT rather than editing the file directly, is
mainly to keep the contents of /etc/qconfig consistent with the contents of the ODM. For
example, if you use vi to remove an entire stanza of information from the file, the ODM still has an
entry for that printer, and you are not able to redefine that printer until the ODM is in sync with the
/etc/qconfig file.
A queue can have a one to one relationship, where there is one queue to one printer. Or, a queue
can have a one to many relationship, where there are many printers in the same room and the job
goes to the first available printer. There might be times when there are multiple queues that support
one printer giving each queue its own characteristics of printing a job, which is referred to as the
many-to-one relationship. This occurs when a printer is capable of printing different types of output
such as ASCII, PostScript, and graphics.
The discipline attribute defines the queue serving algorithm. The default value, fcfs, means
first-come-first-served. sjn means shortest job next.
Additional information — How can you tell what the default queue is based on the
/etc/qconfig file? Answer: The first queue name specified is the default queue.
The LPDEST variable can also be set to define a user default queue. If both PRINTER and LPDEST
are set, LPDEST's value is the value that is used.
Transition statement — Let us look at how to define printers and print queues.

© 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

Move cursor to desired item and press Enter.

AIX Print Spooling


System V Print Spooling

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


F9=Shell F10=Exit Enter=Do

© Copyright IBM Corporation 2009, 2015

Figure B-10. Printer menu AN14G5.0

Notes:

Interface to manage spooling


AIX print spooling and System V print spooling are both supported by SMIT in AIX 6.1 and later.

B-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show the main SMIT menu to manage print spooling.
Details —
Additional information —
Transition statement — Let us configure a local print queue through SMIT.

© 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

AIX printer menu


IBM Power Systems

# smit spooler
AIX Print Spooling
Move cursor to desired item and press Enter.

Start a Print Job


Manage Print Jobs
List All Print Queues
Manage Print Queues
Add a Print Queue
Add an Additional Printer to an Existing Print Queue
Change / Show Print Queue Characteristics
Change / Show Printer Connection Characteristics
Remove a Print Queue
Manage Print Server
Programming Tools

Change / Show Current Print Subsystem

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


F9=Shell F10=Exit Enter=Do

© Copyright IBM Corporation 2009, 2015

Figure B-11. AIX printer menu AN14G5.0

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

B-26 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

B-28 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Configuring a printer with a queue


IBM Power Systems

AIX Print Spooling

Move cursor to desired item and press Enter.

Add a Print Queue

Move cursor to desired item and press Enter. Use arrow keys to scroll.
#ATTACHMENT TYPE DESCRIPTION
local Printer Attached to Local Host
remote Printer Attached to Remote Host
xstation Printer Attached to Xstation
ascii Printer Attached to ASCII Terminal
hpJetDirect Network Printer (HP JetDirect)
file File (in /dev directory)
ibmNetPrinter IBM Network Printer
ibmNetColor IBM Network Color Printer
other User Defined Backend

F1=Help F2=Refresh F3=Cancel


F8=Image F10=Exit Enter=Do
/=Find n=Find Next

© Copyright IBM Corporation 2009, 2015

Figure B-12. Configuring a printer with a queue AN14G5.0

Notes:

Adding a local print queue


In our example, assume that the printer is directly attached to our AIX system. To configure a printer
attached in this way, choose local.
Some applications contain their own print control mechanisms and thus require that a printer be
configured without a queue. Use the SMIT fastpath smit pdp to define a printer without a queue.

© 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.

B-30 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Selecting a printer type (1 of 2)


IBM Power Systems

AIX Print Spooling

Move cursor to desired item and press Enter.

Printer Type
Move cursor to desired item and press Enter.

Bull
Canon
Dataproducts
Hewlett-Packard
IBM
Lexmark
OKI
Printronix
QMS
Texas Instruments
Other (select this if your printer is not listed above)

F1=Help F2=Refresh F3=Cancel


F8=Image F10=Exit Enter=Do
/=Find n=Find Next

© Copyright IBM Corporation 2009, 2015

Figure B-13. Selecting a printer type (1 of 2) AN14G5.0

Notes:

Specify the printer manufacturer


The next selection that has to be made is the printer type. Notice that IBM is only one of the choices
and many other manufacturers are supported as well. Note also that there is an Other option which
will be selected if the printer type is not supported; that is, not part of the list.

© 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.

B-32 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Selecting a printer type (2 of 2)


IBM Power Systems

AIX Print Spooling

Printer Type
Move cursor to desired item and press Enter.

[MORE...8]
ibm2391-2 IBM 2391 Plus printer (Model 2)
ibm3112 IBM 3112 Page Printer
ibm3116 IBM 3116 Page Printer
ibm3130 IBM 3130 LaserPrinter
ibm3812-2 IBM 3812 Model 2 Page Printer
ibm3816 IBM 3816 Page Printer
ibm4019 IBM 4019 LaserPrinter
ibm4029 IBM 4029 LaserPrinter
ibm4037 IBM 4037 LP printer
ibm4039 IBM 4039 LaserPrinter
[MORE...49]

F1=Help F2=Refresh F3=Cancel


Esc+8=Image Esc+0=Exit Enter=Do
/=Find n=Find Next

© Copyright IBM Corporation 2009, 2015

Figure B-14. Selecting a printer type (2 of 2) AN14G5.0

Notes:

Select the manufacturer’s supported printer


If you do not have the software installed for your printer, you are prompted to insert the media to
install the software first, before configuring the device and the queue.
The choice of printer determines the queue, or the virtual printer, setup. For example, an IBM 4029
Laser Printer is capable of handling PostScript, ASCII, GL Emulation, and PCL Emulation. The
SMIT print spooling menus guide you through the creation of up to four separate queues which
submit to the same printer.

© 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.

B-34 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

ppa0 Available 01-G0Standard Parallel Port Adapter

© Copyright IBM Corporation 2009, 2015

Figure B-15. Printer attachment AN14G5.0

Notes:

Selecting the printer attachment


After selecting a printer type, a pop-up window is displayed where the printer interface must be
chosen. Possible values are parallel, RS232, and RS422. Some printers support multiple
attachment methods.
Then, a list of installed adapters that support that method of attachment are presented.

© 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.

B-36 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Add the print queues


IBM Power Systems

Add a Print Queue


Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]

Description IBM 4029 LaserPrinter


Names of NEW print queues to add
ASCII [asc]
GL Emulation []
PCL Emulation []
PostScript [ps]

Printer connection characteristics


* PORT number [p] +
Type of PARALLEL INTERFACE [standard] +
Printer TIME OUT period (seconds) [600] +#
STATE to be configured at boot time available +

F1=Help F2=Refresh F3=Cancel F4=List


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

© Copyright IBM Corporation 2009, 2015

Figure B-16. Add the print queues AN14G5.0

Notes:

Create the print queues


This menu varies depending on the characteristics of the physical printer. If the printer is capable of
two or three different modes or emulations, the system prompts you for a separate queue name for
each emulation. Once these queues are created, they are sometimes referred to as virtual print
devices.
Additional queues can be added to this printer after the initial queues are created.

© 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.

B-38 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Remote printing
IBM Power Systems

host1 client1
lp1

9 Set up the local print queue.


9 Configure a
9 Define client machines in remote queue.
/etc/hosts.lpd.
9 Start the lpd daemon.

© Copyright IBM Corporation 2009, 2015

Figure B-17. Remote printing AN14G5.0

Notes:

Overview of print server setup


Once your system has the local queue set up, any user on that system can print. If the machine is
networked, it can also provide printing for client machines by becoming a print server.
To set up a print server, you need to define the client machine names, or IP addresses, in the
/etc/hosts.lpd file, and then start the lpd daemon. Both of these tasks can be done through
SMIT. To use SMIT, the fastpath to identify the client system is smit mkhostslpd.
The lpd daemon is controlled by SRC. You should use SMIT to start it, because SMIT also adds
entries to /etc/inittab to ensure that it is started on reboot. The fastpath for this screen is smit
mkitab_lpd.

© 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.

B-40 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Client authorization
IBM Power Systems

# smit mkhostslpd

Add Print Access for a Remote Client

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* Name of REMOTE CLIENT [client1]
(Hostname or dotted decimal address)

F1=Help F2=Refresh F3=Cancel F4=List


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

© Copyright IBM Corporation 2009, 2015

Figure B-18. Client authorization AN14G5.0

Notes:

Set up client authorization


This step is done on the print server. On this screen, enter the client machine's name or IP address.
A plus sign (+) is also valid. It indicates that this AIX system is a print server to all machines.

© 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.

B-42 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Start lpd
IBM Power Systems

# smit mkitab_lpd
Start the Print Server Subsystem

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Start subsystem now, on system restart, or both [both] +
TRACE lpd daemon activity to syslog? [no] +
EXPORT directory containing print attributes? [no] +

Note:
Exporting this print server's directory
containing its print attributes will allow
print clients to mount the directory. The
clients can use this server's print attributes
to display and validate print job attributes
when starting print jobs destined for this
print server. Note that the Network File
System (NFS) program product must be installed
and running

© Copyright IBM Corporation 2009, 2015

Figure B-19. Start lpd AN14G5.0

Notes:

Starting the lpd daemon


This step is done on the print server. The lpd daemon is controlled by the system resource
controller (SRC). The commands startsrc and stopsrc can be used to control lpd. By using
SMIT, an entry is placed in the /etc/inittab file to ensure that lpd is started each time the
machine is booted.

© 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.

B-44 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Add a remote print queue


IBM Power Systems

AIX Print Spooling

Move cursor to desired item and press Enter.

Add a Print Queue

Move cursor to desired item and press Enter.Use arrow keys to scroll.
#ATTACHMENT TYPE DESCRIPTION
local Printer Attached to Local Host
remote Printer Attached to Remote Host
xstation Printer Attached to Xstation
ascii Printer Attached to ASCII Terminal
hpJetDirect Network Printer (HP JetDirect)
file File (in /dev directory)
ibmNetPrinter IBM Network Printer
ibmNetColor IBM Network Color Printer
other User Defined Backend

© Copyright IBM Corporation 2009, 2015

Figure B-20. Add a remote print queue AN14G5.0

Notes:

Adding a remote queue on the client


This step is done on the client machine. The procedure to add a remote queue starts the same way
as a local queue: smit spooler > Add a Print Queue. This time, select remote as the
attachment type.
You are prompted to determine if you want to perform any type of filtering or pre-processing to the
print job before it is sent. Normally, Standard Processing is selected. This just sends the job to the
printer server and the print server is responsible for processing the job.

© 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.

B-46 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Define the print server on the client


IBM Power Systems

Add a Standard Remote Print Queue

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
*Name of QUEUE to add [rq1]
*HOSTNAME of remote server [host1]
*Name of QUEUE on remote server [lp1]
Type of print spooler on remote server AIX Version 3 or 4 +
Backend TIME OUT period (minutes) [] #
Send control file first? no +
TO turn on debugging, specify output []
file pathname
DESCRIPTION of printer on remote server []

© Copyright IBM Corporation 2009, 2015

Figure B-21. Define the print server on the client AN14G5.0

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.

B-48 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Let us review
IBM Power Systems

1. True or False: The qdaemon is responsible for printing


jobs.

2. To set up remote printing, what daemons are needed, and


do they run on the server, the client, or both?

3. What does the up = TRUE indicate in the /etc/qconfig


file?

4. What does discipline mean in reference to the


/etc/qconfig file? What are its possible values?

© Copyright IBM Corporation 2009, 2015

Figure B-22. Let us review AN14G5.0

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.

Let us review solutions


IBM Power Systems

1. True or False: The qdaemon is responsible for printing jobs.


The answer is false. The printer back-end is responsible for printing. The
qdaemon manages jobs in queue. The qdaemon hands the jobs off to the back-
end for printing.

2. To set up remote printing, what daemons are needed, and do they run on the
server, the client, or both?
The answer is qdaemon and lpd on the server; qdaemon only on the client.

3. What does the up = TRUE indicate in the /etc/qconfig file?


The answer is it means the queue is accepting jobs. If it were FALSE, the user
would be notified that the queue is not accepting jobs.

4. What does discipline mean in reference to the /etc/qconfig file? What are
its possible values?
The answers are discipline is read by qdaemon to determine the sorting
order for jobs in the queue. The values supported are fcfs (first come first
server) and sjn (shortest job next).

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Now, let us look at how to submit print jobs.

B-50 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Submitting print jobs


IBM Power Systems

• AIX print systems offer compatibility to System V print


commands
• To submit a job to a queue:
System V BSD AIX
lp lpr qprt

$ lp -d queuename filename

- OR-

$ qprt -P queuename filename

© Copyright IBM Corporation 2009, 2015

Figure B-23. Submitting print jobs AN14G5.0

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

B-52 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how to submit jobs to the printer.
Details — Explain the visual using the student notes. Do not explain every single option for every
command. Concentrate on the AIX command.
Note that qprt was chosen to be on the visual because it is the AIX command. lp was also included
because it illustrates that these commands use different options. lp is the most popular printing
command in UNIX. The student notes include a discussion on all the available commands. Students
should choose what works best for them.
You might also want to mention the -j option, which can be used with the enq and lpr commands,
so that the job number is displayed once the job has been submitted to print. The lp command
displays the job number by default. The qprt command uses the -j option for another purpose.
Additional information —
Transition statement — Once you have submitted a job, you probably want to view where in the
queue your job is. Let us see how you can do this.

© Copyright IBM Corp. 2009, 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

Listing jobs in a queue


IBM Power Systems

• To list jobs in a queue:

SYSTEM V BSD AIX


lpstat lpq qchk

For example:
$ qchk
Queue Dev Status Job Files User PP % Blks Cp Rnk
ps lp0 DOWN QUEUE 569
/etc/motd root 1 1 1

© Copyright IBM Corporation 2009, 2015

Figure B-24. Listing jobs in a queue AN14G5.0

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.

B-54 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

B-56 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Change characteristics of a queue


IBM Power Systems

# smit chpq

Print Queue to Change / Show


Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry
Fields]

PRINT QUEUE name [ps] +

Characteristics to Change / Show


Move the cursor to the desired item and press Enter.

1. Printer Setup
2. Default Print Job Attributes
3. Accounting File
4. Queuing Discipline

© Copyright IBM Corporation 2009, 2015

Figure B-25. Change characteristics of a queue AN14G5.0

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

- Mode in which to leave the printer at the end of the job


- Width of printable area on header page
• Attributes for Default Print Job option
After selecting 2. Default Print Job Attributes, the following attributes can be changed or
shown:
- Text print options such as emphasized print
- Job processing options such as page number where printing should begin
- Text formatting options such as top Margin and lines per page
- Paper/Page Options such as page orientation
- Header/Trailer Page such as separator pages
- Messages/Diagnostics
• Attributes for Accounting File option
After selecting 3. Accounting File, the following attribute can be changed or shown:
- Accounting file name
• Attributes for Queuing Discipline option
After selecting 4. Queuing Disciple, the following attribute can be changed or shown:
- Queuing discipline

B-58 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how the characteristics of the queue can be customized.
Details — You must select the queue name to which you want to make the changes. Then, select
the option that holds the attribute that you are changing. Refer to the student notes to obtain a list of
what is contained in each option.
The actual contents of each option will vary depending on the type of queue being customized (for
example, an ASCII queue versus a PostScript queue).
Under Default Print Job Attributes => Job Processing Options..., some queues allow you to
specify the page number where printing should begin. This can be helpful if there is a paper jam in
the middle of printing a job. Bring the queue down and fix the jam. Then, alter this value to indicate
the page at which you want the print job to resume. Then, change the value back to 1 for printing
future jobs.
The queueing discipline will be covered in more detail shortly. If a student asks, the two disciplines
that can be chosen are either First Come First Serve or Shortest Job Next.
Additional information —
Transition statement — Let us see how we can remove a queue.

© 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

Remove a Print Queue

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Print queue to remove ps:lp0
Local printer device /dev/lp0

KEEP the local printer device? no +

© Copyright IBM Corporation 2009, 2015

Figure B-26. Removing a queue AN14G5.0

Notes:

Removing a queue with SMIT


It is not possible to remove a queue containing jobs. The jobs would have to be removed first.
The last option on the screen asks whether the printer device definition should be kept. This option
will only appear if the queue being removed is the only queue defined for a printer. Note that by
default, it will be removed.

B-60 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how queues can be deleted from the system.
Details — The last option on the screen asks whether the printer device definition should be kept.
This option will only appear if the queue being removed is the only queue defined for a printer. Note
that by default, it will be removed. You might want to keep the definition if in the future you want to
add a new queue which uses the same printer. If there were other queues which were using the
printer, the last option would not be present on the SMIT screen. This option will remove the print
queue from the system configuration.
Additional Information—
Transition statement — Other management tasks can be carried out on queues. Let us see what
they are.

© 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

Manage Print Queues

Move the cursor to the desired item and press Enter.

Show Status of Print Queues


Stop a Print Queue
Start a Print Queue
Set the System's Default Print Queue

© Copyright IBM Corporation 2009, 2015

Figure B-27. Managing queues AN14G5.0

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

B-62 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List the supported management tasks for queues through SMIT.
Details — The visual is fairly self-explanatory. Point out that if a print queue is stopped, print jobs
can still be submitted to the queue. However, they will not be processed until the queue is enabled.
Changing the system wide default printer will affect everyone other than those who have set the
PRINTER or LPDEST variable to their own personal choice.
We will look at the first three items on this menu. The last item is self-explanatory, so there is no
need to spend more time on it.
Be sure to point out that the last three tasks on this menu can only be performed by the root user or
a member of the printq group.
Additional information —
Transition statement — Let us see what the different queue statuses mean.

© 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

Understanding queue status


IBM Power Systems

Queue Dev Status Job Files User PP % Bks Cp Rnk


ps lp0 DOWN
QUEUED 1569 /etc/motd root 1 1 1
State Description
DEV_BUSY Printer is busy servicing other print requests.
DEV_WAIT Queue is waiting for the printer
DOWN Queue is down and no jobs will be serviced
from this queue until it is brought up.
OPR_WAIT The queue is waiting for operator intervention.
QUEUED Job is queued and waiting.
READY Everything is ready to receive a print request.
RUNNING Print file is printing.
UNKNOWN Problem with the queue: Need to investigate
further to determine cause.
© Copyright IBM Corporation 2009, 2015

Figure B-28. Understanding queue status AN14G5.0

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.

B-64 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

B-66 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Bringing queues up and down


IBM Power Systems

# lpstat
Queue Dev Status Job Files User PP % Bks Cp Rnk
draft lp0 DOWN
QUEUED 132 /etc/motd team01 1 1 1
Quality lp0 READY

• To enable a queue whose status is DOWN:


# enable draft

• To disable a queue whose status is READY:


# disable quality

You must be a member of the printq group or root.


© Copyright IBM Corporation 2009, 2015

Figure B-29. Bringing queues up and down AN14G5.0

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.

B-68 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Manage Print Jobs


IBM Power Systems

# smit jobs

Manage Print Jobs

Move the cursor to the desired item and press Enter.

Cancel a Print Job


Show the Status of Print Jobs
Prioritize a Print Job
Hold / Release a Print Job
Move a Job between Print Queues

© Copyright IBM Corporation 2009, 2015

Figure B-30. Managing Print Jobs AN14G5.0

Notes:

Who can manage print jobs?


The root user or a member of the print group can work with any print request. Normal users can
only work with their own print jobs.

© 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.

B-70 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Cancel a Print Job


IBM Power Systems

# smit qcan

Cancel a Print Job

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry
Fields]
PRINT QUEUE containing job [ ] +
(required for remote jobs)
* Print JOB NUMBER [ ] +#

© Copyright IBM Corporation 2009, 2015

Figure B-31. Cancel a Print Job AN14G5.0

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.

B-72 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Job priority example


IBM Power Systems

# 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

QUEUED 570 /etc/motd root root


1/07/03 09:40:15 2 15 1 1
/etc/motd

# qpri -#570 -a 25
# qchk -L
Queue Dev Status Job Name From To
______ ___ ______ Submitted Rnk Pri Blks Cp PP %
pslp0 DOWN
QUEUED 570 /etc/motd root root
1/07/03 09:40:15 1 25 1 1
/etc/motd

QUEUED 569 /etc/qconfig root root


1/07/03 09:39:25 2 15 2 1
/etc/qconfig

© Copyright IBM Corporation 2009, 2015

Figure B-32. Job priority example AN14G5.0

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

The qprt -R command can also be used to set job priority.


• Example
The example in the visual shows that when print jobs are submitted they receive the default
priority of 15. The example shows how the qpri command can be used to change the priority
of job number 570 to 25. Use the qchk -L command to show the new job priorities.

B-74 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Define how to change the priority of a print job.
Details — Mention that normal users can only raise their priority to 20, whereas members of the
printq group or root can change their priority to 30. Mention also that jobs by default are submitted
with a priority of 15.
You can only assign priority on local queues. You cannot assign the priority of a remote print job.
The example shows that when print jobs are submitted they receive the default priority of 15. The
example shows how the priority of job number 570 has been increased to 25. This is clearly seen in
the output of the qchk -L command.
Students note that the ps queue has been disabled. However, it is still possible to send jobs to the
queue.
Priority takes precedence over discipline. Even in the shortest-job-next environment, priority is the
most important.
Additional information —
Transition statement — Now let us see how a job can be held in a queue.

© 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

Holding a job in a queue


IBM Power Systems

# 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

© Copyright IBM Corporation 2009, 2015

Figure B-33. Holding a job in a queue AN14G5.0

Notes:

Holding and releasing a print job


The qhld command is used to put a temporary hold on a job that is waiting in the queue. The qhld
command is also the command that is used to release job back in the queue.
The visual provides a example of using the qhld command to hold and then release job # 1493.
This task can also be accomplished through SMIT (smit qhld).

B-76 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — To show how to use the qhld command.
Details — Cover the example. qhld can be used to hold a job, a queue (use -P) or jobs owned by a
particular user (use -u).
If you specify and own and do not specify a queue name, then all jobs by that owner are effected.
You cannot hold a job once it starts printing.
You cannot hold or release remote print jobs.
Explain the example per the visual. Job number 1493 is first held and then released.
In reality, if the queue were ready and only one job was queued, the job would print before you
could alter it to HELD. So, for the sake of example, assume that there are other jobs in the queue
that might currently be printing.
Additional information —
Transition statement — Print jobs can also be moved from one queue to another. Let us see how
this can be done.

© 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

Moving a job between queues


IBM Power Systems

# qchk -A

Queue Dev Status Job Files User PP% Blks Cp Rnk


asc lp0 DOWN
QUEUE 11 /etc/qconfig root 2 1 1
ps lp0 READY

# qmov -mps -#11


# qchk -A

Queue Dev Status Job Files User PP% Blks Cp Rnk


asc lp0 DOWN
ps lp0 RUNNING 11 /etc/qconfig root 2 1 1

© Copyright IBM Corporation 2009, 2015

Figure B-34. Moving a job between queues AN14G5.0

Notes:

Moving print jobs


You can move jobs between queues in AIX. The command qmov is used. The -m option specifies
what queue to move the job to and the -# option specifies the job number.
This can be done through SMIT using smit qmov.

B-78 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — Show how jobs can be moved from one queue to another.
Details — In the example the job is moved from the asc queue to the ps queue.
You cannot move a remote print job to another queue.
A job cannot be moved once it starts printing.
Additional information — When would this be useful?
Answer: If the user has made a mistake of submitting a job to the wrong queue.
Transition statement — Let us see what print-related directories to monitor.

© 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

Printing-related directories to monitor


IBM Power Systems

var

spool

lpd
qdaemon

qdir

• Temporary copies of enqueued


• Contains queue requests
files if spooling
(job description files)

© Copyright IBM Corporation 2009, 2015

Figure B-35. Printing-related directories to monitor AN14G5.0

Notes:

Why directories fill up


The directories shown in the visual fill up very quickly if the spooling mechanism encounters a
problem. For example, if the queue goes down, or if there are many users submitting jobs, there
might not be enough room to handle the requests.
Remember, when print jobs are submitted to spooling rather than just queuing, a copy of that file is
created and stored in the /var/spool/qdaemon directory until that job has printed. At that time,
the temporary file is removed. If the queue or multiple queues quit working, jobs don't get through
the system. This could cause a full condition in this directory structure.

B-80 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Instructor notes:


Purpose — List the directories that should be monitored.
Details — The following are directories which could potentially grow, so these have to be regularly
monitored. The spooling directories and files are under /var/spool. Do not go through each file and
directory name, however two of the more frequently used directories have been listed.
/var/spool/lpd/qdir contains one request for each job submitted to the printer, and the requests are
in the format NumberUser_name:Queue_name. This is what qdaemon uses to determine who
submitted the job, which of the users use to determine who submitted the job, which of the users
requested this particular job, and the queue name to which the job was submitted. The
/var/spool/qdaemon directory contains the spool files (if one is requested).
If the print spooler system needs to be cleared and restarted, it is possible to remove all files from
these directories. For example: rm /var/spool/lpd/qdir/* and
rm /var/spool/qdaemon/*. Be aware that these commands will completely delete all jobs in the
queues and the jobs need to be resubmitted. There are times when these actions are necessary
due to system problems. Of course, only the root user can execute these rm commands.
Also, if the /var file system becomes too large, actions also need to be taken.
Additional information —
Transition statement — What if you encounter a problem with your printer or the queues? What
can you try?

© 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

Printing problem checklist


IBM Power Systems

# cat file > /dev/lp0


Any output?

NO YES
Check hardware Check software

9 Check physical cables 9 qdaemon running


9 Printer online and ready 9 Check /etc/qconfig
9 No paper jams 9 Queue enabled
9 Not out of paper 9 /var and /tmp not full

© Copyright IBM Corporation 2009, 2015

Figure B-36. Printing problem checklist AN14G5.0

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

B-82 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty Look at the contents of /etc/qconfig to make sure it is not corrupt.


Ensure the queue is enabled. If not, enable it.
# lpstat
or
# qprt -A
# enable queuename
Check to make /tmp and /var are not full with the command: df

© Copyright IBM Corp. 2009, 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.

B-84 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (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.

2. True or False: The /etc/qconfig file is read by the


back-end program to determine what the queue discipline
is.

3. True or False: All printer software is automatically installed


when you install the base operating system.

4. What is the difference between these two commands?


# qprt -Pasc file1
# qprt -c -Pasc file1

© Copyright IBM Corporation 2009, 2015

Figure B-37. Checkpoint (1 of 2) AN14G5.0

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.

2. True or False: The /etc/qconfig file is read by the back-end program to


determine what the queue discipline is.
The answer is false. It is read by qdaemon.

3. True or False: All printer software is automatically installed when you install the
base operating system.
The answer is false. Only a handful of printer software is installed by default.

4. What is the difference between these two commands?


# qprt -Pasc file1
# qprt -c -Pasc file1
The answer is # qprt -c -Pasc file 1. The -c flag produces a spool
file.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement — Continue with more checkpoint questions.

B-86 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Checkpoint (2 of 2)
IBM Power Systems

5. What three methods can be used to find out what the


system default queue is?

6. What users can bring print queues down?

7. True or False: Once the queue is down, no more jobs can


be submitted to the printer.

8. Can users hold all their print jobs in a specific queue? If


so, how?

© Copyright IBM Corporation 2009, 2015

Figure B-38. Checkpoint (2 of 2) AN14G5.0

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.

6. What users can bring print queues down?


The answer is the root user or members of the printq group.

7. True or False: Once the queue is down, no more jobs can be


submitted to the printer.
The answer is false. Jobs can be submitted to the queue. However,
they will not be printed until the queue is brought up again.

8. Can users hold all their print jobs in a specific queue? If so, how?
The answer is yes, they can by only specifying a queue name and not
individual job numbers.

© Copyright IBM Corporation 2009, 2015

Additional information —
Transition statement —

B-88 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

Uempty

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


• Describe the purpose and the benefits of a queuing system
• Identify the major components that are responsible for
processing a print request
• Add a printer queue and device under different circumstances
• Submit jobs for printing
• View the status of the print queue

© Copyright IBM Corporation 2009, 2015

Figure B-39. Unit summary AN14G5.0

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.

B-90 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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

Installing and upgrading tasks


The information contrasts AIX and Solaris installing and upgrading tasks.
Tasks AIX Solaris
Install packages installp -a pkgadd
or fast path:
smitty install_latest
Display installed packages lslpp -L pkginfo
or fast path: or
smitty list_installed_sw pkgparam
;Pa
Remove software package installp -r pkgrm
or fast path: smitty reject
installp -u
or fast path: smitty remove
Verify correct installation lppchk pkgchk
or fast path:
smitty check_file
Install a patch instfix patchadd
or fast path:
smitty update_by_fix
Remove a patch installp -r patchrm
or fast path:
smitty reject
Display installed patches instfix -ia showrev -p
Install OS on another disk (Alternate alt_disk_install Live Upgrade
disk installation)
Create an installation server for nimconfig setup_install_server install_dir_path
network installation
Create a boot server for network smitty nim_config_env setup_install_server -b bootdirpath
installation
Set up a client for network installation nim -o bos_inst add_install_client

C-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Booting and shutting down


The following displays processes and locations of items that are involved in booting and shutting
down a system in AIX and Solaris.
Tasks AIX Solaris
Boot process Phases: Phases:
• Read Only Storage (ROS): Check • Boot PROM: Display system
the system mother board, perform information, run POST, load
Power-On Self-Test (POST), bootblk, locate ufsboot
locate the boot image, load the • Boot Programs: bootblk loads
boot image into memory, begin and executes the ufsboot
system initialization and execute • Kernel Initialization: ufsboot loads
phase 1 of the /etc/rc.boot script and executes the core kernel,
• Base Device Configuration: initializes core kernel data
StartConfiguration Manager to structures, loads other kernel
configure base devices modules based on the
• System Boot: Start init process /etc/system file, starts /sbin/init
phase 2, switch to hard-disk root program
file system, start other processes • init: Starts other processes based
defined by records in the on the /etc/inittab file
/etc/inittab file and execute phase
3 of the /etc/rc.boot script
Kernel modules directory Kernel and kernel extension modules Kernel modules are stored in three
are stored in two directories: directories:
• /usr/lib/boot • /platform/sparc/kernel or
• /usr/lib/drivers /platform/i86pc/kernel
• /kernel
• /usr/kernel
Create and stop processes and Set the default environment variables Set the default environment variables
services for a current system run level as defined in /etc/rc as defined in /etc/default/init.
based on the /etc/inittab file.
System run levels Defined run levels: Eight run levels:
• 0-1: Reserved for future use • 0: Power-down state
• 2: Multiuser state with NFS • s or S: Single-user state
resources shared (default run • 1: Administrative state
level) • 2: Multiuser state
• 3-9: Defined according to the • 3: Multiuser state with NFS
user’s preferences resources shared (default run
• m,M,s,S: Single-user state level)
(maintenance level) • 4: Alternative multiuser (not in
• a,b,c: Starts processes assigned use)
to the new run levels while leaving • 5: Power-down state
the existing processes at the • 6: Reboot state
current level running
• Q,q: init command to reexamine
the /etc/inittab file
Note: When a level from 1 to 9 is
specified, the init command kills all
processes at the current level and
restarts any processes associated with
the new run level based on the
/etc/inittab file.
Determine a system’s run level who -r who -r

© Copyright IBM Corp. 2009, 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

Tasks AIX Solaris


Choose one of the following:
• halt
• init
Change a system’s run level telinit level number • poweroff
• reboot
• shutdown
• telinit
• uadmin
Startup script /etc/rc /sbin/rc run-level number
Display boot information bootinfo N/A
Display or alter the list of boot devices bootlist boot

Device management and configuration


The following is a list of tasks that are used for device management and configuration in AIX and
Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm admintool
environment

Configure a device cfgmgr Choose one of the following:


• drvconfig
• devlinks
• disks
• tapes
• ports
Define a device mkdev Choose one of the following:
• drvconfig
• devlinks
• disks
• tapes
• ports
Remove a device rmdev rem_dev
Change a device chdev N/A
List devices lsdev sysdef
Display device lscfg prtconf

C-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Network management and configuration


The following are tasks that are employed when performing network management and
configuration in AIX and Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm N/A
environment
Configure TCP/IP mktcpip ifconfig or
vi /etc/nsswitch.conf
Display interface settings ifconfig ifconfig
Configure interface ifconfig ifconfig
Change name service chnamsv vi /etc/nsswitch.conf
Unconfigure name service rmnamsv vi /etc/nsswitch.conf
Display name service lsnamsv cat /etc/nsswitch.conf

File system management


The following are tasks that are employed when performing file system management in AIX and
Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm N/A
environment
Format a disk N/A - Automatically handled format
Check a file system fsck fsck
Mount a file system mount mount
Display available file-system space df df
Partition a disk N/A - Automatically handled format
List a volume’s table of contents lchangelv prtvtoc
Add a file system crfs newfs
or
mkfs
Unmount a file system umount umount
Back up file systems/files/directories backup ufsdump
Restore file systems/files/directories restore ufsrestore
Change a file system chfs tunefs
Remove a file system rmfs N/A
Display a file system lsfs cat /etc/vfstab

© Copyright IBM Corp. 2009, 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

Virtual disk management


The following is a list of tasks that are used when implementing virtual disk management in AIX and
Solaris.
Tasks AIX Solaris
Run multiple tasks in a GUI smitty chjfs or wsm metatool
environment
Expand file system chfs growfs
or
smitty chjfs
Delete metadevice N/A metaclear
Configure metadevice N/A metainit
Modify metadevice N/A metaparam
Rename metadevice N/A metarename
Display status of metadevice N/A metastat

Logical volume management


The following is a list of tasks that are used when performing logical volume management in AIX
and Solaris. The information in this table includes Solaris 8 and the Veritas Volume Manager
(VxVM). IBM includes its Logical Volume Manager (LVM) in AIX 5L.
Task AIX Solaris
Storage Structure A disk is composed of physical A disk is composed of
partitions. partitions/slices.
A physical volume is the same thing as A file system is placed onto a
a disk. partition.
A volume group is composed of A subdisk (somewhat similar to AIX
physical volumes. physical partition) is composed of
A volume group is divided into logical partitions/slices.
volumes. A plex (similar to AIX logical partition)
A file system is placed onto a logical is composed of subdisks.
volume. A volume (similar to AIX logical
volume) is composed of plexes.AVM
disk is composed of subdisks.
A disk group (similar to AIX volume
group) is composed of VM disks.g
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm vxva
environment
Move logical volume to another migratepv vxassist move
physical volume
Create logical volume mklv vxassist make
Extend logical volume extendlv vxassist growto
Remove logical volume rmlv vxedit rm
Set up sysboot information on VM N/A vxbootsetup
disk
Manage VM disks N/A vxdisk
Create volume group mkvg vxdg init
Remove disk from volume group reducevg vxdg rmdisk
Add disks under volume manager extendvg vxdiskadd

C-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Task AIX Solaris


Administer disks reducevg vxdiskadm
or
extendvg
Set up disks extendvg vxdisksetup
Change logical volume settings chlv vxedit set
Create configuration records for mkvg vxmake
storage structures or
mklv
Manage plexes or volume groups chvg vxplex
or
mkvg
Display volume group lsvg vxprint
Change size of volume lchangelv vxresize
Manage subdisk or physical volume chpv vxsd
Display statistics for storage Choose one of the following: vxstat
structures • lspv
• lsvg
• lslv
Manage volume Choose one of the following: vxvol
• chlv
• mklv
• rmlv
Back up operating system mksysb (to tape or file) Solstice Backup: nwadmin
or
mkcd (CD-ROM)
Restore operating system mksysb (to tape or file) Choose one Solstice Backup:
or nwadmin
mkcd (CD-ROM) nwrecover

© Copyright IBM Corp. 2009, 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

C-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
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

Installing and upgrading tasks


The information contrasts AIX and HP-UX installing and upgrading tasks.
Tasks AIX HP-UX
Install packages installp -a update (HP-UX 9)
or fast path: swinstall (starting with HP-UX 10)
smitty install_latest
Display installed packages lslpp -L rmfn, what (HP-UX 9)
or fast path: swlist (starting with HP-UX 10)
smitty list_installed_sw
Remove software package installp -r swremove
or fast path: smitty reject
installp -u
or fast path: smitty remove
Verify correct installation lppchk swlist -l fileset -a state
or fast path:
smitty check_file
Install a patch instfix swinstall
or fast path:
smitty update_by_fix
Remove a patch installp -r swremove
or fast path:
smitty reject
Display installed patches instfix -ia swlist -l patch
what /stand/vmunix
Install OS on another disk (Alternate alt_disk_install Live Upgrade
disk installation)
Create an installation server for nimconfig setup_install_server install_dir_path
network installation
Create a boot server for network smitty nim_config_env setup_install_server -b bootdirpath
installation
Set up a client for network installation nim -o bos_inst add_install_client

D-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Booting and shutting down


The following displays processes and locations of items that are involved in booting and shutting
down a system in AIX and HP-UX.
Tasks AIX HP-UX
Boot process Phases: Phases:
• Read Only Storage (ROS): Check • pdc: Firmware
the system mother board, perform processor-dependent code (pdc)
Power-On Self-Test (POST), is executed to verify hardware
locate the boot image, load the and general system integrity.
boot image into memory, begin • isl: The initial system loader is
system initialization and execute loaded and executed. isl finds
phase 1 of the /etc/rc.boot script and executes the autoexecute
• Base Device Configuration: Start file.
Configuration Manager to • hpux: boot image loaded and
configure base devices control is passed to the init
• System Boot: Start init process process. /etc/inittab file is read to
phase 2, switch to hard-disk root complete initialization.
file system, start other processes
defined by records in the
/etc/inittab file and execute phase
3 of the /etc/rc.boot script
Kernel modules directory Kernel and kernel extension modules Kernel modules are stored in:
are stored in two directories:
• /usr/lib/boot /stand
• /usr/lib/drivers
Create and stop processes and Set the default environment variables Set the default environment variables
services for a current system run level as defined in /etc/rc as defined in /sbin/rc
based on the /etc/inittab file.
System run levels Defined run levels: Defined run levels:
• 0-1: Reserved for future use • 0: Halted.
• 2: Multiuser state with NFS • S: Single user mode.
resources shared (default run • 1: Minimal system configuration
level) • 2: Multi-user mode.
• 3-9: Defined according to the • 3: Exported file system
user’s preferences • 4: HP-VUE
• m,M,s,S: Single-user state • 5,6: Not currently used.
(maintenance level) Note: When entering from lower state,
• a,b,c: Starts processes assigned all start scripts are executed. When
to the new run levels while leaving entering from higher state, all kill
the existing processes at the scripts are executed
current level running
• Q,q: init command to reexamine
the /etc/inittab file
Note: When a level from 1 to 9 is
specified, the init command kills all
processes at the current level and
restarts any processes associated with
the new run level based on the
/etc/inittab file.
Determine a system’s run level who -r who -r
Change a system’s run level telinit level number Choose one of the following:
• init
• shutdown
• telinit
Startup script /etc/rc /sbin/rc run-level number

© Copyright IBM Corp. 2009, 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

Device management and configuration


The following is a list of tasks that are used for device management and configuration in AIX and
HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI
SMIT (smitty in non-GUI) or wsm sam
environment
Configure a device cfgmgr insf -e
Define a device mkdev mksf
Remove a device rmdev rmsf
Change a device chdev N/A
List devices lsdev lsdev
Display device lscfg ioscan

Network management and configuration


The following are tasks that are employed when performing network management and
configuration in AIX and HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm sam
environment
Configure TCP/IP mktcpip ifconfig
or
vi /etc/nsswitch.conf
Display interface settings ifconfig lansan -v
Configure interface ifconfig ifconfig
Change name service chnamsv vi /etc/nsswitch.conf
Unconfigure name service rmnamsv vi /etc/nsswitch.conf
Display name service lsnamsv cat /etc/nsswitch.conf

D-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP File system management


The following are tasks that are employed when performing file system management in AIX and
HP-UX.
Tasks AIX HP-UX
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm sam
environment
Check a file system fsck fsck
Mount a file system mount mount
Display available file-system space df -k bdf
List a volume’s table of contents lchangelv vgdisplay
lvdisplay
Add a file system crfs newfs
Unmount a file system umount umount
Back up file systems/files/directories backup fbackup
Restore file systems/files/directories restore frestore
Change a file system chfs
Remove a file system rmfs
Display a file system lsfs
Extend a file system chfs -a size=# extendfs

© Copyright IBM Corp. 2009, 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

Logical volume management


The following is a list of tasks that are used when performing logical volume management in AIX
and HP-UX. The information in this table includes HP-UX LVM and AIX 5L LVM.
Task AIX HP-UX
Storage Structure A disk is composed of physical A disk is composed of extends
partitions. (physical partition in AIX).
A physical volume is the same thing as A physical volume is a hard disk.
a disk. A file system is placed onto a logical
A volume group is composed of volume.
physical volumes. A logical volume (similar to AIX logical
A volume group is divided into logical volume) is composed of extends.
volumes. A volume group (similar to AIX volume
A file system is placed onto a logical group) is composed of physical
volume. volumes.
A volume group is divided into logical
volumes
Run multiple tasks in a GUI SMIT (smitty in non-GUI) or wsm sam
environment
Move logical volume to another migratepv pvmove
physical volume
Create logical volume mklv lvcreate
Extend logical volume extendlv lvextend
Remove logical volume rmlv lvremove
Create volume group mkvg vgcreate
Remove disk from volume group reducevg vgreduce
Add disks under volume manager extendvg vgextend
Administer disks reducevg vgreduce
or
extendvg
Set up disks extendvg vgextend
Change logical volume settings chlv lvchange
Create configuration records for mkvg vgcreate
storage structures or or
mklv lvcreate
Manage volume groups chvg vgchange
or or
mkvg vgcreate
Display volume group lsvg vgscan
Change size of volume lchangelv lvchange
Manage subdisk or physical volume chpv pvchange
Display statistics for storage Choose one of the following:
pvdisplay
structures lspv
lvdisplay
lsvg
vgscan
lslv
Manage volume Choose one of the following:
lvchange
chlv
lvcreate
mklv
lvremove
rmlv
Back up operating system mksysb (to tape or file) /opt/ignite/bin/make_recovery
or
mkcd (CD-ROM)
Restore operating system frestore

D-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP
Appendix E. Checkpoint solutions

Unit 1, "Introduction to AIX and IBM Power Systems"

Solutions for Figure 1-10, "Checkpoint," on page 1-23

Checkpoint solutions
IBM Power Systems

1. What is the name of the device that creates and controls


LPARs?
The answer is the HMC.

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


an HMC?
The answer is the Managed System.

3. True or False: An AIX operating system can run in an


environment that has no real devices allocated.
The answer is true.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 2, "AIX system management tools"

Solutions for Figure 2-12, "Checkpoint," on page 2-32

Checkpoint solutions
IBM Power Systems

1. List the two main system management tools available on


AIX.
The answers are SMIT and IBM Systems Director console
for AIX.

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


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

© Copyright IBM Corporation 2009, 2015

E-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 3, "AIX software installation and maintenance"

Solutions for Figure 3-25, "Checkpoint," on page 3-56

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.

2. What command is used to list all installed software on your system?


The answer is lslpp –l or –L.

3. Which of the following can you install as an entity?


a. Ifix
b. LPP
c. Package
d. Bundle
e. All of the above
The answer is all of the above.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 4, "System configuration and devices"

Solutions for Figure 4-13, "Checkpoint," on page 4-28

Checkpoint solutions
IBM Power Systems

1. What does the following location code mean?


fcs0 U78A0.001.DNWGGRX-P1-C3-T1 4Gb FC PCI Express Adapter

The answer is port 1 of a 4 Gb Fibre Card, which is


connected to planar 1, card slot 3, in Power 550 CEC
(U78A0).

2. True or False: cfgmgr is a binary executable that runs at


system initialization time to configure devices on the
system.
The answer is true.

© Copyright IBM Corporation 2009, 2015

E-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 5, "TCP/IP networking"

Solutions for Figure 5-10, "Checkpoint," on page 5-25

Checkpoint solutions
IBM Power Systems

1. When you use smit mktcpip, SMIT updates:


a. Only the ODM
b. Only the kernel
c. /etc/rc.net
d. Both the ODM and the kernel
The answer is both the ODM and the kernel.

2. True or False: You can choose to configure either en0 or et0 since they both map
to the same Ethernet adapter port.
The answer is false. You must configure the interface whose protocol matches the
other hosts on your network (likely en0 using 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.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 6, "System startup and shutdown"

Solutions for Figure 6-13, "Checkpoint," on page 6-31

Checkpoint solutions
IBM Power Systems

1. When starting a partition with an operating system that lacks a


correctly configured network interface, how can you log in to the
system?
The answer is at the HMC Activate Logical Partition – Advanced
panel, specify that a virtual terminal be started as part of the
activation process. When the system finishes booting, a login prompt
will appear in the virtual terminal window.

2. Which AIX feature can be used to stop and start subsystems and
groups of daemons?
The answer is the System Resource Controller (SRC).

3. True or False: The reboot command can be used interchangeably


with the shutdown –Fr command.
The answer is false.

© Copyright IBM Corporation 2009, 2015

E-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 7, "Basics of configuring logical partitions"

Solutions for Figure 7-7, "Checkpoint," on page 7-18

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.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 8, "AIX installation"

Solutions for Figure 8-25, "Checkpoint," on page 8-53

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.

2. True or False: A preservation installation preserves all data on the


disks.
The answer is false. It preserves some of the existing data on the disk
that is selected for installation. This method overwrites the user
(/usr), variable (/var), temporary (/tmp), and root (/) file systems.
Other product application files and configuration data are destroyed.

3. What is the console used for during the installation process?


The answer is the console is used to display all the system messages
and to interact with the installation.

© Copyright IBM Corporation 2009, 2015

E-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 9, "Working with Logical Volume Manager"

Solutions for Figure 9-32, "Checkpoint," on page 9-74

Checkpoint solutions
IBM Power Systems

1. True or False: A logical volume can span more than one


physical volume.
The answer is true.

2. True or False: A logical volume can span more than one


volume group.
The answer is false.

3. True or False: The contents of a physical volume can be


divided between two volume groups.
The answer is false.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 10, "File systems administration"

Solutions for Figure 10-13, "Checkpoint," on page 10-27

Checkpoint solutions
IBM Power Systems

1. What command displays the i-node information for a file?


The answer is istat.

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.

4. A file system is 2 GB. How would you do the following?


a. Add 1 GB: The answer is chfs –a size=+1G <file system>
b. Set the size to 5 GB: The answer is chfs –a size=5G <file system>
The answers are chfs –a size=+1G<file system> and chfs –a
size=+5G<file system>.

© Copyright IBM Corporation 2009, 2015

E-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 11, "The Object Data Manager"

Solutions for Figure 11-13, "Checkpoint," on page 11-37

Checkpoint solutions
IBM Power Systems

1. In which ODM class do you find the physical volume IDs of


your disks?
The answer is CuAt.

2. What is the difference between the states: defined and


available?
The answer is when a device is defined, there is an entry in
ODM class CuDv. When a device is available, the device
driver is loaded. The device driver can be accessed by the
entries in the /dev directory.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 12, "LVM metadata"

Solutions for Figure 12-12, "Checkpoint," on page 12-36

Checkpoint solutions
IBM Power Systems

1. True or False: All LVM information is stored in the ODM.


The answer is false. Information is also stored in other AIX
files and in disk control blocks (like the VGDA and LVCB).

2. True or False: You detect that a physical volume hdisk1 that


is contained in your rootvg is missing in the ODM. This
problem can be fixed by exporting and importing the rootvg.
The answer is false. Use the rvgrecover procedure
instead. This script creates a complete set of new rootvg
ODM entries.

© Copyright IBM Corporation 2009, 2015

E-12 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 13, "Disk management procedures"

Solutions for Figure 13-12, "Checkpoint," on page 13-35

Checkpoint solutions
IBM Power Systems

1. Although everything seems to be working fine, you detect


error log entries for disk hdisk0 in your rootvg. The disk is
not mirrored to another disk. You decide to replace this disk.
Which procedure would you use to migrate this disk?
The answer is procedure 2: Disk still working. There are
some additional steps necessary for hd5 and the primary
dump device hd6. You detect an unrecoverable disk failure
in volume group datavg.
2. You detect an unrecoverable disk failure in volume group
datavg. This volume group consists of two disks that are
completely mirrored. Because of the disk failure, you are not
able to vary on datavg. How do you recover from this
situation?
The answer is forced varyon: varyonvg -f datavg. Use
Procedure 1: Disk mirrored.
© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 14, "Backup and restore"

Solutions for Figure 14-24, "Checkpoint (1 of 2)," on page 14-68

Checkpoint solutions (1 of 2)
IBM Power Systems

1. What is the difference between the following two


commands?
a. find /home/fred | backup -ivf /dev/rmt0
b. cd /home/fred find . | backup -ivf /dev/rmt0
The answer is the first command backs up the files by using the full
path names, whereas the second command backs up the file
names by using the relative path names. Therefore, the second
command’s files can be restored into any directory.

2. True or False: JFS2 snapshots require little or no quiescing


of application activity to obtain a stable point in time image
of the snapped file system.
The answer is true.

© Copyright IBM Corporation 2009, 2015

E-14 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Solutions for Figure 14-25, "Checkpoint (2 of 2)," on page 14-70

Checkpoint solutions (2 of 2)
IBM Power Systems

3. True or False: smit mksysb backs up all file systems,


provided they are mounted.
The answer is false. The mksysb command backs up only
rootvg file systems. To back up other volume groups, you
must use the savevg command.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 15, "Error monitoring"

Solutions for Figure 15-12, "Checkpoint," on page 15-37

Checkpoint solutions
IBM Power Systems

1. Which command generates error reports? Which flag of this command


is used to generate a detailed error report?
The answers are errpt and errpt –a.

2. Which type of disk error indicates bad blocks?


The answer is DISK_ERR4.

3. What do the following commands do?


a. errclear
b. errlogger
The answers are errclear clears entries from the error log and
errlogger is used by root to add entries into the error log.

4. What does the descriptor en_method in errnotify indicate?


The answer is it specifies a program or command to be run when an
error matching the selection criteria is logged.

© Copyright IBM Corporation 2009, 2015

E-16 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 16, "System initialization - I"

Solutions for Figure 16-14, "Checkpoint (1 of 2)," on page 16-41

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.

2. Your machine is booted and at the # prompt.


What is the command that displays the normal bootlist?
How might you change the normal bootlist?
The answers are bootlist –m normal –o, and bootlist –m
normal device1 device2.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-17


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Solutions for Figure 16-15, "Checkpoint (2 of 2)," on page 16-43

Checkpoint solutions (2 of 2)
IBM Power Systems

3. How do you boot an AIX machine into maintenance mode?


The answer is you need to boot from an AIX CD/DVD,
mksysb, or NIM server.

4. What command is used to build a new boot image and


write it to the boot logical volume?
The answer is bosboot -ad /dev/hdiskx.

© Copyright IBM Corporation 2009, 2015

E-18 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 17, "System initialization - II"

Solutions for Figure 17-8, "Checkpoint," on page 17-24

Checkpoint solutions
IBM Power Systems

1. From where is rc.boot 3 run?


The answer is from the /etc/inittab file in rootvg.

2. Your system stops booting with LED 557. What are some
reasons for this problem?
The answers are corrupted JFS log or damaged file system.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-19


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Unit 18, "The AIX system dump facility"

Solutions for Figure 18-12, "Checkpoint," on page 18-37

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.

2. What command can be used to initiate a system dump?


The answer is sysdumpstart.

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.

© Copyright IBM Corporation 2009, 2015

E-20 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Unit 19, "Advanced install techniques"

Solutions for Figure 19-9, "Topic 1 Checkpoint: Alternate disk


installation," on page 19-24

Topic 1 checkpoint solutions: Alternate disk


installation
IBM Power Systems

1. Name the two ways alternate disk installation can be used.


The answers are installing a mksysb image on another disk
and cloning the current running rootvg to an alternate disk.

2. What are the advantages of alternate disk rootvg cloning?


The answers are creates an online backup and allows
maintenance and updates to software on the alternate disk
that helps to minimize downtime.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-21


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

Solutions for Figure 19-16, "Topic 2 Checkpoint: multibos," on


page 19-44
Details —

Topic 2 checkpoint solutions: multibos


IBM Power Systems

1. True or False: multibos provides for booting between


alternate operating system environments within a single
rootvg.
The answer is true.

2. True or False: New fix packs can be applied to a standby


BOS with only a performance impact to the active BOS
during the operation.
The answer is true.

© Copyright IBM Corporation 2009, 2015

E-22 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

AP Solutions for Figure 19-17, "Checkpoint," on page 19-46

Checkpoint solutions
IBM Power Systems

1. Which two alternate disk installation techniques are


available?
The answers are installing a mksysb on another disk and
cloning the rootvg to another disk.

2. True or False: multibos requires cloning of all of the


logical volumes in the active rootvg.
The answer is false.

© Copyright IBM Corporation 2009, 2015

© Copyright IBM Corp. 2009, 2015 Appendix E. Checkpoint solutions E-23


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

E-24 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Instructor Guide

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.

© Copyright IBM Corp. 2009, 2015 Glossary X-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

B change mode The chmod command will change


the access rights to your own files only, for
background (process) A process is “in the yourself, your group or all others.
background” when it is running independently of
the initiating terminal. It is specified by ending the character I/O The transfer of data byte by byte;
ordinary command with an ampersand (&). The normally used with slower, low volume devices
parent of the background process does not wait for such as terminals or printers.
its “death”. character special file An interface to devices not
backup diskette A diskette containing information capable of supporting a file system; a byte oriented
copied from another diskette. It is used in case the device.
original information is unintentionally destroyed. child The process emerging from a fork command
Berkeley Software Distribution Disseminating arm with a zero return code, as distinguished from the
of the UNIX operating system community at the parent which gets the process id of the child.
University of California at Berkeley; commonly client User of a network service. In the client/server
abbreviated “BSD”. Complete versions of the UNIX model, network elements are defined as either
operating system have been released by BSD for a using (client) or providing (server) network
number of years; the latest is numbered 4.3. The resources.
phrase “Berkeley extensions” refers to features command A request to perform an operation or run
and functions, such as the C shell, that originated a program. When parameters, arguments, flags, or
or were refined at UC Berkeley and that are now other operands are associated with a command,
considered a necessary part of any fully configured the resulting character string is a single command.
version of the UNIX operating system.
command file A data file containing shell
bit bucket The AIX file “/dev/null” is a special file commands. See shell file, or shell script.
which will absorb all input written to it and return no
data (null or end of file) when read. command interpreter The part of the operating
system that translates your commands into
block A group of records that is recorded or instructions that the operating system understands.
processed as a unit. command or previous command key.
block device A device that transfers data in fixed concatenate The process of forming one character
size blocks. In AIX, normally 512 or 1024 bytes. string or file from several. The degenerate case is
block special file An interface to a device capable one file from one file just to display the result using
of supporting a file system. the cat command.
booting Starting the computer from scratch (power console The only terminal known explicitly to the
off or system reset). Kernel. It is used during booting and it is the
break key The terminal key used to unequivocally destination of serious system messages.
interrupt the foreground process. context The hardware environment of a process,
BSD Berkeley Software Distribution. including:
• BSD 2.x - PDP-11 Research • CPU registers
• BSD 4.x - VAX Research • Program address
• BSD 4.3 - Current popular VAX version of UNIX. • Stack
• I/O status
button
context The entire context must be saved during a
1. A word, number, symbol, or picture on the process swap.
screen that can be selected. A button can
control character Codes formed by pressing and
represent a command, file, window, or value, for holding the control key and then some other key;
example. used to form special functions like End Of File.
2. A key on a mouse that is used to select buttons control-d See eof character.
on the display screen or to scroll the display
cooked input Data from a character device from
image. which backspace, line kill, and interrupt characters
byte The amount of storage required to represent have been removed (processed). See raw input.
one character; a byte is 8 bits. current directory The currently active directory.
When you specify a file name without specifying a
directory, the system assumes that the file is in
C your current directory.
C The programming language in which the UNIX current subtree Files or directories attached to the
operating system and most UNIX application current directory.
programs are written. The portability attributed to
curses A C subroutine library providing flexible
UNIX operating systems is largely due to the fact
that C, unlike other higher level languages, permits screen handling. See Termlib and Termcap.
programmers to write systems-level code that will
work on any computer with a standard C compiler.

X-2 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

cursor A movable symbol (such as an underline) on


a display, usually used to indicate to the operator
F
where to type the next character. field A contiguous group of characters delimited by
blanks. A field is the normal unit of text processed
customize To describe (to the system) the devices, by text processes like sort.
programs, users, and user defaults for a particular
data processing system. field separator The character used to separate one
field from the next; normally a blank or tab.
FIFO “First In, First Out”. In AIX, a FIFO is a
D permanent, named pipe which allows two
DASD Direct Access Storage Device. IBM's term for unrelated processes to communicate. Only related
a hard disk. processes can use normal pipes.
device driver A program that operates a specific file A collection of related data that is stored and
device, such as a printer, disk drive, or display. retrieved by an assigned name. In AIX, files are
grouped by directories.
device special file A file which passes data directly
to/from the device. file index Sixty-four bytes of information describing
a file. Information such as the type and size of the
directory A type of file containing the names and file and the location on the physical device on
controlling information for other files or other which the data in the file is stored is kept in the file
directories. index. This index is the same as the AIX Operating
directory pathname The complete and unique System i-node.
external description of a file giving the sequence of filename expansion or generation A procedure
connection from the root directory to the specified used by the shell to generate a set of filenames
directory or file. based on a specification using metacharacters,
diskette A thin, flexible magnetic plate that is which define a set of textual substitutions.
permanently sealed in a protective cover. It can be file system The collection of files and file
used to store information copied from the disk. management structures on a physical or logical
diskette drive The mechanism used to read and mass storage device, such as a diskette or
write information on diskettes. minidisk.
display device An output unit that gives a visual filter Data-manipulation commands (which, in UNIX
representation of data. operating systems, amount to small programs) that
take input from one process and perform an
display screen The part of the display device that operation yielding new output. Filters include
displays information visually.
editors, pattern-searchers, and commands that
sort or differentiate files, among others.
E fixed disk A storage device made of one or more
flat, circular plates with magnetic surfaces on
echo To simply report a stream of characters, either which information can be stored.
as a message to the operator or a debugging tool
to see what the file name generation process is fixed disk drive The mechanism used to read and
doing. write information on a fixed disk.
editor A program used to enter and modify flag See Options.
programs, text, and other types of documents. foreground (process) An AIX process which
environment A collection of values passed either to interacts with the terminal. Its invocation is not
a C program or a shell script file inherited from the followed by an ampersand.
invoking process. formatting The act of arranging text in a form
escape The backslash “\” character specifies that suitable for reading. The publishing equivalent to
the single next character in a command is ordinary compiling a program.
text without special meaning. fsck A utility to check and repair a damaged file
Ethernet A baseband protocol, invented by the structure. This normally results from a power
XEROX Corporation, in common use as the local failure or hardware malfunction. It looks for blocks
area network for UNIX operating systems not assigned to a file or the free list and puts them
interconnected via TCP/IP. in the free list. (The use of blocks not pointed at
cannot be identified.)
event One of the previous lines of input from the
terminal. Events are stored in the (Berkeley) free list The set of all blocks not assigned to a file.
History file. full path name The name of any directory or file
event identifier A code used to identify a specific expressed as a string of directories and files
event. beginning with the root directory.
execution permission For a file, the permission to
execute (run) code in the file. A text file must have
execute permission to be a shell script. For a
directory, the permission to search the directory.

© Copyright IBM Corp. 2009, 2015 Glossary X-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

G initial program load The process of loading the


system programs and preparing the system to run
gateway A device that acts as a connector between jobs.
two physically separate networks. It has interfaces
to more than one network and can translate the i-node A collection of logical information about a file
packets of one network to another, possibly including owner, mode, type and location.
dissimilar network. i number The internal index or identification of an
global Applying to all entities of a set. For example: i-node.
• A global search - look everywhere input field An area into which you can type data.
• A global replace - replace all occurrences input redirection The accessing of input data from
• A global symbol - defined everywhere. other than standard input (the keyboard or a pipe).
interoperability The ability of different kinds of
grep An AIX command which searches for strings computers to work well together.
specified by a regular expression. (Global Regular
Expression and Print.) interpreter A program which “interprets” program
statements directly from a text (or equivalent) file.
group A collection of AIX users who share a set of Distinguished from a compiler which creates
files. Members of the group have access privileges computer instructions for later direct execution.
exceeding those of other users.
interrupt A signal that the operating system must
reevaluate its selection of which process should be
H running. Usually to service I/O devices but also to
signal from one process to another.
hardware The equipment, as opposed to the
programming, of a system. IP Internet Protocol.
header A record at the beginning of the file ipl See initial program load.
specifying internal details about the file. ISO International Standards Organization. A United
heterogeneous Descriptor applied to networks Nations agency that provides for creation and
composed of products from multiple vendors. administration of worldwide standards.
hierarchy A system of objects in which each object
belongs to a group. Groups belong to other groups.
Only the “head” does not belong to another group.
J
In AIX this object is called the “Root Directory”. job A collection of activities.
highlight To emphasize an area on the display job number An identifying number for a collection of
screen by any of several methods, such as processes devolving from a terminal command.
brightening the area or reversing the color of
characters within the area.
history A list of recently executed commands.
K
kernel The part of an operating system that contains
home (directory). 1. A directory associated with an programs that control how the computer does its
individual user. work, such as input/output, management and
home (directory). 2. Your current directory on login control of hardware, and the scheduling of user
or after issuing the cd command with no argument. tasks.
homogeneous Descriptor applied to networks keyboard An input device consisting of various keys
composed of products from a single vendor. allowing the user to input data, control cursor and
hypertext Term for online interactive documentation pointer locations, and to control the user/work
of computer software; to be included with AIX. station dialog.
kill To prematurely terminate a process.
kill character The character which erases an entire
I line (usually @).
IEEE Institute of Electrical and Electronics
Engineers. A professional society active in
standards work, the IEEE is the official body for L
work on the POSIX (Portable Operating System for
Computer Environments) open system interface LAN Local Area Network. A facility, usually a
definition. combination of wiring, transducers, adapter
boards, and software protocols, which
index See file index. interconnects workstations and other computers
indirect block A file element which points at data located within a department, building, or
sectors or other indirect blocks. neighborhood. Token-Ring and Ethernet are local
area network products.
init The initialization process of AIX. The ancestor of
all processes. libc A basic set of C callable routines.
library In UNIX operating systems, a collection of
existing subroutines that allows programmers to

X-4 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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

© Copyright IBM Corp. 2009, 2015 Glossary X-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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

X-6 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

R The program can act as a filter for user data


requests.
raw I/O I/O conducted at a “physical” level.
shell The outermost (user interface) layer of UNIX
read permission Allows reading (not execution or operating systems. Shell commands start and
writing) of a file. control other processes, such as editors and
recursive A recursive program calls itself or is compilers; shells can be textual or visual. A series
called by a subroutine which it calls. of system commands can be collected together
into a “shell script” that executes like a batch
redirection The use of other than standard input (.BAT) file in DOS.
(keyboard or pipe output) or standard output
(terminal display or pipe). Usually a file. shell program A program consisting of a sequence
of shell commands stored in an ordinary text file
regular expression An expression which specifies which has execution permission. It is invoked by
a set of character strings using metacharacters. simply naming the file as a shell command.
relative path name The name of a directory or file shell script See shell program.
expressed as a sequence of directories followed by
a file name, beginning from the current directory. single user (mode) A temporary mode used during
“booting” of the AIX system.
RISC Reduced Instruction Set Computer. A class of
computer architectures, pioneered by IBM's John signal A software generated interrupt to another
Cocke, that improves price#performance by process. See kill.
minimizing the number and complexity of the sockets Destination points for communication in
operations required in the instruction set of a many versions of the UNIX operating system,
computer. In this class of architecture, advanced much as electrical sockets are destination points
compiler technology is used to provide operations, for electrical plugs. Sockets, associated primarily
such as multiplication, that are infrequently used in with 4.3 BSD, can be customized to facilitate
practice. communication between separate processes or
root directory The directory that contains all other between UNIX operating systems.
directories in the file system. software Programs.
special character See metacharacter.
S special file A technique used to access I/O devices
in which “pseudo files” are used as the interface for
scalability Desirable feature of computer systems commands and data.
and applications. Refers to the capability to use the
same environment on many classes of computers, standard error The standard device at which errors
from personal computers to supercomputers, to are reported, normally the terminal. Error
accommodate growth or divergent environments, messages can be directed to a file.
without rewriting code or losing functionality. standard input The source of data for a filter, which
SCCS Source Code Control System. A set of is by default obtained from the terminal, but which
programs for maintaining multiple versions of a file can be obtained from a file or the standard output
using only edit commands to specify alternate of another filter through a pipe.
versions. standard output The output of a filter which
scope The field of an operation or definition. Global normally is by default directed to the terminal, but
scope means all objects in a set. Local scope which can be sent to a file or the standard input of
means a restriction to a subset of the objects. another filter through a pipe.
screen See display screen. stdio A “Standard I/O” package of C routines.
scroll To move information vertically or horizontally sticky bit A flag which keeps commonly used
to bring into view information that is outside the programs “stick” to the swapping disk for
display screen or pane boundaries. performance.
search and replace The act of finding a match to a stopped job A job that has been halted temporarily
given character string and replacing each by the user and which can be resumed at his
occurrence with some other string. command.
search string The pattern used for matching in a storage In contrast to memory, the saving of
search operation. information on physical devices such as fixed disk
or tape. See memory.
sed Non-interactive stream editor used to do “batch”
editing. Often used as a tool within shell scripts. store To place information in memory or onto a
diskette, fixed disk, or tape so that it is available for
server A provider of a service in a computer
retrieval and updating.
network; for example, a mainframe computer with
large storage capacity can play the role of streams Similar to sockets, streams are destination
database server for interactive terminals. See points for communications in UNIX operating
client. systems. Associated primarily with UNIX System V,
streams are considered by some to be more
setuid A permission which allows the access rights
of a program owner to control the access to a file.

© Copyright IBM Corp. 2009, 2015 Glossary X-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

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-8 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

system, and a display screen on which an operator


can see the information sent to or received from
the computer.
write Sending data to an I/O device.
write permission Permission to modify a file or
directory.

X
X/OpenT An international consortium, including
many suppliers of computer systems, concerned
with the selection and adoption of open system
standards for computing applications. IBM is a
corporate sponsor of X/Open. See Common
Application Environment.
X Windows IBM's implementation of the X Window
System developed at the Massachusetts Institute
of Technology with the support of IBM and DECT,
that gives users “windows” into applications and
processes not located only or specifically on their
own console or computer system. X-Windows is a
powerful vehicle for distributing applications among
users on heterogeneous networks.

Y
yacc “Yet Another Compiler# Compiler”. For
producing new command interfaces.

Z
zeroeth argument The command name; the
argument before the first.

© Copyright IBM Corp. 2009, 2015 Glossary X-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Instructor Guide

X-10 AIX 7 Jumpstart © Copyright IBM Corp. 2009, 2015


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1

backpg
Back page

Potrebbero piacerti anche