Вы находитесь на странице: 1из 864

V5.

cover

Front cover

AIX 6 Jumpstart for


UNIX Professionals
(Course code AW18)

Student Notebook
ERC 6.0

IBM certified course material


Student Notebook

Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AIX AIX 5L Alerts
AS/400 CICS DB2
DS4000 eServer FlashCopy
HACMP i5/OS iSeries
Magstar Micro Channel Micro-Partitioning
Notes OpenPower POWER
POWER2 POWER3 POWER4
POWER5 POWER5+ POWER6
POWER Hypervisor PowerPC PowerPC Reference
Platform
PowerVM pSeries Redbooks
Requisite RS/6000 System i
System p System p5 System Storage
Tivoli TotalStorage xSeries
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in
the United States, and/or other countries.
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc.
in the United States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the
United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other company, product, or service names may be trademarks or service marks of others.

November 2008 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 customers ability to evaluate and integrate them into the customers 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 2000, 2008. All rights reserved.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
Note to U.S. Government Users Documentation related to restricted rights Use, duplication or disclosure is subject to restrictions
set forth in GSA ADP Schedule Contract with IBM Corp.
V5.1
Student Notebook

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

Course Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

Unit 1. System hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
What is a partition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Physical partition (PPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Logical partition (LPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Partition characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Partition resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Logical partition resource example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
IBM POWER5 LPAR-capable systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
POWER Hypervisor functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
The big picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Advanced partition features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Dynamic partitioning (DLPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Processor concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Micro-partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Virtual I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Virtual I/O example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
Capacity on Demand (CoD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
PowerVM Standard Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-30
POWER6 system highlights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
IBM POWER5 processor-based systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
IBM System p5 servers information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
p5-520 and p5-520Q overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
p6-P520 system overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
p5-550 and p5-550Q overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
p6-P550 system overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43
p5-560Q and p5-570 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44
Midrange functional differences - per CEC node . . . . . . . . . . . . . . . . . . . . . . . . . 1-47
p5-590 and p5-595 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
I/O drawer options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-52
Example I/O drawer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
POWER6 remote I/O drawer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-54
Service Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-55
Hardware Management Console (HMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-57
New Web user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-59
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61
Exercise: System hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-62
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-63

Copyright IBM Corp. 2000, 2008 Contents iii


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

Unit 2. System management tools and documentation . . . . . . . . . . . . . . . . . . . . .2-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2
2.1. System Management Interface Tool (SMIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3
Topic 1 objectives: System Management Interface Tool (SMIT) . . . . . . . . . . . . . . .2-4
AIX administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-5
System Management Interface Tool (SMIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-7
SMIT main menu (ASCII) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-9
SMIT main menu (Motif) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-11
Dialog screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13
Output screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16
SMIT log and script files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
smit command options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
IBM Systems Director Console for AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-21
Lets review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-23
2.2. Using AIX documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25
Topic 2 objectives: Configuring AIX documentation . . . . . . . . . . . . . . . . . . . . . . . .2-26
Viewing AIX 6.1 documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27
Accessing the documents from a Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . . .2-28
AIX 6.1 documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-29
Search AIX 6.1 documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-31
Search scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-32
Lets review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-33
2.3. Web-based System Manager (WebSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-35
Topic 3 objectives: Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . .2-36
Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-37
Accessing the Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-39
Using the Web-based System Manager (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .2-41
Using the Web-based System Manager (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .2-42
Using the Web-based System Manager (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .2-43
Installation for a remote client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-44
Configure the HTTP (Web) server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-47
Remote client installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-48
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-50
Exercise 2: Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-51
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-52

Unit 3. Software installation and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2
AIX product offerings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
Packaging definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
Fileset naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7
Software updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
Software states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11
Software Installation and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Install and Update Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
Install Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16
Software inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-18

iv AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TOC List installed software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19


Fix repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Fix Central Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
More fix services screen (from Fix Central) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Software Service Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Software Maintenance and Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
instfix command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Exercise: AIX software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32

Unit 4. Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Listing of /dev directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Device configuration database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
List all supported devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
List all defined devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Device states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Self-configuring devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
SMIT Devices menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Location code format for PCI devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Location code example: Non-SCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Location code format for SCSI devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Location code example for SCSI device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Physical location codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Listing device physical locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
Adding an ASCII terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
Device nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31
Add a TTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Documenting hardware configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38

Unit 5. The Object Data Manager (ODM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
5.1. Introduction to the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
What is the ODM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Data managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
ODM components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
ODM database files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Device configuration summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Location and contents of ODM repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
How ODM classes act together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Data not managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15

Copyright IBM Corp. 2000, 2008 Contents v


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

Lets review: Device configuration and the ODM . . . . . . . . . . . . . . . . . . . . . . . . . .5-16


ODM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-17
Changing attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-19
Using odmchange to change attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-21
5.2. ODM database files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-23
Software vital product data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Software states you should know about . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26
Predefined devices (PdDv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-28
Predefined attributes (PdAt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-32
Customized devices (CuDv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-34
Customized attributes (CuAt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-37
Additional device object classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-38
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-40
Exercise 4: The Object Data Manager (ODM) . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-41
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-42

Unit 6. System boot: Hardware. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
AIX startup process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-3
Loading the boot image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-4
Boot disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-7
Creating the boot image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Boot device alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-13
HMC remote access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-15
HMCv6: Server management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-17
HMCv6: Activate a partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-19
HMCv6: Activating partition with console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-21
Hardware Management Console (HMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-22
HMCv7: Server management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-24
HMCv7: Activate partition operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-25
HMCv7: Activate partition options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-26
How to fix a corrupted BLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-27
Working with bootlists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-30
Starting System Management Services (SMS) . . . . . . . . . . . . . . . . . . . . . . . . . . .6-32
Working with bootlists in SMS (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-34
Working with bootlists in SMS (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-36
Service processors and boot failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-37
Accessing a system that will not boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-39
Booting in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-41
Working in maintenance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-42
Progress and reference codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-44
Firmware checkpoints and error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-47
Firmware fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-48
Getting firmware updates from the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-50
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-52
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-53
Exercise: System boot: Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-54
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-55

vi AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TOC Unit 7. System boot: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
AIX startup process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
AIX initialization overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
rc.boot 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
rc.boot 2 (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
RAM file system and rootvg (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
rc.boot (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11
RAM file system and rootvg (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13
rc.boot 3 (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
rc.boot 3 (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
rc.boot summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Boot problem management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23
Config_Rules object class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
Device names and CD-ROM example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27
The alog facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29
System hang detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Configuring shdaemon . . . . . . . . . . . . . . . . . . . . . . . 7-34
System resource controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-36
Using the system resource controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-37
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-38
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-39
Exercise: System Boot: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-40
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-41

Unit 8. Installation and initial configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Installation methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Installation process (from CD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Console and language definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Installation and Maintenance menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9
Installation and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
Method of installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Installation disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Primary language environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
Install Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Install More Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
Begin installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17
Installation flowchart - all systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18
Configuration Assistant menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-21
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-22

Unit 9. The Logical Volume Manager (LVM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
9.1. LVM terminology and concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Benefits of the LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4

Copyright IBM Corp. 2000, 2008 Contents vii


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

Volume group limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-6


Scalable volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-8
Configuration limits for volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Striping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Mirroring and striping with RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-15
RAID levels you should know about . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-17
9.2. LVM data representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-19
LVM identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
LVM data on disk control blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
LVM data in the operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
Contents of the VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-25
VGDA example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-27
The logical volume control block (LVCB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-30
How LVM interacts with ODM and VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-32
ODM entries for physical volumes (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-34
ODM entries for physical volumes (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-36
ODM entries for physical volumes (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-37
ODM entries for volume groups (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-38
ODM entries for volume groups (2 of 2)) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-39
ODM entries for logical volumes (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-40
ODM entries for logical volumes (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-41
ODM-related LVM problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-42
Fixing ODM problems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-44
Fixing ODM problems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-46
9.3 Working with volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-49
Logical Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-50
SMIT Volume Groups menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-52
List all volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-53
List volume group contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-54
List volume group information (physical volumes) . . . . . . . . . . . . . . . . . . . . . . . . .9-55
List volume group information (logical volumes) . . . . . . . . . . . . . . . . . . . . . . . . . . .9-56
Add a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-57
Add a Scalable Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-59
Set Characteristics of a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-60
Change a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-61
Logical track group (LTG) size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-63
Hot spare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-65
Extending and reducing volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-68
Remove a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-70
Activate/Deactivate a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-71
Import/Export a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-73
Advanced RAID support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-74
9.4 Logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-77
Logical volume policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-78
SMIT Logical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-80
Show logical volume characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-81
Add a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-83

viii AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TOC Remove a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-84


Set Characteristics of a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-85
List all logical volumes by volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-87
Show logical volume characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-88
Reorganize a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-89
9.5. Physical volumes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-91
SMIT Physical Volumes menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-92
List physical volume information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-93
List logical volumes on a physical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-94
List a physical volume partition map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-95
Add or move contents of physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-96
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-98
Exercise: The Logical Volume Manager (LVM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-99
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-100

Unit 10. Storage management with LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
10.1. Mirroring and quorum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Stale partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6
Creating mirrored LVs (smit mklv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Scheduling policies: Sequential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Scheduling policies: Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12
Mirror write consistency (MWC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Adding mirrors to existing LVs (mklvcopy) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
Mirroring rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19
Mirroring volume groups (mirrorvg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21
VGDA count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23
Quorum not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24
Nonquorum volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-26
Forced varyon (varyonvg -f) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28
Physical volume states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-30
10.2. Disk replacement techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-33
Disk replacement: Starting point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-34
Procedure 1: Disk mirrored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-36
Procedure 2: Disk still working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38
Procedure 2: Special steps for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Procedure 3: Disk in missing or removed state . . . . . . . . . . . . . . . . . . . . . . . . . . 10-42
Procedure 4: Total rootvg failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-44
Procedure 5: Total non-rootvg failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-46
Frequent disk replacement errors (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-48
Frequent disk replacement errors (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-49
Frequent disk replacement errors (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-50
Frequent disk replacement errors (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-52
10.3. Export and import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-55
Exporting a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-56
Importing a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-58
importvg and existing logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-60

Copyright IBM Corp. 2000, 2008 Contents ix


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

importvg and existing file systems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-61


importvg and existing file systems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-63
importvg -L (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-65
importvg -L (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-67
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-68
Exercise: Storage management with LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-69
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-70

Unit 11. Working with file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2
Uses of logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-3
What is a file system? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-5
Why have multiple file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-7
Standard file systems in AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-9
/etc/filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-11
Structure of a journaled file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-13
Structure of an inode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-15
File system fragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-16
Variable number of inodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-18
Allocation group size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-20
Compressed file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-22
Large file enabled file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-24
Journal log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-26
JFS versus JFS2 file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-28
Extended attributes (EA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-31
File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-33
Listing file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-34
List all mounted file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-36
Add/Change/Show/Delete File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-38
Working with journaled files systems in SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . .11-39
Add a standard journaled file system on a previously defined logical volume . . .11-40
Add a Standard Journaled File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-42
Working with enhanced journaled file systems (JFS2) in SMIT . . . . . . . . . . . . . .11-45
Add an enhanced journaled file system (JFS2) on a previously defined logical volume
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-46
Add an Enhanced Journaled File System (JFS2) . . . . . . . . . . . . . . . . . . . . . . . . .11-48
Mount a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-49
Change/Show Characteristics of a Journaled File System . . . . . . . . . . . . . . . . . .11-52
Change/Show Characteristics of an Enhanced Journaled File System . . . . . . . .11-54
Dynamically shrinking a JFS2 file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-55
Remove a Journaled File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-57
Add a RAM file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-59
Add a UDF file system on a DVD-RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-60
System storage review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-62
Listing free disk space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-64
Control growing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-66
The skulker command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-68
Listing disk usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-70

x AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TOC Fragmentation considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-72


Defragmenting a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-74
Verify a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-76
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-78
Exercise: Working with file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-79
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-80

Unit 12. Paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
What is paging space? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
Sizing paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
Paging space placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
Checking paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Adding paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
Change paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15
Remove paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
Problems with paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
Documenting paging space setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21
Exercise 10: Paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23

Unit 13. Backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Backup devices - diskette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Backup devices - tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5
Backup device - read/write optical drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7
Backup device - 7210 external DVD-RAM drive . . . . . . . . . . . . . . . . . . . . . . . . . 13-10
SMIT backup menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
rootvg backup process - mksysb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12
/image.data file for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-14
/bosinst.data file for rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-16
rootvg - Back Up the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-21
rootvg - Back Up This System to Tape/File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-22
mksysb image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-24
Back Up a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-26
Back Up a Volume Group to Tape/File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-27
Restoring a mksysb (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-29
Restoring a mksysb (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-30
Remake/Restore a non-rootvg volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-32
mksysb - ISO9660 burn image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-34
mksysb - UDF DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-36
rootvg - Back Up This System to CD (ISO9660) . . . . . . . . . . . . . . . . . . . . . . . . . 13-37
rootvg - Back Up This System to ISO9660 DVD . . . . . . . . . . . . . . . . . . . . . . . . . 13-38
rootvg - Back Up This System to UDF DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-39
Back Up a Volume Group to CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-40
Back Up a Volume Group to ISO9660 DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-41

Copyright IBM Corp. 2000, 2008 Contents xi


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

Back Up a Volume Group to UDF DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-42


Back up by filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-43
Back up by filename examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-45
Backup a File or Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-47
Back up a file system by inode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-49
Back up a file system by inode using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-51
restore command (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-52
restore command (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-54
Restore a File or a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-55
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-56
Exercise: Using backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-57
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-58

Unit 14. TCP/IP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-2
TCP/IP pseudo device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-3
Network adapters and interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-5
Interface device drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-6
Adapter device drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-7
TCP/IP startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-8
# smit tcpip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-10
/etc/rc.tcpip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-12
Network super daemon (inetd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-14
/etc/inetd.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-16
/etc/services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-18
Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-19
Address resolution protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-24
Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-26
Static routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-28
Dynamic routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-31
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-33
Exercise: TCP/IP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-34
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-35

Unit 15. Error log and syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-2
15.1. Working with the error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-3
Error logging components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-4
Generating an Error Report using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-6
The errpt command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-9
A summary report (errpt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-11
A detailed error report (errpt -a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-12
Types of disk errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-14
LVM error log entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-16
Maintaining the error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-17
15.2. Error notification and syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-19
Error notification methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-20
Self-made error notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-22

xii AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TOC ODM-based error notification: errnotify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-24


syslogd daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-27
syslogd configuration examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-29
Redirecting syslog messages to error log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-32
Directing error log messages to syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-33
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-34
Exercise: Error logging and syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-35
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36

Appendix A. Checkpoint solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1

Appendix B. Performance and workload management. . . . . . . . . . . . . . . . . . . . . B-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Basic performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Performance analysis tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
Identify CPU-intensive programs: ps aux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-8
Identify high priority processes: ps -elf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
Monitoring CPU usage: sar -u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-12
AIX tools: tprof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-14
Monitoring memory usage: vmstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-16
AIX tools: svmon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-18
Monitoring disk I/O: iostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-20
AIX tools: filemon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-23
topas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-25
There is always a next bottleneck! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-26
Workload management techniques (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-27
Workload management techniques (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-28
Workload management techniques (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-30
Simultaneous multi-threading (SMT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-32
Tool enhancements for micro-partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-34
Performance Diagnostic Tool (PDT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-37
Enabling PDT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-39
cron control of PDT components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-41
PDT files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-43
Customizing PDT: Changing thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-45
Customizing PDT: Specific monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-48
PDT report example (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-49
PDT report example (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-51
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-53

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

Appendix D. Quick Reference: Solaris to AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1

Copyright IBM Corp. 2000, 2008 Contents xiii


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

xiv AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

TMK Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AIX AIX 5L Alerts
AS/400 CICS DB2
DS4000 eServer FlashCopy
HACMP i5/OS iSeries
Magstar Micro Channel Micro-Partitioning
Notes OpenPower POWER
POWER2 POWER3 POWER4
POWER5 POWER5+ POWER6
POWER Hypervisor PowerPC PowerPC Reference
Platform
PowerVM pSeries Redbooks
Requisite RS/6000 System i
System p System p5 System Storage
Tivoli TotalStorage xSeries
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in
the United States, and/or other countries.
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc.
in the United States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the
United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other company, product, or service names may be trademarks or service marks of others.

Copyright IBM Corp. 2000, 2008 Trademarks xv


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

xvi AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

pref Course Description


AIX 6 Jumpstart for UNIX Professionals

Duration: 5 days

Purpose
The purpose of this course is to show a UNIX system administrator
how they can install, customize, and administer the AIX 6 operating
system.

Audience
Anyone responsible for the system administrative duties in
implementing and managing systems capable of running the AIX 6
operating system.
This course is targeted for SUN Solaris, HP-UX, or other UNIX system
administrators with at least twelve months of experience in UNIX
administration and other relevant education.

Prerequisites
The students attending this course should have at least one year of
UNIX system administration experience and be able to:
Write shell scripts
Install a UNIX operating system
Install and configure layered products
Start up and shut down the system
Monitor system usage and performance
Create user accounts
Solve user and system problems
Create, configure, and back up file systems
Configure and manage networks

Copyright IBM Corp. 2000, 2008 Course Description xvii


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

Objectives
On completion of this course, students will be able to:
Describe how to install the AIX 6 operating system
Describe and use the system management tools
Install software bundles and filesets
Perform system startup and shutdown
Manage physical and logical devices
Perform file system management
Perform and restore system backups
Configure TCP/IP
Locate and analyze system error logs

Contents
Unit 1: System hardware overview
Unit 2: System management tools and documentation
Unit 3: Software installation and maintenance
Unit 4: Devices
Unit 5: ODM
Unit 6: System boot: Hardware
Unit 7: System boot: Software
Unit 8: AIX 6 installation and initial configuration
Unit 9: The Logical Volume Manager
Unit 10: Storage management with LVM
Unit 11: Managing file systems
Unit 12: Paging space
Unit 13: Backup and restore
Unit 14: TCP/IP configuration
Unit 15: Error logs and syslogd

xviii AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

pref Text highlighting


The following text highlighting conventions are used throughout this book:
Bold Identifies file names, file paths, directories, user names,
principals, menu paths, and menu selections. Also identifies
graphical objects such as buttons, labels, and icons that the
user selects.
Italics Identifies links to Web sites, publication titles, is used where the
word or phrase is meant to stand out from the surrounding text.
It also identifies parameters whose actual names or values are
to be supplied by the user.
Monospace Identifies attributes, variables, file listings, SMIT menus, code
examples, command output, and system messages that you
would see displayed on a terminal.
Monospace bold Identifies commands, subroutines, daemons, and text the user
would type.

Documentation References
The following will be used to indicate where a particular referenced document can be
located:
Info Center Indicates that a referenced document can be found in the AIX
Information Center. This is located at:
http://publib.boulder.ibm.com/infocenter/pseries
Redbooks Indicates that a referenced document can be found in the IBM
Redbooks Web site. This is located at:
http://www.redbooks.ibm.com
General product information can be found on-line at http://www.ibm.com.

Copyright IBM Corp. 2000, 2008 Course Description xix


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

xx AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

pref Agenda
Day 1
Welcome
Unit 1 - System hardware overview
Exercise 1 - System hardware overview
Unit 2 - System management tools and documentation
Exercise 2 - System management tools and documentation
Unit 3 - Software installation and maintenance
Exercise 3 - Software installation

Day 2
Unit 4 - Devices
Unit 5 - The Object Data Manager (ODM)
Exercise 4 - The Object Data Manager (ODM)
Unit 6 - System boot: Hardware
Exercise 5 - System boot: Hardware
Unit 7 - System boot: Software

Day 3
Unit 8 - Installation and initial configuration
Exercise 6 - System boot: Software
Unit 9 - The Logical Volume Manager (LVM)
Exercise 7 - LVM
Unit 10 - Storage management with LVM (Topic 1)

Day 4
Unit 10 - Storage management with LVM (Topics 2 and 3)
Exercise 8 - Storage management with LVM
Unit 11 - Working with file systems
Exercise 9 - Working with file systems
Unit 12 - Paging space
Exercise 10 - Paging space
Unit 13 - Backup and restore (start)

Day 5
Unit 13 - Backup and restore (Conclude)
Exercise 11 - Using backup and restore
Unit 14 - TCP/IP configuration

Copyright IBM Corp. 2000, 2008 Agenda xxi


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

Exercise 12 - TCP/IP configuration


Unit 15 - Error Log and syslogd
Exercise 13 - Error Log and syslogd

xxii AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 1. System hardware overview

What this unit is about


This unit is an introduction to the IBM System p5 and p6 product
range, including workstations, workgroup servers, enterprise servers,
large scale servers, and Logical Partitioning.

What you should be able to do


After completing this unit, you should be able to:
Identify basic architecture elements and hardware components of
the IBM System p5 and p6 servers
Describe the features of Logical Partitioning

How you will check your progress


Accountability:
Checkpoint
Machine exercises

References
All documents can be found in the AIX Information Center:
http://publib.boulder.ibm.com/infocenter/pseries
General product information can be found on-line at:
http://www.ibm.com

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:

Identify basic architecture elements and hardware


components of the IBM System p5 and p6 servers

Describe the features of logical partitioning

Copyright IBM Corporation 2008

Figure 1-1. Unit objectives AW186.0

Notes:

1-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

What is a partition?
Partition
Allocation of one systems resources to create logically separate systems
Each partition is an independent operating environment

From one to many

Copyright IBM Corporation 2008

Figure 1-2. What is a partition? AW186.0

Notes:

Partition
When a computer system is subdivided into multiple, independent operating system
images, those independent operating environments are called partitions. The resources
on the system are divided up among the partitions. Applications running on a partitioned
system do not have to be redesigned for the partitioned environment.

Independent operating environment


Each partition runs its own operating system which may or may not match operating
systems in other partitions on the same system. Each partition may be started and
stopped independently of other partitions.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Physical partition (PPAR)


Physical partition
Resources are allocated in physical building blocks
Blocks contain groups of processors, memory, and I/O slots
Interconnect

SMP building block SMP building block SMP building block

Operating System Operating


System

CPU, CPU, CPU,


Memory, and I/O Memory, and I/O Memory, and I/O

Physical Partition Physical Partition

Copyright IBM Corporation 2008

Figure 1-3. Physical partition (PPAR) AW186.0

Notes:

Introduction
This page defines physical partitioning which we will contrast with logical partitioning on
the next visual. IBM System p servers support logical partitions, not physical partitions.

PPARs
The visual shows an example of a system with three system building blocks, each made
up of a number of processors, an amount of memory, and a number of I/O slots. These
three building blocks can be configured into one, two, or three partitions with each one
made up of one or more entire building blocks. The size of the building blocks depends
on the vendor and system model.

1-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Adding or removing resources


To add or remove resources in a PPAR environment, entire building blocks must be
added or removed. For example, if more memory is needed, you may have to add more
processors and I/O slots.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Logical partition (LPAR)


A partition is the allocation of system resources to create
logically separate systems within the same physical footprint
A logical partition exists when the isolation is implemented with
firmware
Not based on physical system building block
Provides configuration flexibility

SYS1 SYS2 SYS3 SYS4


1:00 10:00 11:00 12:00
Japan USA Brazil UK
RG RESS O
O
EP
ORDEM

AIX 5L Linux AIX 6 i5/OS

Copyright IBM Corporation 2008

Figure 1-4. Logical partition (LPAR) AW186.0

Notes:

Logical partition (LPAR)


Logical partitioning is the ability to make a single system run as if it were two or more
systems. Each partition represents a division of resources in your computer system.
The partitions are logical because the division of resources is virtual and not along
physical boundaries. There are, however, configuration rules which must be followed
and these will be covered later in this course.
For the rest of the course, logical partitions will be called simply LPARs or partitions for
brevity.

Implemented in firmware
The system uses firmware to allocate resources to partitions and manage the access to
those resources. While there are configuration rules, the granularity of the units of
resources that can be allocated to partitions is very flexible. You can add just a small

1-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty amount of memory if that is all that is needed without a dependency on the size of the
memory cards or without having to add more processors or I/O slots that are not
needed.
Firmware refers to underlying software running on a system independently from any
operating system. On IBM System p5 or p6 systems, this includes the software used by
the Flexible Service Processor (FSP) and the POWER Hypervisor.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Partition characteristics
Each partition has its own:
Operating system
Licensed Internal Code (LIC) / Open firmware
Console
Resources
Assorted aspects which are expected in a stand-alone operating system
environment:
Problem logs
Data (libraries, objects, file systems)
Performance characteristics
Network identity
Date and time

Copyright IBM Corporation 2008

Figure 1-5. Partition characteristics AW186.0

Notes:

Characteristics of a partition
The visual above illustrates how each partition is independent. As stated before, each
partition runs its own operating system. The version of the operating system may be
any valid version which is supported on the system. Other things you would expect on a
physically separate system are also separate for partitions; there are even independent
virtual consoles.

What attributes are the same between partitions on the same system?
Each partition shares a few physical system attributes, such as the system serial
number, system model, and processor feature code with other partitions. In addition,
you may choose to share other hardware, such as SCSI devices, among partitions.

1-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Partition resources
Resources are allocated to partitions
Memory allocated in units as small as the LMB size
Dedicated whole processors or shared processing units
Individual I/O slots
Including virtual devices

Some resources can be shared


Virtual devices

Some core system components are inherently shared

AIX 5L Linux AIX 5L


PPPPP PP PPP
MMM MM MM
AAAAAA AAAA AAAA

A = Adapter
M = Memory
P = Processor
Copyright IBM Corporation 2008

Figure 1-6. Partition resources AW186.0

Notes:

Resources
Resources are the system components that are configured into partitions. The details of
the configuration rules for each resource will be covered in later units of this course.
The maximum number of partitions is related to the total amount of resources on the
system. For example, a system with eight processors can be configured with a total of
80 partitions (if there are sufficient resources). If a system has enough resources, the
upper limit of the number of partitions is 254.

Minimum amount of resources


Each partition must be configured with at least 128 MB of memory, one tenth of a
physical processor, and enough I/O devices to provide a boot disk and a connection to
a network. An AIX partition needs at least 256 MB of memory to install and boot.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Memory
Memory is allocated in units known as the Logical Memory Block (LMB). The default
LMB size is variable depending on the total amount of physical memory installed and
may be as small as 16 MB. A partition may be configured with as little as 128 MB of
memory or as much as all of the available memory.

Processors
A partition is configured with either dedicated whole processors or shared processors.
Shared processors are allocated in processing units. The processing power of one
processor is equivalent to 1.0 processing units. Partitions are configured with at least
0.1 processing units or with as much as the equivalent to all of the available physical
processors. After the 0.1 minimum is satisfied, additional processing units can be
allocated in quantities of 0.01 processing units.

I/O slots
I/O resources are allocated to partitions at the slot level. At minimum, you must
configure a partition with enough I/O resources to include the boot disk and a network
connection.

Shared devices
With software called the Virtual I/O Server installed in a special partition, Ethernet and
storage devices can be configured to be shared between partitions.

Secure environments and shared I/O


Highly secure environments may choose not to take full advantage of the cross-partition
sharing of devices. Even very subtle visibility, such as, different response times from a
shared resource, could be considered a covert channel of communication. For this
reason, by design, all shared/virtual resources must be consciously enabled.

Shared core resources


Some devices may be shared because they are core resources to the entire system.
For example, even though you have allocated separate amounts of memory to different
partitions, that memory may be on the same memory card. Likewise, processors, I/O
drawers, and other core system components are shared. Because of this, it is possible
that a hardware failure may bring down more than one partition and, potentially, the
entire system. However, there are many fault containment, in-line recovery, and
redundancy features of the system to minimize unrecoverable failures.

1-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty POWER4, POWER5, and POWER6 processor-based servers comparison


The following is a summary of resource allocation differences between POWER4,
POWER5, and POWER6 processor-based servers:
- Sub-processor allocation and shared processors are new features with POWER5
processor-based servers.
- LMB size is 256 MB for POWER4 and is variable for POWER5 and POWER6
processor-based servers with the smallest possible LMB of 16 MB.
- The concept of allocating I/O at the slot level remains the same, however POWER5
and POWER6 processor-based servers now have the concept of virtual slots with
virtual devices.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Logical partition resource example


Flexibility to allocate resources depending on need
With DLPAR operations, resources can be moved, removed or
added without restarting the partition
LPAR 1 LPAR 2 LPAR 3 LPAR 4

Processors

Memory

I/O Slots

Copyright IBM Corporation 2008

Figure 1-7. Logical partition resource example AW186.0

Notes:

Introduction
This visual above shows how a systems resources might be divided between four
partitions. With logical partitions, resources can be allocated based on computing
needs. You do not need to allocate all resources to partitions, that is, some resources
may remain unallocated until they are needed.

Dynamic logical partitioning (DLPAR)


With DLPAR, resources can be added, removed, or moved between partitions as
computing needs change without restarting the partitions.

1-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

IBM POWER5 and POWER6 LPAR-capable systems


IBM POWER5 and POWER6 processor-based LPAR-capable
systems
Entry, mid-range, and high-end servers
IBM System p5 and p6, OpenPower, and IntelliStation workstation models
Example models:
p5-505 and p5-505Q
p5-510 and p5-510Q
p5-520 and p5-520Q
p5-550 and p5-550Q
p5-570
p5-575
p5-590
p5-595
Blade Center JS21 (PowerPC)
Blade Center JS22 (POWER6)
p520 (POWER6)
p550 (POWER6)
p570 (POWER6)

Visit http://www.ibm.com for the latest list of


models
Copyright IBM Corporation 2008

Figure 1-8. IBM POWER5 LPAR-capable systems AW186.0

Notes:

Introduction
The visual above lists example IBM POWER5, POWER5+ (with Q suffix), or POWER6
processor-based servers which support logical partitioning. The list on the visual is not
comprehensive; check www.ibm.com for the current up-to-date list.
There are OpenPower systems which support only Linux, while the other systems
support AIX 5L, AIX 6, and Linux, with certain models also supporting i5/OS.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

POWER Hypervisor functions


The POWER Hypervisor is firmware that provides:
Virtual memory management
Controls page table and I/O access
Manages real memory addresses versus offset memory addresses
Virtual console support
Security and isolation between partitions
Partitions are allowed access only to resources that are allocated to them (enforced by
the POWER Hypervisor)

LPAR 1 LPAR 2 LPAR 3 LPAR 4

POWER Hypervisor Security and


Isolation Barriers
System Hardware
(memory, processors, devices)

Copyright IBM Corporation 2008

Figure 1-9. POWER Hypervisor functions AW186.0

Notes:

Introduction to the POWER Hypervisor


Partitions are isolated from each other by firmware (underlying software) called the
POWER Hypervisor. The names POWER Hypervisor and Hypervisor will be used
interchangeably in this course.

Virtual memory management by the Hypervisor


There is no program access permitted between partition memory and I/O memory.
Software exceptions and crashes are contained within a partition. The Hypervisor
controls the page tables used by partitions to ensure a partition only has access to its
own physical memory segments. It uses a physical memory offset value for each
partition so that the operating system in each partition can continue to use memory
address zero as its starting point.

1-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Virtual console support


The Hypervisor provides input/output streams for a virtual console device that can be
presented on the HMC.

Security and isolation between partitions


Besides managing virtual memory, the Hypervisor also ensures that a partition may only
access devices allocated to it. It also clears memory, reinitializes processors, resets
processor registers, and resets I/O devices when devices are allocated to a partition
(statically or dynamically).

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The big picture


Managed System

AIX Linux Unassigned


Resources
HMC
Partition 1 Partition 2
Hypervisor
Non-Volatile RAM

Service
Processors
Processor
Memory Ethernet
LPAR
I/O Slots
Allocation
Tables

Copyright IBM Corporation 2008

Figure 1-10. The big picture AW186.0

Notes:

Introduction
This picture brings together several concepts:
- Partitions are independent operating environments and their resources are
managed by the Hypervisor.
- NVRAM is used on the managed system to hold a copy of the partition configuration
so that if the HMC or the network were to fail, the partitions can continue to run and
even reboot if necessary.
- Partitions are configured and managed on the HMC, which is a separate Linux PC
console. A copy of the partition configuration data is also kept on the HMC (in
addition to NVRAM).
- The HMC is connected to the managed system through an Ethernet connection to
the service processor. The service processor is a separate, independent processor

1-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty that provides hardware initialization during system load, monitoring of environmental
and error events, and maintenance support.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Advanced partition features

Dynamic resource allocation


Advanced processor concepts
Virtual I/O
Capacity on Demand

Copyright IBM Corporation 2008

Figure 1-11. Advanced partition features AW186.0

Notes:

Introduction
This page lists the advanced partition features covered in the rest of this unit.

POWER4, POWER5, and POWER6 processor-based servers comparison


POWER4 processor-based servers have dynamic allocation of resources, although
there are new dynamic options in the POWER5 processor-based servers.
The advanced processor configuration options and virtual I/O were new features for
POWER5 processor-based servers.
POWER6 processor-based servers build upon and extend the Advanced Processor
and Virtual I/O capabilities of the POWER5 architecture.
POWER4 processor-based servers also have Capacity on Demand, however, the
features have been enhanced on the POWER5 processor-based servers.

1-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Dynamic partitioning (DLPAR)


DLPAR is the ability to add, remove, or move resources
between partitions without restarting the partitions
Resources
Processors, memory, and I/O slots
Add/remove virtual devices
Security and isolation between LPARs is not compromised
A partition sees its own resources plus other available virtual
resources
Resources are reset when moved
Applications may or may not be DLPAR-aware

DLPAR allows you to react to


changing resource needs

Copyright IBM Corporation 2008

Figure 1-12. Dynamic partitioning (DLPAR) AW186.0

Notes:

Dynamic partitioning
Dynamic partitioning refers to the ability to move resources between partitions without
shutting down the partitions. The opposite of dynamic partitioning is static partitioning,
where new configurations are only used when a partition is reactivated.
DLPAR operations do not weaken the security or isolation between LPARs. A partition
only sees resources that have been explicitly allocated to the partition, along with any
potential connectors for additional virtual resources that may have been configured.
Resources are reset when moved from one partition to another. Processors are
reinitialized, memory regions are cleared, and adapter slots are reset.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

DLPAR operations
You can add, remove, and move resources between partitions. The resources include
memory regions, processing units, and I/O slots. This can be accomplished from the
HMC application or using HMC command-line commands.
With virtual devices, you may add or remove them, but you cannot move them directly
from one partition to another. You can, however, dynamically change the configuration
that specifies what type of virtual adapter is in a virtual slot. Other partition options that
can be reconfigured dynamically will be covered later in this course.

Applications may not be DLPAR-aware


Most applications are unaware of the underlying resource specifics, but some
applications and utilities, particularly monitoring tools, may inhibit some DLPAR
operations if they bind to processors or pin memory. Many resource-aware applications
have been rewritten in recent years to allow DLPAR. Check with your sales
representative about your applications.

1-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Processor concepts
Logical

LPAR LPAR LPAR Virtual

Shared

Dedicated

Inactive
(CoD)

Deconfigured

Physical
(Installed)

Copyright IBM Corporation 2008

Figure 1-13. Processor concepts AW186.0

Notes:

Introduction
This visual summarizes the various concepts concerning POWER5 processors. Along
the bottom are whole, physical processors installed in the computer system. These are
configured in various ways into the three partitions.

Processing units, partial processors, and logical processors


Partitions are allocated in dedicated whole processors or in processing units. A
processing unit is the equivalent to 1.0 physical processors. A partition may be
configured with as little as 0.1 processing units and, after that minimum is satisfied,
processing units may be allocated in units of 0.01 processing units.
The terms Micro-Partitioning and partial processors refer to the ability to allocate less
than a whole physical processor to a partition.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Deconfigured
A physical processor may be automatically deconfigured from the system due to
detected errors or user deconfiguration.

Inactive, Capacity on Demand (CoD) processors


Inactive processors may be added as a dedicated or shared processor through the
activation of a CoD license key. CoD is an option that can be purchased. There is more
on this in a few pages.

Shared versus dedicated processors


Dedicated processors are physical processors that are allocated to a partition and are
dedicated to that partition. With POWER5, other partitions will not use any time slices
on those processors while that partition is active. With POWER6, a dedicated processor
partition can be configured to donate its unused processor capacity to a shared pool.
Shared processors are put into a shared pool. For POWER5 there is a single shared
pool. For POWER6 we can configure multiple shared pools. Shared pool partitions
(SPLPAR) use processing units from a shared pool as needed within configuration
guidelines.

Virtual processors
Since an SPLPAR does not have a specific physical processor allocated to it, it needs
to be presented with a virtual equivalent for use by its CPU scheduling mechanisms.
These are referred to as Virtual Processors. If you were to allocate 2.0 processing units
to a partition, the partition may get bits of execution time on up to 20 physical
processors. This concept is known as virtual processors.

Logical processors
If simultaneous multi-threading is enabled for AIX 5L Version 5.3 or AIX6, then each
virtual processor or physical processor is utilized as if it were two logical CPUs. In other
words, AIX can simultaneously execute two threads on a single processor.

POWER4 and POWER5 processor-based servers comparison


POWER4 processor-based servers may have deconfigured and CoD processors.
Processors are dedicated when allocated to a partition. Shared and virtual processors
were new with POWER5 processor-based servers and enhanced with POWER6
processor-based systems.

1-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Micro-partitioning
Time-sliced sub-processor allocations are dispatched
according to demand and entitled capacity
Physical
Processors
Partition 1
P P P P Partition 2
Partition 3
10ms
Partition 4
Partition 5
Partition 6
Partition 7

Shared Processing Pool


Copyright IBM Corporation 2008

Figure 1-14. Micro-partitioning AW186.0

Notes:

Micro-partitioning
Micro-partitioning is defined as the ability to create a partition and allocate fractional
amounts of processing capacity to it.
Processing power may be allocated to partitions using dedicated processors or shared
processors. For shared processor partitions, processing power may be allocated in the
granularity of 0.01 processing units. A partition must have a minimum of 0.1 processing
units.
The visual above shows seven partitions being run on a processing pool of four physical
processors. The diagram represents a single 10 millisecond (ms) interval. Each
partition gets a percentage of the execution dispatch time on the processors in the pool,
based on its capacity assignment. Do not worry as we will come back to this later. This
page is here to give you some basic terminology until we reach the advanced processor
topic later in this course.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Virtual I/O
Each partition has virtual I/O slots
Configurable for each partition
Virtual slots can have a virtual adapter instance
Ethernet or SCSI
Can be dynamically added or removed just like physical I/O
slots
Cannot be dynamically moved to another partition

Copyright IBM Corporation 2008

Figure 1-15. Virtual I/O AW186.0

Notes:

Virtual I/O basics


Each partition, by default, is configured to support 10 virtual I/O slots and each slot can
be populated with a virtual adapter instance which allows partitions to share devices. It
also provides virtual Ethernet connections between partitions on the same system.
More virtual slots may be configured.
Virtual adapters interact with the operating system like any other adapter card, except
that they are not physically present. Virtual adapters are recorded in system inventory
and management utilities.
As with physical I/O adapters, a virtual I/O adapter must first be deconfigured from the
operating system to perform a DLPAR remove operation.

1-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Virtual Ethernet


Virtual Ethernet provides the same function as using an Ethernet adapter and is
implemented through high-speed, inter-partition, in-memory communication. There are
two options with virtual Ethernet:
- A virtual Ethernet connection can be configured between two LPARs on the same
managed system. There is no actual physical adapter. This provides a fast network
connection between the partitions.
- A virtual Ethernet connection can be configured on one partition to connect to a
network using a Shared Ethernet adapter of another partition on that managed
system.

Virtual SCSI
The virtual SCSI option provides access to block storage devices in other partitions
(that is, device sharing). It uses the client/server model where the server exports disks,
logical volumes, or other SCSI-based devices, and the client sees the imported device
as a standard SCSI device.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Virtual I/O example

Client Virtual I/O Server


Partition Partition
Physical
Virtual Virtual Virtual Layer 2 Physical Network
Ethernet Ethernet Bridge Ethernet
Switch
Virtual
Ethernet Logical
Virtual Disk
Hypervisor Disk

Client Server Device


Adapter Adapter Mapping
SCSI RDMA Protocol
DMA
Buffer Device DM
A Transfer

SCSI, SSA, FC Physical


or Logical Disks
Copyright IBM Corporation 2008

Figure 1-16. Virtual I/O example AW186.0

Notes:

Client/server relationship
Virtual I/O devices provide for the sharing of physical resources, such as adapters and
SCSI devices, among partitions. Multiple partitions can share physical I/O resources
and each partition can simultaneously use virtual and physical (natively attached) I/O
devices. When sharing SCSI devices, the client/server model is used to designate
partitions as users or suppliers of resources. A server makes a virtual SCSI server
adapter available for use by a client partition. A client configures a virtual SCSI client
adapter that uses the resources provided by a virtual SCSI server adapter.
If a server partition providing I/O for a client partition fails, the client partition might
continue to function depending on the significance of the hardware it is using. For
example, if the server is providing the paging volume for another partition, a failure of
the server partition will be significant to the client.

1-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Virtual I/O Server


The IBM Virtual I/O Server software allows the creation of partitions that use the I/O
resources of another partition. In this way, it helps to maximize the utilization of physical
resources on POWER5 and POWER6 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.
Virtual I/O Server is a separate software product, and is included as part of the
PowerVM feature. It supports AIX 5L Version 5.3, AIX 6, and Linux partitions as virtual
I/O clients.

Virtual SCSI adapters


Virtual SCSI adapters provide the ability for a partition to use SCSI devices that are
owned by another partition. For example, one partition may provide disk storage space
to other partitions.
See the Virtual I/O Server technical support Web site for specific devices that are
supported: http://techsupport.services.ibm.com/server/vios

Virtual Ethernet
There are two main features to virtual Ethernet. One is the inter-partition virtual switch
to provide support for connecting up to 4,096 LANs. LAN IDs are used to configure
virtual Ethernet LANs and all partitions using a particular LAN ID can communicate with
each other.
The other feature is a function called Shared Ethernet adapter that bridges networks
together without using TCP/IP routing. This function allows the partition to appear to be
connected directly to an external network. The main benefit of using this feature is that
each partition need not have its own physical network adapter.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Capacity on Demand (CoD)


Permanent Capacity Upgrade on Demand (CUoD)
Permanent activation of processors or memory
Trial CoD
No charge 30-day activation of processors or memory resources
On/Off CoD and Utility CoD
Ability to activate processor or memory resources temporarily
Capacity BackUp
Processors and memory temporarily
added to backup server Add Reserve
Prepaid for up to 90 days Resources

Copyright IBM Corporation 2008

Figure 1-17. Capacity on Demand (CoD) AW186.0

Notes:

Introduction to Capacity on Demand (CoD)


CoD is the name given to a collection of optional features available for purchase on
certain models of POWER5 and POWER5+ processor-based servers. The main bullets
in the visual above list purchasing options. These options are managed from the HMC
and require a license key to activate.
Permanent Capacity Upgrade on Demand (CUoD) requires a purchase agreement.
Once processors or memory are added, there is no ability to turn off the capacity.
Processors are added in units of one whole processor, and memory can be added in 1
GB increments.
Trial CoD is available for up to 30 contiguous days at no additional cost to allow testing
and emergency relief while the customer processes the purchase of permanent CUoD
resources.

1-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty On/Off CoD provides temporary additional processor or memory resources. Usage is
measured and charged based on the number of days the resource was activated (even
if activated for only a few minutes on a given day). Activity is reported to IBM monthly
and there must be an On/Off Capacity agreement.
Utility CoD is similar to On/Off CoD, except that usage is measured and charged in
units of minutes rather than days. Utility CoD is supported by POWER6
processor-based systems.
Capacity BackUp adds reserve processor and memory capacity to a backup server in
the event of an unforeseen loss of production server capability due to forces beyond
your control. You can divert entire workloads to backup servers for up to 90 days. There
is an upfront fee and an emergency-use fee, which include testing.

Reference
For more information, visit the IBM Web site (www.ibm.com) and search for CoD or
use this link: http://www.ibm.com/systems/p/cod/types.html

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

PowerVM Standard Edition


Ordered as an optional feature code for all but the largest
systems
This feature is standard on the p5-590 and 595

Included in this feature


Firmware feature to enable Micro-Partitioning, including:
Shared Dedicated Capacity (POWER6 only)
Multiple Shared Processing Pools (POWER6 only)
Virtual I/O Server software
Shared Ethernet Adapter
Virtual SCSI
Integrated Virtualization Manager

Operating systems which support this feature (as a client)


AIX 5L V5.3 and AIX 6
SUSE LINUX Enterprise Server 9 and later
Red Hat Enterprise Linux AS for POWER Version 3 and later

Copyright IBM Corporation 2008

Figure 1-18. PowerVM Standard Edition AW186.0

Notes:

Feature description
The PowerVM, previously known as Advanced POWER Virtualization (APV) feature,
provides (in the Standard Edition):
- Shared processor pool and Micro-Partitioning. If enabled on POWER6 systems it
also includes:
Shared Dedicated Capacity, so partitions with dedicated processor can donate
unused cycles.
Multiple Shared Processing Pools which enables the configuration of more pools
in addition to the default shared processing pool.
- Virtual I/O Server (VIOS) software for sharing virtual SCSI and Shared Ethernet
adapters
- Integrated Virtualization Manager which provides a significant portion of HMC
functions in a partition rather than requiring a separate management console.

1-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - The original POWER5 APV features only Partition Load Manager software for
automating dynamic logical partitioning operations based on system workload
At initial order entry, selecting the feature code will result in the enabling of
Micro-Partitioning during the manufacturing process and the additional software media
and publications will be shipped to the customer. When ordering the feature as an MES,
an activation key will be posted on an IBM Web site and the customer must retrieve it
and install it on the system.
Once the Virtualization feature is installed in a system, it cannot be removed.

PowerVM feature codes


The PowerVM is ordered by specifying a feature code. The actual code depends on the
system model. For example, to order this feature for a p5-520, you would order the
feature code of 7940.

PowerVM Enterprise Edition


The PowerVM Enterprise Edition provides all the capabilities of the Standard Edition
plus support for Partition Mobility when used on POWER6 processor-based systems.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

POWER6 system highlights


POWER6 processor technology
Fifth implementation of multi-core design
~100% higher frequencies
POWER6 system architecture
New generation of servers
New SMP connection for multi-node configuration
New I/O
PCIe, SAS, SATA
GX+ 12x IO drawers
Enhanced power management
Enhanced virtualization
Partition mobility
Dedicated shared processors LPAR Shared
Multiple virtual shared processor pools VIOS LPAR LPAR LPAR Dedicated
#1 #2 #3 Processor
Integrated Virtual Ethernet
LPAR
Availability POWER6 Virtualization#4
New RAS features Features
Processor instruction retry New
Storage keys Integrated
Virtual Ethernet HMC 7
Power management

Copyright IBM Corporation 2008

Figure 1-19. POWER6 system highlights AW186.0

Notes:
POWER6 technology is built with a new set of individual components that benefit from each
other, providing higher performance.
POWER6 is based on the following:
New advanced semiconductor technology
New processor design. POWER6 processor is the 9th generation 64-bit processor and
5th generation POWER processor
New system architecture
New virtualization plateau with enhanced capabilities
New HMC v7 code
New PHYP microcode
Operated by a new AIX 6 version

1-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The high frequency of the POWER6 clock is based on semiconductor technology
improvement and processor design.
The system architecture has been redesigned including node interconnect.
The I/O drawer uses a new interface called GX+ bus. It is similar to 12 channel InfiniBand
connection.
The I/O subsystems are also new using PCI express and Serial Attachment SCSI (SAS).
Special attention has been given to power consumption of the system at all phases of the
design.
The Hardware Management Console (HMC) version 7 has been redesigned with a new
graphical interface supporting the POWER6 feature set.
POWER6 also has new virtualization tools added such as the Partition Mobility feature.
This provides a way for administrators to perform service on demand (SoD).
The AIX 6 UNIX operating system makes the most of the POWER6 technology, with a
strong focus on security and availability. AIX 6 also provides increased application
scalability and performance.
AIX 6 provides new functionalities, includes improvements over previous versions, and
introduces new software concepts, such as workload partitions.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

IBM POWER5 processor-based systems


System p and System i hardware convergence
POWER5 and later
Both support mix of AIX 5L, AIX 6, Linux, and i5/OS operating systems
All support PowerVM

Entry systems: 1- to 4-way processor systems


Examples: p5-185, p5-505, p5-510, p5-520, p5-550, p5-520Q, p520

Mid-range systems: 2- to 16-way processor systems


Example: p5-550Q, p5-570, p570

High end systems: 8- to 64-way processor systems


Examples: p5-575, p5-590, p5-595

g
Scalin
-way
1- to 64
s
System

Copyright IBM Corporation 2008

Figure 1-20. IBM POWER5 processor-based systems AW186.0

Notes:

Introduction
Since the introduction of POWER5 (and continuing with POWER6), the System p and
System i LPAR-capable hardware systems now use the same basic hardware platform,
with the exception of the I/O subsystem. The same HMC can be used for both System i
and System p managed systems.
The machine type and model numbers shown in the visual above are examples and are
specific to the IBM System p5 and p6 servers. There are differences between these and
the System i servers in both packaging and licensing. Check the IBM Web site
(www.ibm.com) for the most up-to-date information.
Not all system models support all three operating systems.

1-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty HMC required for LPAR management and CoD


An IBM HMC is required to manage partitions or use CoD. Multiple partitions and
multiple POWER5 or POWER6 processor-based servers can be supported by one
HMC. The HMC is not required for a partition to run, but is required to create, define,
and change the logical partition configuration.
An HMC can support multiple systems, but it cannot support a mixture of POWER4 and
POWER5 (or POWER6) processor-based systems. HMCs used with earlier POWER
generation processor-based systems can be upgraded to support later generation
POWER processor-based systems.
The POWER6 processor-based system requires HMCv7. HMCv7 can manage both
POWER5 and POWER6 processor-based systems.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

IBM System p5 servers information


The system configurations and model numbers change frequently

Complete details on
available systems
can be found on
this IBM Web site

Sample configurations
will be described on
the next few pages

http://www-03.ibm.com/systems/p/

Copyright IBM Corporation 2008

Figure 1-21. IBM System p5 servers information AW186.0

Notes:

Detailed information
The available systems that can be purchased are constantly updated. You can find
complete details on the servers and options at this Web site.

1-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

p5-520 and p5-520Q overview


1- or 2-core 1.65 - 2.1 GHz processors (p5-520)
or 4-core 1.5 or 1.65 GHz (p5-520Q)
1 32 GB memory
8 internal disks (up to 2.4 TB)
6 system PCI-X slots
Supports up to four I/O drawers
Up to 14.4 TB disk
p5-520Q supports up to 40 LPARs

Rack-mount (19 4U)

Deskside

Copyright IBM Corporation 2008

Figure 1-22. p5-520 and p5-520Q overview AW186.0

Notes:

Introduction
The p5-520 and p5-520Q are available in a deskside or rack-mount configuration. The
rack-mount system is 4U in height and may be mounted in the IBM RS/6000 7014
Model T00 Enterprise Rack, the IBM RS/6000 7014 Model T42 Enterprise Rack, or
other standard 19 rack units provided that the rack conforms to the EIA-310-D
standard.
Eight hot-swap disk bays, six-hot swap PCI-X slots, two Slimline media bays for
DVD-ROM and DVD-RAM, and one media bay for a tape drive are supported in the
system.

LPAR support
Up to 20 partitions are supported with the purchase of the PowerVM (feature code 7940
for the p5-520) when the system has two processors. If the system has four processors,

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

as with the 520Q model, up to 40 LPARs are supported. Without the PowerVM feature,
dedicated processors must be used, so a maximum of two or four partitions are
supported depending on the number of physical processors.

Memory DIMMs
Memory DIMMS must be installed in quads. Mixed capacities within a quad will result in
reduced reliability. A maximum of two sets of four are supported. Memory DIMMS must
be installed in certain slots; refer the Technical Overview redpaper for details and sizes.

System components
The p5-520 and p5-520Q contain up to 11 bays. There are four front-accessible,
hot-swap-capable disk bays in a minimum configuration, with an additional four
hot-swap-capable disk bays optional. Two of the remaining three bays can be used for a
DVD-ROM and a DVD-RAM, and the third bay can contain a tape drive.
The following integrated devices are also included:
- Six hot-swap 3.3v PCI-X slots
- Service processor
- Two 10/100/1000 Ethernet ports
- Two USB ports
- Dual ported internal Ultra320 SCSI controller with optional RAID adapter
- Hot-swap power and cooling (Redundant power is optional)
- Redundant cooling
- Two serial ports
- Two HMC ports
- Two remote I/O (RIO) ports

Disk drives
The following disk drives are available for the p5-520 as of the writing of this course
(check www.ibm.com for the most up-to-date information):
- 73.4 GB 10,000 RPM Ultra320 SCSI Disk Drive
- 146.8 GB 10,000 RPM Ultra320 SCSI Disk Drive
- 300 GB 10,000 RPM Ultra320 SCSI Disk Drive
- 36.4 GB 15,000 RPM Ultra320 SCSI Disk Drive
- 73.4 GB 15,000 RPM Ultra320 SCSI Disk Drive
In manufacturing, the boot disk is placed in slot 8. If the system has one 4-pack
installed, disks are then filled in slots 7, 6, and 5. If two 4-packs are installed, disks are
filled in slots in this order: 4, 7, 3, 6, 2, 5, and 1. This balancing is for manufacturing test
purposes only and is not due to any limitation.
There is one dual ported Ultra320 SCSI controller integrated into the system planar that
is used to drive the internal disk drives. The eight drives plug into the disk drive

1-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty backplane, which has two separate SCSI buses with four disk drives per bus. This
allows each disk pack to be allocated to separate partitions if the second disk pack is
connected to a separate plug-in Ultra320 PCI-X adapter. For this configuration, the
system must be ordered with feature code 6594.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

p6-p520 system overview


p6-p520 entry server:
1, 2, or 4 POWER6 processors at 4.2 GHz (single or dual-core modules)
1 GB to 64 GB of DDR2 SDRAM (16 GB max per processor 8 DIMM slots)
Three PCIe 8x + two PCI-X adapter slots
3 Gbps internal SAS controller (RAID optional)
Up to 6 SAS disks with 73.4 GB, 146.8 GB or 300 GB 15 K rpm drives.
IVE choice for dual or quad ports 1 Gbps or dual 10 Gbps Ethernet controllers
One slimline and one half-high media bay
Up to eight optional I/O drawers (4 drawers max per dual core)
Desk-side or 4U rack-mount server
Mainframe-inspired RAS features

PowerVM (optional)
Express Edition
Up to three partitions on the server using IVM
Standard Edition
All the virtualization features using an HMC
Enterprise Edition
All the virtualization features using an HMC + Partition Mobility

Copyright IBM Corporation 2008

Figure 1-23. p6-P520 system overview AW186.0

Notes:
The p520 supports single or dual-core POWER6 modules on a single or dual-chip planer.
Each POWER6 module has 8 MB of L2 cache. In a four-core configuration, the system can
contain up to 64 GB of memory via eight DDR2 memory DIMM slots. The p520 can contain
six 3.5" SAS disk bays, which can accommodate up to six SAS disk drives with 73, 146 or
300 GB capacity supporting a maximum of 1.8 TB of internal disk storage. All disk bays are
direct dock and hot-pluggable. The server offers two Ethernet 10/100/1000 Mbps ports, or
optionally four 10/100/1000 Mbps Ethernet ports, or two 10 Gb Ethernet ports.
The RAM configuration options are dependent on the number of processor cores. For
example, one-core systems may have a maximum memory size of 16 GB and do not
support I/O drawers; two-core systems may have a maximum of 32 GB of memory and
support four I/O drawers.
P6-P520 supports AIX (v5.3 or later) and Linux distributions from Red Hat (RHEL4.5 or
later) and SUSE Linux (SLES10 SP1 or later) operating systems.

1-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

p5-550 and p5-550Q overview


1-, 2-, or 4-core 1.5 GHz or 1.65 GHz processors (p5-550)
or 4- or 8-core 1.5 or 1.65 GHz (p5-550Q)
512 MB 64 GB memory
8 internal disks (up to 2.4 TB)
Deskside
5 system PCI-X slots
Supports up to eight I/O drawers
Maximum 28.8 TB disk

Rack-mount (19 4U)

Copyright IBM Corporation 2008

Figure 1-24. p5-550 and p5-550Q overview AW186.0

Notes:

Introduction
The p5-550 and p5-550Q are architecturally similar to the p5-520, except that they have
greater expansion capability. These models support more processing power, memory,
and I/O expansion than the smaller p5-520.
These models have five hot-swap 3.3v PCI-X slots or four hot-swap 3.3-V PCI-X slots
and one slot to support the Dual Port RIO-2 I/O Hub.

I/O drawers
The p5-550 servers can be attached to 7311-D20 I/O drawers using the standard RIO-2
ports or the optional Dual Port RIO-2 I/O Hub. You can attach a maximum of eight
drawers per system and configure a maximum of two RIO loops.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LPAR support
The maximum number of partitions supported with the purchase of the PowerVM is 10
times the number of physical processors. Without the feature, dedicated processors
must be used, so a maximum of one partition per physical processor is supported.

Rack-mount system
The rack-mount system is 4U in height and may be mounted in the IBM 7014 Model
T00 Enterprise Rack, the IBM 7014 Model T42 Enterprise Rack, or another standard
19 rack unit provided that the rack conforms to the EIA-310-D standard.

1-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

p6-P550 system overview


p6-p550 entry server:
2, 4, 6 or 8 POWER6 processors at 3.5 GHz or 4.2 GHz
1 GB to 128 GB of DDR2 SDRAM for 3.5 GHz
1 GB to 256 GB of DDR2 SDRAM for 4.2 GHz
Three PCIe 8x + two PCI-X adapter slots
3 Gbps internal SAS controller (RAID optional)
Up to 6 SAS disks with 73.4 GB, 146.8 GB or 300 GB 15K rpm drives
IVE choice for dual or quad ports 1 Gbp or dual 10 Gbps Ethernet controllers
One slimline and one half-high media bay
Up to eight optional I/O drawers (4 drawers max per dual core)
Desk-side or 4U rack-mount server
Mainframe-inspired RAS features

PowerVM (optional)
Express Edition
Up to three partitions on the server using IVM
Standard Edition
All the virtualization features using an HMC
Enterprise Edition
All the virtualization features using an HMC + Partition Mobility

Copyright IBM Corporation 2008

Figure 1-25. p6-P550 system overview AW186.0

Notes:
The p6-p550 supports up to eight processors (at 3.5 or 4.2 GHz) and up to 256 GB of
memory.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

p5-560Q and p5-570 overview

4-, 8-, or 16-core 1.5 GHz (p5-560Q)


or 2-, 4-, 8-, 12-, 16-core 1.9 GHz or
2.2 GHz processors (p5-570)
Up to 4 system drawers, each with:
2 - 128 GB memory
6 PCI-X slots
6 internal disks (7.2 TB)
Maximum per p5 570
20 I/O drawers
Up to 160 partitions
512 GB memory
79+ TB of disk space

Rack mount only (19 4 U)

Copyright IBM Corporation 2008

Figure 1-26. p5-560Q and p5-570 overview AW186.0

Notes:

System components
The p5-560Q and p5-570 use a rack-mounted server drawer as their basic building
block and can be configured with up to two system drawers for the p5-560Q or up to
four system drawers for the p5-570 in a single rack that are cabled together to create a
single symmetric multiprocessing (SMP) system.
One of the main p5-560Q and p5-570 differences from the entry level models, is that
the processors are installed in cards rather than on a planar.
Each drawer of a p5-570 system contains six disk drive bays and six 3.3 volt PCI-X
slots. With up to 24 disk bays, the model 570 can accommodate up to 3,523.2 GB of
internal disk storage. Each drawer can also hold two DVD-RAM or DVD-ROM drives.
Other integrated features include:
- Service processor
- Two 10/100/1000 Ethernet ports per drawer

1-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - Two internal Ultra320 SCSI controllers per drawer


- Two serial ports per system
- Two USB 2.0 ports per drawer
- Two HMC ports per system
- Two remote I/O (RIO-2) ports per drawer
- Redundant hot-swap power and cooling

LPAR support
Up to 160 partitions on a 16-core server are supported with the purchase of the
PowerVM. Without this feature, dedicated processors must be used, so a maximum of
one partition per physical processor is supported.

Memory for p5-570


The minimum amount of memory per p5-570 system drawer is 2 GB. The maximum is
512 GB (128 GB per drawer).
Memory specifications are different depending on the processor types. For example,
POWER5+ processor-based systems use DDR2 memory whereas POWER5
processor-based systems use DDR1 memory. Also, 1.9 GHz systems support up to a
maximum of 256 GB of memory and 2.2 GHz systems support a maximum of 512 GB of
memory. See www.ibm.com for the individual model specifications.

Memory for p5-560Q


A p5-560Q system can have 2 to 128GB of 528 MHz DDR2 memory (32GB maximum
on a four-core system; 64GB on an eight-core system).

Racks
The system is 4U in height and may be mounted in the IBM RS/6000 7014 Model T00
Enterprise Rack or the IBM RS/6000 7014 Model T42 Enterprise Rack. For p5-570
configurations with two, three, or four drawers, all drawers must be installed together in
the same rack, in a continuous space of 8U, 12U, or 16U within the rack.
The design of the p5 model 570 is optimized for use in an IBM 7014-T00 or T42 rack.
Both the front cover and the processor flex cables occupy space on the front left side of
an IBM 7014 rack that may not be available in typical non-IBM racks. The SMP cables
were specifically designed to support seamless (four-core node) upgradability and
future concurrent maintenance features of these POWER5 systems.
The use of non-IBM racks may limit a customer's ability to exploit these ease-of-use,
upgradeable and serviceable enhancements in the future.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

I/O drawer maximums for the p5-570


The maximum number of attached RIO-2 I/O drawers depends on the number of
system drawers, as follows:
- One-drawer systems support up to eight I/O drawers
- Two-drawer systems support up to 12 I/O drawers
- Three-drawer systems support up to 16 I/O drawers
- Four-drawer systems support up to 20 I/O drawers

I/O subsystem for p5-560Q


Each system node for the p5-560Q has six hot-plug PCI-X adapter slots and six
hot-swappable disk bays which provide up to 3.6 TB of internal disk storage. There are
no optional RIO-2 I/O drawers.

1-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Midrange functional differences per CEC node

p5-570 p6-570

Ring cabling architecture Point-to-point cabling architecture

Eight DIMM sockets / CPU card 12 DIMM sockets / CPU card

DDR2 DIMMS Fully buffered DIMMS

SCSI DASD SAS DASD

Six PCI-X slots Four PCIe and two PCI-X slots

Separate DASD and media controllers Same controller for DASD and media

Two DASD controllers One SAS and SATA DASD / media controller
One of the following:
Two 1 Gb Ethernet ports
Two 1 Gb Ethernet ports Four 1 Gb Ethernet ports
Two 10 Gb optical SR Ethernet ports
IVE Ethernet controller
Rack indicator port No rack indicator port

Copyright IBM Corporation 2008

Figure 1-27. Midrange functional differences - per CEC node AW186.0

Notes:
The point-to-point cabling is done by flex cables.
POWER6 uses an optimized SMP flex cable set for each drawer configuration. There are
various possible configurations requiring SMP cable connections between the drawers.
These cables are ADDITIVE.
The FSP flex cable is located at the rear of the system and is used for FSP communication
between the drawers. There are specific cables depending on the number of drawers.
Although the FSP (service processor) function is implemented in Drawer 1 (also in Drawer
2 with redundant FSP function at GA2), this card is required in every drawer.
The Service Processor cards in the 3rd and 4th drawers are not utilized. However, the
cards are required for signal distribution functions inside the drawer and, therefore, require
the FSP cable to be attached to each drawer in the system configuration.
You must think about a migration scenario when moving from a p5-p570 using SCSI disks
to a p6-p570 with SAS disks.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Also, think about ordering new adapters as PCIe type in order to free up PCIX slots so you
can reuse old configuration adapters.

1-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

p5-590 and p5-595 overview

p5-590
8-, 16-, 24- or 32-core 2.1 GHz
processors
Up to 1 TB memory
Up to eight I/O drawers
Up to 254 partitions
160 PCI-X slots
128 disks for (9.3 TB)

p5-595 differences
16- to 64-core 2.1 or 2.3 GHz
processors
Up to 2 TB memory
Up to 12 I/O drawers
Rack-mount (24 42U)

Copyright IBM Corporation 2008

Figure 1-28. p5-590 and p5-595 overview AW186.0

Notes:

p5-590 overview
The p5-590 uses an 8-, 16-, 24- or 32-core Multi-Chip Module (MCM) symmetric
multiprocessing (SMP) design. It supports up to 254 partitions and up to eight I/O
drawers, with the first one required. Mainframe-inspired RAS features on this system
include selective dynamic firmware updates, a redundant service processor, and a
redundant power subsystem with an optional redundant battery backup. The p5-590
can be contained in one or two system frames, depending on how many I/O drawers
are installed.

p5-595 overview
The p5-595 is similar to the p5-590, although it allows for greater scaling. The p5-595
uses a 16-, 24-, 32-, 40-, 48-, 56- or 64-core MCM SMP design. It also supports up to
254 partitions, but it can support up to 12 I/O drawers. There are no physical differences
between the p5-590 backplane and the p5-595 backplane.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

MCM overview
POWER5 chips can be packaged in different ways such as Multi-Chip Module (MCM),
Dual Chip Module (DCM), or mounted on a system planar. MCMs are used as basic
building blocks on high-end SMPs, such as the p5-590 and p5-595 systems. Each
MCM is an eight-core building block with four POWER5 (or POWER5+) chips (eight
cores) and four L3 cache chips each.
The IBM Sserver p5 590 and 595 Technical Overview and Introduction redpaper has
detailed information on the MCM design.

System frame
Both the p5-590 and p5-595 systems are based on the same 24-inch wide, 42 EIA
(42U) height frame. For additional capacity, either a powered or non-powered frame can
be configured for a p5-595. The second frame must be powered for systems with 48- or
64-core and more than four I/O drawer configurations.

I/O drawers
The I/O drawers provide internal storage and I/O connectivity to the system. Both the
p5-590 and p5-595 use remote I/O drawers (4U) for directly attached PCI or PCI-X
adapters and SCSI disk capabilities. A minimum of one I/O drawer (FC 5791 or FC
5794) is required per system.
Each I/O drawer is divided into halves which are powered separately. Each half
contains 10 blind-swap PCI-X slots (3.3 volt) and one or two Ultra3 SCSI 4-pack
backplanes for a total of 20 PCI slots and up to 16 hot-swap disk bays per drawer
(these adapters do not support external SCSI device attachments).

Connecting the system I/O drawers


System I/O drawers are connected to the p5-590 and p5-595 CEC using RIO-2 loops.
I/O drawers may be connected to the CEC in either single-loop or dual-loop mode.
Dual-loop mode is recommended whenever possible as it provides the maximum
possible bandwidth between the I/O drawer and the CEC, however, single-loop
configurations support more I/O drawers. The number of single-looped and
double-looped I/O drawers that can be connected to a p5-590 or p5-595 server is based
on the number of processor books installed. For example:
- One processor book supports six single-looped drawers or three dual-looped
drawers.
- Two processor books support eight (p5-590) or 12 (p5-595) single-looped drawers
or nine (p5-595) dual-looped drawers.
- Three processor books on a p5-595 support 12 single-looped drawers or nine
dual-looped drawers.

1-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - Four processor books on a p5-595 support 12 single-looped drawers or 12


dual-looped drawers.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

I/O drawer options


7311 Model D20 (p5-520, 520Q, 550, 550Q, 570)
12 disks and 7 PCI-X slots
7311 Model D11 (p5-570)
6 PCI-X slots
7314 Model G30 (p520, p550, p570)
Connected with 12X cables instead of RIO cables
6 PCI-X slots
7040-61D (p5-575, 590, 595)
May be migrated from existing systems
16 disks and 20 PCI-X slots
Internal drawers for p5-575, 590, and 595
Feature 5791 for 20 PCI-X slots and 16 disks
Feature 5794 for 20 PCI-X slots and 8 disks

See the Technical Overview redpapers and


www.ibm.com for more information
Copyright IBM Corporation 2008

Figure 1-29. I/O drawer options AW186.0

Notes:

I/O drawers
The I/O drawers listed in the visual above are connected to the system planar using a
RIO-2 loop configuration. They are connected to the systems using the RIO ports on the
systems. The exception is the new G30 I/O drawer which is connected using 12X
(InfiniBand) ports on special GX adapters which are available for the POWER6
processor-based systems.
The PCI-X slots and disks in these drawers can be accessed directly by the system
processors.
There are other I/O options available which are connected through a fibre channel
controller and these devices are seen as external devices to the system.
For additional information about storage solutions go to the IBM System Storage and
TotalStorage Web site (www.ibm.com/servers/storage).

1-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Example I/O drawer


RIO-2 I/O Drawer - 7311-D20
Front
Op panel
2 six packs
of disks

Rear

not used SPCN SPCN

Rack RIO-2
indicator port ports PCI-X slots
Copyright IBM Corporation 2008

Figure 1-30. Example I/O drawer AW186.0

Notes:

7311-D20 description
7311-D20 I/O drawers can be attached to the p5-520s using the standard RIO-2 ports.
A maximum of four RIO-2 I/O drawers and one RIO loop are supported on the model
520. The D20 is the only I/O expansion drawer option available for the p5-520.
Disk are in six-packs of hot-swappable disks; 36.4, 73.4 or 146.8 GB in size.
There are seven 64-bit 133 MHz 3.3V hot-plug PCI-X slots.
The drawer comes standard with one hot-pluggable power supply. An optional
redundant power supply may be configured.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

POWER6 remote I/O drawer


I/O drawer 7314-G30 with enhanced capabilities is
available for POWER6 system configurations
Two individual 95 drawers within 4U enclosure 19 rack
Six PCI-X slots 64 bits @ 266 MHz
Connection to the CEC is done through the GX+ bus
with dual 12X channel adapters
30 Gb/sec bandwidth; better performance than the D20 I/O drawer
Four G30 drawers can be attached for each GX+ loop (two
loops/CEC supported)
Adapter cards are packaged with a cartridge and are hot pluggable
Up to 232 PCI slots in a full configuration with four nodes with eight
loops and four drawers per loop:
Seven slots * 20 D20s + six slots * 12 G30s + five slots * four
nodes

Copyright IBM Corporation 2008

Figure 1-31. POWER6 remote I/O drawer AW186.0

Notes:
The new G30 drawer offers better performance for I/O subsystem connection than the D20.
The G30 connection to the CEC uses a dual channel InfiniBand interface.
It has higher bandwidth to get the maximum throughput and to scale with the POWER6
CEC performance.
Modular growth is allowed for increasing I/O requirements, and up to four G30 expansion
units can be attached in a loop using the GX dual port 12X channel attach adapter.
Two loops for each CEC are supported.
No DASD slots are available in the G30 I/O drawer.

1-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Service processor
Functions of the service processor
System initialization
Connection to the HMC
Web-based Advanced System Management Interface (ASMI) for setting system
flags
Hardware error detection

Connects to HMC over network

Copyright IBM Corporation 2008

Figure 1-32. Service Processor AW186.0

Notes:

Service processor
The service processor performs many vital Reliability, Availability, and Serviceability
(RAS) functions.
The service processor is an embedded controller that is based on a processor which is
separate for the Central Electronics Complex (processors and memory) and is used to
run both the Power Hypervisor and the partition operating systems, such as AIX.This
separate processor runs a unique service processor internal operating system which
contains specialized programs and device drivers.

Service processor functions


The service processor gives the means to diagnose, check status, and sense
operational conditions of a remote system, even when the main processor is
inoperable. The service processor enables firmware and operating system surveillance,

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

several remote power controls, environmental monitoring (only critical errors are
supported under Linux), reset and boot features, remote maintenance and diagnostic
activities, including console mirroring. The service processor can place calls to report
surveillance failures, critical environmental faults, and critical processing faults.

SPCN ports
There are two SPCN ports to control the power of the attached I/O subsystem. The
SPCN control software is run on the service processor along with the service processor
software.

Serial port access to the service processor


When an HMC is not connected to the service processor, there are two serial ports that
provide terminal access to the service processor. Serial port 1 will give access to the
ASMI and port 2 will receive only boot sequence information. When the HMC is
connected, the serial ports are disabled.

1-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Hardware Management Console (HMC)


The HMC provides:
Virtual console windows
LPAR configuration and operation management
Capacity on Demand (CoD) management
Service tools

PC-based console
Running custom Linux and Java application
Remotely accessible
Connects to Service Processor over private or open network

Desktop Rack-mount

Copyright IBM Corporation 2008

Figure 1-33. Hardware Management Console (HMC) AW186.0

Notes:

HMC description
The HMC is a PC-based console that is available in either a desktop or rack-mount
model. It runs a customized version of Linux with a Java-based management
application. The user can only access the management application and no additional
applications may be installed. A second HMC may be connected to a single managed
system for redundancy. Multiple managed systems may be managed by a single HMC.
The HMC is required for systems running LPARs and is the same HMC that is used for
IBM System i servers.
There are desktop and rack-mount models of HMCs, all with the machine type of 7310.
Desktop models have the model numbers C03, C04, C05, and C06 as of March 2008.
Rack-mount models have model numbers CR2, CR3, and CR4 as of August 2005. The
rack-mount model is a 1U, 19-inch rack-mountable drawer supported in the 7014 Model
T00 and T42 racks.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Remote access to the HMC functions


Remote GUI access to the HMC application (pre-HMCv7) is provided by using the
Web-based System Manager (WebSM). The WebSM client runs on Microsoft Windows
PCs and on Linux and AIX 5L or AIX 6 workstations.
A Web browser using SSL security (https) is all that is needed for a remote GUI
interface to HMCv7. HMCv7 is required for managing POWER6 processor-based
systems, but can also be used to manage POWER5-based systems.
In addition, there are extensive HMC command-line controls accessible through the use
of the Secure Shell (SSH).

HMC is independent from the managed system and its partitions


The managed system refers to the p5 or p6 system being managed by the HMC. While
the HMC is necessary for some functions, such as configuring LPARs, it will not affect
the operation of any partitions if something goes wrong. The partition configuration
information is not only kept on the HMC but also kept in Non-Volatile RAM (NVRAM) on
the managed system, so if the HMC were to crash, the partitions would continue to run.
In fact, you can remove the HMC, replace it with another, then download the partition
data from the NVRAM on the managed system and not affect the running of the
partitions.

Service errors focal point


If a hardware error occurs, that error may be reported by multiple partitions. To prevent
confusion, the HMC is also used as a service focal point for error reporting. An
application on the HMC serves as a filter for errors to ensure IBM service calls are
placed only once per actual hardware error. Alternatively, a partition configured as the
service partition may collect system errors and report them to IBM.

POWER5 HMCs and POWER4 HMCs


POWER4 HMCs may be updated to support POWER5 managed systems. However,
HMCs cannot simultaneously support both POWER4 and POWER5 managed systems.

POWER5 HMCs and POWER6 HMCs


POWER5 HMCs (HMCv6) may be upgraded to support POWER6 managed systems.
HMCv7 is designed to support both POWER5 and POWER6 managed systems.

1-58 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

New Web user interface


Connect using the local console
or via https://<hostname/IP address>

Copyright IBM Corporation 2008

Figure 1-34. New Web user interface AW186.0

Notes:
The Banner, across the top of the workplace window, identifies the product and logo. It is
optionally displayed and is set by using the Change User Interface Settings task.
The Task bar, located below the banner, displays the names of any tasks that are running,
the user ID you are logged in as, online help information, and the ability to log off or
disconnect from the console. (In the above example we see that hscroot is logged in and
has the ability to logout).
The Navigation pane, in the left portion of the window, contains the primary navigation links
for managing your system resources and the HMC. These items are referred to as nodes.
The Work pane, in the right portion of the window, displays information based on the
current selection from the Navigation pane. For example, when Welcome is selected in the
Navigation pane, the Welcome window content is displayed in the Work pane.
The Status bar, in the bottom left portion of the window, provides visual indicators of the
current overall system status. It also contains a status overview icon which may be
selected to display more detailed status information in the Work pane.

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

You can resize the panes of the HMC workplace by moving the pointer over the border that
separates the Navigation pane from the Work pane until the pointer changes to a
double-pointed arrow. When the pointer changes shape, press and hold the left mouse
button while dragging the pointer to the left or right. Release the button and your Navigation
pane or Work pane is now larger or smaller in size. You can also do this within the Work
pane border that separates the resources table from the Tasks pad.

1-60 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint

1. There are a large number of current and past models of IBM POWER-
based servers. Where is a good location to find information on the
available models?

2. True or False: A partition is an independent operating environment.

3. A partition is a logical partition if which one of the following is true?


a. Resource assignments are flexible.
b. Resources can be moved between partitions without a restart.
c. Partitioning is not dependent on physical system building blocks.

4. List the three types of resources that are configured in partitions.

5. What system component is used to configure and manage LPAR-


supported systems?

Copyright IBM Corporation 2008

Figure 1-35. Checkpoint AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exercise: System hardware overview

Exercise 1

Copyright IBM Corporation 2008

Figure 1-36. Exercise: System hardware overview AW186.0

Notes:

1-62 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

IBM p5 systems have a wide range of configuration options


Processors, memory, I/O, partitions
The service processor provides system initialization and the
connection to the HMC
The HMC is used to manage partition configurations, consoles, and
service tools
Logical partitions are independent operating environments
Resources are processors, memory, and I/O slots
Dedicated processors and shared processing units
Physical and virtual I/O
The POWER Hypervisor is firmware that provides the isolation
between partitions, virtual console support, and virtual memory
management
The Advanced POWER Virtualization feature provides Virtual I/O
Server, Partition Load Manager, and Micro-partitioning
Copyright IBM Corporation 2008

Figure 1-37. Unit summary AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 1. System hardware overview 1-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

1-64 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 2. System management tools and


documentation

What this unit is about


This unit introduces the tools that are available for system
administration.

What you should be able to do


After completing this unit, you should be able to:
Outline the benefits of the system management tools available with
AIX 5L and AIX 6.
Define the functionality of SMIT
Define how SMIT activity is logged
Define the use of the Web-based System Manager
Use AIX Web-based documentation

How you will check your progress


Accountability:
Checkpoint questions
Machine exercises

References
Online AIX Version 6.1 Operating System and Device
management
Online AIX Version 6.1 Web-based System Manager
Administration Guide

Note: References listed as online above are available at the following


address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Describe the benefits of the system management tools
available with AIX 5L V5.3 and AIX 6
Discuss the functionality of SMIT
Explain how SMIT activity is logged
Use the Information Center to browse and search AIX
documentation
Use the Web-based System Manager (WSM) to manage AIX
Describe how to enable WSM and install a WebSM client for
remote access

Copyright IBM Corporation 2008

Figure 2-1. Unit objectives AW186.0

Notes:

2-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 2.1. System Management Interface Tool (SMIT)

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Topic 1 objectives: System


Management Interface Tool (SMIT)

After completing this topic, you should be able to:


Describe the benefits of the system management tools
available with AIX 5L V5.3 and AIX 6
Discuss the functionality of SMIT
Explain how SMIT activity is logged

Copyright IBM Corporation 2008

Figure 2-2. Topic 1 objectives: System Management Interface Tool (SMIT) AW186.0

Notes:

2-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX administration

IBM Systems Web-based


SMIT Director System
Console Manager

High-Level Commands
Low-Level Intermediate-Level
Commands Commands

System Kernel System Object ASCII


Calls Services Resource Data Files
Controller Manager

Copyright IBM Corporation 2008

Figure 2-3. AIX administration AW186.0

Notes:

Overview of SMIT
The System Management Interface Tool (SMIT) is a menu-driven interface that
provides access to most of the common system management functions within one
consistent environment.
SMIT does not perform any system management functions directly. It is a user interface
that constructs high-level commands from the user's selections and then executes
these commands on demand. Those commands could be entered directly by the user
to perform the same tasks.
SMIT does not cover every possible system management task, and occasionally there
will be a need to run AIX commands or edit ASCII files directly to complete a particular
system administration task. However, SMIT does make the most frequent or
complex/tedious tasks much easier with a greater degree of reliability.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Types of commands
The following classification of commands may be helpful in understanding the operation
of SMIT:
- High-level commands -These are standard AIX commands (either shell 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. SMIT
constructs high-level commands from the user's selections and then executes these
commands on demand.
- 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 which correspond to AIX system
calls or kernel services and are not normally executed directly by a user.

Overview of Web-based System Manager


The Web-based System Manager was introduced with AIX V4.3. The Web-based
System Manager is an intuitive object-oriented user interface for performing system
management tasks. This tool can be run in standalone mode or in a client-server
environment. In this unit, well focus on SMIT, but the Web-based System Manager will
be discussed in further detail later in this course.

IBM Systems Director Console


The IBM Systems Director Console for AIX is a new management tool in AIX 6.1. IBM
Systems Director Console provides an easy-to-use interface for AIX management
tasks, using a Web browser. It provides access to SMIT and WebSM-based tools
providing synergy with these other common administration interfaces.

2-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

System Management Interface Tool (SMIT)


ASCII or AIXwindows (Motif) user interface components
menu help

submenu help

submenu

help
name selector
list

help
pop-ups dialog panel
list

output panel
Copyright IBM Corporation 2008

Figure 2-4. System Management Interface Tool (SMIT) AW186.0

Notes:

Available interfaces
SMIT provides a flexible user environment. The user can use an ASCII or an
AIXWindows-based interface. These interfaces provide the same facilities, but the
interaction is slightly different.

Components of user interface


The SMIT user interface consists of a number of components:
- Menus - SMIT has a hierarchy of menus which breaks down the typical system
management tasks into related areas. Some submenus may appear in multiple
places within the hierarchy where appropriate.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Selector/Dialog Screens - A selector screen allows you to select an object on which


an action is to be performed (for example, a tape drive). Having selected the object,
a dialog screen allows you to control the way in which the task is performed (for
example, to set the attributes for the drive, or to install from that drive).
- Pop-up Lists - Where there are a number of possible values for a parameter, you
can often request a list of these values and select either a single item or multiple
items.
- Output Panels - SMIT constructs and runs standard AIX commands. The standard
output and standard error from these commands are displayed within a special
SMIT output screen, and this output can be reviewed after command completion.
- Contextual Help - SMIT provides online help that guides you through the use of
SMIT, and provides contextual information about each submenu, dialog screen, and
also each field within a dialog screen.

2-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

SMIT main menu (ASCII)


# smit
System Management

Move cursor to desired item and press Enter.

Software Installation and Maintenance


Software License Management
Devices
System Storage Management (Physical & Logical Storage)
Security & Users
Communications Applications and Services
Workload Partition Administration
Print Spooling
Advanced Accounting
Problem Determination
Performance & Resource Scheduling
System Environments
Processes & Subsystems
Applications
Installation Assistant
Cluster Systems Management
Using SMIT (information only)

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 2-5. SMIT main menu (ASCII) AW186.0

Notes:

Main menu selections


The SMIT main menu allows you to select the administrative functions 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 have to 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.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

SMIT main menu (Motif)

Copyright IBM Corporation 2008

Figure 2-6. SMIT main menu (Motif) AW186.0

Notes:

Need for graphical environment


The graphical (Motif) version of SMIT must be run using a graphical environment like
AIXWindows or Common Desktop Environment (CDE). Typing the command smit in
the graphical environment automatically calls the graphical version of SMIT.

Working with the graphical version of SMIT


To work with graphical SMIT, use the mouse to point and click your way through the
menu system.
Clicking Cancel at the bottom of the screen moves you back one screen. You can also
move back to any previous screen in the menu hierarchy by selecting the screen title in
the Return To: section of the screen.
A number of functions are available from the menus at the top of the screen. To exit
SMIT, for example, click the Exit menu.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Graphical and ASCII SMIT differences


Notice that, in the graphical version of SMIT, the function keys have been removed. The
layout of the menu is slightly different too. In the Motif version of SMIT, you must use the
mouse to click the desired options, whereas the ASCII version uses the cursor keys (as
the mouse feature is disabled).

2-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Dialog screen
Schedule a Job

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
YEAR [07] #
MONTH [Jun] +
DAY (1-31) [22] #
* HOUR (0-23) [] #
* MINUTES (0-59) [] #
SHELL to use for job execution Korn (ksh) +
* COMMAND or SHELL SCRIPT (full pathname) []

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 2008

Figure 2-7. Dialog screen AW186.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 filled in from information held in the system. Usually, you can
change this data from the default values.
A selector screen is a special type of dialog screen in which there is only one value to
change. This usually indicates the object which is acted upon by the subsequent dialog
and AIX command.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 pop-up list. Fields that you can type in are indicated
by square brackets [ ]. Fields that have data that are larger than the space available to
display them are indicated by angle brackets < >. The left angle bracket (<) and the
right angle bracket (>) indicate that their is data further to the left or right (or both).
Special symbols
Special symbols on the screen are used to indicate how data is to be entered:
* This is a required field
# A numeric value is required for this field
/ A pathname is required for this field
X A hexadecimal value is required for this field
? The value entered is not displayed
+ A pop-up list or ring is available
A * symbol 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 + is used to indicate that a pop-up list or ring is available. To
access a pop-up list, use the F4 key. A ring is a special type of list. If a fixed number of
options are available, the Tab key can be used to cycle through the options.
In the Motif version, a List button is displayed. Either click the button or press Ctrl+L to
get a pop-up window to select from.

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. Those valid only for the ASCII interface are marked (A),
and those valid only 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 menu 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 menu

2-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty F8 (or ESC-8) Image - save the current screen to a file (A) and show the
current fastpath
F9 (or ESC-9) Shell - start a sub-shell (A)
F9 Reset all fields (M)
F10 (or ESC-0) Exit - exit SMIT immediately (A)
F10 Go to command bar (M)
F12 Exit - exit SMIT immediately (M)
Ctrl-l List - give a pop-up list of possible values (M)
PgDn (or Ctrl-v) Scroll down one page
PgUp (or ESC-v) Scroll up one page
Home (or ESC-<) Go to the top of the scrolling region
End (or ESC->) Go to the bottom of the scrolling region
Enter Do the current command or select from a single-selection
pop-up menu
/text Finds the text in the output
n Finds the next occurrence of the text

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Output screen
Command: OK stdout: yes stderr: no

Before command completion, additional instructions may appear below.

[TOP]
UID PID PPID C STIME TTY TIME CMD
root 1 0 4 20:15:04 - 1:49 /etc/init
root 1719 1 0 20:16:14 - 0:10 /etc/syncd 60
root 2003 1 0 20:16:19 - 0:00 /etc/srcmstr
root 2233 1 0 17:16:14 - 0:00 /usr/lib/errdemon
ray 3525 1 0 20:01:28 0 0:00 -ksh
root 3806 2003 0 19:16:23 - 0:00 /etc/syslogd
ray 4162 3525 6 20:53:22 0 0:04 smit
root 5355 1 0 20:16:27 - 0:12 /etc/cron
root 6649 2003 0 20:16:32 - 0:00 qdaemon
ray 7303 4162 8 20:09:45 0 0:00 ps -ef

[MORE...6]

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


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

Copyright IBM Corporation 2008

Figure 2-8. Output screen AW186.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 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 or not there are error messages. In this
case, there are no error messages.
Note that, in the Motif version of SMIT, a representation of a man 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/error messages from the command. In this
example, there is output, but there are no error messages.

2-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

SMIT log and script files


smit.log
Audit log
entries

SMIT
smit.script
List of
commands

$HOME/smit.log
Keeps a log of all menu and dialog screens visited, all commands executed and
their output. Also records any errors during the SMIT session.

$HOME/smit.script
Shell script containing all AIX commands executed by SMIT.

Copyright IBM Corporation 2008

Figure 2-9. SMIT log and script files AW186.0

Notes:

Overview
SMIT creates two files in the $HOME directory of the user running SMIT. If these files
already exist, then SMIT appends to them. These files can grow quite large over time,
especially during installations, so the user must maintain them and truncate them when
appropriate.

The smit.log file


The smit.log file contains a record of every SMIT screen (menu/selector/dialog) visited,
the AIX commands executed, and the output from these commands. When the image
key is pressed, the screen image is placed in the smit.log file. If there are any
error/warning messages from SMIT or any diagnostic/debugging messages, then these
are also appended to the smit.log file.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The smit.script file


The smit.script file contains the AIX commands executed by SMIT (preceded by the
date and time of execution). This file can be used directly as a shell script to perform
tasks multiple times, or it can be used as the basis for more complex operations.

2-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

smit command options

General syntax:
smit [-options] [ FastPath ]
Invoke 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 Corporation 2008

Figure 2-10. smit command options AW186.0

Notes:

Introduction
The command smit is used to invoke SMIT. It is not particularly common to run smit
with any options, although a number of them do exist. Some of the more commonly
used options are described here.

Using a fastpath
Using a SMIT fastpath can be very helpful. Fastpaths are names that specify individual
screens within SMIT. If you want to by-pass the menu system and go straight to a
particular screen, use the command smit fastpath. When using SMIT, you can view
the fastpath screen name (for the current screen) by pressing F8 (or Esc+8) - Image.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Specifying the ASCII version of SMIT


Many administrators prefer the ASCII version of SMIT over the graphical SMIT. If you
are working in a graphical environment and want to use the ASCII version of SMIT, use
the command smitty (or smit -C). This option is used fairly often.

Specifying that commands should not actually be executed


If you want to explore the menus of SMIT without accidentally running a command,
invoke SMIT using smit -x. This logs all the normal entries in smit.log and smit.script
but does not execute any commands.

Specifying the log and script files


Since smit.log and smit.script are created in the user's home directory, the natural
growth of these files can create a problem if you log in directly as root. Recall that
root's home directory is /. Later, you learn that filling the root area of your disk can
cause your machine to crash. You can tell SMIT to log smit.log and smit.script
information elsewhere using smit -l filename to specify the location of smit.log and
smit -s filename to specify the location of smit.script.

2-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

IBM Systems Director Console for AIX

Copyright IBM Corporation 2008

Figure 2-11. IBM Systems Director Console for AIX AW186.0

Notes:

IBM Systems Director Console


The IBM Systems Director Console for AIX is a new management tool in AIX 6.1. It is
automatically installed after AIX 6.1 installation is completed. When the network
configuration is finished, you can access it using a Web browser. Internet Explorer
Version 7, and Mozilla Firefox are the supported browsers. You need to enter your user
name and password. The URLs are:
- http://<hostname>:5335/ibm/console
- https://<hostname>:5336/ibm/console
IBM Systems Director Console provides an interface for AIX management tasks. The
management task categories are listed under the Navigation tab. Each category has
subcategories that include all the tasks you can perform using the console.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The layout of the IBM Systems Director Console for AIX


The IBM Systems Director Console for AIX has a Console toolbar, Navigation area, and
Work area.
Console tool bar across top:
- User name (for example. Welcome root)
- Help - Infocenter - ISC Help - AIX Administrator Guide - Logout

Navigation area:
- Tasks categories
- Welcome - My Startup Pages - OS Management - Health - Settings

Work area:
- Page bar - Multiple pages/tabs - Action Selection List
- Portlets - Administrators can operate any tasks on the portlets

2-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Lets review
1. Specify the SMIT function keys that can be used for the
following:
a) List the command that will be run: ____
b) List the screen name which can be used for the
fastpath: ____
c) Take a screen image: ___
d) Break out into a shell: ___
e) Return to the previous menu: ___
2. Specify two ways you can request the ASCII character
version of SMIT from an X-windows environment
command prompt:
________________
________________

Copyright IBM Corporation 2008

Figure 2-12. Lets review AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

2-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 2.2. Using AIX documentation

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Topic 2 objectives: Using AIX documentation


After completing this Topic, you should be able to:
Use the Information Center to browse and search AIX
documentation

Copyright IBM Corporation 2008

Figure 2-13. Topic 2 objectives: Configuring AIX documentation AW186.0

Notes:

Introduction
The AIX documentation library is available from two sources; the installable AIX
Information Center, and the IBM AIX Information Center that is available on the external
Web. The Web-based IBM AIX Information Center contains the latest AIX information.
This external Information Center is available at the following URL:
http://publib16.boulder.ibm.com/pseries/index.htm. You will be prompted for your
geographical region, language, and AIX release level.
This topic covers the use of the information center.

2-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Viewing AIX documentation

Documentation Server Documentation Client


y AIX softcopy documentation yWeb browser
y AIX Information Center software
y Web browser software

Documentation Client
yWeb browser
software

View AIX documentation


from anywhere with a browser
http://publib.boulder.ibm.com/infocenter/pserie
s/v6r1/index.jsp

Copyright IBM Corporation 2008

Figure 2-14. Viewing AIX 6.1 documentation AW186.0

Notes:

Documentation server
In addition to providing man commands to make finding information easy, AIX also
provides system manuals. The documents are available on the Internet at the IBM Web
site http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp. For sites without
access to the Internet, softcopy documentation can be loaded on a documentation
server within a private network. Any other computer in the network with Web browser
software can then become a documentation client and access these documents from
the server.

Requests for documents


When users on a client computer request an AIX document, the request is sent to the
Web server on a documentation server which then sends back the requested item.
When searches are performed, they are done on the server computer and the results
are then sent back to the user on the client computer.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Accessing the documents from a Web browser


Mozilla Firefox for AIX
New features, supports many current Web standards
64-bit
Available as a Web download or on CD when ordering AIX
(Mozilla Firefox for AIX CD)

Mozilla
Standard browser beginning with AIX 5L 5.3
Supports all versions of AIX 5L
32-bit
Available as a Web download

http://www.ibm.com/servers/aix/browsers

Copyright IBM Corporation 2008

Figure 2-15. Accessing the documents from a Web Browser AW186.0

Notes:

Web browser
Mozilla Firefox for AIX is an open source Web browser. It delivers helpful new features
and continues to lead the way in online security. It implements technologies like the
Gecko layout engine, and supports Web standards or draft standards like HTML,
XHTML, XML, CSS, DOM, and many more. Mozilla Firefox for AIX implements OJI, the
Open Java Interface to AIX Java through the AIX Java Plug-in.
Mozilla Firefox for AIX (64-bit) is available as a Web download and on the Mozilla
Firefox for AIX CD that can be ordered with AIX 6.1.
The Mozilla Web browser was introduced with AIX 5L V5.2, and became the standard
Web browser in AIX 5L V5.3.

2-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX 6.1 documentation

Copyright IBM Corporation 2008

Figure 2-16. AIX 6.1 documentation AW186.0

Notes:

Accessing documentation
Once the documentation is set up, it can be accessed from the AIXWindows or CDE
environment with the infocenter command.

Web access
If the documentation was not installed on your system, it can also be accessed at:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Viewing documents
The documents can be viewed in two ways. Either by selecting the entire document with
the PDF tag at the end of each document name, or by selecting the HTML tag and
viewing the document section by section.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Searching
In the top left corner of the Information Center screen, there is a field for entering search
strings. Entering information and clicking GO will search all documents for the string.
Click Search Scope to limit the search to a set of particular documents.

Printing documents
The Information Center allows you to print documents in two ways.
You can download the PDF document and print the entire document from Adobe
Acrobat, or you can access a section of a document in HTML and print that section as
you would normally print the contents of a Web page. Find the section you wish to print
and use the browsers Print function usually found in the File menu.

2-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Search AIX 6.1 documentation

Copyright IBM Corporation 2008

Figure 2-17. Search AIX 6.1 documentation AW186.0

Notes:

Searching documents
Probably the easiest way to find an answer is to search the documentation using the
Search field on the Information Center screen.
Above are the results of a search. In the right frame are the matches from the search in
order of quality with the best match at the top of the list.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Search Scope

Copyright IBM Corporation 2008

Figure 2-18. Search scope AW186.0

Notes:

Search Scope
By clicking the Search Scope link, you can narrow the search to a subset of
documents.

2-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Lets review
1.Which command displays manual entries online?

2.Complete the following sentences:


The AIX 5L and AIX 6 online documentation is loaded on a
_________ _______. Any other computer in the network
with appropriate Web browser software can then become a
_________ ______.

3.How can you start the documentation from the command


line?

Copyright IBM Corporation 2008

Figure 2-19. Lets review AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

2-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 2.3. Web-based System Manager (WebSM)

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Topic 3 objectives:
Web-based System Manager
After completing this Topic, you should be able to:
Describe the steps to install and configure the Web-based
System Manager
Use the Web-based System Manager to manage AIX

Copyright IBM Corporation 2008

Figure 2-20. Topic 3 objectives: Web-based System Manager AW186.0

Notes:

2-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Web-based System Manager

PC or Linux
Remote Client

AIX Version 6.1 System AIX Version 6.1 System


Stand-alone
AIX Version 6.1 Web-based
System System Manager

Client-Server
Copyright IBM Corporation 2008

Figure 2-21. Web-based System Manager AW186.0

Notes:

Introduction
AIX V4.3 introduced the Web-based System Manager, which is the next step in the
evolution of AIX system administration tools. There have been many enhancements to
the Web-based System Manager since AIX 5L V5.1. It is considered the default system
administration tool for AIX 5L and later.
The Web-based System Manager can be run in stand-alone mode, that is, you can use
this tool to perform system administration functions on the AIX system you are currently
running on.
The Web-based System Manager also supports remote management. In this
environment, it is possible to administer an AIX system from a remote PC or from
another AIX system using a graphics terminal. In this environment, the AIX system
being administered is the server and the system on which you are performing the
administration functions is the client.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The client can operate in either:


- Client-server mode by running the wsm command on an AIX client
- Remote client mode on either Windows or Linux clients

Web-based System Manager objectives


The objectives of the Web-based System Manager are:
- Simplified AIX administration using a single interface
- Enable AIX systems to be administered from almost any client platform with a
browser that supports Java V1.4 or use downloaded client code from an AIX 6.1
code
- Enable AIX systems to be administered remotely
- Provide a system administration environment that has a similar look and feel to the
Windows NT/2000/XP, LINUX, and AIX CDE environments
The Web-based System Manager provides a comprehensive system management
environment and covers most of the tasks in the SMIT user interface. The Web-based
System Manager can only be run from a graphics terminal, so SMIT needs to be used in
an ASCII environment.

Client requirements
Supported Microsoft Windows clients for AIX:
- Windows 2000 Professional version
- Windows XP Professional version
- Windows Server 2003
Supported Linux clients are PCs running:
- Red Hat Enterprise Version 3
- SLES 8 or SLES 9
- Suse 8.0, Suse 8.1, Suse 8.2, and Suse 9.0 using desktops KDE or GNOME only
The PC Web-based System Manager client installation needs a minimum of 300 MB of
free disk space, 512 MB memory (1 GB preferred), and a 1 GHz CPU.
To download Web-based System Manager Client code from an AIX host, use the
address: http://<hostname>/remote_client.html

2-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Accessing the Web-based System Manager


Stand-alone mode:
# wsm

Client-server mode:
From the AIX 5L or AIX 6 client:
# wsm -host <managed-host>

Remote client mode:


From Windows or Linux desktop:
Double-click the Web-based System Manager Remote Client icon

Copyright IBM Corporation 2008

Figure 2-22. Accessing the Web-based System Manager AW186.0

Notes:

Introduction
The Web-based System Manager can be configured to run in several different modes.
The operating environments in which Web-based System Manager can be started are
stand-alone application, client-server, applet, and remote client.

Stand-alone mode
To access the Web-based System Manager from the command line, use the wsm
command.
To start the Web-based System Manager console from the Common Desktop
Environment (CDE), do the following:
1. Click the Application Manager icon from the CDE front panel
2. Click the System_Admin icon
3. Click the Management Console icon

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Client-server mode
You can manage your local machine or machines that have been configured for remote
management from the Web-based System Manager console. You can select a different
host than your local machine as the managed host. To do this, use the following
command: /usr/websm/bin/wsm -host [managed-host]. The managed host you
specify as [managed-host] displays under the Navigation Area as the first name under
the list of hosts that can be managed. This host is also used to load the Web-based
System Manager user preference file ($HOME/WebSM.pref). Using the -host
argument displays the console to the machine you are using, and uses the preferences
file of the remote host you specify.

Remote client mode


Remote client mode allows you to run the Web-based System Manager console on a
Windows or Linux system and manage remote AIX systems.
On a Windows system:
1. Double-click the Web-based System Manager Remote Client icon located on
the Windows desktop to open the application
2. From the taskbar, click Start > click Programs > Web-based System Manager
> Web-based System Manager Remote Client
3. From the MS-DOS prompt, run the wsm.bat command from the Remote Client
bin directory
4. Using Windows Explorer, double-click the wsm.bat icon in the Remote Client bin
folder
On a Linux system running the Gnome Desktop:
1. From the taskbar, click Gnome > Programs > Web-based System Manager
Remote Client
2. From an xterm, run the wsm command from the Remote Client bin directory

On a Linux system running the KDE Desktop:


1. From the taskbar, click KDE > Programs > Web-based System Manager
Remote Client
2. From an xterm, run the wsm command from the Remote Client bin directory

2-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Using the Web-based System Manager (1 of 3)

Copyright IBM Corporation 2008

Figure 2-23. Using the Web-based System Manager (1 of 3) AW186.0

Notes:

Console window
The visual shows the Web-based System Manager Console window containing two
primary panes. The pane on the left displays the machines that you can manage from
the Console window. This pane is referred to as the Navigation Area. The pane on the
right (the Contents Area) displays results based on the item selected in the Navigation
Area. You select the machine to perform management operations from the Navigation
Area. As you navigate to the desired operation in the Navigation Area, the Contents
Area is updated to show the allowable choices.

Session log
There is a session log that is a facility of the console. It keeps track of changes made on
managed hosts during a Web-based System Manager session. To view the session log,
click Console > Session Log.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Using the Web-based System Manager (2 of 3)

Copyright IBM Corporation 2008

Figure 2-24. Using the Web-based System Manager (2 of 3) AW186.0

Notes:

Toolbar functions
The visual shows a Web-based System Manager window with the System
Environment: Settings plug-in running in the Contents Area pane. Above the
Navigation Area and Contents Area panes, there is a toolbar with symbols for managing
the window. From left to right, the symbols support the following functions: Back to
previous screen, Forward to next screen, Up one level, Stop reloading, Reload now,
Shutdown, Broadcast message, Find, Show properties of highlighted object, Icon (to
return to icon mode if currently viewing details), and Details (which lists each icon and
provides an explanation of each). Most of these functions can also be accessed via the
View option on the menu bar.

Date/Time icon
If you double-click the Date/Time icon, you can set the date and time on the system.

2-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Using the Web-based System Manager (3 of 3)

Copyright IBM Corporation 2008

Figure 2-25. Using the Web-based System Manager (3 of 3) AW186.0

Notes:

Overview
Note that the Web-based System Manager supports an easy-to-use point-and-click
environment where information can be entered. Use this window to set the system date
and time (only the root user can perform this function). When finished, click OK to apply
your change.
Additional information on the Web-based System Manager can be accessed through
the Internet using the following URL:
http://www-1.ibm.com/servers/aix/wsm/

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Installation for a remote client


Install the Web-based System Manager (usually done by
default with the base)

Install an HTTP server:


IBM HTTP Server (IHS2) on AIX Version 6.1 Expansion Pack

Configure the HTTP server (more detail on the next visual)


configassist

Test the HTTP server with a browser

Enable the Web-based System Manager server:


# /usr/websm/bin/wsmserver -enable

Install the Web-based System Manager client on Windows or


Linux platforms (more detail coming up)

Copyright IBM Corporation 2008

Figure 2-26. Installation for a remote client AW186.0

Notes:

Installing the Web-based System Manager


The Web-based System Manager must be installed on the client and on any managed
systems that will be using it. If you have graphics installed on your machine, you
probably have Web-based System Manager installed. The fileset that needs to be
installed is sysmgt.websm.framework.
To verify that the fileset is installed, type the following:
# lslpp -h sysmgt.websm.framework
If Web-based System Manager is not installed, you see a message similar to the
following:
lslpp: Fileset sysmgt.websm.framework not installed.

2-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty If Web-based System Manager is installed, you see output similar to the following:
# lslpp -h sysmgt.websm.framework
Fileset Level Action Status Date Time

------------------------------------------------------------------------
Path: /usr/lib/objrepos
sysmgt.websm.framework
6.1.0.0 COMMIT COMPLETE 10/18/07 13:39:50

Path: /etc/objrepos
sysmgt.websm.framework
6.1.0.0 COMMIT COMPLETE 10/18/07 13:44:07
The following optional filesets can be installed to add additional functionality to
Web-based System Manager. They are not installed by default.
- sysmgt.msg.Locale Language.websm.apps
Enables the locale language to be used if the LANG environment variable is set or if
the -lang argument is used with the wsm command.
- sysmgt.websm.security
Adds support for SSL communication between client and server. This fileset
supports 40-bit encryption and is available in the Expansion Pack.
- sysmgt.websm.security-us
Adds support for SSL communication between client and server. This fileset
supports 128-bit encryption and is available in the Expansion Pack. Export and
import laws could make this fileset unavailable in some countries.

Installation requirements to support Remote Client mode


To install the Web-based System Manager Remote Client over a network, you must
have the sysmgt.websm.webaccess fileset installed on at least one AIX system. This
fileset is installed automatically with the base operating system. The machine used to
install the Web-based System Manager Remote Client must be set up as an HTTP
server. This is done by installing and configuring the HTTP server of your choice.
The next visual shows the configuration of the HTTP server.

Enabling a Web-based System Manager server


Client-server mode needs to be enabled on the servers that are to be managed as
remote machines. Enabling and disabling a machine to act as a Web-based System
Manager Server can be done through the /usr/websm/bin/wsmserver command.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

To enable a machine to be a Web-based System Manager server, type the command:


/usr/websm/bin/wsmserver -enable
This can also be done through SMIT using the fastpath:
smit web_based_system_manager
To disable a machine so that it cannot be managed from a Web-based System Manager
client, type the command: /usr/websm/bin/wsmserver -disable
This does not terminate existing Web-based System Manager server processes.

2-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Configure the HTTP (Web) server

Copyright IBM Corporation 2008

Figure 2-27. Configure the HTTP (Web) server AW186.0

Notes:

Configuring the HTTP server


You can configure the HTTP server (or Web server) for Web-based System Manager
remote management in two ways:
- In the Configuration Assistant window (/usr/websm/bin/configassist command),
click Yes, configure Web-based System Manager to use this Web server. The
Web server will be started now. You see the screen as shown in the visual.
- You can also configure the Web-based System Manager from SMIT. The fastpath is:
smit web_based_system_manager
The default values that you see are generally good, but if you are using some Web
server software other than the HTTP server you may wish to change the directories and
start commands. You may also select what language you use on the interface.
If you wish to always have the Web server ready for use, select the Start Web server at
system restart also check box to have the start command placed in the inittab file.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Remote client installation

Copyright IBM Corporation 2008

Figure 2-28. Remote client installation AW186.0

Notes:

Installation options
To install the Web-based System Manager remote client on a PC running Windows or
Linux, access the AIX Web Server from the client's browser using the following Url:
http://<managed-host>/remote_client.html
The Web page provides two options for installing the remote client software:
- InstallShield
- Java Web Start (beginning with AIX 5L V5.2.3.0)
The InstallShield option is pretty straightforward. It downloads the code and installs
using the InstallShield standard.
The advantage of the Java Web Start option is that every time the client application
runs, it checks to see if there is a remote server application software update and
automatically downloads the changes.

2-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Java Web Start security


If you are going to use the Java Web Start option, then you must install and configure
the security package which otherwise would be an option in using the remote client. You
first have to install the security package on the AIX server:

- sysmgmt.websm.security (regular strength)


- sysmgmt.websm.security-us (stronger encryption)
The URL for installing the client part of the security package is:
http://hostname/remote_client_security.html

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint
1. True or False? The Web-based System Manager is available
for client access automatically after the BOS is installed.
_____________________________________________
_____________________________________________
2. Which of the following statements are true regarding the Web-
based System Manager?
a) An AIX V6.1 system can be managed from a remote PC with
appropriate WebSM client installed.
b) In stand-alone mode, use the wsm command to access the Web-
based System Manager.
c) It is possible to manage an AIX V6.1 system from a remote AIX V6.1
system using an ASCII terminal.
____________________________________________
____________________________________________
____________________________________________
____________________________________________

Copyright IBM Corporation 2008

Figure 2-29. Checkpoint AW186.0

Notes:

2-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise 2: System management tools

Using SMIT
Using Information Center
Using Web-based system

Copyright IBM Corporation 2008

Figure 2-30. Exercise 2: Web-based System Manager AW186.0

Notes:

Introduction
This lab allows you to set up the Web-based System Manager and learn how to use the
interface. If you have other machines in your classroom that are networked together,
you can also try to perform remote administration using the Web-based System
Manager.
The exercise can be found in your Student Exercise Guide.

Copyright IBM Corp. 2000, 2008 Unit 2. System management tools and documentation 2-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

Most system administration tasks can be completed using either the ASCII or
graphical (Motif) version of SMIT
SMIT provides logging of activities and generated commands
SMIT has useful fastpaths for bypassing the menu structures
Web-based documentation can be installed locally
The Information Center interface provides a way to read, search, or print the
installed manuals
The Information Center interface provides links to useful IBM support sites
Remote access to an Information Center server is possible via any Web
browser
The Web-based System Manager supports system administration tasks in a
stand-alone or client-server environment
The Web-based System Manager can be used either locally or remotely from
either another Web-based System Manager-installed AIX platform or a PC
with the Web-based System Manager application
Remote access may be enabled or disabled
Copyright IBM Corporation 2008

Figure 2-31. Unit summary AW186.0

Notes:

2-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 3. Software installation and maintenance

What this unit is about


This unit covers the process of installing and maintaining optional
software products and updates.

What you should be able to do


After completing this unit, you should be able to:
Define the package definitions and naming conventions
Identify how software products and updates are installed and
managed on the system

How you will check your progress


Accountability:
Checkpoint questions
Exercise

References
SG24-7559 AIX Version 6.1 Differences Guide
Online AIX 6.1 Installation and Migration

Note: References listed as Online above are available at the


following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:
Define the package definitions and naming conventions
Identify how software products and updates are installed
and managed on the system

Copyright IBM Corporation 2008

Figure 3-1. Unit objectives AW186.0

Notes:

3-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX product offerings


AIX

LPPs

AIX documentation

Expansion Pack

Bonus Pack (Web download)


(not available in AIX 6.1)

AIX Toolbox for Linux


(included in AIX 6.1 Expansion Pack)

Copyright IBM Corporation 2008

Figure 3-2. AIX product offerings AW186.0

Notes:

Introduction
The AIX 6.1 operating systems are delivered on multiple CDs. During the ordering
process, it is necessary to indicate the system type.
Licensed Program Products (LPPs) are ordered separately and run on the AIX
operating system.
The contents of the Expansion Pack and Linux toolbox vary over time. Their purpose is
to acquaint users with tools and products that may be valuable in their business
environment.

Expansion Pack
An Expansion Pack is included with every new order of AIX at no additional charge
when media is selected, or it can be ordered separately for existing AIX licenses.
Typical releases may include the following: database software, development tools,

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

software supporting e-business, interoperability support, browsers, Java and Internet


application development tools, network management utilities, and country-specific
security encryption. Linux toolbox is now included in the Expansion Pack.

AIX documentation
The AIX 6.1 documentation comes on either two CDs or one DVD. It contains the full
AIX documentation library in many different languages, in addition to the infocenter run
time environment. These CDs/DVD are not part of the base system installation.

3-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Packaging definitions
LPP: Collection of packages
bos Complete product

package: package:
Collection of filesets
bos.INed bos.adt

fileset: fileset: fileset: Smallest unit


bos.INed bos.adt.lib bos.adt.prof Specific function
Copyright IBM Corporation 2008

Figure 3-3. Packaging definitions AW186.0

Notes:

Licensed Program Product (LPP)


A Licensed Program Product (LPP) is a complete software product collection including
all required packages and filesets. For example, the Base Operating System (bos) itself
is an LPP, which in turn is a complete collection of packages and filesets.

Package
A package contains a group of filesets with a common function. It is a single, installable
image.

Fileset
A fileset is the smallest individually installable unit. It is a collection of files that provides
a specific function. For example, bos.net.tcp.client is a fileset in the bos.net package.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Bundles
A bundle is a collection of packages and filesets suited for a particular
environment
Predefined system bundles in AIX include:
AllDevicesKernels
Alt_Disk_Install
App-Dev
CC_Eval.Graphics
CDE
GNOME
Graphics
KDE
Kerberos_5
Media-Defined
Mozilla
PerfTools
Server
cas_client and cas_server
Devices
Infocenter
openssh_client and openssh_server
wsm_remote
Copyright IBM Corporation 2008

Figure 3-4. Bundles AW186.0

Notes:

Overview
Since there are thousands of filesets, having to determine which individual fileset you
want on your machine can be a time-consuming task. AIX has bundles which offer a
collection of filesets that suit a particular purpose. For example, if you are developing
applications, the App-Dev bundle would be the logical choice to install.
Some filesets within a bundle are only installed if the prerequisite hardware is available.
For example, a graphic adapter is needed to run AIXWindows.
In some cases, bundles are equivalent to product offerings. Often, however, they are a
subset of a product offering or a separate customized bundle. The bundles available
may vary from configuration to configuration and AIX version to AIX version.

3-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Fileset naming

LPP Package Fileset Suffix

bos.terminfo.print.data

Message convention:
LPP.msg[.lang].package.fileset
Copyright IBM Corporation 2008

Figure 3-5. Fileset naming AW186.0

Notes:

Fileset naming convention


Filesets follow a standard naming convention. The LPP name is the first part of every
fileset name. The fileset names are meaningful and describe the contents of the fileset.
The following are the standard fileset suffixes:
.adt Application Development Toolkit for the LPP
.com Common code between two like filesets
.compat Compatibility code that is removed in a future release of the LPP
.data /usr/share portion of a fileset
.dev Device support for that LPP
.diag Diagnostics for a fileset
.fnt Font portion of a fileset

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

.help[lang] Translated help files for the LPP


.loc Locale for the LPP
.mp Multi-processor specific code for a fileset
.msg[lang] Translated messages
.rte Run time or minimum set
.smit SMIT tools and dialogs for a fileset
.ucode Microcode for a fileset
.up Uni-processor specific code for a fileset
With message libraries associated with LPPs, the language is also part of the naming
convention.

3-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Software updates
# oslevel

6 . 1 . 0 . 0

Version Release Modification Fix

MIGRATION smit update_all

Copyright IBM Corporation 2008

Figure 3-6. Software updates AW186.0

Notes:

Introduction
As new software is created for AIX, you will want to upgrade your system to maintain
the latest features and functionality.
The numerical information that shows what level of software you currently have
installed is broken into four parts:
- Version
- Release
- Modification
- Fix
You can see this using the oslevel command.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The oslevel command


The oslevel command reports the level of the operating system using a subset of all
filesets installed on your system. It also prints information about maintenance levels,
including which filesets are not at a specified maintenance level.
The command syntax is:
oslevel [ -l Level | -g | -q ] [-r] [-f] [-s]
where:
-l Level Lists filesets at levels earlier than maintenance level specified by the
Level parameter
-g Lists filesets at levels later than the current maintenance level
-q Lists names of known maintenance levels that can be specified using
the -l flag
-r Applies all flags to the recommended maintenance levels
-f Forces the oslevel command to rebuild the cache for this operation
-s Applies all flags to service pack
Examples are:
- To get the actual BOS level:
# oslevel
6.1.0.0
- To get actual AIX BOS maintenance level:
# oslevel -r
6100-01

Types of upgrades
When you want to upgrade the system, the method you follow depends on what type of
upgrade you are performing. Changes to the version or release levels require you to
perform a migration installation as discussion in the AIX 6.1 Installation unit. If you want
to make a change to the modification or fix levels, use the smit update_all command.
These changes provide fixes to defects or additional functions to the BOS or optional
software products.
Version and release upgrades must be purchased. Modification and fix-level upgrades
are available at no charge. They are provided on CD (order via the AIX Support Center)
or they can be downloaded from the Web. AIX updates are available at
http://www.ibm.com/servers/eserver/support/pseries/aixfixes.html. This Web site is
discussed in more detail later in this unit.

3-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Software states

Applied:
FILESET 6.1.0.2
(New Version)
FILESET 6.1.0.1
Commit
Install or
6.1.0.0 (Old Version)
Reject
Applied FILESET 6.1.0.1
FILESET 6.1.0.2 (Old Version)

Committed:

Committed
Install FILESET 6.1.0.2
6.1.0.2

Copyright IBM Corporation 2008

Figure 3-7. Software states AW186.0

Notes:

Committed state and the initial install


AIX has a number of software states. When you are installing software for the first time,
the software automatically installs to a committed state. This means there is only one
level of that software product installed on your system.

Applied state versus committed state for maintenance


When you are installing a fix or a maintenance level upgrade to 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.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 recommits the old version.

Removing software products


With committed (or applied) software products, you can also remove them. This causes
the product's files to be deleted from the system. Requisite software (software
dependent on this product) is also removed unless it is required by some other software
product on your system. If you want to use the software again, you would need to
reinstall it.

3-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Software Installation and Maintenance


Software Installation and Maintenance

Move cursor to desired item and press Enter.

Install and Update Software


List Software and Related Information
Software Maintenance and Utilities
Software Service Management
Relocatable Software Installation and Maintenance
Network Installation Management
EZ NIM (Easy NIM Tool)
System Workload Partition Software Maintenance
System Backup Manager
Alternate Disk Installation
EFIX Management
Thin Server Maintenance

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 3-8. Software Installation and Maintenance AW186.0

Notes:

Overview
Use the SMIT fastpath smit install to access the Software Installation and
Maintenance menu.
You can also use the Web-based System Manager to install software.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Install and Update Software


Install and Update Software

Move cursor to desired item and press Enter.

Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 3-9. Install and Update Software AW186.0

Notes:

Introduction
Use the smit install_update fastpath to access this menu.

Install Software
This option allows you to install or update to the latest level of software available on the
installation media. This allows you to install everything on the installation media if so
desired. This is most commonly used to install optional software not currently installed
on your system.

3-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Update Installed Software to Latest Level


This option is the smit update_all fastpath. It enables you to update all of your
currently installed software products. Only the existing installed products are updated;
no new optional software is installed. This is the most commonly used method to install
a maintenance level (service) update. This option does not allow you to install fixes that
are on the media, but are older than the most recent fix available on the media.

Install Software Bundle


Use this option to install a software grouped into a bundle. For example, if you wish to
install the Application Development bundle, choose this option.

Update Software by Fix (APAR)


An APAR is a number used to identify reported problems caused by a suspected defect
in a program. A fix to an APAR can be made up of one or more fileset updates. These
updates are obtained through the IBM Support Center or from the following Web site:
http://www-912.ibm.com/eserver/support/fixes/fixcentral/main/pseries/aix

Install and Update from ALL Available Software


This option enables you to install or update software from all software available on the
installation media. Use this option when none of the other menus fit your needs. This
option shows you the base function filesets plus all levels of fixes on the media.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Install Software
Install Software

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software /dev/cd0
* SOFTWARE to install [_all_latest] +
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 +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? no +
PREVIEW new LICENSE agreements? no +

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 2008

Figure 3-10. Install Software AW186.0

Notes:

Introduction
The SMIT Install Software menu allows you to install all or selected software from the
installation media. If any updates exist for these products, they are also installed.
To perform an update_all, the SMIT screen is identical except in the SOFTWARE to
install line where you would see [update_all].
The input device is usually CD-ROM, tape, or diskette. However, it is also possible to
install software that has already been loaded to disk. The directory /usr/sys/inst.images
can be used for this purpose.

SOFTWARE to install: _all_latest


If _all_latest is left in the SOFTWARE to install line, everything on the installation
media is installed (except printers and devices). Usually, this line is used to indicate the

3-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty new software you want to install. Use the List function key (F4) to display all filesets on
the media. From there, you can select the fileset, package, or LPP that you want to
install.
Use the SMIT fast path smit install_latest to access this menu.

PREVIEW only?
The PREVIEW only? option allows you to preview the results of the installation without
actually performing the software install. The system displays information on space
requirements and a list of software products and updates that are installed.

COMMIT software updates?


If you choose no for COMMIT software updates?, then you must choose yes to SAVE
replaced files?
This is the line where you decide whether you want to commit or apply the software
product. The default is commit. To apply the install you must change this line.

License agreements
Beginning with AIX 5L V5.1, software license agreements are shipped and displayed
electronically, saving paper and allowing for electronic software distribution in the
future. If a product has an electronic license agreement, it must be accepted before
software installation can continue.

Using the geninstall command


Using the geninstall command is also a way to install AIX LPP packages. The
geninstall command calls the installp command to install additional AIX LPP
packages. An example is:
# geninstall -d /usr/sys/inst.images/installp/ppc bos.games
Do not specify the version, release, modification, or fix level of the fileset, otherwise the
installation fails.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Software inventory
# smit list_installed
List Installed Software and Related Information

Move cursor to desired item and press Enter.

List Installed Software


List Installed Software by Bundle
List Applied but Not Committed Software Updates
Show Software Installation History
Show Fix (APAR) Installation Status
List Fileset Requisites
List Fileset Dependents
List Files Included in a Fileset
List Fileset Containing File
Show Installed License Agreements

F1=Help F2=Refresh F3=Cancel F4=List


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

lslpp command:
-L Lists the installed software
-h Shows the history of a software product
Copyright IBM Corporation 2008

Figure 3-11. Software inventory AW186.0

Notes:

Introduction
Use the SMIT fast path smit list_installed to access the List Installed Software
and Related Information menu. This menu provides information about the software
and fixes installed on a system.
Most of the SMIT options on this menu actually execute the lslpp command. The
following command options can be used to view specific software information:
-l Displays the name, level, state, and description of the fileset
-h Displays the installation and update history for the fileset
-p Displays requisite information for the fileset
-d Displays dependent information for the fileset
-f Displays the names of the files added to the system during installation of the
fileset
-w Lists the fileset that owns a file
-b List software for the specified bundle name

3-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List installed software


# lslpp -l "bos.*"

Fileset Level State Description


--------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.64bit 6.1.0.0 COMMITTED Base Operating System 64 bit
Runtime
bos.acct 6.1.0.0 COMMITTED Accounting Services
bos.adt.base 6.1.0.0 COMMITTED Base Application Development
Toolkit
bos.adt.include 6.1.0.0 COMMITTED Base Application Development
Include Files
bos.adt.lib 6.1.0.0 COMMITTED Base Application Development
Libraries
bos.alt_disk_install.boot_images
6.1.0.0 COMMITTED Alternate Disk Installation
Disk Boot Images
bos.alt_disk_install.rte
6.1.0.0 COMMITTED Alternate Disk Installation
Runtime
bos.cdmount 6.1.0.0 COMMITTED CD/DVD Automount Facility
bos.content_list 6.1.0.0 COMMITTED AIX Release Content List
bos.diag.com 6.1.0.0 COMMITTED Common Hardware Diagnostics
bos.diag.rte 6.1.0.0 COMMITTED Hardware Diagnostics
bos.diag.util 6.1.0.0 COMMITTED Hardware Diagnostics Utilities
... (rest of output omitted) ...
Copyright IBM Corporation 2008

Figure 3-12. List installed software AW186.0

Notes:

Overview
The lslpp command is used to list the installed software on the system. The various
options of the lslpp command allow you to view selected information on the software
installed.
The output of the lslpp command displays the fileset name, the level of the product, its
state (applied or committed), and a description of the product.
Other options include:
-d Displays filesets that are dependent on the specified software
-f Displays names of files added to the system during the installation of specified
filesets
-p Lists requisite information for a specified fileset

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Fix repository

Available updates
(from IBM Web site)

Fix repository
(locally stored Installed fixes
filesets)

Copyright IBM Corporation 2008

Figure 3-13. Fix repository AW186.0

Notes:

Overview
When working with modifications or fixes, it is common to download the fixes to a
directory on your local hard drive before installation. This location is commonly referred
to as the fix repository.
While /usr/sys/inst.images is a standard location for storing software images and
appears in the SMIT Input Device/Directory (F4) list, you may choose to use any
directory for this purpose.
Managing the fix repository includes knowing how up to date it is relative to what is
available and what in the repository has been installed.
AIX provides a reporting facility to compare the installed software, repository software,
and software available from the IBM Web site. Any two of these can be compared to
obtain a report.

3-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Fix Central Web site

Copyright IBM Corporation 2008

Figure 3-14. Fix Central Web site AW186.0

Notes:

Introduction
IBM System p support provides a Web site interface (Fix Central) to access fix
information. One way to navigate to this Web page is:
- Via Fix Central at:
http://www-912.ibm.com/eserver/support/fixes/fixcentral/main/pseries/aix
Identify the Product family as System p, Product as AIX, Version as 6.1 and Fix
type as Fix packs. Clicking Continue, to reach the next visual.

Fix pack
Fix packs for the AIX 6.1 operating system are provided as Technology Level packages
or Service Packs. These generally available updates have been tested to operate best

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

when all updates in a fix pack are installed. IBM recommends installing the complete fix
pack.

Fix recommendations
Recommendation tools and services for AIX administrators allow the system
administrator to be able to determine recommended levels of hardware and software.
Fix Level Recommendation Tool (FLRT) is a planning tool to help administrators
determine what key components of the System p server are at the minimum
recommended fix level.
Server Optimization and Integration Services - Healthcheck is designed to help you
proactively detect configuration abnormalities that may be keeping your System p
server environment from performing optimally.

Fix search
Find downloads for single software products.

Managing updates
IBM provides several tools which allow the system administrator of AIX machines to be
able to manage downloading and installing fixes to the AIUX operation system filesets.

Security advisories
This service provides technical information for IT professionals who maintain System p
servers. As support bulletins are released, you receive e-mail containing links to the
bulletin.

3-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

More fix services screen (from Fix Central)

Copyright IBM Corporation 2008

Figure 3-15. More fix services screen (from Fix Central) AW186.0

Notes:

Introduction
Service Packs are cumulative. Newer Service packs in a Technology Level contain all
the updates from previous Service Packs. A fix pack is a combination of many single
fixes for product components that are dependent on or related on each other. It can
include new features, functions, or enhancements.

Available information
After selecting the Fix pack by double-clicking the Name link, you are presented with
three tabs. The Package tab displays the release date and package name. The
Package details tab lists the available new APARs, their description, and known
problems with the package. The Installation tips tab identifies all the required steps
before, during, and after installation.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Software Service Management


# smit service_software

Software Service Management

Move cursor to desired item and press Enter.

Service Update Management Assistant (SUMA)


Comparison Reports
Rename Software Images in Repository
Clean Up Software Images in Repository

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 3-16. Software Service Management AW186.0

Notes:

Introduction
The SMIT Software Service Management menu allows access to Service Update
Management Assistant (SUMA) functions, which significantly simplify the system
update process by allowing policy-based automatic downloads of maintenance updates
from the Web. The Software Service Management menu can generate reports to
manage filesets installed on a system, filesets contained in a repository, and filesets
available from the IBM Fix Central Web site. It also provides a way to clean up and
rename software images in a repository.

Service Update Management Assistant (SUMA) option


SUMA is fully integrated into the AIX 6.1 Base Operating System and supports
scheduled and unattended task-based download of Authorized Program Analysis
Reports (APARs), Program Temporary Fixes (PTFs), and recommended maintenance
levels (MLs). SUMA can also be configured to periodically check the availability of

3-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty specific new fixes and entire maintenance levels, so that the time spent on such system
administration tasks is reduced. The SUMA implementation allows for multiple
concurrent downloads to optimize performance and has no dependency on any Web
browser.
SUMA policies can be run without extensive configuration. Filtering options allow
comparisons against an installed software inventory, a fix repository, or a maintenance
level to ensure only desired fixes are downloaded. SUMA provides the option to send
an e-mail notification containing a list of whats available for download, as well as
detailed summary statistics of a download.
SUMA can be accessed through the suma command or through the smit suma fast
path.

Comparison Reports option


This option allows you to generate a comparison report to identify which fix filesets that
are available in a fix repository (lpp_source or a directory of fixes) have not been
installed on the system.

Rename Software Images in Repository option


This option allows you to rename updates, which have FIX ID numbers for names, to
more meaningful fileset names like those generated when updates are copied to hard
disk for future installation. This action renames all filesets in the indicated directory with
the same format. This option is available using the SMIT rename_software fast path.
You can also use the bffcreate command to rename software images in a directory.
This allows you to determine exactly what updates are contained in a directory because
the fileset name is recognizable.

Clean Up Software Images in Repository option


This option allows you to perform various tasks to clean up software image directories
on stand-alone systems. This allows you to remove duplicate or unnecessary filesets
from image repositories, easing management of the images and reducing the amount of
space required to store them.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Software Maintenance and Utilities


# smit maintain_software
Software Maintenance and Utilities
Move cursor to desired item and press Enter.

Commit Applied Software Updates (Remove Saved Files)


Reject Applied Software Updates (Use Previous Version)
Remove Installed Software

Rename Software Images in Repository


Clean Up Software Images in Repository

Copy Software to Hard Disk for Future Installation


Copy Software Bundle to Hard Disk for Future Installation

Check Software File Sizes After Installation


Verify Software Installation and Requisites

Clean Up After Failed or Interrupted Installation

Service Update Management Assistant (SUMA)

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


F9=Shell F10=Exit Enter=Do
Copyright IBM Corporation 2008

Figure 3-17. Software Maintenance and Utilities AW186.0

Notes:

Overview
The fast path smit maintain_software allows you to commit, reject, and remove
software. You might also find the other menu items useful.

Copying software
With the Copy Software to Hard Disk for Future Installation and Copy Software
Bundle to Hard Disk for Future Installation options, you can copy filesets from the
installation media to the hard drive without actually performing an installation. This
allows you to install it later without needing the original installation media. To copy all
software to hard disk for future installation, use the following command:
# gencopy -d /dev/cd0 -t /usr/sys/inst.images all

3-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Checking software


If you are experiencing problems with your software, the Check Software File Sizes
After Installation and Verify Software Installation and Requisites options check and
verify the system by analyzing it to determine if there is a problem. It compares
information stored on the disk to the information stored in ODM.

Cleanup
The Clean Up After Failed or Interrupted Installation option resets your software
installation back to the beginning after a failed install. A failed install is usually due to a
power failure or a system shutdown occurring before the installation is complete. You
then need to start your installation/update over.

Repository management
The Rename Software Images in Repository, Clean Up Software Images in
Repository, and Service Update Management Assistant (SUMA) options are also on
the SMIT Software Service Management menu. These were already discussed in this
unit.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

instfix command
Installs a fix:
# instfix -k IY58143 -d /dev/cd0
Searches for a fix:
# instfix -ik IY58143
All filesets for IY58143 were found.
Searches for a fix by keyword:
# instfix -s SCSI -d /dev/cd0
Lists which AIX BOS maintenance levels are partly or fully
installed:
# instfix -i | grep ML
All filesets for 6.1.0.0_AIX_ML were found.
All filesets for 6100-01_AIX_ML were found.
Lists which filesets are missing in a partly installed AIX BOS
maintenance level:
# instfix -ciqk 6100-01_AIX_ML | grep :-:
Copyright IBM Corporation 2008

Figure 3-18. instfix command AW186.0

Notes:

Introduction
The instfix command allows you to install a fix or a set of fixes without knowing any
information other than the Authorized Program Analysis Report (APAR) number (which
is given to you by your Support Center) or other unique keywords identifying the fix.
The instfix command can also be used to determine if a fix is installed on your
system.

Options for the instfix command


Some of the options for the instfix command are:
-T Display entire table of contents.
-s Search for and display table of contents entries containing the string.
-k Install filesets for a keyword or fix.

3-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty -f Install filesets for multiple keywords or fixes using an input file. Note that the
output of the -T option produces a suitable input file format. -f results in
instfix using standard input.
-i Use with -k or -f option to display whether fixes or keywords are installed.
This option is for information purposes only. Installation is not attempted
when this option is used.
-a Use only with -i to optionally display the symptom text associated with a fix.
-d Specify the input device (required for all but -i).
-c Output should be in colon delimited format.

Examples
The examples on the visual do the following:
- Install all filesets associated with fix IY58143 from the CD in the /dev/cd0 drive:
# instfix -k IY58143 -d /dev/cd0

- Inform the user whether fix IY58143 is installed:


# instfix -ik IY58143
All filesets for IY58143 were found.

- List all keyword entries on the CD containing the string SCSI:


# instfix -s SCSI -d /dev/cd0

- List which AIX BOS Maintenance Levels are partly or fully installed:
# instfix -i | grep ML
All filesets for 6.1.0.0_AIX_ML were found.

- List which filesets are missing in a partly installed AIX BOS Maintenance level:
# instfix -ciqk 6100-01_AIX_ML | grep :-:

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint
1. Which of the following states can your software be in, in order for
you to be able to use it? (select all that apply)
a. Applied state
b. Removed state
c. Install state
d. Commit state
2. What command is used to list all installed software on your
system? _______________
3. Which of the following can you install as an entity? (select all that
apply)
a. Fileset
b. LPP
c. Package
d. Bundle
4. What is the difference between the SMIT menus: Install Software
and Update Installed Software to Latest Level (Update All)?
_________________________________________________
_________________________________________________
Copyright IBM Corporation 2008

Figure 3-19. Checkpoint AW186.0

Notes:

3-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: AIX software installation

Exercise 3

Copyright IBM Corporation 2008

Figure 3-20. Exercise: AIX software installation AW186.0

Notes:

Introduction
This lab gives you the opportunity to install filesets and show software installation
history.
This exercise can be found in your Student Exercise Guide.

Copyright IBM Corp. 2000, 2008 Unit 3. Software installation and maintenance 3-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

AIX package naming conventions include the following


terms:
LPP
Package
Fileset
Suffix

The easiest way to install software is to use SMIT. The


geninstall and installp commands are also
available.

Use the lslpp command, SMIT, or the Web-based


System Manager to list all software products installed on
the system.

Copyright IBM Corporation 2008

Figure 3-21. Unit summary AW186.0

Notes:

3-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 4. Devices

What this unit is about


This unit presents important information regarding devices in an AIX
environment, including information about device states and device
location codes.

What you should be able to do


After completing this unit, you should be able to:
Describe the purpose of the ODM predefined and customized
databases
Describe the different states of a device
Describe the format of device location codes
Use SMIT to add, show, change, and delete devices

How you will check your progress


Accountability:
Checkpoint questions

References
SG24-7559 AIX Version 6.1 Differences Guide
Online AIX 6.1 Installation and migration
Online AIX 6.1 Operating System and device management

Note: References listed as Online above are available at the


following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-1


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

Unit objectives

After completing this unit, you should be able to:


Describe the purpose of the ODM predefined and
customized databases
Describe the different states of a device
Describe the format of device location codes
Use SMIT to add/show/change/delete devices

Copyright IBM Corporation 2008

Figure 4-1. Unit objectives AW186.0

Notes:

4-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Listing of /dev directory


# ls -l /dev
brw-rw--rw 1 root system 20,0 Oct 29 02:25 fd0
brw-rw--rw 1 root system 20,64 Oct 29 02:26 fd1
crw-rw--rw 1 root system 20,0 Oct 29 02:25 rfd0
crw-rw--rw 1 root system 20,64 Oct 29 02:26 rfd1
:
:
crw-r--r-- 1 root system 22,0 Oct 29 02:25 rmt0
crw-r--r-- 1 root system 22,1 Oct 29 02:25 rmt0.1
:
:
brw------- 1 root system 14,1 Oct 29 02:44 hdisk0
brw------- 1 root system 14,2 Nov 1 05:31 hdisk1
crw------- 2 root system 14,1 Oct 29 02:44 rhdisk0
crw------- 1 root system 14,2 Nov 1 05:31 rhdisk1

rmt0

fd0
rmt1

Copyright IBM Corporation 2008

Figure 4-2. Listing of /dev directory AW186.0

Notes:

Types of devices
There are a large number of devices that can be configured in the system. Devices can
be one of two types:
- Block device is a structured random access device. Buffering is used to provide a
block-at-a-time method of access. This is usually only used for disk file systems.
- Character (raw) device is a sequential, stream-oriented device which provides no
buffering.
Most block devices also have an equivalent character device. For example, /dev/hd1
provides buffered access to a logical volume whereas /dev/rhd1 provides raw access
to the same logical volume.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-3


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

ls -l /dev output
The ls -l command allows you to see the type of a file. A special file (in the /dev
directory) is indicated by a b in the first column for a block device or a c for a character
device.
Normally, the fifth field contains a numeric value indicating the number of bytes in the
file. For devices, it shows the major and minor device numbers. The device rmt0 shown
in the listing has a major device number of 22 and a minor device number of 1. This
indicates that the code to handle major device 22 must already be in the kernel, and it
must handle device number 1 correctly. While not shown here, there would be files for
rmt0 with minor numbers of 0 through 7, each of which must be handled correctly by
the device driver. More precisely, the major number refers to the software section of
code in the kernel which handles that type of device, and the minor number refers to the
particular device of that type or the operation mode of a device of that type.

Examples of block devices


Following are examples of block devices:
cd0 CD-ROM
fd0, fd0l, fd0h Diskette
hd1, lv00 Logical volume
hdisk0 Physical volume

Examples of character (raw) devices


Following are examples of character (raw) devices:
console, lft, tty0 Terminal
lp0 Printer
rmt0 Tape drive
tok0, ent0 Adapter
kmem, mem, null Memory
rfd0, rfd0l, rfd0h Diskette
rhd1, rlv00 Logical volume
rhdisk0 Physical volume

4-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Device configuration database


Predefined Configuration Database
Class Type Subclass Description
memory totmem sys Memory
tape 4mm4gb scsi 4.0 GB 4mm Tape Drive
disk osdisk scsi Other SCSI Disk Drive
adapter 23100020 pci IBM 10/100Mbps Ethernet PCI Adapter (23100020)
adapter 14101800 pci IBM PCI Tokenring Adapter (14101800)
adapter chrp_ecp isa_sio CHRP IEEE1284 (ECP) Parallel Port Adapter
adapter keyboard kma_chrp Keyboard Adapter
Customized Configuration Database
Name Status Location Description
sa0 Available 01-S1 Standard I/O Serial Port
sioka0 Available 01-K1-00 Keyboard Adapter
rmt0 Available 10-80-00-0.0 SCSI 4mm Tape Drive
hdisk0 Available 10-80-00-4,0 16 Bit SCSI Disk Drive
hdisk1 Available 10-80-00-5,0 16 Bit SCSI Disk Drive
mem0 Available Memory
ent0 Available 10-60 IBM 10/100 Mbps Ethernet PC Adapter (23100020)

lft lft node Low Function Terminal Subsystem


diskette fd siofd Diskette Drive
printer ibm4019 parallel IBM 4019 LaserPrinter
Copyright IBM Corporation 2008

Figure 4-3. Device configuration database AW186.0

Notes:

Introduction
The predefined and customized databases store information about all of the logical
devices in the system and their attributes. It is managed by the Object Data Manager
(ODM).

Predefined database
The predefined database contains configuration data for all possible devices supported
by the system. The SMIT menus have options to install non-supported drivers. The
contents of the predefined database is largely defined at installation time, ensuring that
you always have support for devices in your system.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-5


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

Customized database
The customized database contains configuration data for all currently defined and
configured (available) devices.

Configuration Manager
The Configuration Manager is a program that automatically configures devices on your
system during system boot and run time. The Configuration Manager uses the
information from the predefined and customized databases during this process, and
updates the customized database afterwards.

4-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List all supported devices


PdDv (Predefined Devices)

# lsdev -P -H
class type subclass description
memory totmem sys Memory
tape 4mm4gb scsi 4.0 GB 4mm Tape Drive
disk osdisk scsi Other SCSI Disk Drive
adapter 22100020 pci IBM PCI Ethernet Adapter (22100020)
adapter 14101800 pci IBM PCI Tokenring Adapter (14101800)
adapter ppa isa_sio Standard I/O Parallel Port Adapter
adapter isa_keyboard isa_sio Keyboard Adapter
..
..

# lsdev -Pc tape


tape 1200mb-c scsi 1.2 GB 1/4-Inch Tape Drive
tape 150mb scsi 150 MB 1/4-Inch Tape Drive
tape 3490e scsi 3490E Autoloading Tape Drive
tape 4mm2gb scsi 2.0 GB 4mm Tape Drive
. .
. .

Copyright IBM Corporation 2008

Figure 4-4. List all supported devices AW186.0

Notes:

Introduction
Default characteristics for known device types are stored in the ODM predefined
database.
Devices are classified as follows:
- Class indicates what the device does
- Type indicates what model it is
- Subclass indicates how it can be attached to the system
There are also definitions for some unknown devices which can be attached to the
system (for example, non-IBM serial or parallel printers or SCSI disk drives). These
devices are either intelligent and need little configuration, or the device attachment
method is standard (for example, parallel or RS232) and no features of the device are
assumed when it is added.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-7


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

Listing supported devices and device attributes


To find out what devices are listed in the predefined database, use the command:
lsdev -P
or click SMIT > Devices > List Devices > List All Supported Devices. The devices
listed may not physically exist on the system, but device support for them has been
installed.
To find out the default attributes of a predefined device, use the command lsattr -D
with the device class or click SMIT > Devices > List Devices > Show Characteristics
of a Supported Device.
Some options for the lsattr command include:
-H shows the headers for the output
-c specifies the class of device

4-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List all defined devices


CuDv (Customized Devices)
# lsdev -C -H
name status location description
sys0 Available System Object
pci0 Available PCI Bus
isa0 Available 10-58 ISA Bus
sa0 Available 01-S1 Standard I/O Serial Port
scsi0 Available 10-80 Wide/Fast-20 SCSI I/O Controller
cd0 Available 10-80-00-3,0 SCSI Multimedia CD-ROM Drive
rmt0 Defined 10-80-00-6,0 4.0 GB 4mm Tape Drive
hdisk0 Available 10-80-00-4,0 16 Bit SCSI Disk Drive
hdisk1 Available 10-80-00-5,0 16 Bit SCSI Disk Drive
mem0 Available Memory
ent0 Available 10-60 IBM 10/100 Mbps Ethernet PCI
tok0 Available 10-90 IBM PCI Tokenring Adapter

# lsattr -EH -l sys0


attribute value description user_settable
keylock normal State of system keylock at boot time False
realmem 131072 Amount of usable physical memory Kbytes False
iostat true Continuously maintain DISK I/O history True

# lsattr -E -l sys0 -a realmem


realmem 131072 Amount of usable physical memory in Kbytes False

Copyright IBM Corporation 2008

Figure 4-5. List all defined devices AW186.0

Notes:

Introduction
The devices that have been customized in the system are described in the ODM
customized database. Each device has a logical device name, status, location, and
various attributes.

Listing customized device information


The lsdev -CH command provides information on the resource name, its status (or
state), the address or location, and a brief description of all devices in the customized
database.
This list contains those devices that are found on the system. The status column
contains:
- Available: The device is ready and can be used
- Defined: The device is unavailable

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-9


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

Devices may appear in a defined state after a restart. If this is the case, it may be
because the device is powered off or no longer exists on the system.
Devices with a location code are physical devices. Devices without a location code are
logical devices. Location codes depend on the type of device and the adapter to which
the device is connected.
The lsattr -E -l [resource name] command provides detailed information on the
effective attributes currently configured for specified devices. In the example, it provides
configuration information on the system itself.
- The -C option for lsdev pulls the customized information from the ODM
- The -E option for lsattr shows the effective attributes
- The -l option for both commands is the logical device name
- The -c option for both commands is the class of device
- The -a attribute option for the lsattr command displays information for a
specific attribute
The lscfg-v command can also be used to list information about devices found in the
ODM customized database. The listing is sorted by parent, child, and device location.
Specific hardware information about devices is listed, such as EC level, FRU number,
part number, and so forth. The output also displays the model architecture and bus
type.

4-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Device states
Predefined Database

Undefined Supported
Device

rmdev -dl
Customized Database
rmdev -dl
Defined Not Usable
mkdev -l
or rmdev -l
cfgmgr
Available Ready for
Use

Copyright IBM Corporation 2008

Figure 4-6. Device states AW186.0

Notes:

Device states
The most common device states are:
- Undefined - The device is a supported device but is not configured. It does not
reside in the customized database.
- Defined - The device has been added to the customized database. It has been
allocated a logical device name, a location code, and attributes have been assigned
to it. But, it is still unavailable for use.
- Available - The device resides in the customized database. The device is fully
configured and is ready for use.
When a device is first identified, it is configured and put into the Available state.
If a device that has been configured in the past is powered off and the machine is
rebooted, the device appears in the Defined state. This indicates that the system
knows it is supposed to be there, but because it was not powered on, it cannot be used.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-11


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

Changing device states


You can control the device states by using SMIT or the commands:
mkdev and rmdev
To put a defined tape device into an available state, you can:
Click SMIT > Devices > Configure/Unconfigure Devices > Configure a
Defined Device, or
Use the command: mkdev -l rmt0
To move an available tape device to defined:
Click SMIT > Devices > Configure/Unconfigure Devices > Unconfigure a
Device then set KEEP definition in database to yes, or
Use the command: rmdev -l rmt0
To permanently remove an available or define tape device:
Click SMIT > Devices > Configure/Unconfigure Devices > Unconfigure a
Device then set KEEP definition in database to no, or
Use the command: rmdev -dl rmt0
Remember, most Defined devices are the result of not powering on the device before
booting. Or, it could be the device was physically removed, but you never ran the
command rmdev -dl xxxx to remove the device from the ODM.

The cfgmgr command

This command is executed at boot time to discover and configure attached devices.
After booting the system, if a device is either removed/powered-off or
attached/powered-on, the state of the device in the ODM is not automatically changed.
Rather than running mkdev or rmdev on the specific device, you would typically execute
the cfgmgr command. This discovers any new devices or re-assesses the state of any
devices already defined in the ODM customized device database.

4-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Self-configuring devices

2. Answer:
- CD-ROM
- 10-80-00-3,0
1. Who are you?

Device
cfgmgr Driver
4a) Load device driver
4b) Make /dev/cd0
ODM: 3. cd0 defined entry
cd0
defined Device
Kernel Driver
10-80-00-3,0
/unix 39

ODM: # ls -l /dev/cd0
cd0 br--r--r-- root system 39, 0 /dev/cd0
available
10-80-00-3,0 5. Device available

Copyright IBM Corporation 2008

Figure 4-7. Self-configuring devices AW186.0

Notes:

Configuring devices
The cfgmgr program runs during boot and configures devices. It can also be run safely
from the command line on a system that is up and running. It identifies all
self-configuring devices as long as they are powered on and matches them to the
information in the predefined database. It then uses the predefined information to
complete a customized database entry for the device.
All devices are self-configuring except for parallel and serial devices. So, except for
things like printers and ASCII terminals, configuring a device requires only attaching it
and powering it on before booting the machine. Since cfgmgr runs during the boot
process, no more intervention is required by the administrator.
You see that, for SCSI devices, you need to set a unique SCSI ID on the device before
attaching it. Once that is done, configuration of the device is handled by AIX.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-13


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

SMIT Devices menu


# smit devices
Devices

Move cursor to desired item and press Enter.


Install/Configure Devices Added After IPL
Printer/Plotter
TTY
Asynchronous Adapters
PTY
Console
MPIO Management
Fixed Disk
Disk Array
CD ROM Drive
Read/Write Optical Drive
Diskette Drive
Tape Drive
Communications
Graphic Displays
Graphic Input Devices
Low Function Terminal (LFT)
SCSI Initiator Device
SCSI Adapter
FC Adapter
IDE Adapter
iSCSI
Asynchronous I/O
Multimedia
List Devices
Configure/Unconfigure Devices
Install Additional Device Software
PCI Hot Plug Manager
SSA Disks
SSA RAID Arrays
Copyright IBM Corporation 2008

Figure 4-8. SMIT Devices menu AW186.0

Notes:

Introduction
The SMIT Devices menu (fastpath: # smit devices) is used to manage the
configuration information about the devices in the system. This information controls the
way the kernel and applications behave towards the attached physical devices. The list
of devices varies depending on what you have configured or installed on your system.
Devices can also be managed using the Web-based System Manager.

SMIT device functions


Some of the SMIT options are submenus which provide the functions to add, change,
and delete the configuration information, report any errors, and trace activity for specific
device types:
- Install/Configure Devices Added After IPL
Runs cfgmgr

4-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - Printer/Plotter
This submenu allows you to configure printer devices and also queues for local
printers and remote printers.
- TTY
Used for any non-printer device attached to a serial port. For example: terminal,
modem, and direct connection.
- PTY
Used for a pseudo-terminal device. It provides the appearance of a real ASCII
terminal to the application, but does not have any physical port attachment. It is
used for applications such as AIXWindows and TCP/IP communications.
- Communications
Used for adapters for various types of communications. For example: Token Ring,
Ethernet, MultiProtocol, X.25, 3270, and Fiber Optic.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-15


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

Device addressing
Location codes are used for device addressing
The location code for a device is a path from the adapter in
the CPU drawer or system unit, through the signal cables and
the asynchronous distribution box (if there is one) to the
device
Location codes consist of up to four fields of information
depending on the type of device
Location codes differ based on model type

Copyright IBM Corporation 2008

Figure 4-9. Device addressing AW186.0

Notes:

Location code
Every logical device is assigned a location code when it is attached to the system.
Location codes depend on the type of device and the adapter to which it connects.
The location code is another way of identifying the physical device.
The location codes exist to provide the system with a method of locating the device and
establishing relationships between devices and their adapters. If a hardware failure
occurs, the location code is often displayed or referred to in the LED.

Location code format


The format for location codes is: AB-CD-EF-GH
The length of the location code depends on the type of device. Two pairs indicate an
adapter. Four pairs indicate a device attached to an adapter.

4-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Location code format for PCI devices


AB-CD-EF-GH

AB 00 Resources attached to the processor


01 Resources attached to the ISA bus
04 Resources attached to the PCI bus (only)
XY Resources attached to the XY PCI bus
(For example - 10 or 1P)

CD 01-99 For pluggable adapters/cards


A-Z,0 As position 1 and 2 respectively for
integrated adapters

EF The connector ID

GH Port identifier, address, memory


modules, device, FRU for the device

Copyright IBM Corporation 2008

Figure 4-10. Location code format for PCI devices AW186.0

Notes:

Introduction
Knowing how to interpret location codes allows you to quickly locate a device based on
the software definition. If you have several of the same type of devices (hard disks, for
example) it allows you to easily identify the exact disk that is having the problem.
The actual values used in the location codes vary from model to model. For specific
values, you need to reference the Service Guide for your model. These can be found
online at the IBM Information Center:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-17


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

PCI location code format (AB)


The location code format in the visual is an example of what you might find on a 43P
Model 150 pSeries system. While this is an old system, it illustrates how AIX location
codes are constructed. The best guide to the codes is actually using ldev to list the
ones on your own system.
In older machines there was only a single PCI bus which used an AB value of 04. In
current machines these are multiple PCI buses which are assigned AB values which
identify the bus, such as 10 or IP.
The first set of digits, AB, defines the bus type that devices are attached to:
- 00 defines resources attached to the processor bus, such as the system planar,
processor, memory, and primary PCI bus.
- 01 defines resources attached to the ISA bus, such as the diskette drive, mouse,
and keyboard adapters.
- 04 defines resources attached to the PCI bus where either there is only one PCI bus
or where the PCI bus cannot be determined.
- XY defines resources attached to the XY parent PCI bus, where XY is a two
character identifier for the bus determined by the machine designer. For example, a
machine may have several PCI buses each numbered 10, 20, and so forth.

PCI location code format (CD)


The second set of digits, CD, identify a slot or adapter number.
Again, how this position is used may vary from machine/model to machine/model.
The integrated devices are on the primary PCI bus (starting with 10) or on the ISA bus
(01). Their CD positions are fixed unlike on the Model 140 where the letters are
assigned in the order of discovery. So, for example, 01-D1 is always the integrated
diskette drive and is attached on the ISA bus. 10-80 is always the integrated SCSI
controller (adapter).
Pluggable cards are attached to one of the two PCI buses. Slots 2 and 3 are on the
primary bus and start with 10. Cards in slots 1, 4 or 5 are on the secondary bus and
start with 1P. Each slot has an assigned location code number. To see the assigned
numbers, you need to reference the Service Guides. To give one example, a card in slot
1 has an address of 1P-08.
When you are looking at the location codes on a Model 150, use this chart taken from
the Service Guide to interpret their meaning:
- 1P-08 Slot 1
- 10-b0 Slot 2
- 10-90 Slot 3
- 1P-18 Slot 4

4-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - 1P-10 Slot 5


For integrated devices, like the built-in keyboard port, the C position is a letter A-Z and
the D position is a 0. For example 01-F0 shows that the keyboard adapter is on the ISA
bus (01) and is an integrated adapter (F0). The letters are assigned in the order in
which they are discovered during configuration. Each integrated device is assured a
unique value.

PCI location code format (EF)


EF is usually 00. We show an example of an 128-port async adapter shortly that shows
a non-00 EF position.

PCI location code format (GH)


GH is usually 00 for non-SCSI devices. Multiple diskette drives is one exception. A
128-port async adapter also gives non-00 GH positions.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-19


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

Location code example: Non-SCSI


128-Port Asynchronous Controller
1P-10-11-01 1P-10-11-07
System Unit
0 1 2 3 4 5 6 7
1
128-Port 8 9 10 11 12 13 14 15 Remote
Adapter Async Node 1P-10-22-04
(RAN)
2 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
1P-10 1 2
8 9 10 11 12 13 14 15 8 9 10 11 12 13 14 15

1P-10-21-10

Copyright IBM Corporation 2008

Figure 4-11. Location code example: Non-SCSI AW186.0

Notes:

Non-SCSI example
The example in the visual illustrates non-SCSI device location codes for a System p
server.
A 128-port asynchronous adapter allows 128 serial devices (like ASCII terminals) to be
attached to the adapter. The adapter has two connectors (or ports) on the card. Each
connector can support a serial bus.
On each bus, boxes that contain ports are connected to each other. These boxes are
called Remote Asynchronous Nodes (RANs). Each of the two connectors can support
four RANs. Four RANs on two connectors gives a total of eight RANs. Each RAN has
16 ports. That gives a total of 128 ports.

4-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Location code


The location code must account for each piece of the puzzle.
AB-CD is the same as the previous examples. It provides the adapter card address. In
our example, the adapter card is plugged into slot 5 on the PCI bus.
E identifies the connector on the adapter card, 1 or 2.
F identifies the RAN. RANs are numbered in ascending order going away from the
adapter, 1-4.
GH is the two-digit port number. For example, port 7 is 07. The range of numbers is
00-15.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-21


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

Location code format for SCSI devices

AB-CD-EF-G,H
AB-CD Identifies the bus and the adapter location
Same as with non-SCSI devices

EF For a single SCSI bus - 00


For a dual SCSI bus:
Internal bus - 00
External bus - 01

G,H G = SCSI address (SCSI ID) of the device


H = Logical unit number of the device

Copyright IBM Corporation 2008

Figure 4-12. Location code format for SCSI devices AW186.0

Notes:

SCSI device example


The visual shows an example of location codes for SCSI devices.
The location code format is slightly different. You notice in this format that the G and H
positions are separated by a comma.

AB-CD position
The AB-CD positions contain the same information you have already covered. It
indicates where the adapter card (SCSI controller) is attached: the bus and slot number.

EF position
The EF position identifies the SCSI bus. If the controller provides only a single SCSI
bus, the EF position is 00. If the controller provides for dual SCSI buses, each bus must

4-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty be identified by a unique address. With dual SCSI, the card's internal bus is identified
with 00 and the card's external bus is identified with 01.

G,H position
The G,H position provides two pieces of information. The G position is the SCSI
address, or SCSI ID, of the device. The SCSI ID is set on the device itself. It is usually
accomplished by setting jumpers or switches on the device. Some devices have
external dials or push buttons that allow for an easy method to set the ID. Set the SCSI
ID so that it doesn't conflict with another device on that bus. When cfgmgr runs, it
recognizes the ID that is set on the hardware and sets the G position accordingly.
The H is usually a 0. If the SCSI devices has multiple device within it, then the logical
unit number (LUN) is used to uniquely identify each device. Non-zero numbers are used
with RAID arrays or some CD jukeboxes.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-23


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

Location code example for SCSI device


SCSI Devices (Disk, Tape, CD-ROM)

System
Unit
10-80-00-4,0
SCSI 10-80-00-6,0
Adapter 7 4

SCSI Bus 6
10-80
0
SCSI ID

Copyright IBM Corporation 2008

Figure 4-13. Location code example for SCSI device AW186.0

Notes:

What is the location code?


This example shows several SCSI devices attached to a single SCSI bus on a 43P
Model 150. This is not a dual SCSI. This is a single bus that has devices that are
housed inside and outside the cabinet.
From the device addressing, the adapter is integrated on the PCI bus. The external disk
has a SCSI ID of 6 and the tape device has a SCSI ID of 4.
What would the location code be for the disk with a SCSI ID of 0?
____-____-____-___,___
The SCSI adapter uses a SCSI ID of 7 by default. Normally, you should not set a device
to a SCSI ID of 7 for that reason.

4-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Physical location codes


Assigned by system firmware

Used to uniquely identify hardware for:


Assigning adapters to logical partitions
Identifying field replaceable units (FRU)

Structure of a physical location code:


<enclosure>-<planar>-<slot>-<port>-<logical location>
Enclosure is usually:
<machine type>.<model>.<serial#>
Example, U787A.001.DNZ0713-P1-C3

Displayed by default with lscfg command

Copyright IBM Corporation 2008

Figure 4-14. Physical location codes AW186.0

Notes:

Introduction
Physical addressing has been in place throughout the history of the RS/6000, pSeries,
and System p family of products. An important change with the partitionable System p
servers is that these codes are now not only of concern to manufacturing engineers and
IBM equipment service personnel, but also to the administrator of these systems.
This physical location code is generated by the system firmware, and the scheme used
to assign the location code can vary from one machine to the next.

Uses of physical location codes


With the System p servers, the unique identifier of a physical component is the physical
location code. This identifier is used in problem isolation, identifying a failed component,
and specifying the FRU that is needed to fix the problem.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-25


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

When partitioning a system, devices are assigned to each logical partition on an


adapter-by-adapter basis and the physical location code is the unique identifier of each
adapter. Since each partition may have a different operating system, the identification of
components cannot depend upon an O/S unique location code such as the AIX location
code.

Addressing scheme
The first part of the physical location code is the enclosure identification. On the older
POWER4 platforms (e.g., p690) this would be the rack# and the position of a drawer in
the enclosure. In most System p servers, the enclosure is identified by noting the
machine-type, model, and serial number of that enclosure.
The next part of the location code is the physical location of a component in that
enclosure. This would typically be the planar (or internal bus) and the connection to that
bus (expressed as a slot position). The location code, up to this point, could be
identifying an adapter. Optionally, the physical location may include a port# if that
adapter has multiple ports.
Following this physical portion of the location code, we can have a logical portion. This
is used when a component is located by addressing on the adapters bus rather than a
fixed physical path. For example, the SCSI address of a device on a SCSI bus.

Important AIX commands


- List all adapters and their AIX location codes: lsdev -Cc adapter
- Show information about device including physical location code and the AIX location
code: lscfg -vl xyz where xyz is the name of a device such as ent0 or ssa0

4-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Listing device physical locations

CuDv Customized Devices

# lsdev -C -H -F "name status physloc location description"


name status physloc location description

en1 Defined 01-08 Standard Ethernet Network


ent1 Defined U789D.001.DQDWAYT-P1-C4-T1 01-08 10/100/1000 Base-TX
et1 Defined 01-08 IEEE 802.3 Ethernet
hdisk2 Defined U7311.D20.107F67B-P1-C04-A8 02-08-01-8,0 16 Bit LVD SCSI Disk
hdisk3 Defined U7311.D20.107F67B-P1-C04-A9 02-08-01-9,0 16 Bit LVD SCSI Disk
scsi0 Defined U7311.D20.107F67B-P1-C04 02-08-00 PCI X Dual Channel
scsi1 Defined U7311.D20.107F67B-P1-C04 02-08-01 PCI X Dual Channel
ses0 Defined U7311.D20.107F67B-P1-C04-AF 02-08-01-15,0 SCS Enclosure Services
sisscsia0 Defined U7311.D20.107F67B-P1-C04 02-08 PCI XDDR Dual Channel

Copyright IBM Corporation 2008

Figure 4-15. Listing device physical locations AW186.0

Notes:

Using lsdev to list location codes


The use of physical location codes is becoming more common, especially when
working on problem determination involving the physical devices in a System p server.
By default, the lsdev command only shows the traditional AIX locations codes, but it
does allow us to ask for additional information.
Use lsdev -C -H -F "name status physloc location description" to display the
output in a user-specified format. The physloc format option provides the physical
location code of a device and the location format option provides the AIX location
code of a device.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-27


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

Adding an ASCII terminal

S1

S2 TTY

Move cursor to desired item and press Enter.

List All Defined TTYs


Add a TTY
Move a TTY to Another Port
Change / Show Characteristics of a TTY
Remove a TTY
Configure a Defined TTY
Generate an Error Report
Trace a TTY

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


F9=Shell F10=Exit Enter=Do
Copyright IBM Corporation 2008

Figure 4-16. Adding an ASCII terminal AW186.0

Notes:

Introduction
Most devices self-configure using cfgmgr. One type of device that does not, is an ASCII
terminal. The next few visuals go through the process of adding an ASCII terminal in
order to provide an example of what is required to manually configure a device.

First steps
First, physically attach the terminal to the serial port. Be sure to note which serial port it
is attached to. We need that information as we complete this process.
To begin the configuration, use the smit tty command. The TTY screen is used to
manage the configuration of asynchronous devices.
To add the terminal, select Add a TTY.

4-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Attachment
TTY Type

Move cursor to desired item and press Enter.

tty rs232 Asynchronous Terminal


tty rs422 Asynchronous Terminal

Parent Adapter

Move cursor to desired item and press Enter.

sa0 Available 01-S1 Standard I/O Serial Port 1


sa1 Available 01-S2 Standard I/O Serial Port 2
sa2 Available 1P-03-11 16-Port RAN EIA-232 for 128-Port adapter
sa3 Available 1P-03-12 16-Port RAN EIA-232 for 128-Port adapter
sa4 Available 1P-03-13 16-Port RAN EIA-232 for 128 Port adapter

Copyright IBM Corporation 2008

Figure 4-17. Attachment AW186.0

Notes:

Introduction
Once you select Add a TTY, you are then asked the TTY Type and which Parent
Adapter the terminal is attached to.

TTY type
In this example, the choices for TTY type are rs232 and rs422. The most common TTY
type is rs232.
To select the correct parent adapter, you need to know where the device is physically
attached. This is where the serial port is important.
In our example from the previous page, the terminal was attached to serial port 1.
Therefore, we select sa0 - Standard I/O Serial Port 1.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-29


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

Location code
The location code is also displayed. 01-S1 is, in fact, the location code of serial port 1.
Remote asynchronous nodes used in conjunction with the 128-port async adapter are
sa2, sa3, and sa4.
Be careful with the numbering scheme:
sa0 is serial port 1.
sa1 is serial port 2. The sa stands for serial adapter. The adapters are devices and
device names are numbered starting at 0.

4-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Device nomenclature

For the built-in serial connection, the nomenclature looks like this:

sa0 sa1
Built-in adapters
on system planar

Serial ports s1 s2
For the 128-port adapter, the nomenclature looks like this:

1 Adapter Location code: 1P-03

sa2 sa3 sa4

16-Port 16-Port 16-Port


RAN RAN RAN
Copyright IBM Corporation 2008

Figure 4-18. Device nomenclature AW186.0

Notes:

Pictorial view
This visual shows a picture, and the associated nomenclature, for the scenario we are
discussing on adding a TTY.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-31


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

Add a TTY
Add a TTY

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[TOP] [Entry Fields]


TTY type tty
TTY interface rs232
Description Asynchronous Terminal
Parent adapter sa0
* PORT number [] +
Enable LOGIN disable +
BAUD rate [] +
PARITY [none] +
BITS per character [8] +
Number of STOP BITS [1] +
TIME before advancing to next port setting [0] +#
TERMINAL type [dumb]
FLOW CONTROL to be used [xon] +
[MORE...31]

F1=Help F2=Refresh F3=Cancel F4=List


Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 4-19. Add a TTY AW186.0

Notes:

PORT number
There is only one mandatory field on this screen and that is the PORT number. The F4
key provides a list of possible port numbers. For the first built-in serial port m it is s1. For
the second, it is s2. On a 16-port RAN, the choices are 0-15. Select the one to which
the terminal is connected. The combination of the appropriate RAN selected on the
Parent Adapter selector screen and the port number shown here provides the system
with the correct location code.
You must supply the port number to uniquely locate the device. The value required
depends upon the adapter specified. For example:
Built-in serial port S1 s1
Built-in serial port S2 s2
8-Port Adapter 0-7
16-Port Adapter 0-15
Each 16-PORT RAN 0-15

4-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Enable LOGIN


The Enable LOGIN attribute is set to disable by default. If you are adding a terminal
that should have a login prompt, you should change this to enable.

Asynchronous line characteristics


The asynchronous line characteristics must be specified: BAUD rate, PARITY, BITS
per character, and Number of STOP BITS. In a national language environment, you
must use eight bits with no parity (the default). Set the speed appropriately for the
terminal device or modem you are using, up to 38400.

TERMINAL type
The TERMINAL type attribute is used to assign the TERM environment variable when a
user logs in on the device. You must set this to the name of a supported terminal type.
The list of supported terminals can be found in directories located in
/usr/share/lib/terminfo.

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-33


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

Documenting hardware configuration


lsdev -CH
Provides name, status, location, and description of devices

lscfg -v
Provides details of all devices including manufacturer, type and model
number, and part numbers

lsattr -El sys0


Provides attributes for the name device (for example, sys0)
Run command for all devices

getconf -a
Provides the values of all system configuration variables

Copyright IBM Corporation 2008

Figure 4-20. Documenting hardware configuration AW186.0

Notes:

Commands to help document device configurations


Documentation is an important part of the system administrators job. Be sure to
document all device configurations for your machines.
The following commands are useful to help document your device configuration:
- lsdev -CH
Provides a listing from the customized database. The -H option supplies headers to
the output for easier interpretation.
- lscfg -v
Provides a verbose detailed output of all of the devices on the machines. It includes
vital product data (VPD) which has information such as the manufacturer, type and
model, and part numbers. Not all devices have VPD.

4-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - lsattr -El sys0


Provides attributes for the device. In this example, it is providing the attributes for the
kernel where sys0 is the device name of the kernel. To fully document your system,
you need to run this command against all devices configured on your machine. For
example, to get the attributes of a hard drive, you need to run:
lsattr -El hdisk0
It would probably be helpful to create a shell script to complete this process for you.
- getconf -a
Writes the values of all system configuration variables to standard output.

getconf -a command examples


Following are examples of the getconf command:
# getconf BOOT_DEVICE
hdisk0

# getconf MACHINE_ARCHITECTURE
chrp

# getconf KERNEL_BITMODE
64

# getconf HARDWARE_BITMODE
64

# getconf REAL_MEMORY
131072

# getconf DISK_PARTITION /dev/hdisk0


16

# getconf DISK_SIZE /dev/hdisk0


8678

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-35


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

Checkpoint (1 of 2)
1. Is it possible to use SCSI ID 7 for a new tape drive?
_______________________________________________
_______________________________________________

2. Use the output on the next visual (lsdev -C -H) to answer the
following four questions:
a) What will happen if we attempt to add another device with the SCSI address set to
4?
_______________________________________________
_______________________________________________
b) Can the 8 mm tape drive be currently used? Why?
_______________________________________________
_______________________________________________
c) Where is the printer connected? __________________
d) The Ethernet adapter is installed in what slot?
_______________________________________________
_______________________________________________

Copyright IBM Corporation 2008

Figure 4-21. Checkpoint (1 of 2) AW186.0

Notes:

4-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint (2 of 2)
# lsdev -C H
name status location description
sys0 Available System Object
pci0 Available PCI Bus
isa0 Available 10-58 ISA Bus
ppa0 Available 01-R1 Standard I/O Parallel Port Adapter
lp0 Available 01-R1-00-00 IBM 4039 LaserPrinter
sa0 Available 01-S1 Standard I/O Serial Port 1
tty0 Available 01-S1-00-00 Asynchronous Terminal
mem0 Available Memory
scsi0 Available 10-80 Wide SCSI I/O Controller
rmt0 Defined 10-80-00-3,0 5.0 GB 8 mm Tape Drive
hdisk0 Available 10-80-00-4,0 SCSI Disk Drive
ent0 Available 10-60 IBM PCI 10/100 Ethernet Adapter

Copyright IBM Corporation 2008

Figure 4-22. Checkpoint (2 of 2) AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 4. Devices 4-37


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

Unit summary

A physical device is the actual hardware attached to the


system
A logical device is the software interface used by programs
and users to access a physical device
Device information is stored in the ODM in two databases:
customized and predefined
Devices can exist in a number of different states:
unavailable, defined, available, and stopped
Location codes are used to describe exactly where a device
is connected to the system
Device attributes can be modified through SMIT
To create, modify, or remove device definitions, it is
sometimes necessary to use commands such as mkdev,
chdev, and rmdev
Copyright IBM Corporation 2008

Figure 4-23. Unit summary AW186.0

Notes:

4-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 5. The Object Data Manager (ODM)

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
Lab exercise

References
Online AIX Version 6.1 Command Reference volumes 1-6
Online AIX Version 6.1 General Programming Concepts:
Writing and Debugging Programs
Online AIX Version 6.1 Technical Reference: Kernel and
Subsystems
Note: References listed as online above are available via the IBM
Systems Information Center at the following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:

Describe the structure of the ODM

Use the ODM command line interface

Explain the role of the ODM in device configuration

Describe the function of the most important ODM files

Copyright IBM Corporation 2008

Figure 5-1. Unit objectives AW186.0

Notes:

Importance of this unit


The ODM is a very important component of AIX and is a 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 using the ODM command line
interface.
It is also very important that you, as an AIX system administrator, understand the role of
ODM during device configuration. Thus, explaining the role of the ODM in this process
is another major objective of this unit.

5-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 5.1. Introduction to the ODM

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

What is the ODM?


The Object Data Manager (ODM) is a database intended for
storing system information.

Physical and logical device information is stored and


maintained through the use of objects with associated
characteristics.

Copyright IBM Corporation 2008

Figure 5-2. What is the ODM? AW186.0

Notes:

5-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Data managed by the ODM

Devices Software

System
Resource ODM SMIT Menus
Controller

TCP/IP Error Log,


NIM
Configuration Dump

Copyright IBM Corporation 2008

Figure 5-3. Data managed by the ODM AW186.0

Notes:

System data managed by ODM


The ODM manages the following system data:
- Device configuration data
- Software Vital Product Data (SWVPD)
- System Resource Controller (SRC) data
- TCP/IP configuration data
- Error log and dump information
- Network Installation Manager (NIM) information
- SMIT menus and commands

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Emphasis in this unit


Our main emphasis in this unit is on the use of ODM to store and manage information
regarding devices and software products (software vital product data). During the
course, many other ODM classes are described.

5-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

ODM components

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 2008

Figure 5-4. ODM components AW186.0

Notes:

Completing the drawing on the visual


The drawing on the visual above identifies the basic components of ODM, but some
terms have been intentionally omitted from the drawing. Your instructor will complete
this drawing during the lecture. Please complete your own copy of the drawing by
writing in the terms supplied by your instructor.

ODM data format


For security reasons, the ODM data is stored in binary format. To work with ODM files,
you must use the ODM command line interface. It is not possible to update ODM files
with an editor.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM database files

Predefined device information PdDv, PdAt, PdCn

CuDv, CuAt, CuDep, CuDvDr,


Customized device information
CuVPD, Config_Rules

Software vital product data history, inventory, lpp, product

sm_menu_opt, sm_name_hdr,
SMIT menus sm_cmd_hdr, sm_cmd_opt

Error log, alog, and dump SWservAt


information

System Resource Controller SRCsubsys, SRCsubsvr, ...

Network Installation Manager nim_attr, nim_object, nim_pdattr


(NIM)
Copyright IBM Corporation 2008

Figure 5-5. ODM database files AW186.0

Notes:

Major ODM files


The table on the visual summarizes the major ODM files in AIX. As you can see, the
files listed in this table are placed into several different categories.

Current focus
In this unit, we will concentrate on ODM classes that are used to store device
information and software product data. At this point, we will narrow our focus even
further and confine our discussion to ODM classes that store device information.

5-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Predefined and customized device information


The first two rows in the table on the visual indicate that some ODM classes contain
predefined device information and that others contain customized device information.
What is the difference between these two types of information?
Predefined device information describes all supported devices. Customized device
information describes all devices that are actually attached to the system.
It is very important that you understand the difference between these two information
classifications.
The classes themselves are described in more detail in the next topic of this unit.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Device configuration summary


Predefined Databases
PdDv

PdCn PdAt

Customized Databases

CuDep CuDv CuAt

CuDvDr CuVPD

Config_Rules

Configuration Manager
(cfgmgr)
Copyright IBM Corporation 2008

Figure 5-6. Device configuration summary AW186.0

Notes:

ODM classes used during device configuration


The visual above shows the ODM object classes used during the configuration of a
device.

Roles of cfgmgr and Config_Rules


When an AIX system boots, the Configuration Manager (cfgmgr) is responsible for
configuring devices. There is one ODM object class which the cfgmgr uses to
determine the correct sequence when configuring devices: Config_Rules. This ODM
object class also contains information about various methods files used for device
management.

5-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Configuration Manager
Predefined
"Plug and Play"
PdDv
PdAt
PdCn

Config_Rules
cfgmgr

Customized Methods
CuDv Define
Device Load
CuAt Configure
Driver
CuDep Change
CuDvDr Unload Unconfigure

CuVPD Undefine
Copyright IBM Corporation 2008

Figure 5-7. Configuration Manager AW186.0

Notes:

Importance of Config_Rules object class


Although cfgmgr gets credit for managing devices (adding, deleting, changing, and so
forth), it is actually the Config_Rules object class that does the work through various
methods files.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Location and contents of ODM repositories

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 2008

Figure 5-8. Location and contents of ODM repositories AW186.0

Notes:

Introduction
To support diskless, dataless, and other workstations, the ODM object classes are held
in three repositories. Each of these repositories is described in the material that follows.

/etc/objrepos
This repository contains the customized devices object classes and the four object
classes 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 requiring a separate copy for each machine is associated
with the configuration of the machine or product.

5-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty /usr/lib/objrepos
This repository contains the predefined devices object classes, SMIT menu object
classes, and the four object classes 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 installed in
the /usr part can be shared among several machines with compatible hardware
architectures.

/usr/share/lib/objrepos
Contains the four object classes 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 recorded in the ODM. When run with the -l
(lower case L) flag, it lists each of the locations (/, /usr/lib, /usr/share/lib) where it finds
the fileset recorded. This can be distracting if you are not concerned with these
distinctions. Alternately, you can run lslpp -L which only reports each fileset once,
without making distinctions between the root, usr, and share portions.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

How ODM classes act together

PdDv: CuDv:
type = "14106902" name = "ent1"
class = "adapter" status = 1
subclass = "pci" chgstatus = 2
prefix = "ent" ddins = "pci/goentdd"
cfgmgr location = "02-08"
DvDr = "pci/goentdd" parent = "pci2"
Define = /usr/lib/methods/define_rspc" connwhere = "8
Configure = "/usr/lib/methods/cfggoent"
PdDvLn = "adapter/pci/14106902"
uniquetype = "adapter/pci/14106902"

PdAt: CuAt:
uniquetype = name = "ent1"
chdev -l ent1 \
"adapter/pci/14106902" attribute = "jumbo_frames"
-a jumbo_frames=yes
attribute = "jumbo_frames" value = "yes"
deflt = "no" type = "R"
values = "yes,no"

Copyright IBM Corporation 2008

Figure 5-9. How ODM classes act together AW186.0

Notes:

Interaction of ODM classes


The visual above and the notes below summarize how ODM classes act together.
1. In order for a particular device to be defined in AIX, the device type must be
predefined in ODM class PdDv.
2. A device can be defined by 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.
3. At this point, you only have default attribute values in PdAt which, in our example of
a gigabit Ethernet adapter, means you could not use jumbo frames (default is no). If
you change the attributes, for example, jumbo_frames to yes, you get an object
describing the nondefault value in CuAt.

5-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Data not managed by the ODM

Filesystem
information ?

User/Security
information ?

Queues and
Queue devices ?

Copyright IBM Corporation 2008

Figure 5-10. Data not managed by the ODM AW186.0

Notes:

Completion of this page


The visual above identifies some types of system information that are not managed by
the ODM, but the names of the files that store these types of information have been
intentionally omitted from the visual. Your instructor will complete this visual during the
lecture. Please complete your own copy of the visual by writing in the file names
supplied by your instructor.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Lets review:
Device configuration and the ODM
1.
_______

Undefined Defined Available

2. 3.
AIX Kernel Applications

D____ D____ 4. /____/_____ 5.

Copyright IBM Corporation 2008

Figure 5-11. Lets review: Device configuration and the ODM AW186.0

Notes:

Instructions
Please answer the following questions. Please put the answers in the picture above. If
you are unsure about a question, leave it out.
1. Which command configures devices in an AIX system? (Note: This is not an ODM
command.)
2. Which ODM class contains all devices that your system supports?
3. Which ODM class contains all devices that are configured in your system?
4. Which programs are loaded into the AIX kernel to control access to the devices?
5. If you have a configured tape drive rmt1, which special file do applications access to
work with this device?

5-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

ODM commands
Object class: odmcreate, odmdrop

Descriptors: odmshow

uniquetype attribute deflt values

tape/scsi/scsd block_size none 0-2147483648,1

disk/scsi/osdisk pvid none

tty/rs232/tty login disable enable, disable, ...

Objects: odmadd, odmchange, odmdelete, odmget


Copyright IBM Corporation 2008

Figure 5-12. ODM commands AW186.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 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. The exercise for this unit contains an
optional part that shows how to create self-defined ODM classes.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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

5-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Changing attribute values


# 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

# odmdelete -o PdAt -q"uniquetype=tape/scsi/scsd and attribute=block_size"

# odmadd file

Copyright IBM Corporation 2008

Figure 5-13. Changing attribute values AW186.0

Notes:

Discussion of command sequence on the visual


The odmget command in the example will pick 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 which can be changed using an editor.
In this example, the default value for the attribute block_size is changed to 512.
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 describing the same attribute in the database. The first object found will
be used, and the results could be quite 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.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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

5-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Using odmchange to change attribute values

# 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

Copyright IBM Corporation 2008

Figure 5-14. Using odmchange to change attribute values AW186.0

Notes:

Another way of changing attribute values


The series of steps shown on this visual shows how the odmchange command can be
used instead of the odmadd and odmdelete steps shown in the previous example to
modify attribute values.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

5-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 5.2. ODM database files

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Software vital product data


lpp: product:
name = "bos.rte.printers lpp_name = "bos.rte.printers
size = 0 comp_id = "5765-G620
state = 5 state = 5
ver = 6 ver = 6
rel = 1 rel = 1
mod =0 mod =0
fix = 0 fix = 0
description = "Front End Printer ptf = "
Support prereq = "*coreq bos.rte 6.1.0.0
lpp_id = 38 description = "
supersedes = ""

inventory: history:
lpp_id = 38 lpp_id = 38
private = 0 ver = 6
file_type = 0 rel = 1
format = 1 mod = 0
loc0 = "/etc/qconfig fix = 0
loc1 = " ptf = "
loc2 = " state = 1
size = 0 time = 1187714064
checksum = 0 comment = ""
Copyright IBM Corporation 2008

Figure 5-15. Software vital product data AW186.0

Notes:

Role of installp command


Whenever you are installing a product or update in AIX, the installp command uses
the ODM to maintain the Software Vital Product Database (SWVPD).

Contents of SWVPD
The following information is part of the SWVPD:
The name of the software product (for example, bos.rte.printers)
The version, release, modification, and fix level of the software product (for example,
5.3.0.10 or 6.1.0.0)
The fix level, which contains a summary of fixes 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)

5-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

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
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. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Software states you should know about

Only possible for PTFs or updates


Applied Previous version stored in /usr/lpp/Package_Name
Rejecting update recovers to saved version
Committing update deletes previous version

Committed Removing committed software is possible


No return to previous version
Applying,
Committing, If installation was not successful:
a) installp -C
Rejecting, b) smit maintain_software
Deinstalling
Cleanup failed
Broken Remove software and reinstall

Copyright IBM Corporation 2008

Figure 5-16. Software states you should know about AW186.0

Notes:

Introduction
The AIX SWVPD uses software states that describe the status of an install or update
package.

The applied and committed states


When installing a program temporary fix (PTF) or update package, you can install the
software into an applied state. Software in an applied state contains the newly installed
version (which is active) and a backup of the old version (which is inactive). This gives
you the opportunity to test the new software. If it works as expected, you can commit
the software, which will remove the old version. If it does not work as planned, you can
reject the software, which will remove the new software and reactivate the old version.
Install packages cannot be applied. These will always be committed.

5-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Once a product is committed, if you would like to return to the old version, you must
remove the current version and reinstall the old version.

States indicating installation problems


If an installation does not complete successfully (for example, if the power fails during
the install) you may find software states like applying, committing, rejecting, or
deinstalling. To recover from this failure, execute the command installp -C or use the
SMIT fastpath: smit maintain_software
Select Clean Up After Failed or Interrupted Installation when working in SMIT.

The broken state


After a cleanup of a failed installation, you might detect a broken software status. In this
case, the only way to recover from the failure is to remove and reinstall the software
package.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Predefined devices (PdDv)


PdDv:
type = scsd"
class = "tape"
subclass = "scsi"
prefix = "rmt"
...
base = 0
...
detectable = 1
...
led = 2418
setno = 54
msgno = 0
catalog = "devices.cat"
DvDr = "tape"
Define = "/etc/methods/define"
Configure = "/etc/methods/cfgsctape"
Change = "/etc/methods/chggen"
Unconfigure = "/etc/methods/ucfgdevice"
Undefine = "etc/methods/undefine"
Start = ""
Stop = ""
...
uniquetype = "tape/scsi/scsd"
Copyright IBM Corporation 2008

Figure 5-17. Predefined devices (PdDv) AW186.0

Notes:

The Predefined Devices (PdDv) object class


The Predefined Devices (PdDv) object class contains entries for all devices 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
sharing the same high-level function. For example, tape is a functional class name
representing all tape devices.

5-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty subclass
Device classes are grouped into subclasses. The subclass scsi specifies all tape
devices that may 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 assigned to
tape devices. Names of tape devices would then look like rmt0, rmt1, or rmt2.

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, the standard
I/O diskette adapter and a SCSI hard drive. The device 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 actually 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 means that it is not (for example, a printer or tty).

led
Indicates the value displayed on the LEDs when the configure method begins to run.
The value stored is a decimal, but the value 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.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 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 associated with the device type. This program is called when
a device is brought into the defined state.

Configure
Names the configure method associated with the device type. This program is called
when a device is brought into the available state.

Change
Names the change method associated with the device type. This program is called
when a device attribute is changed via the chdev command.

Unconfigure
Names the unconfigure method associated with the device type. This program is called
when a device is unconfigured using:
rmdev -l.

Undefine
Names the undefine method associated with the device type. This program is called
when a device is undefined using:
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.

5-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty uniquetype
This is a key that is referenced by other object classes. Objects use this descriptor a
pointer back to the device description in PdDv. The key is a concatenation of the class,
subclass, and type values.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Predefined attributes (PdAt)


PdAt:
uniquetype = "tape/scsi/scsd"
attribute = "block_size"
deflt = ""
values = "0-2147483648,1"
...

PdAt:
uniquetype = "disk/scsi/osdisk"
attribute = "pvid"
deflt = "none"
values = ""
...

PdAt:
uniquetype = "tty/rs232/tty"
attribute = "term"
deflt = "dumb"
values = ""
...

Copyright IBM Corporation 2008

Figure 5-18. Predefined attributes (PdAt) AW186.0

Notes:

The Predefined Attribute (PdAt) object class


The Predefined Attribute (PdAt) object class contains an entry for each existing
attribute for each device 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 three attributes (block size,
physical volume identifier, and terminal name) and their default values.
The meanings of the key fields 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.

5-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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 issue the following command:
# chdev -l tty0 -a term=ibm3151

deflt
Identifies the default value for an attribute. Non-default values are stored in CuAt.

values
Identifies the 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.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Customized devices (CuDv)


CuDv:
name = "ent1"
status = 1
chgstatus = 2
ddins = "pci/goentdd"
location = "02-08"
parent = "pci2"
connwhere = "8"
PdDvLn = "adapter/pci/14106902"

CuDv:
name = "hdisk2"
status = 1
chgstatus = 2
ddins = "scdisk"
location = "01-08-01-8,0"
parent = "scsi1"
connwhere = "8,0"
PdDvLn = "disk/scsi/scsd"

Copyright IBM Corporation 2008

Figure 5-19. Customized devices (CuDv) AW186.0

Notes:

The Customized Devices (CuDv) object class


The Customized Devices (CuDv) object class contains entries for all device instances
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 may or
may not have a corresponding actual device 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.

5-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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 two devices, an Ethernet
adapter ent1 and a disk drive hdisk2.

status
Identifies the current 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 - Don't 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 PdDv object class. It specifies the name of the device driver that is loaded into
the AIX kernel.

location
Identifies the physical 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. In many AIX systems, the
location codes are labeled in the hardware to facilitate the finding of devices.

parent
Identifies the logical name of the parent device. For example, the parent device of
hdisk2 is scsi1.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

connwhere
Identifies the specific location on the parent device where the device is connected. For
example, the device hdisk2 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.

5-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Customized attributes (CuAt)

CuAt:
name = "ent1"
attribute = "jumbo_frames"
value = "yes"
...

CuAt:
name = "hdisk2"
attribute = "pvid"
value = "00c35ba0816eafe50000000000000000"
...

Copyright IBM Corporation 2008

Figure 5-20. Customized attributes (CuAt) AW186.0

Notes:

The Customized Attribute (CuAt) object class


The Customized Attribute (CuAt) object class contains customized device-specific
attribute information.
Devices represented in the CuDv object class have attributes found in the 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.

Discussion of examples on visual


The sample CuAt entries on the visual show two attributes that have customized
values. The attribute login has been changed to enable. The attribute pvid shows the
physical volume identifier that has been assigned to disk hdisk0.

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Additional device object classes


PdCn: CuDvDr:
uniquetype = "adapter/pci/sym875 resource = "devno"
connkey = "scsi value1 = "36"
connwhere = "1,0" value2 = "0"
value3 = "hdisk3
PdCn:
uniquetype = "adapter/pci/sym875 CuDvDr:
connkey = "scsi resource = "devno"
connwhere = "2,0" value1 = "36"
value2 = "1"
value3 = "hdisk2"

CuDep: CuVPD:
name = "rootvg name = "hdisk2"
dependency = "hd6" vpd_type = 0
vpd = "*MFIBM *TM\n\
HUS151473VL3800 *F03N5280
CuDep:
*RL53343341*SN009DAFDF*ECH179
name = "datavg 23D *P26K5531 *Z0\n\
dependency = "lv01" 000004029F00013A*ZVMPSS43A
*Z20068*Z307220"

Copyright IBM Corporation 2008

Figure 5-21. Additional device object classes AW186.0

Notes:

PdCn
The Predefined Connection (PdCn) object class contains connection information for
adapters (sometimes called intermediate devices). This object class also includes
predefined dependency information. For each connection location, there are one or
more objects describing the subclasses of devices that can be connected.
The sample PdCn objects on the visual indicate that, at the given locations, all devices
belonging to subclass SCSI could 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

5-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty logical devices, exclusively. Physical dependencies of one device on another device are
recorded in the CuDv object class.
The sample CuDep objects on the visual show the dependencies between logical
volumes and the volume groups they belong to.

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 may 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. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint

1. In which ODM class do you find the physical volume IDs of


your disks?
__________________________________________________

2. What is the difference between defined state and available


state?
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________

Copyright IBM Corporation 2008

Figure 5-22. Checkpoint AW186.0

Notes:

5-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise 4: The Object Data Manager (ODM)

Review of device configuration ODM


classes
Role of ODM during device configuration
Creating self-defined ODM classes
(optional)

Copyright IBM Corporation 2008

Figure 5-23. Exercise 4: The Object Data Manager (ODM) AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 5. The Object Data Manager (ODM) 5-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

The ODM consists of files called object classes, which


contain individual records called objects. The layout of the
objects is indicated by descriptors.
AIX offers a command line interface to work with the ODM
files.
Information about devices is held in the customized and
the predefined databases (Cu*, Pd*).

Copyright IBM Corporation 2008

Figure 5-24. Unit summary AW186.0

Notes:

5-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 6. System boot: Hardware

What this unit is about


This unit describes the boot process up to the point of loading the boot
logical volume. It describes the content of the boot logical volume and
explains how it can be re-created if it is corrupted.
The unit also discusses the meaning of the LED codes and describes
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:
Describe the process of loading an AIX boot image
Describe the contents of the boot logical volume (BLV)
Fix a corrupted boot logical volume
View and modify boot lists
Use System Management Services (SMS)
Boot into maintenance mode to access a system that will not boot
Interpret LED codes and console messages displayed during boot

How you will check your progress


Accountability:
Checkpoint questions
Exercise

References
Online AIX Version 6.1 Operating system and device
management
Note: References listed as online above are available at the following
address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

SA38-0509 RS/6000 Eserver pSeries Diagnostic Information for


Multiple Bus Systems
SG24-5496 Problem Solving and Troubleshooting in AIX 5L

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:
Describe the process of loading an AIX boot image
Describe the contents of the boot logical volume (BLV)
Fix a corrupted boot logical volume
View and modify boot lists
Use System Management Services (SMS)
Boot into maintenance mode to access a system that will
not boot
Interpret LED codes and console messages displayed
during boot

Copyright IBM Corporation 2008

Figure 6-1. Unit objectives AW186.0

Notes:

6-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX startup process

Power ON
System boot: Hardware
Hardware initialization

Low level configuration tool


Locate boot device using Low level y Hardware status
normal bootlist (NVRAM) config tool?
Yes
y Hardware configuration
y Bootlist configuration
Load boot image into memory
Yes No

AIX Initialization
Normal mode Locate boot device using
Normal service bootlist (NVRAM) or
(Multiuser mode) mode?
No
rc.boot alternate bootlist from firmware
Phase 1
System boot:
rc.boot
Phase 2
Software
Service mode
(Boot from alternate media)
init starts
y Diagnostics CD-ROM
processes
y Installation CD-ROM
from /etc/inittab
y mksysb tape
rc.boot y etc.
Phase 3

Other processes started


from /etc/inittab

Copyright IBM Corporation 2008

Figure 6-2. AIX startup process AW186.0

Notes:

Introduction
Booting a system running AIX proceeds in three overall stages:
- Hardware initialization
- Location of the boot device and loading of the boot image
- AIX initialization
Our focus here will be on locating and loading the boot image and using the low level
configuration tool (SMS) to set the boot list.

Additional detail regarding startup process


This visual is meant to provide an overview of the AIX startup process. More detail
regarding various steps in the process will be provided in the material that follows.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Loading the boot image


Power ON

Hardware
initialization

Locate boot device


using the bootlist

Architecture? Load boot


RS6K image into
RSPC or CHRP memory
Load SOFTROS
boot logical volume from boot logical
volume

Boot disk
Load boot image from boot logical volume:
Kernel, RAMFS, & base ODM

AIX initialization
phase 1 AIX initialization

Copyright IBM Corporation 2008

Figure 6-3. Loading the boot image AW186.0

Notes:

Introduction
This visual shows the details of the Load the boot image into memory block from the
AIX Startup Process visual.

Locate boot device


System firmware reads the boot list to locate the boot image. During a normal boot, the
location of the boot image is usually a hard drive. Besides hard drives, the boot image
could be on tape or CD-ROM. This is the case when booting into maintenance or
service mode. If working with the Network Installation Manager (NIM), the boot image is
loaded via the network.
To use an alternate boot location, you must invoke the appropriate boot list by pressing
function keys during the boot process. There is more information on boot lists later in
the unit.

6-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty System architecture types


How AIX is loaded into memory depends on the system architecture. Prior to AIX 5L
V5.2, there were three basic hardware architecture types. Beginning with AIX 5L V5.3,
the CHRP architecture is the only architecture supported.

Architecture Processor Description


POWER
This is the original or classic RS/6000
RS6K POWER2
workstation based on the Micro Channel bus
PowerPC
RSPC* PowerPC PowerPC Reference Platform
PowerPC
POWER3
CHRP Common Hardware Reference Platform
POWER4
POWER5
The bootinfo -p command displays the system architecture.
* When you are dealing with PReP systems, RSPC is the name of the boot image type
you will be using.

Hardware initialization
System firmware (also called Read Only Storage (ROS)) initializes the hardware and
loads the boot image into memory. The RSPC and CHRP platforms use an additional
piece of software called SOFTROS to load the boot image. SOFTROS resides in the
boot logical volume (BLV).

BLV
The BLV is a logical volume on the boot disk which contains the boot image. The BLV is
part of rootvg and has a logical volume type attribute of boot.

AIX initialization
When the boot image is loaded into memory, control is transferred to the kernel. This is
the start of AIX initialization.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Booting from other devices


In addition to booting from disk, it is also possible to boot from a CD-ROM, tape, or the
network.

Boot device Description


When booting from a hard disk, the boot image is placed into
Hard disk
a separate logical volume (the boot logical volume)
When booting from CD-ROM or tape, the boot image is
CD-ROM or tape included at the beginning of the media, but is not in a separate
logical volume
When booting from the network, the boot image is loaded into
Network
memory over the network from a file system on the server

6-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Boot disk
Boot disk

hd5
(Boot logical volume)

VGDA Compressed Compressed Rest of the boot disk


kernel RAM filesystem (hd2, hd4, hd9var, etc.)
bootexpand
Boot record
Base ODM
SOFTROS
(CHRP and RSPC)

Copyright IBM Corporation 2008

Figure 6-4. Boot disk AW186.0

Notes:

Boot record
The boot record is a 512-byte block containing the size and location of the boot image.
This is read by ROS to locate the BLV.

SOFTROS
The RSPC and CHRP platforms use the SOFTROS program to perform system
initialization not provided by the hardware ROS (firmware). SOFTROS is not included in
the boot logical volume for RS6K platforms.

Loading the boot image


ROS (RS6K), or SOFTROS (RSPC or CHRP), loads bootexpand, the compressed
kernel, the compressed RAM file system, and the reduced ODM into memory.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

bootexpand
bootexpand uncompresses the kernel and RAM file system.
Compressing the boot image reduces its size to less than half. This saves space on the
boot device and also requires less time to load from the media. When bootexpand is
finished, control is passed to the kernel.
By default, the kernel and the RAM file system are compressed. However, it is possible
to create an uncompressed BLV, in which case, bootexpand is not included.

Kernel
The kernel initializes itself and then executes /etc/init in the RAM file system.
The kernel that is loaded from the boot logical volume is never replaced during the boot
process. The same kernel is used in multiuser mode. A copy of the kernel also exists on
the hard disk (/unix), but this copy is only used for reference by the ps command. If you
need a new kernel, you must re-create the BLV with the new kernel.

RAM file system (RAMFS)


This is a reduced, or miniature, root file system which is loaded into memory and used
as if it were a disk-based file system. The RAM file system is used during rc.boot
phases 1 and 2. The contents of the RAM file system are slightly different depending on
the type of system boot:

Type of boot Contents of RAM file system


Programs and data necessary to access rootvg and
Boot from system hard disk
bring up the rest of AIX
Boot from the installation Programs and data necessary to install AIX or
CD-ROM perform software maintenance
Boot from diagnostics Programs and data necessary to execute stand-alone
CD-ROM diagnostics

RAM file system version of init


The RAM file system version of init is a specialized version used in rc.boot phases 1
and 2 of the boot process. It is /usr/lib/boot/ssh on the boot disk root file system.

Disk version of init


If booting from a hard disk, at the end of rc.boot phase 2, the disk-based root file
system is mounted over the RAM file system and the full disk-based version of init is
run (rc.boot phase 3).

6-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Base ODM


The BLV contains a reduced copy of the ODM. During the boot process, many devices
are configured before hd4 (rootvg) is available. For these devices, the corresponding
ODM files must be stored in the BLV.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Creating the boot image


bosboot command

Creates boot image from disk files

Copies boot image to BLV

Updates boot record

Copyright IBM Corporation 2008

Figure 6-5. Creating the boot image AW186.0

Notes:

Introduction
Initially, the BLV is created as part of the software installation. The BLV may also be
re-created when the base operating system (bos) software is upgraded. However, there
may be circumstances where you will be required to re-create the BLV manually, for
example:
- If the BLV has become corrupted, the system will not boot.
- If a new kernel is needed. Since the system kernel is loaded from the BLV, you must
update the BLV if you wish to use a new kernel.
- If you want to enable kernel debug features or change certain performance-related
variables.

6-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty bosboot command


The bosboot command creates the boot image on the specified boot device. The
bosboot command performs the following functions:
- Creates the base ODM from the full ODM in the root file system
- Creates the RAM file system from files in the root file system
- Compresses the kernel and RAM file system
- Copies the base ODM, RAM file system, system kernel, bootexpand, and
SOFTROS (if CHRP or RSPC) to the boot device
- Updates the boot record if the boot device is a hard disk (bosboot calls mkboot)
For disk boot images, the image is placed in the BLV on the physical boot disk which
you specify. For CD or tape boot images, the image is placed at the beginning of the
media.

RAM file system


bosboot uses prototype files in the root file system to select which files will be copied
into the RAM file system. The name of the prototype file identifies the system
architecture and the type of boot image being created. For example:
- If creating a boot image to boot from the hard disk on a CHRP platform, the
prototype file used would be:
/usr/lib/boot/chrp.disk.proto
- For a CD boot image on CHRP:
/usr/lib/boot/chrp.cd.proto
- For a tape boot image on RSPC:
/usr/lib/boot/rspc.tape.proto
The proto files listed are the core proto files, however many more proto files may be
used, depending on the type of platform (CHRP, RS6K, RSPC) and device (CD, tape,
disk, etc.) for which the boot image is being created.

Kernel
By default, bosboot uses /unix on the root file system for the kernel in the boot image.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

SOFTROS
If the system architecture is CHRP or RSPC, bosboot copies the appropriate version of
SOFTROS from the root file system:

File Description
/usr/lib/boot/aixmon.chrp SOFTROS for CHRP architecture
/usr/lib/boot/aixmon_rspc SOFTROS for RSPC architecture

Syntax
bosboot has a number of options to provide fine-grained control in creating a boot
image. The two most commonly used options are shown below. See the man page for
further details on this command.
bosboot -a -d device

Argument Description
-a Create a complete boot image and write it to the BLV.
Use -d device to specify the physical boot disk (normally
/dev/hdisk0) containing the BLV which you want to update. The
-d device bosboot command will identify the BLV on the boot disk. If the -d
flag is omitted, bosboot uses the boot device used for the last
system boot (bootinfo -b provides this information).

6-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Boot device alternatives


Boot device is the first one found with a boot image in bootlist
If 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
If boot device is a disk boot depends on service key usage
Normal mode boot boot to multi-user
Service mode boot Diagnostic menu
Two types of service mode boots:
Requesting default service bootlist (enter 5 or press F5)
Requesting customized service bootlist (enter 6 or press F6)
HMC advanced boot options support both of the above options
Copyright IBM Corporation 2008

Figure 6-6. Boot device alternatives AW186.0

Notes:

Boot alternatives
The device the system will boot off of is the first one 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 which 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 the Install and Maintenance menu. If the NIM server is configured to serve
out a maintenance image, then the system boots to a Maintenance menu (a sub-menu
of the Install and Maintenance menu). If the NIM server is configured to serve out a
diagnostic image, then we boot to a diagnostic mode.
There are other ways to boot to a diagnostic utility. If the booting device is a CD with a
diagnostic CD in the drive, we boot into that diagnostic utility. If a service mode boot is

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

requested and the booting device is a hard drive with a BLV, then the system boots into
the diagnostic utilities.
The system can be signaled which bootlist to use during the boot process. The default
is to use the normal bootlist and boot in a normal mode. This 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 may be generated from the system
console (this may be an HMC-provided virtual terminal) or from a service processor
attached workstation (such as an HMC) which can simulate a keyboard signal at the
right moment.
The keyboard signal that is used can vary from firmware to firmware, but the most
common is a numeric 5 to indicate the firmware provide service bootlist and a numeric 6
to indicate the customizable service bootlist. Either of these special keyboard signals
will result in a service mode boot, which, as we stated earlier, can cause a boot to
diagnostic mode when booting off a BLV on your hard drive.

6-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

HMC remote access

HMCv6 Use WebSM client


lpar1
HMCv7 Use Web browser with SSL

lpar2

lpar3

user: hscroot
Service
LAN Processor
pw: abc123

Hardware Management
Console (HMC)
Remote Workstation

Copyright IBM Corporation 2008

Figure 6-7. HMC remote access AW186.0

Notes:

HMC remote access


You only need to work through an HMC if you either need to manage the logical
partition within which your AIX operating system is running, or you need to access a
system console for you AIX operating system. For most AIX administration tasks, a
direct connection into your system through telnet or ssh is sufficient.
While you can sit at the HMC to work with a partitioned-managed system, many system
administrators prefer to work from their workstation in their office. The HMC provides
two basic modes for doing this: command line interface through an ssh connection, or a
graphic interface.
Prior to HMCv7, the remote graphic interface used Web-based System Manager
(WebSM). WebSM, while native to an AIX workstation, required the download of a
WebSM Client for MS Windows and Linux workstations.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

With HMCv7 (which supports both POWER5- and POWER6-managed systems), the
remote graphic interface is provided by Web services which can be accessed from a
standard Web browser, such as Internet Explorer or Mozilla.

6-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

HMCv6: Server management

Copyright IBM Corporation 2008

Figure 6-8. HMCv6: Server management AW186.0

Notes:

Introduction
After accessing the HMC, you can reach the HMC Server Management application by
left-clicking to select it from the Server and Partition item in the left navigation panel of
the HMC. You can click the + and - signs to expand or collapse the output.

Functions in the Server Management application


You can use the HMC Server Management application to create system and partition
profiles, activate (start) partitions, shut down and restart operating systems, power on
and off the system, watch the status codes, and open virtual console windows.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Operator Panel Value column


The Operator Panel Value column will display both boot and error codes for both the
managed system and for partitions. To view codes after they appear, go to either the
managed system properties or the partition properties and access the Reference
Codes tab.

6-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

HMCv6: Activate a partition


Partition must be in the Not Activated state
Select the partition profile name, right-click and select Activate

Copyright IBM Corporation 2008

Figure 6-9. HMCv6: Activate a partition AW186.0

Notes:

Introduction
To activate a partition manually, select either the partition name or one of the profiles
that have been created for that partition, right-click and then select Activate.
To activate partitions, the managed system must be powered on and in either the
Standby or the Operating state.

Partition State column


The state column for partitions can have the following values:
- Not Activated: The partition is ready to be activated.
- Running: The partition has finished its boot routines. The operating system may be
performing its own boot routines, or it may be in its normal running state.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Not Available: This partition is not available for use. Logical partitions will be listed
as Not Available if the system is powered off.
- Shutting Down: The partition has been issued the Partition Shut Down command
and is in the process of shutting down.
- Open Firmware: The partition has been activated and started with the open firmware
boot option.

Partition must be in the Not Activated state


Partitions that are in the Not Activated state are available to be activated. You can view
the state of a partition from the HMC interface.

Activating a partition
To activate a partition, select a partition profile name, right-click, and select Activate.
Another window will open which is shown on the next visual.
Alternatively, you can select the partition name, right-click, and select Activate. The
difference with this procedure is that the default partition profile will be selected
automatically in the window that opens.

6-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

HMCv6: Activating partition with console


Select the profile and check the terminal window check box

Copyright IBM Corporation 2008

Figure 6-10. HMCv6: Activating partition with console AW186.0

Notes:

Introduction
The window shown in the visual above opens after you select a partition profile and
choose Activate. It verifies the correct partition name and has the profile selected by
default. You may choose whether or not to open the virtual terminal window as part of
the activation process.
Once you activate a partition and it is running, it is referred to as an active partition.

Complete the activation of a partition


On this window, check to make sure the correct profile name is selected and choose
whether or not you wish to have an Open Terminal (console) on the HMC when the
partition starts. If you do, select this check box, and then click OK.
No errors will occur if you do not open a terminal window. You may open a terminal
window later after the partition is already running.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Hardware Management Console (HMC)

Copyright IBM Corporation 2008

Figure 6-11. Hardware Management Console (HMC) AW186.0

Notes:

Hardware Management Console


The HMC is primarily a desktop PC workstation used to provide several functions for
configuring, installing, and operating System p servers. There is a graphic user
interface (GUI) or a command line interface. The HMC can be used for logical
partitioning management and displaying system resources booting. It also is used for
starting, stopping, resetting, and shutting down a partition.

6-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Working with logical partitions


Booting, starting, and shutting down a logical partition are our focus in this section. By
booting in SMS mode, you can identify the first boot device. Starting the system with the
network adapter selected as the first device, you should be able to install out logical
partition using a NIM server. To access your HMC, it is assumed that your managed
system is attached. Enter the IP- address using the URL protocol https in a Web
browser:
https://##.##.##.##

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

HMCv7: Server management

Copyright IBM Corporation 2008

Figure 6-12. HMCv7: Server management AW186.0

Notes:

Introduction
The HMCv7 graphical interface has a layout which is similar to the WebSM interface, in
that it has a navigation area on the left and a content area on the right. But the details
and the path it takes to do a task is significantly different.

Navigating
The main panel you need to get to, for the types of tasks which we will be performing in
the course, is the one with the partitions for your managed system. To get there, you
need to expand the hierarchy of items under Systems Management in the navigation
area. Once you have expanded Managed Systems, you next need to expand Servers.
This gives you a list of the various managed systems which are managed by this HMC.
You then locate the managed system of interest and click it to bring up the panel with
the LPARs for that system.

6-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

HMCv7: Activate partition operation

Copyright IBM Corporation 2008

Figure 6-13. HMCv7: Activate partition operation AW186.0

Notes:

Introduction
An important column next to the partitions is Status. It will tell us whether the partition is
either Running or Not Activated. Another important column is Reference Code which
displays information about the progress of our system boot operation.
In order to work with a logical partition, you need to select it by clicking the box to the
left of the partition name. After a brief delay, a small menu icon will appear to the right of
the partition name. At this point, you can either use the Tasks area on the lower part of
the window or the menu icon to navigate to the task you want to invoke.
Two of the major menu items are Operations and Console Window, both of which we
can use in this course. If we expand Operations we will see several operation
categories, the most important of which is Activate (or shutdown if the LPAR is
currently in a state of not-active. The Console item is one way to start and stop a virtual
console session with your partition.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

HMCv7: Activate partition options

Copyright IBM Corporation 2008

Figure 6-14. HMCv7: Activate partition options AW186.0

Notes:

Introduction
The Activate Logical Partition window allows you to control how the partition is
activated.
The profiles allow you to specify the resource allocations for the partition.
Another option is to ask for a virtual terminal to be started to allow you to interact with
the system console.
The Advanced... button opens a window which allows you to override the boot mode
which is defined in the profile (usually Normal). Once you have selected the boot mode,
you would click OK, and then click OK in the original Activate Logical Partition window.

6-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

How to fix a corrupted BLV


Boot from bootable
media: Select volume group
CD, tape or NIM that contains hd5

5
or Maintenance

F5 1 Access a Root Volume Group


or
HMC boot option # bosboot -ad /dev/hdisk0
Diagnostic with
default bootlist # shutdown -Fr
or
(F1 or #1
to set SMS
options) Copyright IBM Corporation 2008

Figure 6-15. How to fix a corrupted BLV AW186.0

Notes:

Maintenance mode
If the BLV 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 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 actually a common way to do special boots in
either a Cluster 1600 or a logical partition environment.

Bootlists
The bootlists are set using the bootlist command or the System Management
Services (SMS) program. Most machines support both a normal and service bootlist. If
your model supports this, you will use a function key during bootup to select the
appropriate list. Normally, pressing F5 when you hear the tone that indicates keyboard

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

discovery during bootup forces the machine to use the firmware default bootlist which
lists media devices first. So, it will check for a bootable CD or tape before looking for a
disk to boot.

Default service bootlist


The System p and pSeries systems support up to five boot devices. Some models only
support four. Pressing either F5 or 5 at the right time during boot will invoke the default
service bootlist. The default service bootlist is fixed in the firmware code and has the
following sequence:
1) Diskette drive
2) CD-ROM
3) Internal disk
4) Communication adapter
Using this list ensures that it will first attempt booting with the CD-ROM before any hard
drive.

Use the correct installation CD


Be careful to use the correct AIX installation CD (or NIM spot, or mksysb tape) to boot
your machine. For example, you should not boot an AIX 5L V5.3-00 installed machine
with an AIX 5L V5300-03 installation CD (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 you may experience if there
is a mismatch is an infinite loop of /etc/getrootfs errors when trying to access the
rootvg in maintenance mode.

Recreating the boot logical volume


After booting from CD, tape or NIM an Installation and Maintenance menu is shown
and you can startup the maintenance mode. We will cover this later in this unit. After
accessing the rootvg, you can repair the BLV with the bosboot command. You need to
specify the corresponding disk device, for example hdisk0:
bosboot -ad /dev/hdisk0
It is important that you do a proper shutdown. All changes need to be written from
memory to disk.

6-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The bosboot command requires that the boot logical volume (hd5) exists. If you ever
need to re-create the BLV from scratch (maybe it had been deleted by mistake or the
LVCB of hd5 has been damaged) the following steps should be followed:
1. Boot your machine in maintenance mode:
- From CD or tape press either F5 of 5 or press either F1 or 1 to access the
Systems Management Services (SMS) to select boot device.
2. Remove the old hd5 logical volume:
# 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. Shutdown and reboot the system:
# shutdown -Fr
By using the internal command ipl_varyon -i you can check the state of the boot
record.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working with bootlists


Normal Mode:
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5

Service Mode:
# bootlist -m service -o
cd0
hdisk0 blv=hd5
ent0

# diag
TASK SELECTION LIST
Display Service Hints
Display Software Product Data
Display or Change Bootlist
Gather System Information
Copyright IBM Corporation 2008

Figure 6-16. Working with bootlists AW186.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 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, we boot either from
hdisk0 or hdisk1. To query the bootlist, you can use the -o option.
The second example shows how to display the service mode bootlist.
The bootlist command also allows you to specify IP parameters to use when
specifying a network adapter:

6-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

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 can allow you to boot to either maintenance or
diagnostic using a NIM server without having to use SMS to specify the network adapter
as the boot device.

diag command
The diag command is part of the package bos.rte.diag which allows diagnostic tasks.
One part of these diagnostic tasks allows for displaying and changing bootlists. Working
with the diag command is covered later in the course.

Types of bootlists
The custom bootlist is the normal bootlist set using the bootlist command, the diag
command, or the SMS programs. The normal bootlist is used during a normal boot. The
default bootlist is called when F5 or F6 is pressed during the boot sequence. Most
machines, in addition to the default bootlist and the customized normal bootlist, allow for
a customized service bootlist. This is set using mode service with the bootlist
command. The default bootlist is called when F5 is pressed during boot. The service
bootlist is called when F6 is pressed during boot. (For POWER5 and POWER6 systems,
the numeric 5 or 6 key is pressed.) For machines which 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 F5 (or 5) or F6 (or 6) causes a service boot and a service boot using a BLV will
result in booting to diagnostics, these options are referred to as booting to diagnostic
either with the default bootlist or the stored (customizable) bootlist.
Here is a list summarizing the boot modes and the manual keys associated with them
(this may vary depending on the model of your machine):
- F1 (graphic console) or 1 (ASCII console and newer models): Start System
Management Services
- F5 (graphic console) or 5 (ASCII console and newer models): Start a service boot
using the default service bootlist (which searches the removable media first). If
booting off disk, it will boot to diagnostics.
- F6 (graphic console) or 6 (ASCII console and newer models): Start a service boot
using the customized service bootlist. If booting off of disk, it will boot to diagnostics.
You may find variations on the different models of AIX systems. Refer to the User Guide
for your specific model at:
http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.pseries.doc/
hardware.htm.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Starting System Management Services (SMS)


Reboot or power on the system
Press F1 or 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
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 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 2008

Figure 6-17. Starting System Management Services (SMS) AW186.0

Notes:

SMS ASCII and graphic modes


You can also change the bootlist with the SMS. The SMS programs are integrated into
the hardware (they reside in NVRAM).
The visual shows how to start the SMS in ASCII mode as seen on newer systems.
There is an equivalent graphic menu seen on older systems. During system boot,
shortly before the firmware looks for a boot image, it discovers some basic hardware on
the system. At this point, the LED will usually display a value of E1F1. As the devices
are discovered, either a text name or graphic icon for the resource will display on the
screen. The second item is usually the keyboard. When the keyboard is discovered, a
unique double-beep tone is usually sounded. Having discovered the keyboard, the
system is ready to accept input that will override the default behavior of conducting a
normal boot. But once 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

6-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty you may do during this brief period of time is to press F1 (or 1) key to request that the
system boot using SMS firmware code.

SMS on LPAR systems


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
using this profile. Be sure to check the Open Terminal window when activating.
To start SMS using the Advanced Option for Power On under a POWER5 or POWER6
HMC:
Activate the partition using the SMS boot mode. Do this by clicking Advanced...
when activating the partition. From the Boot Mode list, select SMS. Do not forget to
choose to open a terminal window. The partition will stop at the SMS menu.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working with bootlists in SMS (1 of 2)


System Management Services Multiboot
Main Menu
1. Select Language 1. Select Install/Boot Device
2. Setup Remote IPL 2. Configure Boot Device Order
(Initial Program Load) 3. Multiboot Startup <OFF>
3. Change SCSI Settings
4. Select Console ===> 2
5. Select Boot Options

Configure Boot Device Order


===> 5 1. Select 1st Boot Device
2. Select 2nd Boot Device
3. Select 3rd Boot Device
Select Device Type 4. Select 4th Boot Device
1. Diskette 5. Select 5th Boot Device
2. Tape 6. Display Current Setting
3. CD/DVD 7. Restore Default Setting
4. IDE
5. Hard Drive ===> 1
6. Network
7. None
8. List All Devices

===> 8

Copyright IBM Corporation 2008

Figure 6-18. Working with bootlists in SMS (1 of 2) AW186.0

Notes:

Working with the bootlist


From the System Management Service menu, select Boot Options to work with the
bootlist. The menu differs on the various models and firmware levels, but the one shown
here is fairly standard and is used by the firmware when booting a logical partition.
The next screen is the Multiboot menu. It allows you to either specify a specific device
to boot with immediately, modify the customized bootlists (with the intent of booting
using one of them), or to request that you be prompted at each boot for the device to
boot from (multiboot option).
The focus here is the second option to modify the customized bootlist. The Configure
Bootlist Device Order window allows us to either list or modify the bootlist. You select
which position in the bootlist you wish to modify and then it prompts you to identify the
device you want to use.

6-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Select the device type. If you do not have many bootable devices, it is sometimes
easier to use the List All Devices menu option.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working with bootlists in SMS (2 of 2)


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 6.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )
3. 1 SATA CD-ROM
( loc=U789D.001.DQDWAYT-P1-T3-L8-L0 )
4. None
Select Task
===> 2
SAS 73407 MB Harddisk, part=2 (AIX 6.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )

1. Information
2. Set Boot Sequence: Configure as 1st Boot Device

===> 2
Current Boot Sequence
1. SAS 73407 MB Harddisk, part=2 (AIX 6.1.0)
( loc=U789D.001.DQDWAYT-P3-D1 )
2. None
3. None
4. None
Copyright IBM Corporation 2008

Figure 6-19. Working with bootlists in SMS (2 of 2) AW186.0

Notes:

Selecting bootlist devices


For each position in the bootlist, you can select a device. The location code provided
with each device in the list allows you to uniquely identify devices that otherwise might
be confused. Once you have selected a device, you need to set that selection. You
can repeat this for each position. The other option is to clear a device by specifying
None as an option for that position.
Exiting out of SMS will always trigger a boot attempt. If you have not specified a
particular device for this boot, it will use the bootlist you have set in SMS.

6-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Service processors and boot failures

Boot failure! HMC

553

Internet
Modem

S2
Service Processor
Modem IBM Support
553, ... Center
Automatic transmittal of
boot failure information

Copyright IBM Corporation 2008

Figure 6-20. Service processors and boot failures AW186.0

Notes:

Introduction
The service processor allows actions to occur even when the regular processors are
down.

Calling IBM support center


Service processors can be set up to automatically call an IBM support center (or any
other site) in case of a boot failure. An automatic transmittal of boot failure information
takes place. This information includes LED codes and service request numbers that
describe the cause of the boot failure.
If the data is sent to an IBM Service Center, the information is extracted and placed in a
problem record. IBM Service personnel will call the customer to find out if assistance is
requested.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

In partitioned systems, the HMC receives the information from the service processors
on the systems it manages and the HMC Service Aid component is the utility which
places the call-home to the IBM Service Center.
A valid service contract is a prerequisite for this call-home feature of the service
processor or the HMC service aid.

Other features
Other features of the service processor are:
- Console mirroring to make actions performed by a remote technician visible and
controllable by the customer.
- Remote as well as local control of the system (power on/off, diagnostics,
reconfiguration, and maintenance).
- Run-time hardware and operating system surveillance. If, for example, a CPU fails,
the service processor would detect this, reboot itself automatically, and run without
the failed CPU.
- Timed power on and power off, reboot on crash, and reboot on power loss.

6-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Accessing a system that will not boot


Boot the system from
the BOS CD-ROM, tape
or
network device (NIM)
F5 or 5

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 Backup
Recover data

Copyright IBM Corporation 2008

Figure 6-21. Accessing a system that will not boot AW186.0

Notes:

Introduction
Before discussing LED/LCD codes that are shown during the boot process, we want to
identify how to access a system that will not boot. The maintenance mode can be
started from an AIX CD, an AIX bootable tape (like a mksysb), or a network device that
has been prepared to 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 5L V5.3 and AIX 6.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 it is not, you may need to use a dynamic

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LPAR operation on the HMC to allocate that slot. Remember to rerun cfgmgr to
discover the device after it has been allocated.
- 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 normal -o
- If you want to boot from your internal tape device, you will need to change the
bootlist because the tape device, by default, is not part of the bootlist. For example:
# bootlist -m normal cd0 rmt0 hdisk0
- Insert the boot media (either tape or CD) into the drive.
- Power on the system. The system begins booting from the installation media. After
several minutes, c31 is displayed in the LED/LCD panel which means that the
software is prompting on the console for input (normally 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 can also 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. For this, you would need to
place your systems network adapter in your customized service bootlist before any
other bootable devices, or use SMS to specifically request a boot over that adapter (the
latter option is the most common).
# 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>

6-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Booting in maintenance mode


Welcome to Base Operating System
Installation and Maintenance
Define the 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)

>>> 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 Install from a System Backup

Choice [1]: 1 Copyright IBM Corporation 2008

Figure 6-22. Booting in maintenance mode AW186.0

Notes:

First steps
When booting in maintenance mode, you first have to 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.
As we want to work in maintenance mode, we enter 3 to start up the Maintenance
menu.
From this point, we access our rootvg to execute any system recovery steps that may
be necessary.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working in maintenance mode


Access a Root Volume Group
Type the number for a volume group to display the logical volume information
and press Enter.

1) Volume Group 00c35ba000004c00000001153ce1c4b0 contains these disks:


hdisk1 70006 02-08-00 hdisk0 70006 02-08-00

Choice: 1

Volume Group Information


Volume Group ID 00c35ba000004c00000001153ce1c4b0 includes the following
logical volumes:
hd5 hd6 hd8 hd4 hd2 hd9var
hd3 hd1 hd10opt

Type the number of your choice and press Enter.


1) Access this Volume Group and start a shell
2) Access this Volume Group and start a shell before mounting filesystems

99) Previous Menu

Choice [99]: 1

Copyright IBM Corporation 2008

Figure 6-23. Working in maintenance mode AW186.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. In the example, two volume groups exist on the system. Note
that only the volume group IDs are shown, not the names of the volume groups. Check
with your system documentation to make sure you select the correct disk. Do not rely
too much on the physical volume name, but more on the PVID, VGID, or SCSI ID.
After selecting the volume group, it will show the list of logical volumes contained in the
volume group. This is how you confirm you have selected rootvg. 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

6-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Access this Volume Group and start a shell


When you choose this selection, the rootvg will be activated (varyonvg command), and
all file systems belonging to the rootvg will be mounted. A shell will be started which can
be used to execute any system recovery steps.
Typical scenarios where this selection must be chosen include:
- Changing a forgotten root password
- Re-creating the BLV
- Changing a corrupted bootlist

Access this Volume Group and start a shell before mounting file
systems
When you choose this selection, the rootvg will be activated, but the file system
belonging to the rootvg will not be mounted.
A typical scenario where this selection is chosen is when a corrupted file system needs
to be repaired 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.
A corrupted transaction log must be reinitialized using the logform command, which is
only possible when no file system is mounted. After initializing the log device, you need
to do a file system repair for all file systems that use this transaction log. Beginning with
AIX 5L V5.1 you have to explicitly specify the file system type (JFS or JFS2):
# 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
# exit
Keep in mind that US keyboard layout is used, but you can use the retrieve function by
using:
set -o emacs or set -o vi

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Progress and reference codes


Progress Codes
System Reference Codes (SRCs)
Service Request Numbers (SRNs)
Obtained from:
Front panel of system enclosure
HMC or IVM (for logically partitioned systems)
Operator console message or diagnostics (diag utility)
Online hardware and AIX documentation available at:
http://publib.boulder.ibm.com/infocenter/systems
Search for: service support troubleshooting
Customer Service, Support, and Troubleshooting manual
Covers procedures and lists of reference codes
For AIX progress codes, search for AIX Progress Codes
For AIX message codes, click on Message Center
RS/6000 Eserver pSeries Diagnostic Information for Multiple
Bus Systems (SA38-0509)
Copyright IBM Corporation 2008

Figure 6-24. Progress and reference codes AW186.0

Notes:

Introduction
AIX provides progress and error indicators (display codes) during the boot process.
These display codes can be very useful in resolving startup problems. Depending on
the hardware platform, the codes are displayed on the console and the operator panel.
With AIX 5L V5.2 and later, the operator panel also displays some text messages (such
as AIX is starting), during the boot process. For the purpose of this discussion,
we will focus on the numeric codes and their meanings.

Operator panel
For non-LPAR systems, the operator panel is an LED display on the front panel.
POWER4-, POWER5-, and POWER6-based systems can be divided into multiple
LPARs. In this case, a system-wide LED display still exists on the front panel. However,

6-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty the operator panel for each LPAR is displayed on the screen of the HMC. The HMC is a
separate system which is required when running multiple LPARs.

Progress codes and other reference codes


Reference codes can have various sources:
- Diagnostics:
Diagnostics, or error log analysis, can provide Service Request Numbers (SRNs)
which can be used to determine the source of a hardware or operating system
problem.
- Hardware initialization:
System firmware sends boot status codes (called firmware checkpoints) to the
operator panel. Once the console is initialized, the firmware can also send 8-digit
error codes to the console.
- AIX initialization:
The rc.boot script and the device configuration methods send progress and error
codes to the operator panel.
Codes from the hardware/firmware or AIX initialization scripts fall into two categories:
- Progress Codes: These are checkpoints indicating the stages in the initial program
load (IPL) or boot sequence. They do not necessarily indicate a problem unless the
sequence permanently stops on a single code or a rotating sequence of codes.
- System Reference Codes (SRCs): These are error codes indicating that a problem
has originated in hardware, Licensed Internal Code (firmware), or in the operating
system.

Documentation
Note: all information on Web sites and their design is based upon what is available at
the time of this course revision. Web site URLs and the design of the related Web
pages often change.
Online hardware documentation and AIX message codes are available at:
http://publib.boulder.ibm.com/infocenter/systems
- The content area has popular links, such as the Systems hardware service,
support, and troubleshooting link which take you to a page where you can
download the PDF for the Customer Service, Support, and Troubleshooting manual.
- The content area also has links to finder tools, such as the Systems Hardware code
finder.
- If there is no link for what you need, the search for field can be vary useful. For
example, if you want to see the latest documentation on the AIX progress codes,
simply type in your request and you will find a link to a list of codes in the search
result list.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- A search for the AIX message center provides access to not only codes, but the
messages that commands display when there is a problem.

In addition to the support site we discuss here, there is another infocenter that provides
hardware documentation:
http://publib.boulder.ibm.com/infocenter/pseries
This takes you to the IBM System p and AIX Information Center.
In the left hand navigation area, there are two links.
- The first link represents the default page which, in the content area, has useful links
for System p hardware information. For example, by clicking Support for System p
products, you will be taken to the IBM System p and AIX Information Center Web
page. From there, you would identify your hardware and software combination
(System p and AIX), and then click go.
- The second link in the navigation area is titled, at the time of this writing, System p
Hardware. In reality, clicking this link expands the navigation list to provide access
to a list of links for older pSeries and RS/6000 systems.
- Other useful links in the navigation area are:
AIX Documentation
AIX Resources
AIX Message Center

There is a hardcopy book (also available online and as a downloadable PDF file) called
RS/6000 Eserver pSeries Diagnostic Information for Multiple Bus Systems
(SA38-0509). Chapter 30, AIX diagnostic numbers and location codes provides
descriptions for the numbers and characters that display on the operator panel and
descriptions of the location codes used to identify a particular item.

6-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Firmware checkpoints and error codes

LED/LCD
Monitor display
20EE000B F22

"Boot record "No memory found"


Error"

Copyright IBM Corporation 2008

Figure 6-25. Firmware checkpoints and error codes AW186.0

Notes:

Firmware checkpoints
AIX systems use the LED/LCD display to show the current boot status. These boot
codes are called firmware checkpoints.

Error codes
If errors are detected by the firmware during the boot process, an error code is shown
on the monitor. For example, the error code 20EE000B indicates that a boot record
error has occurred.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Firmware fixes
The following types of firmware (Licensed Internal Code) fixes
are available:
Server firmware
Power subsystem firmware
I/O adapter and device firmware
Types of firmware maintenance:
Disruptive (always for upgrades to new version/release)
Concurrent (only if using HMC interface for service pack)
Firmware maintenance can be done:
Using the HMC
Through the operating system (service partition)
Systems with an HMC should normally use the HMC
Firmware maintenance through the operating system is
always disruptive
Copyright IBM Corporation 2008

Figure 6-26. Firmware fixes AW186.0

Notes:

Types of firmware fixes


The following types of firmware (Licensed Internal Code (LIC)) fixes are available:
- Server firmware is the code that enables hardware, such as the service processor
- Power subsystem firmware is the code that enables the power subsystem hardware
in the 57x and 59x model servers
- I/O adapter and device firmware is the code that enables hardware such as Ethernet
PCI adapters or disk drives

Server firmware
Server firmware is the part of the LIC that enables hardware, such as the service
processor. Check for available server firmware fixes regularly, and download and install
the fixes, if necessary. Depending on your service environment, you can download,
install, and manage your server firmware fixes using different interfaces and methods,

6-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty including the HMC or by using functions specific to your operating system. However, if
you have a 57x or 59x model server, or you have a pSeries server that is managed by
an HMC, you must use the HMC to install server firmware fixes.

Power subsystem firmware


Power subsystem firmware is the part of the LIC that enables the power subsystem
hardware in the 57x or 59x model servers. You must use an HMC to update or upgrade
power subsystem firmware fixes.

I/O adapter and device firmware fixes


I/O adapter and device firmware is the part of the LIC that enables hardware, such as
Ethernet PCI adapters or disk drives.
If you use an HMC to manage your server, you can use the HMC interface to download
and install your I/O adapter and device firmware fixes. If you do not use an HMC to
manage your server, you can use the functions specific to your operating system to
work with I/O adapter and device firmware fixes.

Concurrent versus disruptive maintenance


For concurrent firmware maintenance, LIC updates are performed concurrently while
managed systems and operating systems continue to run.
For disruptive LIC updates or upgrades, a complete system shutdown and restart is
required before the update or upgrade takes effect on the managed system.
Disruptive updates can be immediate or deferred.
- Immediate - load and activate, with a system shutdown (this is the preferred, and
default, option for disruptive updates)
- Deferred - load the update concurrently, but activate it later
Not all fixes can be done in concurrent mode. For example, the following kind of
updates will be disruptive:
- Those which cannot be activated until the hardware can be re-initialized
- Any changes which affect the code that is loaded into the partitions

Where the fixes can be installed


On a POWER5 system, you can choose to install fixes for LIC through either the HMC
or the operating system. For managed systems that use an HMC, the default is to install
fixes through the HMC.

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Getting firmware updates from the Internet


Get firmware updates from IBM at:
http://techsupport.services.ibm.com/server/mdownload

Update firmware through:


Hardware Management Console

For more information, go to the online Performing Licensed


Internal Code Maintenance course:
http://www-1.ibm.com/servers/resourcelink
Select Education
Select eServer i5 and eServer p5
or System p POWER6 hardware
Select Performing Licensed Internal Code Maintenance

Copyright IBM Corporation 2008

Figure 6-27. Getting firmware updates from the Internet AW186.0

Notes:

Where to get the firmware fixes


Firmware fixes can be obtained at the URL:
http://techsupport.services.ibm.com/server/mdownload
After downloading the package follow the instructions in the README file.

Where to install from


If your system has an HMC, you can use the Web-based System Manager from your
HMC to install the firmware fixes.
If not using an HMC, then you would need to use the Service Processor menus.

For more information


An online course is available called Performing Licensed Internal Code Maintenance.

6-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty To get to this course, go to:


http://www-1.ibm.com/servers/resourcelink
You will need to register. Once registered:
1. Select Education
2. Select eServer i5 and eServer p5
3. Select Performing Licensed Internal Code Maintenance
A newer version of the course also available to you:
1. Select Education
2. Select System p POWER6 hardware
3. Select Performing Licensed Internal Code Maintenance

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint (1 of 2)
1. True or False? You must have AIX loaded on your system to use
the System Management Services programs.
2. Your AIX system is currently powered off. AIX is installed on
hdisk1 but the boot list is set to boot from hdisk0. How can you
fix the problem and make the machine boot from hdisk1?
__________________________________________________
__________________________________________________
3. Your machine is booted and at the # prompt.
a) What is the command that will display the boot list?
______________________________
b) How could you change the boot list?
______________________________
4. What command is used to build a new boot image and write it to
the boot logical volume?
_____________________________________
5. What script controls the boot sequence? _________________
Copyright IBM Corporation 2008

Figure 6-28. Checkpoint (1 of 2) AW186.0

Notes:

6-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint (2 of 2)
6. True or False? During the AIX boot process, the AIX kernel is
loaded from the root file system.
7. True or False? A service processor allows actions to occur even
when the regular processors are down.
8. List the five components of the boot logical volume (assume a
CHRP system). ______________________
________________________________________________
9. How do you boot an AIX machine in maintenance mode?
________________________________________________
________________________________________________
10. Your machine keeps rebooting and repeating the POST.
What could be the reason for this?
___________________________________________________
_____________________________________________

Copyright IBM Corporation 2008

Figure 6-29. Checkpoint (2 of 2) AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exercise: System boot: Hardware

Exercise 5

Copyright IBM Corporation 2008

Figure 6-30. Exercise: System boot: Hardware AW186.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

6-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

During the boot process, the kernel from the boot image is
loaded into memory
Boot devices and sequences can be updated via 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 using the
bosboot command
LED codes produced during the boot process can be used
to diagnose boot problems

Copyright IBM Corporation 2008

Figure 6-31. Unit summary AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 6. System boot: Hardware 6-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

6-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 7. System boot: Software

What this unit is about


This is the second of two units that deal with the AIX startup process.
This unit describes the later stages of the process.

What you should be able to do


After completing this unit, you should be able to:
Describe the functions of rc.boot, phases 1, 2, and 3
Describe how devices are configured during AIX initialization
Interpret LED codes and console messages displayed during boot
Describe the use of the alog facility
List the basic features of system hang detection
Describe the System Resource Controller (SRC)
Analyze and solve boot problems

How you will check your progress


Accountability:
Checkpoint questions
Exercise

References
Online AIX Version 6.1 Operating system and device
management
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

SA38-0509 RS/6000 Eserver pSeries Diagnostic Information for


Multiple Bus Systems
SG24-5496 Problem Solving and Troubleshooting in AIX 5L

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:
Describe the functions of rc.boot, phases 1, 2, and 3
Describe how devices are configured during AIX
initialization
Interpret LED codes and console messages displayed
during boot
Describe the use of the alog facility
List the basic features of system hang detection
Describe the System Resource Controller (SRC)
Analyze and solve boot problems

Copyright IBM Corporation 2008

Figure 7-1. Unit objectives AW186.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.
This unit describes the functions performed by rc.boot during AIX initialization and
provides practice with troubleshooting boot problems. In this unit, we will discuss most,
but not all, of the functions performed by rc.boot. Further details can be obtained
through study of the rc.boot script itself.

7-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX startup process


Power ON
System boot: Hardware
Hardware initialization

Low level configuration tool


Locate boot device using Low level y Hardware status
normal bootlist (NVRAM) config tool?
Yes
y Hardware configuration
y Bootlist configuration
Load boot image into memory
Yes No

AIX Initialization
Normal mode Locate boot device using
Normal
(Multiuser mode) mode?
No
service bootlist (NVRAM)
rc.boot
Phase 1
System boot:
rc.boot
Phase 2
Software Service mode
(Boot from alternate media)
init starts
y Diagnostics CD-ROM
processes
y Installation CD-ROM
from /etc/inittab
y mksysb tape
rc.boot y etc.
Phase 3

Other processes started


from /etc/inittab

Copyright IBM Corporation 2008

Figure 7-2. AIX startup process AW186.0

Notes:

Introduction
In the previous unit, we discussed the process of loading an AIX boot image from the
boot logical volume. In this unit, we will cover AIX initialization. The focus is on rc.boot,
phases 1, 2, and 3.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

AIX initialization overview


Boot loader loads kernel and RAM file system
Passes control to kernel

Kernel initializes various data structures,


and mounts the RAM file system

Kernel starts RAM file system version of init

init runs rc.boot 1 Phase 1: Configure base devices

init runs rc.boot 2 Phase 2: Activate rootvg and


mount rootvg file systems

Kernel starts rootvg version of init


init reads /etc/inittab

init runs rc.boot 3 Phase 3: Configure remaining devices

init continues starting processes as


defined in /etc/inittab Complete transition to multiuser mode
Copyright IBM Corporation 2008

Figure 7-3. AIX initialization overview AW186.0

Notes:

Kernel initialization
After being loaded into memory by the boot loader, the kernel initializes itself, mounts
the RAM file system, and starts the /etc/init process.

RAM file system version of init


The RAM file system version of init is a specialized version
(/usr/lib/boot/ssh on the boot disk root file system) which runs rc.boot 1 and rc.boot
2.

rc.boot
rc.boot is a script that controls AIX initialization. The rc.boot script exists on both the
RAM file system and the disk root file system (it is copied to the RAM file system
structure within the boot image by the bosboot command).

7-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty rc.boot phase 1


The RAM file system version of init calls rc.boot 1, which configures the base
devices. The base devices are those devices required for the kernel to access the
rootvg file systems.

rc.boot phase 2
The RAM file system version of init calls rc.boot 2, which activates rootvg and then
mounts the rootvg file systems (/, /usr, and /var).

rootvg version of init


The kernel now restarts init using the version from the disk-based root file system.
init reads instructions from /etc/inittab.

rc.boot phase 3
init runs the sysinit action first:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1
rc.boot 3 configures the remaining devices.

Completion of AIX initialization


init continues reading from /etc/inittab, starting the remaining processes to complete
the transition to multiuser mode.

Type of boot
AIX supports booting from hard disk, CD-ROM, tape, and from a network server. In this
lesson, we focus on booting from a hard disk.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rc.boot 1
Start rc.boot 1
rootvg is not active !

echo "rc.boot: starting disk boot \


process" > /tmp/boot_log 1. Startup logging

548 Failure restbase 2. Copy ODM from boot image to the


RAM file system

510

cfgmgr -f 3. Configure base devices using ODM


files in the RAM file system

511

bootinfo -b 4. Determine boot device

Devices to activate
Display End rc.boot 1
rootvg are configured !
code
Copyright IBM Corporation 2008

Figure 7-4. rc.boot 1 . AW186.0

Notes:

Introduction
The init process started from the RAM file system executes the boot script rc.boot 1.
The purpose of phase 1 is to configure the base devices so that rootvg can be
activated in phase 2.

Display codes
The principle progress and error codes displayed by rc.boot are shown in the visual in
dotted-line boxes. Error codes are shown to the side with the word failure (example:
548). Progress codes are shown in-line in the process flow (examples: 510 and 511).

7-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 1. Startup logging


rc.boot creates a temporary log file in /tmp in the RAM file system. As the boot
proceeds, rc.boot (and some of the programs that it calls) log progress information
into this temporary file. Later in the boot process when the disk-based file systems are
mounted, this file is saved to the boot log using the alog command.

2. Copy ODM from boot image to the RAM file system


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 548 is shown.

3. Configure base devices


When restbase has completed successfully, the configuration manager (cfgmgr) is run
with the option -f (first). cfgmgr reads the Config_Rules ODM class and executes all
methods that have phase=1 set. Phase 1 configuration methods configure the base
devices so that the rootvg can be activated in rc.boot phase 2.
Base devices are all devices that are necessary to access the rootvg. If the rootvg is
stored on a hdisk0, all devices from the motherboard to the disk itself must be
configured in order to be able to access the rootvg.

4. Determine boot device


At the end of rc.boot 1, the system determines the last boot device by calling:
bootinfo -b
The LED shows 511.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rc.boot 2 (part 1)
Start rc.boot 2

551
552
Failure ipl_varyon -v 1. Activate rootvg
552
556
517

Failure
555 fsck -fp /
Failure 2. Mount root
557 mount -f /

/../usr/sbin/fsck -fp /usr


Failure /../usr/sbin/mount /usr 3. Mount /usr
518

/../usr/sbin/fsck -fp /var


Failure 4. Mount /var
518 mount /var

copycore
5. Copy dump (if required) and
umount /var
unmount /var

Display swapon /dev/hd6 6. Start paging on primary paging


code device
Copyright IBM Corporation 2008

Figure 7-5. rc.boot 2 (part 1) AW186.0

Notes:

Introduction
The main purposes of phase 2 are to:
- Mount the disk-based file systems
- Update the disk-based file systems with information from the RAM file system
For the purposes of discussion, we have artificially divided rc.boot phase 2 into two
parts.

1. Activate rootvg
The rootvg is varied on with a special version of the varyonvg command (ipl_varyon)
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.

7-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 2. Mount root


The root file system is checked by fsck. The option, -f, means that the file system is
checked only if it was not unmounted cleanly during the last shutdown. This improves
the boot performance. If the check fails, LED 555 is shown.
The root 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.

Accessing the RAM file system


The disk-based root file system is now mounted over the RAM file system. Ordinarily,
this would prevent access to the contents of the RAM file system. However, AIX has
special syntax built into the logical file system layer in the kernel which allows rc.boot
to access both the RAM file system and the disk-based file system:
/../ points to the RAM file system root directory.
/ points to the disk-based root directory.

3. Mount /usr
The /usr disk-based file system (normally /dev/hd2) is checked by fsck. It is then
mounted to provide access to the complete command set. If the mount fails, LED 518 is
displayed and the boot stops.
The script uses the RAM file system copy of the fsck and mount commands
(/../usr/sbin/fsck and /../usr/sbin/mount). Since hd2 is not yet mounted, there is no
access to the disk-based usr commands.

4. Mount /var
Next, the /var file system is checked (fsck) and mounted. This is necessary for the next
step: copying the dump.

5. Copy dump
The copycore command checks for the presence of a system dump in the primary
paging space (hd6)). If a dump exists in the paging space device, it will be copied from
the dump device, /dev/hd6, to the copy directory which is, by default, the directory
/var/adm/ras. The /var file system is unmounted when copycore finishes.

6. Start paging
Next, swapon is run to start paging on the primary paging space (normally hd6).

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

RAM file system and rootvg (part 1)


RAM file system

dev etc usr var

objrepos

rootvg

hd4 (root)

dev etc usr var


objrepos
hd2 (usr)

bin lib sbin etc


hd9var (var)

adm tmp spool


ras copycore
hd6 (paging)

Copyright IBM Corporation 2008

Figure 7-6. RAM file system and rootvg (part 1) AW186.0

Notes:

Status of the RAM file system and rootvg


The visual shows the status of the RAM file system and rootvg after the completion of
the first part of phase 2:
- hd4 is mounted on to the root directory in the RAM file system
- hd2 is mounted on to /usr in hd4
- hd9var is mounted temporarily on to /var in hd4 so that copycore can be run, then
hd9var is unmounted

7-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

rc.boot 2 (part 2)
(continued)

cp /../etc/objrepos/Cu* /etc/objrepos 7. Copy ODM files from the


RAM file system to disk

usr/lib/boot/mergedev 8. Copy /dev from the RAM


file system to disk
517

518 Failure mount /var 9. Mount /var

cat /../tmp/boot_log | alog -q -t boot 10. Update alog boot log

553

End rc.boot 2

Display init exits 11. Kernel frees memory used


code Kernel invokes newroot() for RAM file system
Copyright IBM Corporation 2008

Figure 7-7. rc.boot (part 2) AW186.0

Notes:

Introduction
After the paging space /dev/hd6 has been made available, rc.boot 2 continues with
the tasks shown in the visual:

7. Copy ODM files


All of the customized ODM databases are copied from /../etc/objrepos (the RAM file
system) to /etc/objrepos (the disk-based root file system). At this stage both ODMs (in
the boot image and hd4) are in sync.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

8. Copy /dev
The mergedev command copies all device files from /dev on the RAM file system to
/dev in the disk-based file system.

9. Mount /var
The disk-based /var file system is mounted.

10. Update alog boot log


During phases 1 and 2, rc.boot has been logging information about the startup
process in a temporary file. Now that the disk-based /var file system is mounted, this
information is saved to the alog boot file (which resides in /var/adm/ras).
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.

11. Kernel frees the RAM file system


When rc.boot 2 is finished, the /, /usr and /var file systems in rootvg are active.
When rc.boot 2 exits, the RAM file system version of init also exits. When process 1
(init) exits, the kernel responds by invoking the newroot() function. This function
forces the unmount of the RAM file system and the memory is returned to the free pool.
The kernel then restarts init, but now it is using the disk-based version of init.

7-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

RAM file system and rootvg (part 2)


RAM file system

dev etc usr var

mergedev
objrepos

cp Cu*
rootvg

hd4 (root)

dev etc usr var


objrepos
hd2 (usr)

bin lib sbin etc


hd9var (var)

adm tmp spool


ras copycore
hd6 (paging)

Copyright IBM Corporation 2008

Figure 7-8. RAM file system and rootvg (part 2) AW186.0

Notes:

Status of the RAM file system and rootvg


The visual shows the status of the RAM file system and rootvg just before rc.boot
phase 2 exits:
- hd4 is mounted on the root directory of the RAM file system
- hd2 is mounted on /usr in hd4
- rc.boot used mergedev to copy device files from /dev in the RAM file system to
/dev in hd4
- rc.boot copied all the customized databases (Cu*) from /etc/objrepos in the RAM
file system to /etc/objrepos in hd4
- hd9var is remounted on /var in hd4

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rc.boot 3 (part 1)
553

Kernel starts rootvg version of init

init reads sysinit entry from


/etc/inittab and starts rc.boot 3

fsck fp /tmp
mount /tmp 1. Mount /tmp file system

syncvg -v rootvg & 2. Synchronize rootvg in the


background
Normal: cfgmgr p2 3. Configure all remaining
Service: cfgmgr p3 devices (non-base devices)

cfgcon 4. Configure console

c31 c32 c33 c34


5. Update the ODM in the boot
Display logical volume
savebase
code
Copyright IBM Corporation 2008

Figure 7-9. rc.boot 3 (part 1) AW186.0

Notes:

Introduction
At the end of phase 2, the kernel restarts init, now using the disk-based version. init
executes commands from /etc/inittab. The first command executed is the sysinit
entry:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1
When rc.boot 3 completes, init continues executing commands from /etc/inittab.
For the purposes of this discussion, we have artificially divided rc.boot phase 3 into
two parts.

553 code
Before rc.boot phase 2 exits, it displays status code 553 on the LED. If the system
hangs and this code is still displayed, it usually indicates a problem with /etc/inittab.

7-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 1. Mount /tmp


The /tmp file system is checked (fsck) and mounted.

2. Synchronize rootvg
The rootvg is synchronized. If there are any stale partitions, syncvg will update them.
Stale partitions could occur if volume(s) in rootvg are mirrored and a disk used as a
copy in the mirrored volume(s) had been inactive. Since synchronization can take some
time, it is started in the background (&) so that rc.boot can proceed while rootvg is
being synchronized.

3. Configure remaining (non-base) devices


The configuration manager is called again. If the machine was booted in normal mode,
cfgmgr is called with option -p2 (phase 2). If the machine supports service mode, and
service mode was selected, cfgmgr is called with option -p3 (phase 3).
The cfgmgr command reads ODM class Config_Rules and executes all rules which
have phase=2 (-p2) or phase=3 (-p3). All remaining devices that are not base devices
are configured at this time.

4. Configure console
The console is configured by cfgcon. It displays one of the following display codes:
Display code Description
Console has not been selected. cfgcon prompts user to select
c31
console.
Console is an lft terminal. lft (low function terminal) is the device
c32
name for the standard graphics console.
c33 Console is a tty.
c34 Console is a disk file.
If CDE is specified in /etc/inittab, the CDE will be started and you get a graphical boot
on the console.

5. Update ODM
The savebase command is run to synchronize the ODM in the boot logical volume with
the ODM from the root file system.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rc.boot 3 (part 2)

syncd 60 6. Start the file system


synchronization daemon
errdemon 7. Start the error logging facility

Turn off LEDs 8. Turn off the LED display

rm -f /etc/nologin 9. Remove /etc/nologin


10. Check for missing devices
Yes
Devices with
Send warning message to
chgstatus=3 in
CuDv? console and boot log.

No
Send System initialization
completed to console and boot log 11. Exit rc.boot 3
rc.boot exits

init continues executing 12. init continues


commands from /etc/inittab
Copyright IBM Corporation 2008

Figure 7-10. rc.boot 3 (part 2) AW186.0

Notes:

6. Start the file system synchronization daemon


The syncd daemon is started. AIX does not write file system data directly to disk. To
improve performance, file system writes are written to a cache in memory (called the
buffer cache). The syncd daemon writes the data from the disk cache to the appropriate
disk(s). The argument 60, causes syncd to write the cache to disk every 60 seconds.

7. Start the error logging facility


The errdemon command is started. It provides error logging and reporting capabilities
and is the normal logging facility in multiuser mode.

8. Turn off the LEDs


The status/error indicators are turned off.

7-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9. Remove /etc/nologin


During the shutdown process, shutdown creates the /etc/nologin file to prevent any new
logins during the shutdown. Normally, shutdown removes the file before halting.
However, if some problem occurred during the shutdown process, then the file may still
exist. This step makes sure that /etc/nologin does not exist so that users will be able to
login.

10. Check for missing devices


The rc.boot command checks the CuDv ODM class for devices that were previously
configured, but were not present during this boot (chgstatus=3). If any are found, the
following message is displayed on the console:
A device that was previously detected could not be found. Run diag -a.
For example, this could happen if external devices are not powered on during system
boot.

11. Exit rc.boot 3


The rc.boot 3 script is finished. The last message,
System initialization completed
is displayed (and sent to the boot log) and rc.boot exits.

12. init continues


The init script continues starting processes from /etc/inittab, completing the transition
to multiuser mode.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rc.boot summary
Command Executed Primary actions Config_Rules
from phase
rc.boot 1 RAM file system restbase
cfgmgr -f 1

rc.boot 2 RAM file system ipl_varyon


Mount rootvg
file systems
mergedev
Copy ODM files
rc.boot 3 rootvg cfgmgr -p2 2 = normal
OR
cfgmgr -p3 3 = service
savebase

Copyright IBM Corporation 2008

Figure 7-11. rc.boot summary AW186.0

Notes:

rc.boot 1
Phase 1 of rc.boot is run from the RAM file system. The primary actions are:
- The base ODM is restored from the boot image to the RAM file system (restbase)
- The base devices are configured using the phase 1 methods from Config_Rules
(cfgmgr -f)

7-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty rc.boot 2
Phase 2 is also started from the RAM file system. The primary actions are:
- The rootvg is activated (ipl_varyon)
- The rootvg file systems are mounted
- /dev files (which may have been modified by cfgmgr -f) are copied to /dev in the
rootvg (mergedev)
- ODM files (which may have been modified by cfgmgr -f) are copied to
/etc/objrepos in the rootvg

rc.boot 3
Phase 3 is started by init from /etc/inittab in the rootvg. The primary actions are:
- Configure the remaining devices: cfgmgr -p2 or cfgmgr -p3
- Save any ODM changes to the boot logical volume (savebase)

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Boot problem management


Check LED User Action
Boot list wrong? LED codes cycle Power on, press F1, select Multi-Boot, select the
correct boot device.
/etc/inittab corrupt? 553 Access the rootvg. Check /etc/inittab (empty,
/etc/environment corrupt? missing or corrupt?). Check /etc/environment.
Boot logical volume or 20EE000B Access the rootvg. Re-create the BLV:
boot record corrupt? # bosboot -ad /dev/hdiskx
JFS/JFS2 log corrupt? 551, 552, 554, 555, Access rootvg before mounting the rootvg file
556, 557 systems. Re-create the JFS/JFS2 log:
# logform -V jfs /dev/hd8 or
# logform -V jfs2 /dev/hd8
Run fsck afterwards.
Superblock corrupt? 552, 554, 556 Run fsck against all rootvg file systems. If fsck
indicates errors (not an AIX file system), repair the
superblock as described in the notes.
rootvg locked? 551 Access rootvg and unlock the rootvg:
# chvg -u rootvg
ODM files missing? 523 - 534 ODM files are missing or inaccessible. Restore the
missing files from a system backup.
Mount of /usr or /var failed? 518 Check /etc/filesystem. Check network (remote
mount), file systems (fsck) and hardware.
Copyright IBM Corporation 2008

Figure 7-12. Boot problem management AW186.0

Notes:

Introduction
The visual shows some common boot errors that might happen during the AIX software
boot process.

Boot list wrong?


If the boot list is wrong then the system cannot boot. This 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.

7-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty /etc/inittab corrupt? /etc/environment corrupt?


An LED of 553 usually indicates a corrupted /etc/inittab file, but in some cases a bad
/etc/environment file may also lead to a 553 LED. To fix this problem, boot in
maintenance mode and check both files. Consider using a mksysb to retrieve these files
from a backup tape.

Boot logical volume or boot record corrupt?


The next thing to try if your machine does not boot, is to check the BLV.
To fix a corrupted BLV, boot in maintenance mode and use the bosboot command:
# bosboot -ad /dev/hdisk0

JFS/JFS2 log corrupt?


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
exit
For JFS2:
# logform -V jfs2 /dev/hd8
# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
exit
The logform command initializes a new JFS transaction log and this may result in the
loss of data because JFS transactions may be destroyed. But, your machine will boot
after the JFS log has been repaired.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Superblock corrupt?
Another thing 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 corrupt superblock in
the file system.
Each file system has two super blocks: one in logical block 1, and a copy in logical block
31. To copy the superblock from block 31 to block 1 for the root file system, issue the
following command:
# dd count=1 bs=4k skip=31 seek=1 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 may lead to a hanging system.
To unlock the rootvg, boot in maintenance mode and access the rootvg with file
systems. Issue the following command to unlock the rootvg:
# chvg -u rootvg

ODM files missing?


If you see LED codes in the range 523 to 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.

7-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Configuration Manager
Predefined

PdDv
PdAt
PdCn

cfgmgr Config_Rules

Customized Methods
CuDv Define
CuAt Device
load
Configure
Driver
CuDep Change
CuDvDr Unconfigure
unload
CuVPD Undefine
Copyright IBM Corporation 2008

Figure 7-13. Configuration Manager AW186.0

Notes:

When the configuration manager is invoked


During system boot, the configuration manager is invoked to configure all devices that
are detected as well as any device whose device information is stored in the
configuration database. At run time, you can configure a specific device by directly
invoking the cfgmgr command.
If you encounter problems during the configuration of a device, use:
cfgmgr -v
With this option, cfgmgr shows the devices as they are configured.

Automatic configuration
Many devices are automatically detected by the configuration manager. For this to
occur, device entries must exist in the predefined device object classes. The

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

configuration manager uses the methods from PdDv to manage the device state, for
example, to bring a device into the defined or available state.

Installing new device support


The cfgmgr command can be used to install new device support. If you invoke cfgmgr
with the -i flag, the command attempts to install device software support for each
newly detected device.
High-level device commands like mkdev invoke methods and allow the user to add,
delete, show, or change devices and their attributes.

Define method
When a device is defined through its define method, the information from the predefined
database for that type of device is used to create the information describing the
device-specific instance. This device-specific information is then stored in the
customized database.

Configure method steps


The process of configuring a device is often device-specific. The configure method for a
kernel device must:
1. Load the device driver into the kernel
2. Pass device-dependent information describing the device instance to the driver
3. Create a special file for the device in the /dev directory
Of course, many devices are not physical devices, such as logical volumes or volume
groups. These are called pseudodevices. For this type of device, the configured state is
not as meaningful. However, it still has a configuration method that simply marks the
device as configured or performs more complex operations to determine if there are any
devices attached to it.

Configuration order
The configuration process requires that a device be defined or configured before a
device attached to it can be defined or configured. At system boot time, the
configuration manager configures the system in a hierarchical fashion. First, the
motherboard is configured, then the buses, then the adapters that are attached, and
finally the devices that are connected to the adapters. The configuration manager then
configures any pseudodevices (volume groups, logical volumes, and so forth) that need
to be configured.

7-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Config_Rules object class

phase seq boot_mask rule

1 10 0 /etc/methods/defsys cfgmgr -f
1 12 0 /usr/lib/methods/deflvm

2 10 0 /etc/methods/defsys
2 12 0 /usr/lib/methods/deflvm
2 19 0 /etc/methods/ptynode cfgmgr -p2
2 20 0 /etc/methods/startlft (Normal boot)

3 10 0 /etc/methods/defsys
3 12 0 /usr/lib/methods/deflvm
3 19 0 /etc/methods/ptynode cfgmgr -p3
3 20 0 /etc/methods/startlft
(Service boot)
3 25 0 /etc/methods/starttty

Copyright IBM Corporation 2008

Figure 7-14. Config_Rules object class AW186.0

Notes:

Introduction
The Config_Rules ODM object class is used by cfgmgr during the boot process. The
phase attribute determines when the respective method is called.

Phase 1
All methods with phase=1 are executed when cfgmgr -f is called. The first method that
is started is /etc/methods/defsys, which is responsible for the configuration of all
base devices. The second method /usr/lib/methods/deflvm loads the logical volume
device driver (LVDD) into the AIX kernel.
If you have devices that must be configured in rc.boot 1, that means before the
rootvg is active, you need to place phase 1 configuration methods into Config_Rules.
A bosboot is required afterwards.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Phase 2
All methods with phase=2 are executed when cfgmgr -p2 is called. This takes place in
the third rc.boot phase, when the key switch is in normal position, or for a normal boot
on a PCI machine. The seq attribute controls the sequence of the execution: the lower
the value, the higher the priority.

Phase 3
All methods with phase=3 are executed when cfgmgr -p3 is called. This takes place in
the third rc.boot phase, when the key switch is in service position, or a service boot
has been issued on a PCI system.

Sequence number
Each configuration method has an associated sequence number. When executing the
methods for a particular phase, cfgmgr sorts the methods based on the sequence
number. The methods are then invoked, one by one, starting with the smallest
sequence number. Methods with a sequence number of 0 are invoked last, after those
with non-zero sequence numbers.

Boot mask
Each configuration method has an associated boot mask:
- If the boot_mask is zero, the rule applies to all types of boot.
- If the boot_mask is non-zero, the rule then only applies to the boot type specified.
For example, if boot_mask = DISK_BOOT, the rule would only be used for boots from
disk versus NETWORK_BOOT which only applies when booting via the network.

7-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Device names and CD-ROM example


Initial State
HOST1 HOST2
# lsdev -Cc disk # lsdev -Cc disk
hdisk0 Available 10-80-00-1, 0 Disk Drive hdisk0 Available 10-80-00-4, 0 Disk Drive
hdisk1 Available 10-80-00-2, 0 Disk Drive
hdisk2 Available 10-80-00-3, 0 Disk Drive

After moving a disk (booted from disk)


HOST1 HOST2
# lsdev -Cc disk
# lsdev -Cc disk
hdisk0 Available 10-80-00-1, 0 Disk Drive
hdisk0 Available 10-80-00-4, 0 Disk Drive
hdisk1 Defined 10-80-00-2, 0 Disk Drive
hdisk1 Available 10-80-00-2, 0 Disk Drive
hdisk2 Available 10-80-00-3, 0 Disk Drive

Booted from CD-ROM


HOST1 HOST2
# lsdev -Cc disk # lsdev -Cc disk
hdisk0 Available 10-80-00-1, 0 Disk Drive hdisk0 Available 10-80-00-2, 0 Disk Drive
hdisk1 Available 10-80-00-3, 0 Disk Drive hdisk1 Available 10-80-00-4, 0 Disk Drive

Device name has changed Both device names have changed

Copyright IBM Corporation 2008

Figure 7-15. Device names and CD-ROM example AW186.0

Notes:

Introduction
There is one time when device names can change: when you boot from an installation
or diagnostic CD-ROM. Since the CD-ROM does not have a copy of your ODM and is
read-only, it does not know your device names. This means that when cfgmgr runs from
rc.boot on the CD-ROM, it just names devices in the order it finds them. Any time
device names have a different order than the order that cfgmgr uses, device names will
change when you boot from the CD-ROM.

Example
In the example shown, there are two systems (HOST1 and HOST2). Both systems are
shut down and a disk is moved from HOST1 to HOST2. When the systems are
rebooted from the disk, existing names are preserved. However, when either system is
booted from CD-ROM, device names are changed.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Possible problems
If device names have changed, the potential for serious problems does exist. For
example, if the boot disk for HOST2 was the disk at SCSI address 4 (the original
hdisk0) and the system administrator for HOST2 performed a New and Complete
Overwrite installation on hdisk0 (booting the system from CD-ROM), the disk at SCSI
address 2 is now hdisk0.
After the installation is complete, the system will reboot based on the boot list. The boot
list does not use device names like hdisk0, but instead points to a specific device in the
open firmware device tree. So, it will still be pointing to the disk with SCSI address 4
and would boot from the old operating system. More importantly, if there was user data
on the disk at SCSI address 2, it would be overwritten.

Avoiding problems
Device name changes when booted from CD-ROM need not cause problems if you are
careful. The CD-ROM menus give you the opportunity to identify disks using their
location codes and by listing the logical volumes on the disk.

Suggestions
Keep an on-paper record of:
- Disk names
- Their location codes
- What each disk is used for
At a minimum, you should do this for the boot disk.
Be very careful when you boot from CD-ROM. You must never assume that device
names will be the same when you boot from the CD-ROM. Always verify device names
using location codes.
Before performing possibly destructive operations, try to verify the data on the target
disk. If you are not sure, power the system down and disconnect the cables from all but
the target disk. Thirty minutes of prevention is worth hours of restoring data from tape.
If possible, try to make the boot disk be hdisk0 and connected in the location that
cfgmgr names first. Of course, this is not always possible.

7-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

The alog facility


User Boot Install
Applications Process NIM Process

alog program

/var/adm/ras/bootlog
Use the alog /var/adm/ras/BosMenus.log
command to /var/adm/ras/bosinst.data
view logs .
.
/var/adm/ras/errlog

To view the boot log:


# alog -o -t boot

To view the console log:


# alog -o -t console Copyright IBM Corporation 2008

Figure 7-16. The alog facility AW186.0

Notes:

The alog facility


The alog command is a BOS feature that provides a general-purpose logging program
that can be used by any application or user to manage a log. The alog command reads
standard input and writes the output to standard out and copies it to a fixed-size file at
the same time. The file is treated as a circular log. That means when it is filled, new
entries are written over the oldest entries. Log files used by alog are either:
- User-defined (defined on the alog command line)
- System-defined (defined in the alog ODM database)
The command alog -L will list all the logs on the system.
Two system-defined logs which are used to capture information during startup are the
boot and console logs.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Normal system logging


Many system administrators start the boot process and then go and get a cup of coffee!
Unfortunately, boot messages may appear on the screen, only to be scrolled and lost,
never to be seen by the user. In some instances, these messages may be important,
particularly if the system did not boot properly. Fortunately, AIX provides a mechanism
to capture these messages.
During normal system operation, events are logged by the AIX Error Logging Facility
(errdemon) and syslogd. However, these facilities are not started until rc.boot 3.
The alog command is used by both the rc.boot script and the configuration manager
during the boot process to log important events. If the machine does not boot, boot the
machine into maintenance mode and view the boot log contents. Some of the
messages that are logged are described in the following table:

String Description
This is the first message logged by
rc.boot: starting disk boot process
rc.boot. Start of phase 1.
rc.boot: boot device is hdiskX End of phase 1.
rc.boot: executing "ipl_varyon -v" Start of phase 2.
rc.boot: run time mount of /tmp Start of phase 3.
Start of cfgmgr -p2 -v (or -p3 if in
rc.boot: executing "cfgmgr"
service mode).
cfgmgr is running in phase X First output from cfgmgr.
Configuration time: XX seconds Last output from cfgmgr.
End of phase 3. Last output from
System initialization completed.
rc.boot.
Start of /etc/rc (invoked by init
Starting Multi-user Initialization
from /etc/inittab).
End of /etc/rc. Normally the last
entry. If this is the first boot after a
Multi-user initialization completed
software installation, there may be
some output from fbcheck.

Boot log
During the boot process, rc.boot, cfgmgr (called by rc.boot to configure devices),
and several entries in the inittab file, use the boot log. The boot log is a binary file:
/var/adm/ras/bootlog.
The following command can be used to view the boot log:
alog -o -t boot
Note: For a complete description of this command, see the alog man page.

7-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Console log


In addition to the boot log, everything sent to the system console is automatically logged
to the alog console log. The console log is a binary file: /var/adm/ras/conslog.
To view the console log:
# alog -o -t console

Navigating the logs


SInce alog files are not time stamped (with the exception of the console log), it can be
somewhat confusing. Here are some hints to help you find your way around the boot
log:
alog -o always displays entries in order. The last entry displayed will always be the
last entry logged.
It may be helpful to save the output of alog -o to a temporary file. Then, search
backwards from the end to make sure you are looking at the last boot. The following
strings can be used as landmarks to navigate the boot log. They are listed in order in
the table.

Sending a message to an alog file


To log a message, simply send it to the alog commands standard input. For example:
# echo Test Message | alog -t console
will append Test Message to /var/adm/ras/conslog.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

System hang detection


System hangs:
High priority process
Other

What does shdaemon do?


Monitors system's ability to run processes
Takes specified action if threshold is crossed

Actions:
Log error in the Error Log
Display a warning message on the console
Launch recovery login on a console
Launch a command
Automatically REBOOT system

Copyright IBM Corporation 2008

Figure 7-17. System hang detection AW186.0

Notes:

Types of system hangs


The shdaemon program can help recover from certain types of system hangs. For our
purposes, we will divide system hangs into two types:
- High priority process
The system may appear to be hung if some applications have adjusted their process
or thread priorities so high that regular processes are not scheduled. In this case,
work is still being done, but only by the high priority processes. As currently
implemented, shdaemon specifically addresses this type of hang.
- Other
Other types of hangs may be caused by a variety of problems. For example, system
thrashing, kernel deadlock, and a kernel in tight loop. In these cases, no (or very
little) meaningful work will get done. The shdaemon program may help with some of
these problems.

7-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty What does shdaemon do?


If enabled, shdaemon monitors the system to see if any process with a process priority
number higher than a set threshold has been run during a set time-out period.
(Remember that a higher process priority number indicates a lower priority on the
system.) In effect, shdaemon checks to see if lower priority processes are being
scheduled.
The shdaemon program runs at the highest priority (priority number = 0), so that it will
always be able to get CPU time, even if a process is running at a very high priority.

Actions
If lower priority processes are not being scheduled, shdaemon will perform the specified
action. Each action can be individually enabled and has its own configurable priority
and time-out values. There are five actions available:
- Log error in the Error Log
- Display a warning message on a console
- Launch a recovery login on a console
- Launch a command
- Automatically REBOOT the system

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Configuring shdaemon

# shconf -E -l prio
sh_pp enable Enable Process Priority Problem
pp_errlog enable Log Error in the Error Logging
pp_eto 2 Detection Time-out
pp_eprio 60 Process Priority
pp_warning enable Display a warning message on a console
pp_wto 2 Detection Time-out
pp_wprio 60 Process Priority
pp_wterm /dev/console Terminal Device
pp_login disable Launch a recovering login on a console
pp_lto 2 Detection Time-out
pp_lprio 100 Process Priority
pp_lterm /dev/console Terminal Device
pp_cmd enable Launch a command
pp_cto 5 Detection Time-out
pp_cprio 60 Process Priority
pp_cpath /home/unhang Script
pp_reboot disable Automatically REBOOT system
pp_rto 5 Detection Time-out
pp_rprio 39 Process Priority

Copyright IBM Corporation 2008

Figure 7-18. Configuring shdaemon AW186.0

Notes:

Introduction
The shdaemon configuration information is stored as attributes in the SWservAt ODM
object class. Configuration changes take effect immediately and survive across reboots.
Use shconf (or smit shd) to configure or display the current configuration of shdaemon.

Enabling shdaemon
At least two parameters must be modified to enable shdaemon:
- Enable priority monitoring (sh_pp)
- Enable one or more actions (pp_errlog, pp_warning, and so forth)

7-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty When enabling shdaemon, shconf performs the following steps:


- Modifies the SWservAt parameters
- Starts shdaemon
- Modifies /etc/inittab so that shdaemon will be started on each system boot

Action attributes
Each action has its own attributes, which set the priority and time-out thresholds, and
define the action to be taken. The timeout attribute unit of measure is in minutes.

Example
In the example shown, shdaemon is enabled to monitor process priority (sh_pp=enable),
and the following actions are enabled:
- Log error in the Error Log (pp_log=enable)
Every two minutes (pp_eto=2), shdaemon will check to see if any process has been
run with a process priority number greater than 60 (pp_eprio=60). If not, shdaemon
logs an error to the error log.
- Display a warning message on a console (pp_warning=enable)
Every two minutes (pp_wto=2), shdaemon will check to see if any process has been
run with a process priority number greater than 60 (pp_wprio=60). If not, shdaemon
sends a warning message to the console specified by pp_wterm.
- Launch a command (pp_cmd=enable)
Every five minutes (pp_cto=5), shdaemon will check to see if any process has been
run with a process priority number greater than 60 (pp_cprio=60). If not, shdaemon
runs the command specified by pp_cpath (in this case, /home/unhang).

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

System resource controller

Provides a single interface to control subsystems


Controls individual or groups of subsystems

Subsystem group spooler

Subsystem qdaemon writesrv lpd

Subserver qdaemon writesrv lpd

Copyright IBM Corporation 2008

Figure 7-19. System resource controller AW186.0

Notes:

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 program (or a set of
related programs) designed to perform a function. This can be further divided into
subservers. Subservers are similar to daemons. SRC was designed to minimize the
need for user intervention since it provides control of individual subsystems or groups of
subsystems with a few commands.
The relationship between the group and subsystem is easily seen from the output of the
following command:
lssrc -a The visual shows the relationship between the spooler subsystem group and
its subsystems qdaemon, writesrv, and lpd. Some subsystems have subservers. For
example, the TCP/IP group contains a subsystem, inetd, that has several subservers,
for example ftp and telnet.

7-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Using the system resource controller


List SRC status
# lssrc -g spooler
subsystem Group PID Status
qdaemon spooler 8022 active
writesrv spooler 9558 active
lpd spooler inoperative

Start a subsystem
# startsrc -s lpd
0513-059 The lpd Subsystem has been started. Subsystem PID is 12472.

Refresh a subsystem
# refresh -s lpd
0513-095 The request for subsystem refresh was completed successfully.

Stop a subsystem
# stopsrc -s lpd
0513-044 The lpd Subsystem was requested to stop.

Copyright IBM Corporation 2008

Figure 7-20. Using the system resource controller AW186.0

Notes:

SRC status
The lssrc command is used to show the status of the SRC. In the example shown, we
are checking the status of the spooler group using the -g option. To list the status of all
processes, the -a should be used:
lssrc -a
The -s and -g options control subsystems or subsystem groups respectively. These
can be used with the SRC commands.

SRC control
In the remaining examples, we are controlling one subsystem, lpd - the daemon that
controls the print server. Use startsrc to start subsystems or groups. Use stopsrc to
stop subsystems or groups. The refresh command forces the subsystem to reread any
of its configuration files.

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint (1 of 2)

1. What is the primary function of each phase of rc.boot?


Phase 1 ______________________________________
Phase 2 ______________________________________
Phase 3 ______________________________________

2. Your system stops booting with LED 557:


a) In which rc.boot phase does the system stop? ______
b) What command was trying to execute? ______________
c) What are some reasons for this problem?
_______________________________________________
_______________________________________________
_______________________________________________

Copyright IBM Corporation 2008

Figure 7-21. Checkpoint (1 of 2) AW186.0

Notes:

7-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint (2 of 2)
3. Which ODM file is used by cfgmgr during boot to configure
the devices in the correct sequence?
______________________________

4. What command shows the contents of the boot log?


_______________________________

5. What is the function of shdaemon?


_________________________________________________
_________________________________________________
_________________________________________________

6. Which AIX feature can be used to start and stop groups of


daemons or programs? ______________________________

Copyright IBM Corporation 2008

Figure 7-22. Checkpoint (2 of 2) AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exercise: System boot: Software

Exercise 6

Copyright IBM Corporation 2008

Figure 7-23. Exercise: System Boot: Software AW186.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

7-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

After the boot image is loaded into RAM, the rc.boot


script is executed in three phases to configure the system
During rc.boot 1, devices to vary on the rootvg are configured
During rc.boot 2, the rootvg is varied on
In rc.boot 3, the remaining devices are configured

The alog boot log contains information during startup by


the rc.boot script and the configuration manager
The shdaemon program can help recover from certain
types of system hangs
The SRC provides commands to make it easier to control
subsystems

Copyright IBM Corporation 2008

Figure 7-24. Unit summary AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 7. System boot: Software 7-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

7-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 8. Installation and initial configuration

What this unit is about


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

What you should be able to do


After completing this unit, you should be able to:
List the different installation and media options available
List the steps necessary to install the AIX base operating system
Identify the tasks that can be carried out using the Configuration
Assistant

How you will check your progress


Accountability:
Checkpoint questions

References
SG25-7559 IBM AIX Version 6.1 Differences Guide
SC23-6629 AIX Version 6.1 Release Notes
SC23-6630 AIX Version 6.1 Expansion Pack Release Notes
Online AIX Version 6.1 Installation and migration

Note: References listed as Online above are available at the


following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:
List the different installation and media options available
List the steps necessary to install the AIX base operating
system
Identify the tasks that can be carried out using the
Configuration Assistant

Copyright IBM Corporation 2008

Figure 8-1. Unit objectives AW186.0

Notes:

8-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Installation methods

CD-ROM
Tape (not available for AIX 5L or AIX 6 installation)
4 mm
8 mm

Preinstallation option (for a new system order)


Network Installation Manager (NIM)
Token Ring
Ethernet
FDDI

Copyright IBM Corporation 2008

Figure 8-2. Installation methods AW186.0

Notes:

Required memory
In AIX 6.1, 256 MB of RAM is the minimum required to install the base operating
system.
In AIX 5L V5.2 and AIX 5L V5.3, 128 MB of RAM is required to install the base
operating system (BOS).

Platform type
Beginning with AIX 5L V5.2, the Common Hardware Reference Platform (CHRP) is the
only supported platform. Execute bootinfo -p to get your hardware platform and
bootinfo -y to check. As of AIX 6.1, the 32-bit kernel has been deprecated. Therefore,
64-bit hardware is required run AIX 6.1 (POWER4, POWER5, or POWER6 systems
only).

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Media type
The contents of the CD-ROM is packaged in a file system format, thus the installation
process from a CD is carried out in a different format from the tape.

Preinstallation option
The preinstallation option is only valid if accompanied by a hardware order that includes
the preinstalled AIX.

Network Installation Manager (NIM)


Network installations are carried out using the AIX NIM. This allows the user to manage
the installation of the BOS and optional software, on one or more machines in a network
environment. The NIM environment is made up of client and server machines, where it
is the server machine that makes the resources available to the other machines; that is,
installation has to be initiated from the server to the client. An existing System p with
AIX installed is required to set up a NIM environment. Additional information on how to
perform a NIM installation can be found in the Network Installation Management Guide
and Reference.

8-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Installation process (from CD)

Insert CD in CD-ROM drive

Power on peripheral SCSI devices

Power on system

Press 5
Copyright IBM Corporation 2008

Figure 8-3. Installation process (from CD) AW186.0

Notes:

Installation media and peripheral devices


The system needs to boot from the installation media. The BOS installation is most
commonly performed using a CD.
Insert the installation media into the drive. If it is an external device, you must power it
on before powering on the system or the system will not recognize it. It is best to power
on all peripheral devices, because, during the installation, all recognized devices are
configured.
The CD and tape devices must be powered on to open the door to the device. If they
are internal, you need to power on the system before inserting the installation media.

Power on the system


Power on the system to start the boot sequence. The LED displays numbers indicating
the system components that are being tested. Also, if you are using a graphical display,

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

you see icons of the hardware devices appear on the screen. The machine is
completing a power on self-test (POST). If you insert the media before the POST is
done (about 30 seconds), the machine can still boot from that media.
For partitioned machines, the logical partition will be started from the HMC. There is no
POST phase for a partition activation; that occurs when powering on the entire
managed system.
Once the POST is complete, the system searches the boot list for a bootable image.
When it finds the bootable image, you can see menus appear on the screen.

When to press 5
If the machine doesn't reach the installation menu, but instead keeps cycling through
the POST, it is because the CD (or whatever installation device you are trying to use) is
not in the boot list. If this happens and you are installing by CD, just after the keyboard
is discovered, press 5. This invokes the default service boot list. The CD is on that list. If
you are attempting to install by tape, you need to add a tape device to a bootlist. This is
done via the SMS program. This is discussed later. Older AIX servers and AIX releases
may require using the F5 key instance of the 5 key.
For a partition activation, you would use the advanced activation options to specify that
you want a Diagnostic w/ default bootlist. This is the equivalent of pressing 5.

8-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Console and language definition


Select your console
This message is displayed
in different languages to:
******* Please define the System Console. All native graphics displays
*******

Type the F1 key and press Enter Terminal on serial


to use this display as the System Console.

NEXT:
Select the language
for installation

Copyright IBM Corporation 2008

Figure 8-4. Console and language definition AW186.0

Notes:

Selecting the console


Each native (graphics) display and the ASCII terminal attached to the first built-in serial
port (S1) displays the console messages. Whichever display you respond to becomes
the console display during the installation. The console display can be changed at a
later time if required.
Graphic displays request that you press F1 and then press Enter to make it the system
console. If you are using an ASCII terminal as the system console, you need to press 2
and then press Enter.

Configuring an ASCII terminal as a console


If you are using an ASCII terminal as your console, make sure that it is powered on and
correctly configured before you begin the installation. AIX assumes these
characteristics for the terminal on S1:

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Terminal type=dumb
- Speed=9600
- Parity=none
- Bits per character=8
- Stop bits=1
- Line Control=IPRTS
- Operating mode=echo
- Turnaround character=CR
The boot program does not redisplay the message if you missed it the first time. If your
terminal was not correctly configured, you can still press 2 and press Enter to continue,
once you have corrected the problem.

Selecting the language for installation


During the installation, you are also prompted to select the language to be used for both
the messages and the status information displayed during the installation process. The
language does not have to be the same as the language intended for the primary
environment of the system.

8-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Installation and Maintenance menu


At the Installation and Maintenance menu, check all the
installation settings:

Welcome to Base Operating System


Installation and Maintenance

Type the number of your choice and press Enter. Choice 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

Copyright IBM Corporation 2008

Figure 8-5. Installation and Maintenance menu AW186.0

Notes:

Overview
To confirm or change the installation and system settings that have been set for this
system, type 2, and then press Enter. Type 88 to display help on this or any subsequent
installation screen.

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Installation and Settings

Installation and Settings

Either type 0 or 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 settings listed above


88 Help ?
99 Previous Menu Warning: Base operating system installation
will destroy or impair recovery of SOME data
>>> Choice [1]: on the destination disk hdisk0

Copyright IBM Corporation 2008

Figure 8-6. Installation and Settings AW186.0

Notes:

Overview
The Installation and Settings menu allows you to:
- Set the type of installation:
Migration
Preservation
New and Complete Overwrite
- Determine the installation disk
- Set the primary language environment
- Set more options

8-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Method of installation
Option 1 of the Installation and Settings menu:
Change Method of Installation

Type the number of your choice 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 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 user (/usr), variable (/var), temporary
(/tmp), and root (/) file systems. Other product (application) files and
configuration data will be destroyed.
3 Migration Install
Upgrades the Base Operating System to current release. Other product
(application) files and configuration data are saved.

88 Help ?
99 Previous Menu
>>> Choice [2]: 1

Copyright IBM Corporation 2008

Figure 8-7. Method of installation AW186.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 shown in the visual
displays, the contents of which depends on the current state of the machine.

Complete Overwrite Install


On a new machine, the New and Complete Overwrite option is the only possible
method of installation. On an existing machine, if you want to completely overwrite the
existing version of BOS, then you should use this method.

Preservation Install
Use the Preservation Install option 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

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 has to be done after doing a
preservation installation.

Migration Install
Migration prior to AIX V4.2.1 is not supported. Use the Migration Install option to
upgrade an AIX V4.2.1 or later system to an AIX 5L or later version, while preserving
the existing root volume group. This method preserves all file systems except /tmp, as
well as the logical volumes and system configuration files. Obsolete or selective fix files
are removed. The Migration Install option is the default installation method for an AIX
system running Version 4.x.
The installation process determines which optional software products are installed.

8-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Installation disks

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

Size VG
Name Location Code (MB) Status Bootable
>>>1 hdisk0 10-80-00-4,0 2063 rootvg yes
2 hdisk1 10-80-00-5,0 2063 rootvg no

>>> 0 Continue with choices indicated above


55 More Disk Options
66 Disks not known to Base Operating System Installation
77 Display Alternative Disk Attributes
88 Help?
99 Previous Menu

>>> Choice [0]:

Copyright IBM Corporation 2008

Figure 8-8. Installation disks AW186.0

Notes:

Selecting installation disks


Having selected 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 here.
This screen also gives you the option to install to an unsupported disk by adding the
code for the device first.
When you have finished selecting the disks, type 0 in the Choice field, and then press
Enter.

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Primary language environment


Option 2 of the Installation and Settings menu:
Type the number for the Cultural Convention (such as date, time, and
money), Language and Keyboard for this system and press Enter, or type 106
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 Arabic (Bahrain) Arabic (Bahrain)
-----
-----

10. MORE CHOICES


88 Help ?
99 Previous menu

Choice [1]:

Copyright IBM Corporation 2008

Figure 8-9. Primary language environment AW186.0

Notes:

Overview
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 might actually
display a number of language options, such as French, German, Italian, Byelorussian,
Ukrainian, and so forth.
It is recommended that if you are going to change the language, then you should
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 used to display text and system
messages.

8-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Install Options
Option 4 of the Installation and Settings menu:
Install Options
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. Graphics Software.................................................... Yes
2. System Management Client Software ..... Yes
3. Create JFS2 File Systems Yes
4. Enable System Backups to install any system .. Yes
( Install all devices)

>>> 5. Install More Software


0 Install with the current settings listed above.

88 Help ?
99 Previous Menu
>>> Choice [5]: _

Copyright IBM Corporation 2008

Figure 8-10. Install Options AW186.0

Notes:

Introduction
When installing, the installation software detects it and presents some additional
installation options.

Install Options
When Graphics Software is set to yes, X11, WebSM, Java, and other software
dependent on these packages are installed. The System Management Client
Software option includes WebSM, Java, service agent, lwi, and pconsole. You may
optionally select to have JFS file systems, instead of JFS2 file systems. The Enabling
System Backups to install any system option installs all devices. Otherwise, only
device drivers necessary to your system hardware configuration are installed. To install
more software (which may require CD swapping) press Enter.

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Install More Software

Install More Software

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

>>> Choice [0]: _

Copyright IBM Corporation 2008

Figure 8-11. Install More Software AW186.0

Notes:

Overview
The Install More Software menu is available in the New and Complete Overwrite
installation method, as well as the Preservation Installation method. Select Install
More Software to choose additional software to install after the BOS installation
process finishes. A software bundle file corresponds to each selection that contains the
required packages and filesets.

8-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Begin installation

Installing Base Operating System

Please wait . . . . . .

Approximate Elapsed Time


% tasks completed (in minutes)
16 1

Builds AIX directory structure


Restores BOS, locale, and filesets from installation media only
Installs software for the connected and powered-on devices

Copyright IBM Corporation 2008

Figure 8-12. Begin installation AW186.0

Notes:

Overview
The installation media contains information stored on it to determine the sizes that the
standard AIX file systems have. These are set large enough for the installation to
succeed but do not leave much free space after installation. You can dynamically
increase the size of any of the file systems once AIX has been installed. If you are
installing from a system image backup tape, the file systems created are the same sizes
and names as those on the system when the tape was created.
The files are restored from the media and then verified. This takes some time but can
be left unattended. After the BOS has installed, the appropriate locale optional program
is also installed.
Once the installation has completed, the system automatically reboots from the newly
installed operating system on disk.

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Installation flowchart - all systems


Start the system
Change:
Installation Method
Select the console
Destination Disks
Language
Select language

Install Options:
Begin
Desktop
with default TCB
settings? 64-bit/JFS2 (64-bit platform)
no Graphics Software
Import User Volume Groups
Verify default install
Enable System Backups
method and settings
yes
Default yes Install More Software:
settings need to be Mozilla
changed? Kerberos_5
Server
no GNOME Desktop
Install from media KDE Desktop

Perform customization
Copyright IBM Corporation 2008

Figure 8-13. Installation flowchart - all systems AW186.0

Notes:

Introduction
The flowchart in this visual summarizes the installation steps we have discussed.

8-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Configuration Assistant menu

Copyright IBM Corporation 2008

Figure 8-14. Configuration Assistant menu AW186.0

Notes:

Introduction
After installing AIX, the operating system runs with the following default settings: one
user (root), the date and time for where the system was manufactured, and other very
general settings. You probably want to change some or all of these settings. Also, you
must provide system and network information if you want to communicate with other
systems.
The Configuration Assistant and Installation Assistant provide step-by-step instructions
for completing each customization task. Examples of tasks that can be performed are
setting the system date and time, setting the root's password, and configuring the
network.
Complete the tasks in the order that the Configuration Assistant / Installation Assistant
lists them. It is helpful to complete all customization tasks before you use your system.

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

If using a graphics terminal for the installation, the newly installed BOS reboots and
starts the Configuration Assistant, which guides you through completing customization
tasks. When you use the Configuration Assistant immediately after BOS installation,
you have to first accept the license agreement. After doing this, only the tasks that apply
to your type of installation are shown.
If an ASCII terminal was used for the installation, an ASCII-based Installation Assistant
is displayed instead. Both the graphics-based Configuration Assistant and the
ASCII-based Installation Assistant provide comparable support.

After the initial execution


When you have completed your work using the Configuration Assistant / Installation
Assistant, you can indicate that you are done working with the program. This prevents
this program from being displayed at the next reboot.
To run the Configuration Assistant or Installation Assistant at a later time:
- From a graphics terminal, type install_assist to access the Configuration
Assistant.
- From AIXWindows, the command configassist can also be used to access the
Configuration Assistant.
- From an ASCII terminal, type install_assist to access the Installation Assistant.
You must have root user authority to use the Configuration Assistant / Installation
Assistant.

8-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint

1. AIX 5L or AIX 6 can be installed from which of the


following: (select all that are correct)
a. CD-ROM
b. Diskette
c. 4 mm tape

2. True or False? A Preservation Install preserves all data


on the disks.

3. What is the console used for during the installation


process?
_____________________________________________
_____________________________________________

Copyright IBM Corporation 2008

Figure 8-15. Checkpoint AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 8. Installation and initial configuration 8-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

AIX 5L and AIX 6 are only distributed on CD-ROM


In order to install the base operating system, system
specific questions have to be answered before the process
can begin
The Configuration Assistant is used by the system
administrator to further customize the system

Copyright IBM Corporation 2008

Figure 8-16. Unit summary AW186.0

Notes:

8-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 9. The Logical Volume Manager (LVM)

What this unit is about


This unit explains concepts important for understanding the logical
volume manager (LVM) used in AIX and provides information about
how to work with this facility.

What you should be able to do


After completing this unit, you should be able to:
Define key LVM-related terms
Explain where LVM information is stored
Manage volume groups, logical volumes, and physical volumes

How you will check your progress


Accountability:
Checkpoint questions
Lab exercise

References
Online AIX Version 6.1 Commands reference
Online AIX Version 6.1 Operating System and Device
management
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Redbooks AIX Storage Management Redbook (GG24-4484)


Redbooks Logical Volume Manager from A to Z: Introduction and
Concepts Redbook (SG24-5432)
Redbooks Logical Volume Manager from A to Z: Troubleshooting
and Commands Redbook (SG24-5433)

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Define key LVM-related terms
Explain where LVM information is stored
Manage volume groups, logical volumes, and physical
volumes

Copyright IBM Corporation 2008

Figure 9-1. Unit objectives AW186.0

Notes:

Importance of this unit


The AIX LVM may be similar to logical volume management facilities you have worked
with in other UNIX or UNIX-like environments, but it is likely that it also differs from
these other facilities in certain ways. This unit explains key LVM-related terminology
and concepts, and describes ways of managing this key AIX facility.

9-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9.1. LVM terminology and concepts

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Benefits of the LVM


Logical volumes solve noncontiguous space problems
Logical volumes can span disks
Logical volume sizes can be dynamically increased
Logical volumes can be mirrored
Physical volumes are easily added to the system
Logical volumes can be relocated
Volume group and logical volume statistics can be collected

These tasks can be performed dynamically!

Copyright IBM Corporation 2008

Figure 9-2. Benefits of the LVM AW186.0

Notes:

Introduction
The AIX LVM controls disk storage resources by mapping data between a simple and
flexible logical view of storage space and the actual physical disks.
This visual and these notes provide a brief overview of the basic components of LVM.

Components
A hierarchy of structures is used to manage disk storage:
- Volume groups
- Physical volumes
- Physical partitions
- Logical volumes
- Logical partitions

9-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Volume group (VG)


A VG is the largest unit of storage allocation. It 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 make 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.
All disks in the VG must move together.

Physical volume (PV)


A PV is the name for an actual disk or hard 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 only belong to one VG.

Physical partition (PP)


All of the physical volumes in a volume group are divided into PPs. All the PPs within a
VG are the same size, although different VGs can have different PP sizes.

Logical volume (LV)


Within each volume group, one or more LVs are defined. LVs are groups of information
located on physical volumes. Data on LVs appears to be contiguous to the user but can
be non-contiguous on the PV or can even be located on several PVs.

Logical partition (LP)


Each LV consists of one or more LPs. They are the same size as the PPs within a VG.
Each LP is mapped to at least one PP. Although the LPs are numbered consecutively,
the underlying PPs are not necessarily consecutive or contiguous.
This allows file systems, paging space, and other LVs to be resized or relocated, to
span multiple PVs, and to have their contents replicated for greater flexibility and
availability in the storage of data.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Volume group limits


Normal Volume Groups (mkvg)
Number of disks: Max. number of partitions/disk:
1 32512
2 16256
4 8128
8 4064
16 2032
32 1016
Big Volume Groups (mkvg -B or chvg -B) mkvg -t
Number of disks: Max. number of partitions/disk: chvg -t
1 130048
2 65024
4 32512
8 16256
16 8128
32 4064
64 2032
128 1016
Copyright IBM Corporation 2008

Figure 9-3. Volume group limits AW186.0

Notes:

Volume group types prior to AIX 5L V5.3


On systems running versions of AIX 5L prior to AIX 5L V5.3, only two different VG types
are available:
- Normal volume groups: When creating a VG with the mkvg command, without
specifying either the -B flag or the -S flag, a normal VG is created.
The maximum number of LVs in a normal VG is 256. This VG type is sometimes
referred to as the standard volume group, original volume group (in SMIT), or default
volume group type.
- Big volume groups: This volume group type was introduced with AIX V4.3.2. A big
VG can be created using the -B flag of mkvg or by choosing the appropriate selection
in SMIT.
A big VG cannot be imported into AIX V4.3.1 or prior versions.
The maximum number of LVs in a big VG is 512.

9-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The mkvg command


The mkvg command can be used to create VGs. Here are some examples illustrating
the use of this command:
1. Create a normal volume group datavg, that contains a disk hdisk2:
# mkvg -s 16 -t 2 -y datavg hdisk2
- The option -s 16 specifies a partition size of 16 MB.
- The option -t 2 is a factor that must be multiplied by 1016. In this case, the option
indicates that the maximum number of partitions on a disk is 2032. As indicated by
the first table on the visual, that means that the VG can have up to 16 disks. The
size of each disk must be less than or equal to 32512 megabytes (2032 * 16).
- The option -y specifies the name of the VG (datavg).
2. Create a big VG bigvg with three disks:
# mkvg -B -t 16 -y bigvg hdisk2 hdisk3 hdisk4
- The option -B specifies that we are creating a big VG.
- The option -t 16 indicates that the maximum number of partitions on a disk is
16256. As indicated by the second table on the visual, that means that the VG can
have up to eight disks.
- The option -y specifies the name of the VG.

The chvg command


Volume groups characteristics can be changed with the chvg command. For example,
to change a normal volume group datavg into a big volume group, the following
command must be executed:
# chvg -B datavg

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Scalable volume groups


Introduced in AIX 5L V5.3

Support 1024 disks per VG.

Support 4096 LVs per VG.

Maximum number of PPs is VG- instead of PV-dependent.

LV control information is kept in the VGDA.

No need to set the maximum values at creation time; the


initial settings can always be increased at a later date.

Copyright IBM Corporation 2008

Figure 9-4. Scalable volume groups AW186.0

Notes:

Scalable volume group description


AIX 5L V5.3 took LVM scalability to the next higher level and introduced the scalable
volume group (scalable VG) type, in addition to supporting the normal and big VGs. All
three types of VGs are supported in AIX 6.1.
The scalable VG can accommodate a maximum of 1024 PVs and raises the limit for the
number of LVs to 4096. 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 of configuring VGs with
a relatively small number of disks, but with fine grained storage allocation options
through a large number of PPs that are small in size. The scalable VG can hold up to
2097152 (2048 K) PPs. Optimally, the size of a physical partition can also be configured
for a scalable VG. As with the older VG types, the size is specified in units of megabytes
and the size variable must be equal to a power of 2. The range of the PP size starts at 1
(1 MB) and goes up to 131072 (128 GB), which is more than two orders of magnitude

9-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty above the 1024 (1 GB) maximum for AIX 5L V5.2. (The new maximum PP size provides
an architectural support for 256 PB disks.)

Reserved logical volumes


Note that the maximum number of user definable LVs is given by the maximum number
of LVs per VG minus 1, because one LV is reserved for system use. Consequently,
system administrators can configure 255 LVs in normal VGs, 511 in big VGs, and 4095
in scalable VGs.

Logical volume control block (LVCB)


The LVCB contains meta data about a logical volume. 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 on-disk volume group descriptor area (VGDA). The LVCB structure
on the first LV user block and the LVCB structure within the VGDA are similar but not
identical. (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.) With scalable VGs, LV
control information is no longer stored on the first user block of any LV. All relevant LV
control information is kept in the VGDA as part of the LVCB information area and the LV
entry area. So, no precautions have to be taken when using raw LVs, because there is
no longer a need to preserve the information held by the first 512 bytes of the logical
device.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Configuration limits for volume groups

Maximum Maximum Maximum Maximum


VG Type
PVs LVs PPs per VG PP size
256 32512 1 GB
Normal VG 32
(1016*32)

512 130048 1 GB
Big VG 128
(1016*128)

Scalable VG 1024 4096 2097152 128 GB

Copyright IBM Corporation 2008

Figure 9-5. Configuration limits for volume groups AW186.0

Notes:

Comparing volume group types


The table on the visual provides a comparison of key characteristics of the three VG
types.

Determining the type of a volume group


To determine the type of a VG, use the lsvg command, as illustrated below:
# lsvg data_svg
VOLUME GROUP: mike_svg VG IDENTIFIER: 000c91ad00004c00000000fd961161d9
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1080 (17280 megabytes)
MAX LVs: 256 FREE PPs: 1080 (17280 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2

9-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty STALE PVs: 0 STALE PPs: 0


ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512 MAX PVs: 1024
LTG size(Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
The value of MAX PVs (1024 in this example) should show which type the VG is.
Scalable VGs will say 1024, big VGs will say 128, and original VGs will say 32 (if not
modified with the t factor). Additionally, the older VG types have one more line in the
output:

MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32

These lines shows that the VG cannot be a scalable VG, as scalable VGs are not PP
per PV dependent.

Converting a volume group to a scalable volume group


A VG can be converted to a scalable VG using the chvg -G <vg_name> command, but
the volume group must be varied off.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Mirroring

Physical Logical
Partitions Partitions

write(data);

Mirrored
Logical
Volume Application

Copyright IBM Corporation 2008

Figure 9-6. Mirroring AW186.0

Notes:

General description of mirroring


LVs can be mirrored, which means each logical partition gets more than one associated
physical partition. The maximum ratio is 1:3; this means that one LP has three
associated PPs.

Discussion of example on visual


The picture on the visual shows a two-disk mirroring of an LV. An application writes data
to the disk, which is always handled by the LVM. The LVM recognizes that this partition
is mirrored. The data will be written to both physical partitions. If one of the disks fails,
there will be at least one good copy of the data.

9-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Striping

LP1
1 4 7
1
Stripe hdisk0 2
Units 3
4 LP1
2 5 8 LP2
LP2
5
6 LP3
hdisk1
7 Striped
8 Logical
LP3 9
3 6 9 Volume
Stream of
hdisk2 data

Copyright IBM Corporation 2008

Figure 9-7. Striping AW186.0

Notes:

General description of striping


Striping is an LVM feature where the partitions of the LV are spread across different
disks. The number of disks involved is called stripe width.
Striping works by splitting write and read requests to a finer granularity, named stripe
size. Stripe sizes may vary from 4 KB to 128 KB. A single application write or read
request is divided into parallel physical I/O requests. The LVM fits the pieces together
via complex buffer management.

When to use striping


Striping makes good sense, when the following conditions are true:
- The disks use separate adapters. Striping on the same adapter does not improve
the performance very much.
- The disks are equal in size and speed.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- The disks contain striped LVs only.


- Accessing large sequential files. For writing or reading small files, striping does not
improve the performance.

Striped column support for logical volumes (AIX 5L V5.3 and later)
AIX 5L V5.3 further enhanced the LVM striping implementation and introduced striped
columns support for LVs. This feature allows you to extend a striped LV even if one of
the PVs in the group of disks used for the LV has become full.
In previous AIX releases, you could enlarge the size of a striped LV with the extendlv
command, but only as long as enough PPs were available within the group of disks
used for the striped LV. Rebuilding the entire LV was the only way to expand a striped
LV beyond the hard limits imposed by the disk capacities. This workaround required you
to back up and delete the striped LV and then to recreate the LV with a larger stripe
width followed by a restore operation of the LV data.
To overcome the disadvantages of this rather time-consuming procedure, AIX 5L V5.3
introduces the concept of striped columns for LVs.
In AIX 5L V5.3 and AIX 6.1, the upper bound (the maximum number of disks that can be
allocated to the LV) can be a multiple of the stripe width. One set of disks, as
determined by the stripe width, can be considered as one striped column.
If you use the extendlv command to extend a striped LV beyond the physical limits of
the first striped column, an entire new set of disks will be used to fulfill the allocation
request for additional LPs. If you further expand the LV, more striped columns may get
added as required as long as you stay within the upper bound limit. The -u flag of the
chlv, extendlv, and mklvcopy commands allows you to change the upper bound to be
a multiple of the stripe width. The extendlv -u command can be used to change the
upper bound and to extend the LV in a single operation.

9-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Mirroring and striping with RAID


RAID = Redundant Array of Independent Disks

RAID
Adapter

RAID Array
Controller
Group of
disks

Copyright IBM Corporation 2008

Figure 9-8. Mirroring and striping with RAID AW186.0

Notes:

Storage subsystem capabilities


IBM offers storage subsystems (for example the IBM TotalStorage DS4500 Storage
Server) that allow mirroring and striping on a hardware level.

Redundant Array of Independent Disks (RAID)


RAID is a term used to describe the technique of improving data availability through the
use of arrays of disks and various data-striping methodologies. Disk arrays are groups
of disks that work together to achieve higher data-transfer and I/O rates than those
provided by single large drives. An array is a set of multiple disk drives plus an array
controller that keeps track of how data is distributed across the drives.
By using multiple drives, the array can provide higher data-transfer rates and higher I/O
rates when compared to a single large drive; this is achieved through the ability to
schedule reads and writes to the disks in the array in parallel.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Arrays can also provide data redundancy so that no data is lost if a single physical disk
in the array should fail. Depending on what is referred to as the RAID level, data is
either mirrored or striped.

Common RAID levels


The most common RAID levels are RAID 0, RAID 1, and RAID 5. These RAID levels
are described on the next page.

9-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

RAID levels you should know about


RAID Level Implementation Explanation

Data is split into blocks. These


blocks are written to or read
0 Striping
from a series of disks in parallel.
No data redundancy.
Data is split into blocks and
duplicate copies are kept on
1 Mirroring separate disks. If any disk in the
array fails, the mirrored data can
be used.
Data is split into blocks that are
striped across the disks. For
Striping with each block, parity information is
5
parity drives written that allows the
reconstruction in case of a disk
failure.
Copyright IBM Corporation 2008

Figure 9-9. RAID levels you should know about AW186.0

Notes:

Introduction
The most common RAID levels are RAID 0, RAID 1, and RAID 5. These RAID levels
are described in the paragraphs that follow.

RAID 0
RAID 0 is known as disk striping. Conventionally, a file is written out to (or read from) a
disk in blocks of data. With striping, the information is split into chunks (a fixed amount of
data) and the chunks are written to (or read from) a series of disks in parallel.
RAID 0 is well suited for applications requiring fast read or write accesses. On the other
hand, RAID 0 is only designed to increase performance; there is no data redundancy, so
any disk failure will require reloading from backups.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Select RAID level 0 for applications that would benefit from the increased performance
capabilities of this RAID level. Never use this level for critical applications that require
high availability.

RAID 1
RAID 1 is known as disk mirroring. In this implementation, duplicate copies of each
chunk of data are kept on separate disks or as is more common, each disk has a twin
that contains an exact replica (or mirror image) of the information. If any disk in the array
fails, then the mirrored twin can take over.
Read performance can be enhanced as the disk with its actuator closest to the required
data is always used, thereby minimizing seek times. The response time for writes can be
somewhat slower than for a single disk, depending on the write policy; the writes can
either be executed in parallel for speed, or serially for safety. This technique improves
response time for read-mostly applications, and improves availability. The downside is
you will need twice as much disk space.
RAID 1 is most suited to applications that require high data availability, good read
response times, and where cost is a secondary issue.

RAID 5
RAID 5 can be considered as disk striping combined with a type of mirroring. That
means that data is split into blocks that are striped across the disks, and parity
information is written that allows recovery in the event of a disk failure.
Parity data is never stored on the same drive as the blocks that are protected. In the
event of a disk failure, the information can be rebuilt by the using the parity information
from the remaining drives.
Select RAID level 5 for applications that manipulate small amounts of data, such as
transaction processing applications. This level is generally considered the best
all-around RAID solution for commercial applications.

LVM support of RAID


RAID algorithms can be implemented as part of the operating system's file system
software, or as part of a disk device driver. AIX LVM supports the following RAID
options:
- RAID 0 (Striping)
- RAID 1 (Mirroring)
- RAID 10 or 0+1 (Mirroring and striping)

9-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9.2. LVM data representation

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LVM identifiers
Goal: Unique worldwide identifiers for
Volume groups
Hard disks
Logical volumes

# lsvg rootvg
... VG IDENTIFIER: 00c35ba000004c00000001157f54bf78

# lspv 32 bytes long


hdisk0 00c35ba07b2e24f0 rootvg active
... 32 bytes long
# lslv hd4 (16 are shown)
LOGICAL VOLUME: hd4 VOLUME GROUP: rootvg
LV IDENTIFIER: 00c35ba000004c00000001157f54bf78.4 ...
...
VGID.minor number
# uname -m
00C35BA04C00

Copyright IBM Corporation 2008

Figure 9-10. LVM identifiers AW186.0

Notes:

Use of identifiers
The LVM uses identifiers for disks, VGs, and LVs. As VGs could be exported and
imported between systems, these identifiers must be unique worldwide.
All identifiers are based on the CPU ID of the creating host and a timestamp.

Volume group identifiers


As shown on the visual, the VGs identifiers (VGIDs) have a length of 32 bytes.

9-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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.
Note: If you ever have 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 LV identifiers consist of the VGID, a period, and the minor number of the LV.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LVM data on disk control blocks


Volume Group Descriptor Area (VGDA)
Most important data structure of LVM
Global to the VG (same on each disk)
One or two copies per disk

Volume Group Status Area (VGSA)


Tracks the state of mirrored copies
One or two copies per disk

Logical Volume Control Block (LVCB)


Has historically occupied first 512 bytes of each
LV
Contains LV attributes (policies, number of copies)
Should not be overwritten by applications using raw
devices!
Copyright IBM Corporation 2008

Figure 9-11. LVM data on disk control blocks AW186.0

Notes:

Disk control blocks 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 VG. Each disk
contains the complete allocation information of the entire VG.
2. The Volume Group Status Area (VGSA) tracks the status of all PVs in the VG
(active or missing) and the state of all allocated PPs in the VG (active or stale).
Each disk in a VG contains a VGSA.
3. The Logical Volume Control Block (LVCB) generally resides in the first 512 bytes of
each LV. However, no LVCB information is kept at this location in scalable VGs.
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. If raw devices are

9-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty used (for example, many database systems use raw LVs), be careful that these
programs do not destroy the LVCB.

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).
- PVMA: tracks if any of the disks are missing
- MWC_DBA: holds the status for each LV if passive mirror write consistency is used
- PPSA: logs any stale PPs
The overall size 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. (If a big
VG was created with the -T 0 option of the mkvg command, no LVCB will occupy the first
block of the LV.) With scalable VGs, LV control information is no longer stored on the
first user block of any LV. All relevant LV control information is kept in the VGDA as part
of the LVCB information area and the LV entry area. So, no precautions have to be
taken when using raw LVs, because there is no longer a need to preserve the
information held by the first 512 bytes of the logical device.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LVM data in the operating system

Object Data Manager (ODM)


Physical volumes, volume groups, and logical volumes are
represented as devices (customized devices)
CuDv, CuAt, CuDvDr, CuDep

AIX Files
/etc/vg/vgVGID Handle to the VGDA copy in memory
/dev/hdiskX Special file for a disk
/dev/VGname Special file for administrative access to a VG
/dev/LVname Special file for a logical volume
/etc/filesystems Used by the mount command to associate
LV name, file system log, and mount point

Copyright IBM Corporation 2008

Figure 9-12. LVM data in the operating system AW186.0

Notes:

LVM information stored in the ODM


PVs, VGs, and LVs are handled as devices in AIX. Every PV, VG, and LV is defined in
the customized object classes in the ODM.

LVM information stored in AIX files


As shown on the visual, many AIX files also contain LVM-related data.
The VGDA is always stored by the kernel in memory to increase performance. This
technique is called a memory-mapped file. The handle is always a file in the /etc/vg
directory. This filename always reflects the VGID.

9-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Contents of the VGDA

Header Time Stamp Updated when VG is changed

PVIDs only (no PV names)


Physical Volume List
VGDA count and PV state

LVIDs and LV names


Logical Volume List
Number of copies

Physical Partition Map Maps LPs to PPs

Must contain same value as


Trailer Time Stamp
header time stamp

Copyright IBM Corporation 2008

Figure 9-13. Contents of the VGDA AW186.0

Notes:

Introduction
The table on the visual shows the contents of the VGDA. The individual items listed are
discussed in the paragraphs that follow.

Time stamps
Time stamps are used to check if a VGDA is valid. If the system crashes while changing
the VGDA, the time stamps will differ. The next time the VG is varied on, this VGDA is
marked as invalid. The latest intact VGDA will then be used to overwrite the other
VGDAs in the VG.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Physical volume list


The VGDA contains the PV list. Note that no disk names are stored, only the unique
disk identifiers are used. For each disk, the number of VGDAs on the disk and the PV
state is stored. We will talk about PV states later in this unit.

Logical volume list


The VGDA contains a record of the LVs that are part of the VG. It stores the LV
identifiers and the corresponding LV names. Additionally, the number of copies is stored
for each LV.

Physical partition map


The most important data structure is the PP map. It maps each LP to a PP. The size of
the PP map is determined at VG creation time.

9-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

VGDA example
# lqueryvg -p hdisk1 -At
Max LVs: 256
PP Size: 20 1: ____________
Free PPs: 12216
LV count: 3 2: ____________
PV count: 1 3: ____________
Total VGDAs: 2 4: ____________
MAX PPs per PV: 32768
MAX PVs: 1024

Logical:
5: ____________
00c35ba000004c00000001157fcf6bdf.1 lv00 1
00c35ba000004c00000001157fcf6bdf.2 lv01 1
00c35ba000004c00000001157fcf6bdf.3 lv02 1

Physical: 00c35ba07fcf6b93 2 0

6: ____________ 7: ____________
Copyright IBM Corporation 2008

Figure 9-14. VGDA example AW186.0

Notes:

The lqueryvg command


The lqueryvg command is a low-level command that shows an extract from the VGDA
on a specified disk, for example, hdisk1.
In the command shown on the visual, -p hdisk1 means to read the VGDA on hdisk1,
-A means to display all available information, and -t means to display descriptive tags.
The visual only shows selected fields from the report; a more complete example output
is shown below in these notes.

Interpreting lqueryvg output


As an exercise in interpreting the output of lqueryvg, match each of the following
expressions to the appropriate numbered location on the visual:
a. VGDA count on this disk

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

b. 2 VGDAs in VG
c. 3 LVs in VG
d. PP size = 220 (2 to the 20th power) bytes, or 1 MB (for this VG)
e. LVIDs (VGID.minor_number)
f. 1 PVs in VG
g. PVIDs

Output of lqueryvg on AIX 6.1


The output of lqueryvg on recent AIX versions gives more information than shown in
the example on the visual. An example of lqueryvg (for the rootvg disk) output from an
AIX 6.1 system is given below:
Max LVs: 256
PP Size: 24
Free PPs: 590
LV count: 10
PV count: 1
Total VGDAs: 2
Conc Allowed: 0
MAX PPs per PV 1016
MAX PVs: 32
Quorum (disk): 1
Quorum (dd): 1
Auto Varyon ?: 1
Conc Autovaryo 0
Varied on Conc 0
Logical: 00c35ba000004c00000001157f54bf78.1 hd5 1
00c35ba000004c00000001157f54bf78.2 hd6 1
00c35ba000004c00000001157f54bf78.3 hd8 1
00c35ba000004c00000001157f54bf78.4 hd4 1
00c35ba000004c00000001157f54bf78.5 hd2 1
00c35ba000004c00000001157f54bf78.6 hd9var 1
00c35ba000004c00000001157f54bf78.7 hd3 1
00c35ba000004c00000001157f54bf78.8 hd1 1
00c35ba000004c00000001157f54bf78.9 hd10opt 1
00c35ba000004c00000001157f54bf78.10 hd11admin 1
Physical: 00c35ba07b2e24f0 2 0
Total PPs: 767
LTG size: 128
HOT SPARE: 0
AUTO SYNC: 0
VG PERMISSION: 0

9-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty SNAPSHOT VG: 0


IS_PRIMARY VG: 0
PSNFSTPP: 4352
VARYON MODE: 0
VG Type: 0
Max PPs: 32512

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The logical volume control block (LVCB)


# getlvcb -AT hd2
AIX LVCB
intrapolicy = c
copies = 1
interpolicy = m
lvid = 00c35ba000004c00000001157f54bf78.5
lvname = hd2
label = /usr
machine id = 35BA04C00
number lps = 102
relocatable = y
strict = y
stripe width = 0
stripe size in exponent = 0
type = jfs2
upperbound = 32
fs =
time created = Mon Oct 8 11:16:49 2007
time modified = Mon Oct 8 07:00:09 2007

Copyright IBM Corporation 2008

Figure 9-15. The logical volume control block (LVCB) AW186.0

Notes:

The LVCB and the getlvcb command


The LVCB stores attributes of an LV. The getlvcb command queries an LVCB.

Example on visual
In the example on the visual, the getlvcb command is used to obtain information from
the LV hd2. The information displayed includes the following:
- Intrapolicy, which specifies what strategy should be used for choosing PPs on a PV.
The five general strategies are edge (sometimes called outer-edge), inner-edge,
middle (sometimes called outer-middle), inner-middle, and center (c = Center).
- Number of copies (1 = No mirroring).
- Interpolicy, which specifies the number of PVs to extend across (m = Minimum).
- LVID

9-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - LV name (hd2)


- Number of LPs (103)
- Can the partitions be reorganized? (relocatable = y)
- Each mirror copy on a separate disk (strict = y)
- Number of disks involved in striping (stripe width)
- Stripe size
- LV type (type = jfs)
- JFS file system information
- Creation and last update time

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

How LVM interacts with ODM and VGDA


importvg
ODM
VGDA
/etc/filesystems
LVCB
Change, using Match IDs by
low-level name
commands

mkvg
extendvg
mklv Update
crfs exportvg
chfs
rmlv
reducevg

...
Copyright IBM Corporation 2008

Figure 9-16. How LVM interacts with ODM and VGDA AW186.0

Notes:

High-level commands
Most of the LVM commands that are used when working with VGs, PVs, or LVs are
high-level commands. These high-level commands (like mkvg, extendvg, mklv, and
others 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 has to be
updated; for example, to add a new LV. 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

9-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty situation where the VGDA/LVCB and the ODM are not in sync. The same situation may
occur when low-level commands are used incorrectly.

The importvg and exportvg commands


The visual shows two very important commands that are explained in detail later. The
command importvg imports a complete new VG based on a VGDA and LVCB on a
disk. The command exportvg removes a complete VG from the ODM.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM entries for physical volumes (1 of 3)


# 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"
Copyright IBM Corporation 2008

Figure 9-17. ODM entries for physical volumes (1 of 3) AW186.0

Notes:

CuDV entries for physical volumes


The CuDv object class contains information about each PV.

Key attributes
Remember the most important attributes:
- status = 1 means the disk is available
- chgstatus = 2 means the status has not changed since last reboot
- location specifies the location code of the device
- parent specifies the parent device

9-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Physical vs. virtual disks


The two disks have different device drivers and different Predefined Device object class
links. This is because hdisk2 is a physical disk which has been directly allocated to the
LP (which this example came from), while hdisk0 is a virtual disk which is mapped
though the Advanced Power Virtualization feature to a backing physical disk which is
allocated to a Virtual I/O Server partition on the same machine.
The virtual disk does not have an AIX location code. Rather, its location is the physical
location code of its parent virtual SCSI adapter (vscsi0) supplemented with the LUN
number for the backing device which is recorded in the connwhere field. The physical
location code of the parent adapter is recorded in the CuVPD object for the adapter.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM entries for physical volumes (2 of 3)

# 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 Corporation 2008

Figure 9-18. ODM entries for physical volumes (2 of 3) AW186.0

Notes:

The pvid attribute


The disks 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 information stored in CuAt


Other attributes of PVs (for example, the size of the disk) may be stored in CuAt.

9-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

ODM entries for physical volumes (3 of 3)


# odmget -q "value3 like hdisk[03]" CuDvDr
CuDvDr:
resource = "devno"
value1 = "17"
value2 = "0"
value3 = "hdisk0"

CuDvDr:
resource = "devno"
value1 = "36"
value2 = "0"
value3 = "hdisk3"

# ls -l /dev/hdisk[03]
brw------- 1 root system 17, 0 Oct 08 06:17 /dev/hdisk0
brw------- 1 root system 36, 0 Oct 08 09:19 /dev/hdisk3

Copyright IBM Corporation 2008

Figure 9-19. ODM entries for physical volumes (3 of 3) AW186.0

Notes:

Major and minor numbers


The ODM class CuDvDr is used to store the major and minor numbers of the devices.
The output shown on the visual, for example, indicates that CuDvDr has stored the
major number 17 (value1) and the minor number 0 (value2) for hdisk0.
The major numbers for the two disks are different because hdisk0 is a virtual disk,
served from a Virtual I/O Server partition, while hdisk1 is a physical disk allocated to
this LP.

Special files
Applications or system programs use the special files to access a certain device. For
example, the visual shows special files used to access hdisk0 (/dev/hdisk0) and
hdisk1 (/dev/hdisk1).

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM entries for volume groups (1 of 2)


# odmget -q "name=rootvg" CuDv
CuDv:
name = "rootvg"
status = 0
chgstatus = 1
ddins = ""
location = ""
parent = ""
connwhere = ""
PdDvLn = "logical_volume/vgsubclass/vgtype"
# odmget -q "name=rootvg" CuAt
CuAt:
name = "rootvg"
attribute = "vgserial_id"
value = "00c35ba000004c00000001157f54bf78"
type = "R"
generic = "D"
rep = "n"
nls_index = 637
(output continues on next page)

Copyright IBM Corporation 2008

Figure 9-20. ODM entries for volume groups (1 of 2) AW186.0

Notes:

CuDv entries for volume groups


Information indicating the existence of a VG is stored in CuDv, which means all VGs
must have an object in this class. The visual shows an example of a CuDv entry for
rootvg.

VGID
One of the most important pieces of information about a VG is the VGID. As shown on
the visual, this information is stored in CuAt.

Disks belonging to a volume group


An entry for each disk that belongs to a VG is stored in CuAt. This is shown on the next
page.

9-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

ODM entries for volume groups (2 of 2)


# odmget -q "name=rootvg" CuAt
...

CuAt:
name = "rootvg"
attribute = "timestamp"
value = "470a1bc9243ed693"
type = "R"
generic = "DU"
rep = "s"
nls_index = 0

CuAt:
name = "rootvg"
attribute = "pv"
value = "00c35ba07b2e24f00000000000000000"
type = "R"
generic = ""
rep = "sl"
nls_index = 0

Copyright IBM Corporation 2008

Figure 9-21. ODM entries for volume groups (2 of 2)) AW186.0

Notes:

Disks belonging to a volume group


The CuAt object class contains an object for each disk that belongs to a VG. The visual
shows an example of a CuAt object for a disk in rootvg.

Length of PVID
Remember that the PVID is a 32-number field, where the last 16 numbers are set to
zeros.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM entries for logical volumes (1 of 2)


# odmget -q "name=hd2" CuDv
CuDv:
name = "hd2"
status = 0
chgstatus = 1
ddins = ""
location = ""
parent = "rootvg"
connwhere = ""
PdDvLn = "logical_volume/lvsubclass/lvtype"

# odmget -q "name=hd2" CuAt Other attributes include intra,


CuAt: stripe_width, type, etc.
name = "hd2"
attribute = "lvserial_id"
value = "00c35ba000004c00000001157f54bf78.5"
type = "R"
generic = "D"
rep = "n"
nls_index = 648
Copyright IBM Corporation 2008

Figure 9-22. ODM entries for logical volumes (1 of 2) AW186.0

Notes:

CuDv entries for logical volumes


The CuDv object class contains an entry for each LV.

Attributes of a logical volume


Attributes of an LV, for example, its LVID (lvserial_id), are stored in the object class
CuAt. Other attributes that belong to an LV are the intra-physical policy (intra),
stripe_width, type, size, and label.

9-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

ODM entries for logical volumes (2 of 2)

# odmget -q "value3=hd2" CuDvDr


CuDvDr:
resource = "devno"
value1 = "10"
value2 = "5"
value3 = "hd2"

# ls -l /dev/hd2
brw------- 1 root system 10,5 08 Jan 06:56 /dev/hd2

# odmget -q "dependency=hd2" CuDep


CuDep:
name = "rootvg"
dependency = "hd2"

Copyright IBM Corporation 2008

Figure 9-23. ODM entries for logical volumes (2 of 2) AW186.0

Notes:
CuDvDr logical volume objects
Each LV has an object in CuDvDr that is used to create the special file entry for that LV
in /dev. As an example, the sample output on the visual shows the CuDvDr object for
hd2 and the corresponding /dev/hd2 (major number 10, minor number 5) special file
entry in the /dev directory.

CuDep logical volume entries


The ODM class CuDep (customized dependencies) stores dependency information for
software devices. For example, the sample output on the visual indicates that the LV
hd2 is contained in the rootvg VG.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM-related LVM problems


2.
VGDA High-Level Commands ODM
LVCB
- Signal Handler
1. - Lock

What can cause problems ?


kill -9, shutdown, system crash
Improper use of low-level commands
Hardware changes without, or with wrong,
software actions
Full root file system

Copyright IBM Corporation 2008

Figure 9-24. ODM-related LVM problems AW186.0

Notes:

Normal functioning of high-level commands


As already mentioned, most of the time administrators use high-level commands to
create or update VGs or LVs. 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 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.

9-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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
systems free space before attempting LVM recovery operations.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Fixing ODM problems (1 of 2)


If the ODM problem is not in the rootvg, for example in volume
group homevg, do the following:

# varyoffvg homevg

# exportvg homevg Remove complete volume


group from the ODM
# importvg -y homevg hdiskX

Import volume group and


create new ODM objects

Copyright IBM Corporation 2008

Figure 9-25. Fixing ODM problems (1 of 2) AW186.0

Notes:

Determining which volume group has the problem


If you detect ODM problems, you must determine whether the VG with the problem is
the rootvg or not. Because the rootvg cannot be varied off, the procedure given here
applies only to non-rootvg VGs.

Steps in ODM repair procedure (for problem not in rootvg)


1. In the first step, you vary off the VG, which requires that all file systems must be
unmounted first. To vary off a VG, use the varyoffvg command.
2. In the next step, you export the VG by using the exportvg command. This
command removes the complete VG from the ODM. The VGDA and LVCB are not
touched by exportvg.
3. In the last step, you import the VG by using the importvg command. Specify the VG
name with the -y option, otherwise AIX creates a new VG name.

9-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty You need to specify only one intact PV of the VG that you import. The importvg
command reads the VGDA and LVCB on that disk and creates completely new
ODM objects.
Note: We will return to the export and import functions later in this course.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Fixing ODM problems (2 of 2)


If the ODM problem is in the rootvg, try using
rvgrecover:
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 Uses odmdelete
done to export rootvg
odmdelete -q "name=$VG" -o CuAt
odmdelete -q "parent=$VG" -o CuDv Uses importvg to
odmdelete -q "name=$VG" -o CuDv import rootvg
odmdelete -q "name=$VG" -o CuDep
odmdelete -q "dependency=$VG" -o CuDep
odmdelete -q "value1=10" -o CuDvDr
odmdelete -q "value3=$VG" -o CuDvDr
importvg -y $VG $PV # ignore lvaryoffvg errors
varyonvg $VG
Copyright IBM Corporation 2008

Figure 9-26. Fixing ODM problems (2 of 2) AW186.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 may be possible to fix the problem using one of
the techniques described below.

The rvgrecover shell script


If you detect ODM problems in rootvg, you can try using the shell script rvgrecover.
The procedure is described in the AIX 4.3 Problem Solving Guide and Reference
(SC23-4123). Create this script (shown on the visual) in /bin and mark it as executable.
The script rvgrecover removes all ODM entries that belong to your rootvg by using
odmdelete. That is the same way exportvg works.

9-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty After deleting all ODM objects from rootvg, it imports the rootvg by reading the VGDA
and LVCB from the boot disk. This results in completely new ODM objects that describe
your rootvg.

The redefinevg command


Use of the redefinevg command is another way that you might be able to fix ODM
problems in rootvg. The redefinevg command redefines the set of PVs of the given
VG in the device configuration database. If inconsistencies occur between the PV
information in the ODM and the on-disk metadata, the redefinevg command
determines which PVs belong to the specified VG and re-enters this information in the
ODM. The redefinevg command checks for inconsistencies by reading the reserved
areas of all the configured PVs attached to the system.

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 VG must be active
for the re-synchronization to occur. If LV names are specified, only the information
related to those LVs is updated.

RAM Disk Maintenance Mode


If the preceding techniques do not fix the problem, you must go into the RAM Disk
Maintenance Mode (boot into maintenance mode from the CD-ROM). Before
attempting this, you should make sure you have a current mksysb backup.
Use the steps in the following table (which are similar to those in the rvgrecover script
shown on the visual) to recover the rootvg VG after booting to maintenance mode and
file system mounting.
Step Action
Delete all of the ODM information about LV.
Get the list of LVs from the VGDA of the PV.
# 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

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Step Action
Delete the VG 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 VG associated with the PV back to the ODM.
3
# importvg -y rootvg hdisk0
Recreate the device configuration database in the ODM from the
4 information on the PV.
# 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.
These steps can also be used to recover other VGs by substituting the appropriate PV
and VG information. It is suggested that this example be made into a script.

9-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9.3 Working with volume groups

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Logical Volume Manager


# smit lvm

Logical Volume Manager

Move cursor to desired item and press Enter.

Volume Groups
Logical Volumes
Physical Volumes
Paging Space

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-27. Logical Volume Manager AW186.0

Notes:

Introduction
The SMIT Logical Volume Manager menu is used to manage many aspects of the
system's storage. The Web-based System Manager can also be used to manage the
Logical Volume Manager.

Volume groups
The SMIT Volume Groups menu provides facilities to manipulate the VGs in the system.

Logical volumes
The SMIT Logical Volumes menu provides facilities to manipulate the LVs in the
system. LVs which contain journaled file systems, paging space or dump volumes can

9-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty also be manipulated from their respective menus. However, the facilities on this menu
give a much lower level of control over the characteristics of the LV. For example,
features such as partition allocation policy and mirroring for an LV, can only be set using
this menu. This menu is also used when an LV, which does not contain an AIX file
system, is being manipulated.

Physical volumes
The SMIT Physical Volumes menu allows the user to configure the PVs (fixed disks) in
the system. This menu duplicates options on the Fixed Disks menu of Devices.

Paging space
The SMIT Paging Space menu allows a user to add, delete, activate, and list the paging
spaces available.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

SMIT Volume Groups menu


# smit vg
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

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-28. SMIT Volume Groups menu AW186.0

Notes:

Volume group configuration


The visual shows the SMIT screen that allows for the configuration of VGs. To get to this
menu, use the SMIT fastpath:
smit vg
Lets describe these items throughout the course.

9-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List all volume groups

# lsvg
rootvg
payrollvg

# lsvg -o
rootvg

Copyright IBM Corporation 2008

Figure 9-29. List all volume groups AW186.0

Notes:

The lsvg command


The lsvg command can be used to list the VGs in the system.
It can be used to list the names of all VGs (default) or only those that are varied
on/active using the -o option.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

List volume group contents

# lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 000bc6fd00004c00000000e10fdd7f52


VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1084 (17344 megabytes)
MAX LVs: 256 FREE PPs: 1032 (16512 megabytes)
LVs: 11 USED PPs: 52 (832 megabytes)
OPEN LVs: 10 QUORUM: 2
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable

Copyright IBM Corporation 2008

Figure 9-30. List volume group contents AW186.0

Notes:

List volume group information


The lsvg command can be used to list information about the status and content of a
particular VG, for example:
lsvg Volumegroup.
The output provides status information about the VG. The most useful information here
is:
- VG state (VG STATE - active or inactive/complete if all PVs are active)
- PP size (PP SIZE - 4 MB by default)
- Total number of PPs (TOTAL PPs)
- Number of free PPs (FREE PPs)

9-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List volume group information (physical volumes)

# lsvg -p rootvg

rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 159 52 24..00..00..00..28
hdisk1 active 159 78 32..02..00..12..32

Copyright IBM Corporation 2008

Figure 9-31. List volume group information (physical volumes) AW186.0

Notes:

The lsvg -p command


The lsvg -p Volumegroup command gives information about all of the PVs within the
VG. The information given is:
- PV name (PV_NAME)
- PV state (PV STATE - active or inactive)
- Total number of PPs (TOTAL PPs)
- Number of free PPs (FREE PPs)
- How the free space is distributed across the disk (FREE DISTRIBUTION)
Free distribution is the number of PPs allocated within each section of the PV: outer
edge, outer middle, center, inner middle, inner edge.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

List volume group information (logical volumes)

# lsvg -l rootvg

rootvg:
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd6 paging 32 32 1 open/syncd N/A


hd5 boot 2 2 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs2 1 1 1 open/syncd /var
hd4 jfs2 9 9 1 open/syncd /
hd2 jfs2 101 101 1 open/syncd /usr
hd3 jfs2 4 4 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 5 5 1 open/syncd /opt
hd11adminjfs2 8 8 1 open/syncd /admin
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred

Copyright IBM Corporation 2008

Figure 9-32. List volume group information (logical volumes) AW186.0

Notes:

The lsvg -l command


The lsvg -l Volumegroup command gives information about all of the LVs within the
VG. The details given are:
- LV name (LVNAME)
- Type of LV (TYPE, for example, file system, paging)
- Number of LPs (LPs)
- Number of PPs (PPs)
- Number of PVs (PVs)
- LV state (LV STATE)
- Mount point (MOUNT POINT), if the LV contains a journaled file system

9-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Add a Volume Group


# smit mkvg
Add a Volume Group

Move cursor to desired item and press Enter.

Add an Original Volume Group


Add a Big Volume Group
Add a Scalable Volume Group

Add an Original Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
VOLUME GROUP name []
Physical partition SIZE in megabytes +
* PHYSICAL VOLUME names [] +
FORCE the creation of volume group? no +
Activate volume group AUTOMATICALLY yes +
at system restart?
Volume group MAJOR NUMBER [] +#
Create VG Concurrent Capable? no +

Copyright IBM Corporation 2008

Figure 9-33. Add a Volume Group AW186.0

Notes:

The mkvg command


The mkvg command is used to create a VG. A new VG must contain at least one PV.
The -y option is used to indicate the name for the new VG. If this is not specified, a
system-generated name is used. The -s option is used to specify the PP size in MB
which must be a power of 2. The default is the smallest PP size consistent with the
maximum PP/PV and the largest PV in the VG.
The -n option means that the VG is not automatically activated at system startup. This
should be done for external disks that may not always be available to the system.
An example of the mkvg command to create a VG named newvg created with a PP size
of 2 MB is:
# mkvg -s 2 -y newvg hdisk1

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Using SMIT
The VG MAJOR NUMBER on the SMIT window is used by the kernel to access that
VG. This field is most often used for High Availability Network File Systems (HANFS)
and High Availability Cluster Multi-Processing (HACMP) applications.
The item on the SMIT window referring to concurrent mode operation have no meaning
on systems without HACMP installed. This item is valid on AIX V4.2 and later.
There is a separate SMIT window for adding a big VG which is identical to this window.

9-58 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Add a Scalable Volume Group


# smit mkvg

Add a Scalable Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
VOLUME GROUP name []
Physical partition SIZE in megabytes +
* PHYSICAL VOLUME names [] +
FORCE the creation of 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 +

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 2008

Figure 9-34. Add a Scalable Volume Group AW186.0

Notes:

Additional options for scalable volume groups


There is a separate SMIT menu for adding scalable VGs. 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 VG.
With non-scalable VGs, LVM allows tuning of the number of PPs for each PV via the -t
factor. In scalable VGs, the PPs are managed on a VG- wide basis.
The maximum number of LVs was fixed depending upon the type of VG. Now, in
scalable VGs the maximum is tunable.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Set Characteristics of a Volume Group

# smit vgsc

Set Characteristics of a Volume Group

Move cursor to desired item and press Enter.

Change a Volume Group


Add a Physical Volume to a Volume Group
Remove a Physical Volume from a Volume Group
Reorganize a Volume Group

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-35. Set Characteristics of a Volume Group AW186.0

Notes:

Volume group operations


Once the VG has been created, you can do four operations on it:
- Modify its attributes
- Increase its size by adding PVs
- Decrease its size by removing PVs
- Reorganize it

9-60 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Change a Volume Group


# smit chvg

Change a Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name rootvg
* Activate volume group AUTOMATICALLY yes +
at system restart?
* A QUORUM of disks required to keep the volume yes +
group on-line ?
Convert this VG to Concurrent Capable? no +
Change to big VG format? no +
Change to scalable VG format? no +
LTG Size in kbytes 128 +
Set hotspare characteristics n +
Set synchronization characteristics of stale n +
partitions
Max PPs per VG in units of 1024 32 +
Max Logical Volumes 256 +

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 2008

Figure 9-36. Change a Volume Group AW186.0

Notes:

Activate volume group automatically


The SMIT menu option Activate volume group AUTOMATICALLY at system restart
calls the chvg command to change the startup characteristics of a VG. The -a y option
sets the VG to be used at startup. The -a n option resets this characteristic to no.

Quorum of disks
The SMIT menu option A QUORUM of disks required to keep the volume group
on-line? determines if the VG is automatically varied off (deactivated) after losing its
quorum of PVs. Selecting no means that the VG stays active until it loses all of its PVs.
However, if this option is set to no then you are in danger of having backdated VGDAs.
To activate a non-quorum user-defined VG, all of the PVs within the VG must be
accessible or the activation fails.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Scalable volume group options


If the VG is scalable, then you can change the Max PPs per VG and the Max Logical
Volumes. Note that the screen says the units are in kilobytes. This is misleading. The
value is simply a count in units of 1024 PPs. For example, a value of 2 would indicate
2048 PPs per VG. The default is 32 (32,768 PPs). Allowable values are powers of 2 up
to 2048 (2,097,152 PPs).

9-62 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Logical track group (LTG) size


LTG is the maximum transfer size of a logical volume
Prior to AIX 5L V5.3:
Default LTG size is 128 KB
LTG size can be changed by the -L flag on the chvg or mkvg command
AIX 5L V5.3 and V6.1:
AIX dynamically sets the LTG size (calculated at each volume group
activation)
LTG size can be changed with the command:
varyonvg -M <LTGsize>
The mkvg -L flag is no longer supported
The chvg -L flag has no effect on volume groups created in AIX 5L V5.3
or later
Enable variable LTG on old volume groups using chvg -L 0
To display the LTG size of a disk, use the command:
# /usr/sbin/lquerypv -M <hdisk#>

Copyright IBM Corporation 2008

Figure 9-37. Logical track group (LTG) size AW186.0

Notes:

Logical track group (LTG) size


When LVM receives a request for an I/O, it breaks the I/O down into LTG sizes before it
passes the request down to the device driver of the underlying disks. The LTG is the
maximum transfer size of LV and is common to all the LVs in the VG since it is a VG
attribute.
Prior to AIX 5L V5.1, the only supported LTG was 128 KB. In AIX 5L V5.1 and V5.2,
LVM accepted LTG values of 128 KB, 256 KB, 512 KB, and 1024 KB. However, many
disks now support transfer sizes larger than 1 MB. To take advantage of these larger
transfer sizes and get better disk I/O performance, AIX now accepts values of
128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, and 16 MB for the LTG size.
The default LTG size prior to AIX 5L V5.3 was 128 KB. In AIX now, LVM dynamically
discovers the optimal LTG size each time the VG is varied on.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Setting the LTG size


In AIX 5L V5.1 and V5.2, the LTG size is set by the -L flag using either the chvg or mkvg
command.
Now in AIX, if you want to specify the LTG size, you can set it using the varyonvg -M
command. The following command sets the LTG size of the myvg VG to 512 KB:
# varyonvg -M512K myvg
The chvg -L flag has no effect on VGs created in AIX 6.1, but allows the LTG size to
change on standard and big VGs which were created on AIX releases prior to AIX 5L
V5.3.
The following command enables variable LTG for a tmpvg VG created prior to AIX 5L
V5.3 at the next varyonvg and sets the logical track group size to the common
maximum transfer size of the disks (because of the -L 0):
# chvg -L 0 tmpvg
If this command is not executed, a VG created prior to AIX 5L V5.3 has the old LTG size
in AIX 5L V5.3 and AIX 6.1, and this LTG size behaves the same way it did in the prior
release.
You can specify 128, 256, 512, or 1024 instead of 0 on the command line to indicate
128 KB, 256 KB, 512 KB, or 1024 KB LTG size, respectively. The value should be less
than or equal to the maximum transfer size of all disks in the VG. The default size is 128
kilobytes.

Displaying the LTG size


To obtain what the maximum supported LTG size of your hard disk is, you can use the
lquerypv command with the -M flag. The output gives the LTG size in KB. For example:
# /usr/sbin/lquerypv -M hdisk0
256
In AIX 6.1, this information is automatically included in the lspv command output that is
discussed later.

9-64 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Hot spare

1st copy 2nd copy 1st copy 2nd copy


of data1 of data1 of data2 of data2
LV LV LV LV

Synchronization

Hot spare

Copyright IBM Corporation 2008

Figure 9-38. Hot spare AW186.0

Notes:

What is an LVM hot spare?


A hot spare is a disk or group of disks used to replace a failing disk. LVM marks a PV
missing due to write failures. It then starts the migration of data to the hot spare disk.

Minimum hot spare requirements


The following is a list of minimal hot sparing requirements enforced by the operating
system:
- Spares are allocated and used by VG.
- LVs must be mirrored.
- All LPs on hot spare disks must be unallocated.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Hot spare disks must have at least equal capacity to the smallest disk already in the
VG. Good practice dictates having enough hot spares to cover your largest mirrored
disk.

Designate a hot spare disk


To designate a disk as a hot spare disk, use the chpv -h command.
For example, to mark hdisk1 as a hot spare disk, use the command:
# chpv -hy hdisk1
To remove hdisk1 from the hot spare pool, use the command:
# chpv -hn hdisk1

Set the hot spare migration policy for the volume group
The chvg -h command sets the migration policy for the VG. The following table shows
the arguments that can be used with the chvg -h command:
chvg -h
Description
argument
Permits one-for-one migration of partitions from one failed disk to
y (lower case) one spare disk. From the pool of hot spare disks, the smallest one
which is big enough to substitute for the failing disk is used.
Migrates partitions from a failing disk to one or more hot spare
Y (upper case)
disks; might use the complete pool of hot spare disks.
n No automatic migration takes place (the default).
r Removes all disks from the pool of hot spare disks for this VG.
For example, to set an automatic migration policy which uses the one smallest hot
spare disk that is large enough to replace the failing disk in the datavg VG, use the
command:
# chvg -hy datavg

Set the hot spare synchronization policy for the volume group
The chvg -s command is used to specify the synchronization characteristics. The
following two values are valid for the synchronization argument:
chvg -s
Description
argument
y Automatically attempts to synchronize stale partitions.
Does not automatically attempt to synchronize stale partitions (the
n
default).

9-66 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty For example, to automatically synchronize stale partitions for the datavg VG, use the
command:
chvg -sy datavg

How to set up hot sparing


The following table summarizes the steps required to set up hot sparing:
Step Command Action
Decide which VGs with mirrored LVs require high
1 -
availability
Decide how many hot spare disks are required, and how
2 - large the hot spare disks must be based on the existing
disks in the VG
3 extendvg Add the hot spares to the VGs which they are to protect
Decide which hot spare policy is most effective for your
4 -
VGs
5 chpv Designate the selected disks as hot spares
Decide which synchronization policy meets the business
6 chvg
needs, and set the policy
7 - Sleep well at night!
Instead of using the command line interface, you can use the Web-based System
Manager to make the changes on the hot spare information.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Extending and reducing volume groups

Does not retain current disk contents


hdisk6

# extendvg myvg hdisk6


myvg

hdisk4 hdisk5

# reducevg myvg hdisk5

Copyright IBM Corporation 2008

Figure 9-39. Extending and reducing volume groups AW186.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
fastpath 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 these 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 which has been previously used, but
contains data which is no longer needed.
The syntax for the extendvg command is:
extendvg [-f] Volumegroup hdiskn

9-68 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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, 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 fastpath:
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. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Remove a Volume Group


# smit reducevg2
Remove a Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name [] +

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 2008

Figure 9-40. Remove a Volume Group AW186.0

Notes:

How to remove a volume group


You can use the smit reducevg2 fastpath to remove a volume group. It runs a script
which identifies what physical volumes are in the volume group, and then runs the
reducevg command to remove each physical volume until there are no more physical
volumes in the volume group.
The Remove a Volume Group menu does not have a corresponding high-level
command. The correct way to remove a volume group is to use the Remove a
Physical Volume from a Volume Group option (which calls the reducevg command).
This removes the volume group when you remove the last physical volume within it.
The syntax of the reducevg command is:
reducevg [-d] [-f] VolumeGroup PhysicalVolume

9-70 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Activate/deactivate a volume group

Activate a volume group (make it available for use):


varyonvg [ -f ] Volumegroup

# varyonvg datavg

Deactivate a volume group (make it unavailable for use):


varyoffvg Volumegroup

# varyoffvg datavg

Copyright IBM Corporation 2008

Figure 9-41. Activate/Deactivate a volume group AW186.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 could cause errors and loss of data in the volume group descriptor areas
and the logical volumes within that volume group.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

In AIX 6.1, the option -M allows the specification of a logical track group size for the
volume group, instead of allowing LVM to determine it dynamically.

9-72 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Import/export a volume group


# smit importvg

Import a Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
VOLUME GROUP name []
* PHYSICAL VOLUME name [] +
Volume Group MAJOR NUMBER [] +#

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 2008

Figure 9-42. Import/Export a Volume Group AW186.0

Notes:

Exporting a volume group


If you have a volume group on one or more removable disks that you want to access on
another system, you must first export the volume group from the current system using
the exportvg command. This removes all information about the volume group from the
system. To export a volume group, it must be inactive.

Importing a volume group


To access an exported volume group on a system, it must be imported to the system
using the importvg command. Do not attempt to import rootvg.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Advanced RAID support


Checks all disks in a volume group if they have grown in
size:
chvg -g Volumegroup

# chvg -g datavg

Turns on bad block relocation policy of a volume group:


chvg -b [ y/n ] Volumegroup

# chvg -b y datavg

Turns off bad block relocation policy of a volume group:


# chvg -b n datavg

Copyright IBM Corporation 2008

Figure 9-43. Advanced RAID support AW186.0

Notes:

Has the disk grown in size?


Modern storage subsystems, such as RAID arrays, have the ability to increase the size
of what looks like a disk to LVM. The command chvg -g vgname, examines all the disks
in the volume group to see if they have grown in size. If any disks have grown in size it
attempts to dynamically add additional physical partitions to the physical volumes. If
necessary, the proper -t factor is applied or the volume group is converted to a big
volume group.

Bad block relocation


The command chvg -b y vgname turns on the bad block relocation policy of a volume
group. The command chvg -b n vgname turns off the bad block relocation policy of a
volume group.

9-74 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Bad block relocation policy should be turned off for RAID devices and storage
subsystems unless the manufacturer tells you otherwise.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

9-76 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9.4 Logical volumes

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-77
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Logical volume policies


Intra-physical volume allocation policy:

E M C M E

Inner Edge
Inner Middle
Center
Outer Middle (Middle)
Center Edge (Edge)
Inter-physical volume allocation policy:
Maximum number of physical volumes to use
Range of physical volumes to use
Copyright IBM Corporation 2008

Figure 9-44. Logical volume policies AW186.0

Notes:

Introduction
When creating or changing a logical volume you can define the way the LVM decides
on which physical partitions to allocate to the logical volume. This affects the
performance of the logical volume.

Intra-physical volume allocation policy


The intra-physical volume allocation policy indicates where, on the physical volume,
partitions are allocated to the logical volume. The choices are: center, middle, edge,
inner edge, and inner middle. Location of the data can impact performance. To
determine the area with the best performance, you need to check the documentation
with your disks. The center area generally was the area with the best performance on
older disks. But, that may not be true with newer disks.

9-78 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Inter-physical volume allocation policy


The inter-physical volume allocation policy indicates how many physical volumes can
be used to contain the physical partitions of the logical volume. The maximum number
of physical volumes that can be used by the logical volume can be specified (this is
normally set to the number of physical volumes in the volume group). The range of
volumes used can be:
- Minimum
Only allocate partitions on one physical volume, or as many as there are copies
- Maximum
Allocate partitions across all physical volumes up to the maximum number of
physical volumes

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-79
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

SMIT Logical Volumes menu


# smit lv

Logical Volumes

Move cursor to desired item and press Enter.

List All Logical Volumes by Volume Group


Add a Logical Volume
Set Characteristic of a Logical Volume
Show Characteristics of a Logical Volume
Remove a Logical Volume
Copy a Logical Volume

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-45. SMIT Logical Volumes menu AW186.0

Notes:

SMIT Logical Volumes menu


This is the top-level SMIT menu for logical volumes. The next few pages discuss these
items.

9-80 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Show logical volume characteristics


Physical volume map:
# lslv -l lv00

lv00:/home/john
PV COPIES IN BAND DISTRIBUTION
hdisk0 010:000:000 70% 000:000:007:003:000

Logical partition map:


# lslv -m lv00

lv00:/home/john
LP PP1 PV1 PP2 PV2 PP3 PV3
00010134 hdisk0
0002 0135 hdisk0
00030136 hdisk0

Copyright IBM Corporation 2008

Figure 9-46. Show logical volume characteristics AW186.0

Notes:

lslv -l lvname
The lslv -l lvname command gives information about the distribution of a particular
logical volume's logical partitions for each physical volume. The information includes
the number of logical partitions on the disk and its copies, if any, on that disk; the
percentage of physical partitions which match the intra-physical volume allocation
policy; the distribution of physical partitions on the physical volume (outer edge, outer
middle, center, inner middle, inner edge).

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-81
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

COPIES
The COPIES field of the lslv -l lvname command has the following three fields:
- 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
The example in the visual, COPIES (010:000:000), can be interpreted as:
- 010 - Information regarding first copy, that is, 10 physical partitions
- 000:000 - These two fields hold information regarding the second and the third
copies, mirrored copies on the physical volume. By looking at this output, you can
tell if the logical volume is mirrored and if the mirrored copies are on the same
physical volume. If they are all on separate physical volumes, which is the default,
the last two fields still show 000.

IN BAND
The IN BAND field displays the percentage of physical partitions on the physical volume
that belong to the logical volume and were allocated within the physical volume region
specified by intra-physical allocation policy.

DISTRIBUTION
The DISTRIBUTION field displays the number of physical partitions allocated within each
section of the physical volume: outer edge, outer middle, center, inner middle, and inner
edge.
The example in the visual, DISTRIBUTION (000:000:007:003:000), shows that of the
10 physical partitions, seven physical partitions are located in the center area and three
physical partitions in the inner-middle area of the disk. There is a relationship between
the distribution 000:000:007:003:000 and the copies 010:000:000 whereby the
007:003 numbers indicate the distribution of the 010.

lslv -m lvname
The lslv -m lvname command gives a map of which physical volumes contain which
physical partitions for the logical partitions of the logical volume. Three columns are
given, one for each copy of a logical partition.

9-82 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Add a logical volume


# smit mklv
Add a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[TOP] [Entry Fields]


Logical volume NAME []
* VOLUME GROUP name rootvg
* Number of LOGICAL PARTITIONS [] #
PHYSICAL VOLUME names [] +
Logical volume TYPE [] +
POSITION on physical volume outer_middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [] #
to use for allocation
Number of COPIES of each logical 1 +
partition
Mirror Write Consistency? active +
Allocate each logical partition copy yes +
[MORE...11]

F1=Help F2=Refresh F3=Cancel F4=List


F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F0=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-47. Add a Logical Volume AW186.0

Notes:

The mklv command


The mklv command creates a logical volume. The name of the logical volume can be
specified or, alternatively, a system-generated name is used. The volume group to
which 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. Using mklv from the command line, you can now specify
blocks (b,B), KB (k,K), MB (m,M) and GB (g,G) rather than the number of partitions.
Examples are:
# mklv -y newlv1 datavg 1
# mklv -y newlv2 datavg 1b
# mklv -y newlv3 datavg 1k
# mklv -y newlv4 datavg 1m
# mklv -y newlv5 datavg 1g
The system rounds to the physical partition size of the volume group.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-83
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Remove a logical volume


# smit rmlv

Remove a Logical Volume

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[TOP] [Entry Fields]


LOGICAL VOLUME name [] +

F1=Help F2=Refresh F3=Cancel F4=List


F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F0=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-48. Remove a Logical Volume AW186.0

Notes:

The rmlv command


The rmlv command removes a logical volume. The -f option prevents the command
from prompting for confirmation.
Do not use rmlv to remove journaled file systems or paging space volumes. These
high-level structures have information relating to them saved in the ODM database and
in files such as /etc/filesystems. This information is not removed by the rmlv command.
You should use the appropriate command for that type of data structure.

9-84 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Set characteristics of a logical volume


# smit lvsc

Set Characteristics of a Logical Volume

Move cursor to desired item and press Enter.

Change a Logical Volume


Rename a Logical Volume
Increase the Size of a Logical Volume
Add a Copy to a Logical Volume
Remove a Copy from a Logical Volume

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-49. Set Characteristics of a Logical Volume AW186.0

Notes:

The chlv command


The chlv command is used to change the characteristics of a logical volume.
Characteristics that can be changed are the allocation and scheduling policies and the
permissions. (When a logical volume is created, it always has read/write permissions,
but this can be changed to read-only later.)
You can change the name of a logical volume using the chlv command with the -n
option. No other chlv options can be specified if -n is used.

Changing the size of the logical volume


The size of a logical volume may be increased at any time, assuming that there is
sufficient space in the volume group. To do this, the extendlv command is used. You
can now specify blocks, KB, MB, and GB rather than the number of partitions. You can

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-85
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

set the allocation policies for the new partitions to different values than used by the
original logical volume.
The size of a logical volume may not be decreased automatically. To make a logical
volume smaller, back it up, delete it, create a new logical volume of the desired size,
and restore the data.

9-86 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List all logical volumes by volume group

# lsvg -o | lsvg -i -l

rootvg:
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd6 paging 32 32 1 open/syncd N/A


hd5 boot 2 2 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs2 2 2 1 open/syncd /var
hd4 jfs2 9 9 1 open/syncd /
hd2 jfs2 101 101 1 open/syncd /usr
hd3 jfs2 4 1 1 open/syncd /tmp
hd1 jfs2 1 1 1 open/syncd /home
hd10opt jfs2 5 5 1 open/syncd /opt
hd11admin jfs2 8 8 1 open/syncd /admin
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred

Copyright IBM Corporation 2008

Figure 9-50. List all logical volumes by volume group AW186.0

Notes:

Listing logical volumes


From the smit lv fastpath, 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.
The SMIT option Show Characteristics of a Logical Volume uses the lslv lvname
to show status information about the selected logical volume.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-87
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Show logical volume characteristics

# lslv lv02

LOGICAL VOLUME: lv02 VOLUME GROUP: course


LV IDENTIFIER: 0000000000004c00000000e5cf75106f.4 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 128 PP SIZE: 4 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 10 PPs: 10
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: /home/malcolm LABEL: /home/malcolm
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ? NO

Copyright IBM Corporation 2008

Figure 9-51. Show logical volume characteristics AW186.0

Notes:

Specific logical volume characteristics


The following characteristics are specific to logical volumes:
- WRITE VERIFY
Specifies whether to verify all writes to the logical volume with a follow-up read.
- BB POLICY
Indicates whether the LVM should try to relocate a bad block if one is encountered.
- UPPER BOUND
Specifies the maximum number of disks that this logical volume can span.

9-88 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Reorganize a volume group


# smit reorgvg

Reorganize a Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* VOLUME GROUP name vg3
LOGICAL VOLUMES [lv04 lv07] +

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 2008

Figure 9-52. Reorganize a Volume Group AW186.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 to the order listed on the command line.

reorgvg syntax
The syntax is: reorgvg volumegroup [lvname]
For example: reorgvg vg3 lv04 lv07
In AIX V4.2 and later, if you enter the reorgvg command with the volume group name
and no other arguments, the entire volume group is reorganized.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-89
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

9-90 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 9.5. Physical volumes

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-91
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

SMIT Physical Volumes menu


# smit pv

Physical Volumes

Move cursor to desired item and press Enter.

List All Physical Volumes in System


Add a Disk
Change Characteristics of a Physical Volume
List Contents of a Physical Volume
Move Contents of a Physical Volume

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 9-53. SMIT Physical Volumes menu AW186.0

Notes:

SMIT Physical Volumes menu


This is the top-level menu for physical volume. Each of these items is discussed in the
following pages.

9-92 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List physical volume information


List all physical volumes in system:
# lspv

hdisk0 da1c923411d52ec91cd600802eda72c9 rootvg active


hdisk1 bebc800000000000000000802evg79c9 rootvg active

List the contents of a physical volume:

# lspv hdisk0

PHYSICAL VOLUME: hdisk0 VOLUME GROUP: rootvg


PV IDENTIFIER: da1c923411d52ec91cd600802eda72c9
VG IDENTIFIER: 000bc6fd00004c00000000e10fdd7f52
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 4 megabyte(s) LOGICAL VOLUMES: 6
TOTAL PPs: 95 (380 megabytes) VG DESCRIPTORS: 2
FREE PPs: 3 (12 megabytes) HOT SPARE: no
USED PPs: 92 (368 megabytes) MAX REQUEST 256 KB
FREE DISTRIBUTION: 00..03..00..00..00
USED DISTRIBUTION: 19..16..19..19..19
Copyright IBM Corporation 2008

Figure 9-54. List physical volume information AW186.0

Notes:

Listing physical volume information


From the smit pv fastpath, the List all Physical Volumes in System option uses the
undocumented command getlvodm -C 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 (i.e., not up to date with other copies), total number of physical
partitions, number of free physical partitions, and distribution of free space on the
physical volume.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-93
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

List logical volumes on a physical volume

# lspv -l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd1 1 1 00..00..00..12..00 /home
hd3 4 4 00..03..00..00..00 /tmp
hd2 101 101 00..00..17..12..00 /usr
hd4 9 9 00..00..13..00..00 /
hd8 1 1 00..00..01..00..00 N/A
hd6 8 8 00..00..00..08..00 N/A
hd5 2 2 01..00..00..00..00 N/A
hd9var 2 2 00..00..02..00..00 /var
hd10opt 5 5 00..00..02..00..00 /opt
hd11admin 8 8 00..00..02..00..00 /admin

Copyright IBM Corporation 2008

Figure 9-55. List logical volumes on a physical volume AW186.0

Notes:

Listing logical volumes


The lspv -l pvname command lists all the logical volumes on a physical volume
including the number of logical partitions, physical partitions, and distributions on the
disk.

9-94 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

List a physical volume partition map

# lspv -p hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-2 used outer edge hd5 boot N/A
3-154 free outer edge
155-186 used outer middle hd6 paging N/A
187-307 free outer middle
308-308 used center hd8 jfslog N/A
309-309 used center hd4 jfs2 /
310-313 used center hd2 jfs2 /usr
314-314 used center hd9var jfs2 /var
315-317 used center hd3 jfs2 /tmp
318-318 used center hd1 jfs2 /home
319-319 used center hd10opt jf22 /opt
320-360 used center hd2 jfs2 /usr
361-363 used center hd10opt jfs2 /opt
364-364 used center hd3 jfs2 /tmp
365-372 used center hd4 jfs2 /
373-380 used center hd11admin jfs2 /admin
381-423 used center hd2 jfs2 /usr
424-424 used center hd9var jfs2 /var
425-425 used center hd10opt jfs2 /opt
426-438 used center hd2 jfs2 /usr
439-460 free center
461-613 free inner middle
614-767 free inner edge

Copyright IBM Corporation 2008

Figure 9-56. List a physical volume partition map AW186.0

Notes:

Showing partition map


The lspv -p pvname command lists all the logical volumes on a disk and the physical
partitions to which its logical partitions are mapped. It is listed in the order of physical
partition and shows what partitions are free and which are used, as well as the location;
that is, center, middle, edge, inner edge, and inner middle.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-95
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add or move contents of physical volumes


A disk can be added:
Through SMIT, or
Configured through configuration manager when the system
boots up

Move the contents of a physical volume:

migratepv [ -l lvname ] sourcePV targetPV ..

# migratepv -l lv02 hdisk0 hdisk6

Copyright IBM Corporation 2008

Figure 9-57. Add or move contents of physical volumes AW186.0

Notes:

Adding a physical device


To add a physical volume to the system using SMIT, click SMIT > Devices > Add a
Disk > Fixed Disk. This adds the disk and assigns it an hdisk number. Once the disk
has been added, it needs to be added to a volume group so that it can be used. Refer to
the SMIT Volume Groups or Define a Fixed Disk to the Operating System menus.
The alternative method is to power down the system, connect the new disk to the
system, power up the system, and in so doing cfgmgr is invoked, which picks up the
new device (if it is a detectable device).
In AIX V4.3.1 and later, if you wish to add a disk that exceeds the 1016 PP/PV limitation
to a pre-existing volume group, first convert the volume group so that it can hold
multiples of 1016 partitions per disk. This is done using the chvg -t factor command,
where factor is a value between 1 and 16. Thus, the maximum number of physical
partitions per physical volume for this volume group changes to factor multiplied by
1016.

9-96 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Preparation to remove a physical device


The migratepv command can be used to move all partitions (or partitions from a
selected logical volume) from one physical volume to one or more other physical
volumes in the same volume group. This would be used if the physical volume is about
to be taken out of service and removed from the machine or to balance disk usage.

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-97
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint

1. A scalable volume group can contain up to ____ disks


and ____ logical volumes.
2. (True or False) Each volume group has a unique
identifier.
3. (True or False) Disks can be added to an existing
volume group.
4. The ____ command can be used to create a logical
volume.
5. (True or False) No LVM information is stored outside of
the ODM.

Copyright IBM Corporation 2008

Figure 9-58. Checkpoint AW186.0

Notes:

9-98 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: Working with LVM

Exercise 7

Copyright IBM Corporation 2008

Figure 9-59. Exercise: The Logical Volume Manager (LVM) AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 9. The Logical Volume Manager (LVM) 9-99
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

An LVM volume group contains one or more physical


volumes. Each physical volume is divided into physical
partitions.
A logical volume contains one or more logical partitions.
Each logical partition is mapped to at least one physical
partition.
LVM supports mirroring and striping.
LVM information is stored in a number of different places,
including the ODM and the VGDA.
The system administrator can use commands or SMIT to
manage volume groups, physical volumes, and logical
volumes.

Copyright IBM Corporation 2008

Figure 9-60. Unit summary AW186.0

Notes:

9-100 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 10.Storage management with LVM

What this unit is about


This unit discusses several advanced LVM-related concepts and
explains how to complete various important storage and disk
management tasks. The procedures required to complete the tasks
discussed involve the use of LVM.

What you should be able to do


After completing this unit, you should be able to:
Set up mirroring appropriate to your needs
Describe the quorum mechanism
Explain the physical volume states used by LVM
Replace a disk under different circumstances
Export and import volume groups

How you will check your progress


Accountability:
Lab exercises
Checkpoint questions

References
Online AIX Version 6.1 Commands reference
Online AIX Version 6.1 Operating System and Device
management
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp
Redbooks AIX Storage Management Redbook (GG24-4484)
Redbooks Logical Volume Manager from A to Z: Introduction and
Concepts Redbook (SG24-5432)
Redbooks Logical Volume Manager from A to Z: Troubleshooting
and Commands Redbook (SG24-5433)

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Set up mirroring appropriate to your needs
Describe the quorum mechanism
Explain the physical volume states used by LVM
Replace a disk under different circumstances
Export and import volume groups

Copyright IBM Corporation 2008

Figure 10-1. Unit objectives AW186.0

Notes:

Introduction
This unit presents details regarding LVM concepts and capabilities not discussed in
detail in previous units, and it explains many disk management procedures that are very
important for any AIX 5L system administrator.

10-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 10.1.Mirroring and quorum

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Mirroring
Logical
hdisk0 Partitions

hdisk1

Mirrored
hdisk2 Logical
Volume

LP: PP1: PP2: PP3:


VGSA
5 hdisk0, 5 hdisk1, 8 hdisk2, 9

Copyright IBM Corporation 2008

Figure 10-2. Mirroring AW186.0

Notes:

Using mirroring to increase availability


The visual above shows a mirrored logical volume, where each logical partition is
mirrored to three physical partitions. More than three copies are not possible.
If one of the disks fails, there are at least two copies of the data available. That means
mirroring is used to increase the availability of a system or a logical volume.

Role of VGSA
The information about the mirrored partitions is stored in the VGSA, which is contained
on each disk. In the example shown on the visual, we see that logical partition 5 points
to physical partition 5 on hdisk0, physical partition 8 on hdisk1, and physical partition 9
on hdisk2.

10-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Historical information


In AIX 4.1/4.2, the maximum number of mirrored partitions on a disk was 1016. AIX 4.3
and subsequent releases allow more than 1016 mirrored partitions on a disk.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Stale partitions

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 2008

Figure 10-3. Stale partitions AW186.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), if it has at least one stale partition.

10-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Updating stale partitions


If a disk with stale partitions has been repaired (for example, after a power failure), you
should use the varyonvg command which starts the syncvg command to synchronize
the stale partitions. The syncvg command is started as a background job that updates
all stale partitions from the volume group.
Always use the varyonvg command to update stale partitions. After a power failure, a
disk forgets its reservation. The syncvg command cannot reestablish the reservation,
whereas varyonvg does this before calling the syncvg command. The term reservation
means that a disk is reserved for one system. The disk driver puts the disk in a state
where you can work with the disk (at the same time, the control LED of the disk turns
on).
The varyonvg command works if the volume group is already varied on or if the volume
group is the rootvg.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Creating mirrored LVs (smit mklv)


Add a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
Logical volume NAME [lv01]
VOLUME GROUP name rootvg
Number of LOGICAL PARTITIONS [50]
PHYSICAL VOLUME names [hdisk2 hdisk4]
Logical Volume TYPE []
POSITION on physical volume edge
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?
...
SCHEDULING POLICY for reading/writing parallel
logical partition copies

Copyright IBM Corporation 2008

Figure 10-4. Creating mirrored LVs (smit mklv) AW186.0

Notes:

Using SMIT to create a mirrored logical volume


A very easy way to create a mirrored logical volume is to use the SMIT fastpath
smit mklv to reach the screen shown on the visual, and then do the following:
1. Specify the logical volume name, for example lv01.
2. Specify the number of logical partitions, for example 50.
3. Specify the disks where the physical partitions reside. If you want mirroring on
separate adapters, choose disk names that reside on different adapters.
4. Specify the number of copies, for example 2 for a single mirror or 3 for a double
mirror.

10-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 5. Do not change the default entry, which is yes, for Allocate each logical
partition copy on a SEPARATE physical volume?. Otherwise you would mirror
on the same disk, which makes no sense. If you leave the default entry of yes and
no separate disk is available, mklvcopy will fail.
6. The terms Mirror Write Consistency and Scheduling Policy are explained in the next
few pages.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Scheduling policies: Sequential

1. hdisk0 1 ms

scsi0

3 ms write()
2. hdisk1
scsi1

8 ms Mirrored
3. hdisk2
scsi2
Logical
Volume

Second physical write operation is not started unless the first


has completed successfully
In case of a total disk failure, there is always a "good copy"
Increases availability, but decreases performance
In this example, the write operation takes 12 ms (1 + 3 + 8)
Copyright IBM Corporation 2008

Figure 10-5. Scheduling policies: Sequential AW186.0

Notes:

Write operations
The sequential scheduling policy performs writes to multiple copies, in order. The
multiple physical partitions representing the mirrored copies of a single logical partition
are designated primary, secondary, and tertiary.
In sequential scheduling, the physical partitions are written to in sequence; the system
waits for the write operation for one physical partition to complete before starting the
write operation for the next one.
The write() operation of the application must wait until all three partitions are written to
the disk. This decreases the performance, but increases availability. In case of a total
disk failure (for example, due to a power loss), there will always be a good copy.

10-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Read operations


For read operations on mirrored logical volumes with a sequential scheduling policy,
only the primary copy is read. If that read operation is unsuccessful, the next copy is
read. During the read-retry operation on the next copy, the failed primary copy is
corrected by the LVM with a hardware relocation. Thus, the bad block that prevented
the first read from completing is patched for future access.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Scheduling policies: Parallel


writes start
at the same
hdisk0
time
1 ms scsi0
write()
hdisk1
3 ms scsi1

Mirrored
hdisk2
8 ms scsi2 Logical
Volume

Write operations for physical partitions start at the same time:


When the longest write (8 ms) finishes, the write operation is
complete
Improves performance (especially READ performance)
Copyright IBM Corporation 2008

Figure 10-6. Scheduling policies: Parallel AW186.0

Notes:

Write operations
The parallel scheduling policy starts the write operation to all copies at the same time.
When the write operation that takes the longest to complete finishes (in the example on
the visual, the one that takes eight milliseconds), the write() from the application
completes.

Read operations
Specifying mirrored logical volumes with a parallel scheduling policy may increase
overall performance due to a common read/write ratio of 3:1 or 4:1. With sequential
policy, the primary copy is always read; with parallel policy, the copy that is best
reachable is used. On each read, the system checks whether the primary is busy. If it is
not busy, the read is initiated on the primary. If the primary is busy, the system checks
the secondary. If it is not busy, the read is initiated on the secondary. If the secondary is
busy, the read is initiated on the copy with the least number of outstanding I/Os.

10-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Parallel/sequential policy


The parallel/sequential policy always initiates reads from the primary copy, but initiates
writes concurrently.

Parallel/round-robin policy
The parallel/round-robin policy alternates reads between the copies. This results in
equal utilization for reads even when there is more than one I/O outstanding at a time.
Writes are performed concurrently.

Mirroring on separate adapters


A parallel policy offers the best performance if you mirror on separate adapters.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Mirror write consistency (MWC)

Problem:
Parallel scheduling policy and ...
... system crashes before the writes to all mirrors have
been completed
Mirrors of the logical volume are in an inconsistent state

Solution: Mirror Write Consistency (MWC)


MWC information used to make logical partitions consistent
again after reboot
Active MWC uses separate area of each disk (outer edge
area)
Try to place logical volumes that use active MWC
in the outer edge area

Copyright IBM Corporation 2008

Figure 10-7. Mirror write consistency (MWC) AW186.0

Notes:

Function of mirror write consistency (MWC)


When working with the parallel scheduling policy, the LVM starts the write operations for
the physical partitions at the same time. If a system crashes (for example, due to a
power failure) before the writes to all mirrors have been completed, the mirrors of the
logical volume will be in an inconsistent state.
To avoid this situation, always use MWC when working with the parallel scheduling
policy.
When the volume group is varied back online for use, the MWC information is used to
make logical partitions consistent again.

10-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Active mirror write consistency


Active MWC is implemented as a cache on the disk and behaves much like the JFS and
JFS2 log devices. The physical write operation proceeds when the MWC cache has
been updated. The disk cache resides in the outer edge area. Therefore, always try to
place a logical volume that uses active MWC in the same area as the MWC. This
improves disk access times.

Passive mirror write consistency


AIX 5L V5.1 introduced the passive option to the MWC algorithm for mirrored logical
volumes. This option cannot be used with logical volumes in normal (default) volume
groups. It is only valid when in a big VG or a scalable VG.
Passive MWC reduces the problem of having to update the MWC log on the disk. This
method logs that the logical volume has been opened but does not log writes. If the
system crashes, then the LVM starts a forced synchronization of the entire logical
volume when the system restarts.

Syntax for setting MWC options


The following syntax is used with either the mklv or chlv command to set MWC
options:
mklv -w y|a|p|n
chlv -w y|a|p|n

Description of MWC options


The following table provides a description of the MWC options:

Option Description

y or a Active MWC: Logical partitions that might be inconsistent


if the system or the volume group is not shut down
properly are identified. When the volume group is varied
back online, this information is used to make logical
partitions consistent.

p Passive MWC: The volume group logs that the logical


volume has been opened. After a crash when the
volume group is varied on, an automatic forced
synchronization of the logical volume is started.
Consistency is maintained while the forced
synchronization is in progress by using a copy of the
read recovery policy that propagates the blocks being
read to the other mirrors in the logical volume.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Option Description

n No MWC: The mirrors of a mirrored logical volume can


be left in an inconsistent state in the event of a system or
volume group crash. There is no automatic protection of
mirror consistency. Writes outstanding at the time of the
crash can leave mirrors with inconsistent data the next
time the volume group is varied on. After a crash, any
mirrored logical volume that has MWC turned off should
perform a forced synchronization before the data within
the logical volume is used. For example,

syncvg -f -l LVname

An exception to the forced synchronization requirement


is with logical volumes whose content is only valid while
the logical volume is open, such as paging spaces.

10-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Adding mirrors to existing LVs (mklvcopy)


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 [hd2]
NEW TOTAL number of logical partition 2
copies
PHYSICAL VOLUME names [hdisk1]
POSITION on physical volume outer edge
RANGE of physical volumes minimum
MAXIMUM NUMBER of PHYSICAL VOLUMES [32]
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 no
logical partition copies?

Copyright IBM Corporation 2008

Figure 10-8. Adding mirrors to existing LVs (mklvcopy) AW186.0

Notes:

Adding mirrors to existing logical volumes


Using the mklvcopy command or the SMIT fastpath smit mklvcopy, you can add
mirrors to existing logical volumes. You need to specify the new total number of logical
partition copies and the disks where the physical partitions reside. If you work with
active MWC, use edge (or outer_edge, as it is sometimes called) as the position policy
to increase performance.
If there are many LVs to synchronize, it is better not to synchronize the new copies
immediately after the creation. (The default action is to not synchronize the new copies
immediately after the creation.)

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Examples of mklvcopy command use


Here are some examples illustrating the use of the mklvcopy command:
1. Add a copy for logical volume lv01 on disk hdisk7:
# mklvcopy lv01 2 hdisk7
2.Add a copy for logical volume lv02 on disk hdisk4. The copies should reside in the
outer edge area. The synchronization will be done immediately:
# mklvcopy -a e -k lv02 2 hdisk4

Removing copies from a logical volume


To remove copies from a logical volume, use rmlvcopy or the SMIT fastpath smit
rmlvcopy.

10-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Mirroring rootvg

hd9var mirrorvg hd9var


hd8 hd8
hd5 hd5
... ...
hd1 hd1

hdisk0 hdisk1

1. extendvg 5. bosboot -a
2. chvg -Qn 6. bootlist
3. mirrorvg -s 7. shutdown -Fr
4. syncvg -v 8. bootinfo -b

Make a copy of all rootvg LVs using mirrorvg


and place copies on the second disk
Execute bosboot and change your bootlist
Copyright IBM Corporation 2008

Figure 10-9. Mirroring rootvg AW186.0

Notes:

Reason to mirror rootvg


What is the reason to mirror the rootvg?
If your rootvg is on one disk, you get a single point of failure; that means, if this disk
fails, your machine is not available any longer.
If you mirror rootvg to a second (or third) disk, and one disk fails, there will be another
disk that contains the mirrored rootvg. Doing so increases the availability of your
system.

Procedure for mirroring rootvg


The following steps show how to mirror the rootvg.
- Add the new disk to the volume group (for example, hdisk1):
# extendvg [ -f ] rootvg hdisk1

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- If you use one mirror disk, be sure that a quorum is not required for varyon:
# chvg -Qn rootvg
- Add the mirrors for all rootvg logical volumes:
# mklvcopy hd1 2 hdisk1
# mklvcopy hd2 2 hdisk1
# mklvcopy hd3 2 hdisk1
# mklvcopy hd4 2 hdisk1
# mklvcopy hd5 2 hdisk1
# mklvcopy hd6 2 hdisk1
# mklvcopy hd8 2 hdisk1
# mklvcopy hd9var 2 hdisk1
# mklvcopy hd10opt 2 hdisk1
# mklvcopy hd11admin 2 hdisk1

(If you have other logical volumes in your rootvg, be sure to create copies for them
as well.)
An alternative to running multiple mklvcopy commands is to use mirrorvg. This
command was added in AIX V4.2 to simplify mirroring VGs. The mirrorvg
command, by default, will disable quorum and mirror the existing LVs in the
specified VG. To mirror rootvg, use the command:
# mirrorvg -s rootvg
- Now synchronize the new copies you created:
# syncvg -v rootvg
- As we want to be able to boot from different disks, we need to use bosboot:
# bosboot -a
As hd5 is mirrored, there is no need to do it for each disk.
- Update the bootlist. In case of a disk failure, we must be able to boot from different
disks:
# bootlist -m normal hdisk1 hdisk0
# bootlist -m service hdisk1 hdisk0
- Reboot the system:
# shutdown -Fr
- Check that the system boots from the first boot disk:
# bootinfo -b

10-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Mirroring volume groups (mirrorvg)

Mirror a Volume Group

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

For rootvg, you need to execute:


bosboot
bootlist -m normal ...
Copyright IBM Corporation 2008

Figure 10-10. Mirroring volume groups (mirrorvg) AW186.0

Notes:

The mirrorvg command


Another way to mirror a volume group is to use the mirrorvg command or the SMIT
fastpath smit mirrorvg.
Note: If you mirror the rootvg with the mirrorvg command, you need to execute a
bosboot afterwards. Additionally, you need the bootlist command to change your
bootlist.
The mirrorvg command was introduced with AIX 4.2.1.

The unmirrorvg command


The opposite of the mirrorvg command is unmirrorvg, which removes mirrored copies
for an entire volume group.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Default setting for quorum checking


As shown on the visual, quorum checking is disabled by default (Keep Quorum
Checking ON? is set to no.) Well cover the meaning of the term quorum in the next few
pages.

10-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

VGDA count
Two-disk Volume Group
Loss of PV1: Only 33% VGDAs available
(No quorum)

Loss of PV2: 66% of VGDAs available


PV1 PV2 (Quorum)

Three-disk Volume Group


Loss of 1 PV: 66% of VGDAs still available
(Quorum)

PV1 PV2 PV3

Copyright IBM Corporation 2008

Figure 10-11. VGDA count AW186.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 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, which 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 containing more than two disks
If a volume group consists of more than two disks, each disk contains one VGDA. If one
disk fails, we still have 66% of VGDAs available and the quorum is fulfilled.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Quorum not available


datavg

Two VGDAs One VGDA

hdisk1 hdisk2

If hdisk1 fails, datavg has no quorum!


VG
act
ctive iv e
n ot a
VG
# varyonvg datavg Closed during operation:
No more access to LVs
FAILS !!! LVM_SA_QUORCLOSE
in error log
Copyright IBM Corporation 2008

Figure 10-12. Quorum not available AW186.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. The hdisk1 disk 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.

10-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Volume group already varied on


If the volume group is already varied on when quorum is lost, the LVM will deactivate
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 may still be listed as active (lsvg -o), however, all
application data access and LVM functions requiring 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 actually written to the disk.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Nonquorum volume groups


With single mirroring, always disable the quorum:
chvg -Qn datavg
varyoffvg datavg
varyonvg datavg

Additional considerations for rootvg:


chvg -Qn rootvg
bosboot -ad /dev/hdiskX
Reboot

Turning off the quorum checking does not allow


a normal varyonvg without a quorum
It does prevents closing of the volume group
when quorum is lost
Copyright IBM Corporation 2008

Figure 10-13. Nonquorum volume groups AW186.0

Notes:

Loss of quorum in a nonquorum volume group


When a nonquorum volume group loses its quorum it will not be deactivated. Instead, it
will be active until it loses all of its physical volumes.

Recommendations when using single mirroring


When working with single mirroring, always disable quorum checking using the
command:
chvg -Qn
For data volume groups, you must vary off and vary on the volume group to make the
change effective.

10-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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. Afterwards,
reboot the machine.

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.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Forced varyon (varyonvg -f)


datavg

Two VGDAs One VGDA

ved"
"remo hdisk1 hdisk2

# varyonvg datavg FAILS !!! (even when quorum disabled)

Check the reason for the failure (cable, adapter, power),


before doing the following ...

# varyonvg -f datavg
Failure accessing hdisk1. Set PV STATE to removed.
Volume group datavg is varied on.

Copyright IBM Corporation 2008

Figure 10-14. Forced varyon (varyonvg -f) AW186.0

Notes:

When normal vary on may fail


If the quorum of VGDAs is not available during vary on, the varyonvg command will fail,
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 for 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.

10-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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 more than 50% of the VGDAs available
(except to vary on rootvg).

Quorum checking off


With Quorum Checking Off, you have to make a distinction between an already active
volume group and varying on a volume group.
An active volume group will be 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 MISSINGPV_VARYON=true, you take full responsibility for
the volume group integrity.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Physical volume states


varyonvg VGName
active
Q
losuoru
um t? m
uor k?
Q o

missing missing

varyonvg -f VGName
Hardware
Repair
removed
Hardware Repair
followed by:
varyonvg VGName

chpv -v a hdiskX
removed
Copyright IBM Corporation 2008

Figure 10-15. Physical volume states AW186.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 can not be accessed during a varyonvg, but quorum is available, the failing
disk gets a PV state of missing. If the disk can be repaired, for example, after a power

10-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty failure, you just have to issue a varyonvg VGName to bring the disk into the active state
again. Any stale partitions will be synchronized.

Removed state
If a disk cannot be accessed during a varyonvg and the quorum of disks is not
available, you can issue a varyonvg -f VGName which is a forced vary on of the volume
group.
The failing disk gets a PV state of removed, and it will not be used for quorum checks
any longer.

Recovery after repair


If you are able to repair the disk (for example, after a power failure), executing a
varyonvg alone does not bring the disk back into the active state. Rather, it maintains
the removed state.
At this stage, you have to announce the fact that the failure is over by using the
following command:
# chpv -va hdiskX
This defines the disk hdiskX as active.
Note that you have to do a varyonvg VGName afterwards to synchronize any stale
partitions.

The chpv -r command


The opposite of chpv -va is chpv -vr which brings the disk into the removed state.
This works only when all logical volumes have been closed on the disk that will be
defined as removed. Additionally, chpv -vr does not work when the quorum is lost in
the volume group after removing the disk.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

10-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 10.2.Disk replacement techniques

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Disk replacement: Starting point


A disk must be replaced ...

Yes
Disk mirrored? Procedure 1

No
Yes
Disk still working? Procedure 2

No

Volume group
No
Procedure 3
lost?
rootvg Not rootvg
Yes
Procedure 4 Procedure 5
Copyright IBM Corporation 2008

Figure 10-16. Disk replacement: Starting point AW186.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 will help you whenever you have to replace a disk.
1. If the disk that must be replaced is completely mirrored onto another disk, follow
procedure 1.
2. If a disk is not mirrored, but still works, follow procedure 2.

10-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 3. If you are absolutely sure that a disk failed and you are not able to repair the
disk, do the following:
- If the volume group can be varied on (normal or forced), use procedure 3.
- If the volume group is totally lost after the disk failure, that means the volume
group could not be varied on (either normal or forced).
If the volume group is rootvg, follow procedure 4.
If the volume group is not rootvg follow procedure 5.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 1: Disk mirrored


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. Connect new disk to system


May have to shut down if not hot-pluggable

5. Add new disk to volume group:


# extendvg vg_name hdiskY

6. Create new copies:


# mirrorvg vg_name hdiskY
# syncvg vg_name
Copyright IBM Corporation 2008

Figure 10-17. Procedure 1: Disk mirrored AW186.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 be either missing or
removed. Refer to Physical Volume States in Unit 5: Disk Management Theory for more
information on disk states. 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.

10-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The goal and how to do it


The goal of each disk replacement is to remove all logical volumes from a disk.
1. Start removing all logical volume copies from the disk. Use either the SMIT
fastpath 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 additional unmirrored logical volumes on the disk, you have to either
move them to another disk (migratepv), or remove them if the disk cannot be
accessed (rmlv).
2. If the disk is completely empty, remove the disk from the volume group. Use
SMIT fastpath smit reducevg or the reducevg command.
3. After the disk has been removed from the volume group, you can remove it from
the ODM. Use the rmdev command as shown in the visual.
If the disk must be removed from the system, shut down the machine and then
remove it, if the disk is not hot-pluggable.
4. Connect the new disk to the system and reboot your system. The cfgmgr will
configure the new disk. If using hot-pluggable disks, a reboot is not necessary.
5. Add the new disk to the volume group. Use either the SMIT fastpath
smit extendvg or the extendvg command.
6. Finally, create new copies for each logical volume on the new disk. Use either
the SMIT fastpath smit mirrorvg or the mirrorvg command. Synchronize the
volume group (or each logical volume) afterwards, using the syncvg command.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 2: Disk still working


1. Connect new disk to system.

2. Add new disk to volume group: 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 2008

Figure 10-18. Procedure 2: Disk still working AW186.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 it.
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 fastpath
smit extendvg or the extendvg command.

10-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 3. Before executing the next step, it is necessary to distinguish between the rootvg
and a non-rootvg volume group.
- If the disk that is replaced is in rootvg, execute the steps that are shown on
the visual Procedure 2: Special Steps for rootvg.
- 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.
4. If the old disk has been completely migrated, remove it from the volume group.
Use either the SMIT fastpath smit reducevg or the reducevg command.
5. If you need to remove the disk from the system, remove it from the ODM using
the rmdev command as shown. Finally, remove the physical disk from the
system.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 2: Special steps for rootvg


rootvg 1

hdiskX 2
hdiskY

3. Disk contains hd5?


# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
1. Connect new disk to system
# chpv -c hdiskX
# bootlist -m normal hdiskY
2. Add new disk to volume
group
Migrate old disk to new disk:
3. # migratepv hdiskX hdiskY

4. Remove old disk from


volume group 4

5. Remove old disk from ODM 5

Copyright IBM Corporation 2008

Figure 10-19. Procedure 2: Special steps for rootvg AW186.0

Notes:

Additional steps for rootvg


Procedure 2 requires some additional steps if the disk that must be replaced is in
rootvg.
1. Connect the new disk to the system as described in Procedure 2.
2. Add the new disk to the volume group. Use smit extendvg or the extendvg
command.
3. This step requires special considerations for rootvg:
- Check whether your disk contains the boot logical volume. The default
location for the boot logical volume is /dev/hd5.
Use the command lspv -l to check the logical volumes on the disk that must
be replaced.

10-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty If the disk contains the boot logical volume, migrate the logical volume to the
new disk and update the boot logical volume on the new disk. To avoid a
potential boot from the old disk, clear the old boot record by using the
chpv -c command. Then, change your bootlist:
# migratepv -l hd5 hdiskX hdiskY
# bosboot -ad /dev/hdiskY
# chpv -c hdiskX
# bootlist -m normal hdiskY
If the disk contains the primary dump device, you must deactivate the dump
before migrating the corresponding logical volume:
# sysdumpdev -p /dev/sysdumpnull
- Migrate the complete old disk to the new one:
# migratepv hdiskX hdiskY
If the primary dump device has been deactivated, you have to activate it
again:
# sysdumpdev -p /dev/hdX
4. After the disk has been migrated, remove it from the root 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
afterwards:
# rmdev -l hdiskX -d

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 3: Disk in missing or removed state


1. Identify all LVs and file systems on failing disk: Volume group
# lspv -l hdiskY

2. Unmount all file systems on failing disk:


# umount /dev/lv_name hdiskX hdiskY
3. Remove all file systems and LVs from failing
disk:
# smit rmfs # rmlv lv_name
# lspv hdiskY
4. Remove disk from volume group: ...
# reducevg vg_name hdiskY
PV STATE: removed
5. Remove disk from system:
# rmdev -l hdiskY -d # lspv hdiskY
...
6. Add new disk to volume group:
# extendvg vg_name hdiskZ PV STATE: missing

7. Re-create all LVs and file systems on new disk:


# mklv -y lv_name # smit crfs

8. Restore file systems from backup:


# restore -rvqf /dev/rmt0
Copyright IBM Corporation 2008

Figure 10-20. Procedure 3: Disk in missing or removed state AW186.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 will 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.

10-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Procedure steps


If the failing disk is in a missing or removed state, start the following 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 you have 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 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 (those not associated with a file system)
from the failing disk using smit rmlv or the rmlv command.
5. Remove the disk from the volume group, using the SMIT fastpath
smit reducevg or the reducevg command.
6. Remove the disk from the ODM and from the system using the rmdev command.
7. Add the new disk to the system and extend your volume group. Use the SMIT
fastpath smit extendvg or the extendvg command.
8. Re-create all logical volumes and file systems that have been 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 has to 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. 2000, 2008 Unit 10. Storage management with LVM 10-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 4: Total rootvg failure


rootvg

1. Replace bad disk


hdiskX

2. Boot in maintenance mode


rootvg
3. Restore from a mksysb tape

hdiskX hdiskY
4. Import each volume group into
the new ODM (importvg), if needed
Contains OS
datavg logical
volumes

hdiskZ
mksysb

Copyright IBM Corporation 2008

Figure 10-21. Procedure 4: Total rootvg failure AW186.0

Notes:

When to use this procedure


Procedure 4 applies to a total rootvg failure.
This situation might come up when your rootvg consists of one disk that fails. Or, your
rootvg is installed on two disks and the disk fails that contains operating system logical
volumes (for example, /dev/hd4).

Procedure steps
Follow these steps:
1. Replace the bad disk and boot your system in maintenance mode
2. Restore your system from a mksysb tape

10-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty If any rootvg file systems were not mounted when the mksysb was made, those file
systems are not included on the backup image. You will need to create and restore
those as a separate step.
If your mksysb tape does not contain user volume group definitions (for example, you
created a volume group after saving your rootvg), you have to import the user volume
group after restoring the mksysb tape. For example:
# importvg -y datavg hdisk9
Only one disk from the volume group (in our example hdisk9), needs to be selected.
Export and import of volume groups is discussed in more detail in the next topic.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Procedure 5: Total non-rootvg failure


datavg
1. Export the volume group from the system:
# exportvg vg_name

2. Check /etc/filesystems
hdiskX
3. Remove bad disk from ODM and the system:
# rmdev -l hdiskX -d

4. Connect new disk.


Tape
5. If volume group backup is available (savevg):
# restvg -f /dev/rmt0 hdiskY

6. If no volume group backup is available: Re-


create ... hdiskY
- Volume group (mkvg)
- Logical volumes and file systems (mklv, crfs)

Restore data from a backup:


# restore -rqvf /dev/rmt0

Copyright IBM Corporation 2008

Figure 10-22. Procedure 5: Total non-rootvg failure AW186.0

Notes:

When to use this procedure


Procedure 5 applies to a total failure of a non-rootvg volume group. This situation might
come up if your volume group consists of only one disk that fails. Before starting this
procedure, make sure this is not just a temporary disk failure (for example, a power
failure).

Procedure steps
Follow these steps:
1. To fix this problem, export the volume group from the system. Use the command
exportvg as shown. During the export of the volume group, all ODM objects that
are related to the volume group will be deleted.
2. Check your /etc/filesystems. There should be no references to logical volumes or
file systems from the exported volume group.

10-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 3. Remove the bad disk from the ODM (use rmdev as shown). Shut down your
system and remove the physical disk from the system.
4. Connect the new drive and boot the system. The cfgmgr will configure the new
disk.
5. If you have a volume group backup available (created by the savevg command),
you can restore the complete volume group with the restvg command (or the
SMIT fastpath smit restvg). All logical volumes and file systems are recovered.
If you have more than one disk that should be used during restvg, you must
specify these disks:
# restvg -f /dev/rmt0 hdiskY hdiskZ
The savevg and restvg commands will be discussed in a future chapter.
6. If you have no volume group backup available, you have to re-create everything
that was part of the volume group.
Re-create the volume group (mkvg or smit mkvg), all logical volumes (mklv or
smit mklv) and all file systems (crfs or smit crfs).
Finally, restore the lost data from backups, using the restore command or any
other tool you use to restore data in your environment.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Frequent disk replacement errors (1 of 4)


rootvg

rootvg - Migration
hdiskY hdiskX

Boot problems after migration:


Firmware LED codes cycle or boots to SMS multiboot menu

Fix:
Check bootlist (SMS menu)
Check bootlist (bootlist)
Re-create boot logical volume (bosboot)
Copyright IBM Corporation 2008

Figure 10-23. Frequent disk replacement errors (1 of 4) AW186.0

Notes:

Possible problem after rootvg migration


A common problem seen after a migration of the rootvg is that the machine will not
boot. The LED codes may cycle. This loop indicates that the firmware is not able to find
bootstrap code to boot from. At some firmware levels, the system will boot to SMS
mode when unable to find a valid boot image. At the newest firmware level, the system
console prompts you to continue looping or boot to SMS.
This problem is usually easy to fix:
- Check your bootlist by either:
Booting in SMS press F1 and checking your bootlist, or
Booting in maintenance mode and checking your bootlist using the bootlist
command
- If the bootlist is correct, update the boot logical volume using the bosboot command

10-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Frequent disk replacement errors (2 of 4)

VGDA:
PVID: PVID: ...
datavg ...221... ...555...
physical:
...221...
hdisk4 hdisk5 ...555...

ODM:
CuAt:
name = "hdisk4"
hdisk5 is removed from ODM and attribute = "pvid"
from the system, but not from the value = "...221..."
...
volume group: CuAt:
name = "hdisk5"
# rmdev -l hdisk5 -d attribute = "pvid"
value = "...555..."
Copyright IBM Corporation 2008
...
Figure 10-24. Frequent disk replacement errors (2 of 4) AW186.0

Notes:

The problem
Another frequent error occurs when the administrator removes a disk from the ODM (by
executing rmdev) and physically removes the disk from the system, but does not
remove entries from the volume group descriptor area (VGDA).
The VGDA stores information about all physical volumes of the volume group. Each
disk has at least one VGDA.
Disk information is also stored in the ODM, for example, the physical volume identifiers
are stored in the ODM class CuAt.
Note: Throughout this discussion the physical volume ID (PVID) is abbreviated in the
visuals for simplicity. The physical volume ID is actually 32 characters.
What happens if a disk is removed from the ODM but not from the volume group?

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Frequent disk replacement errors (3 of 4)

VGDA:
...
PVID:
datavg ...221...
physical:
...221...
...555...
hdisk4 !!!

ODM:
# rmdev -l hdisk5 -d
CuAt:
name = "hdisk4"
Fix: attribute = "pvid"
value = "...221..."
# reducevg datavg ...555... ...

Use PVID instead of disk name


Copyright IBM Corporation 2008

Figure 10-25. Frequent disk replacement errors (3 of 4) AW186.0

Notes:

The fix
After removing a disk from the ODM, there is still a reference in the VGDA of the other
disks in the volume group of the removed disk. In early AIX versions, the fix for this
problem was difficult. You had to add ODM objects that described the attributes of the
removed disk.
This problem can now be fixed by executing the reducevg command. Instead of
specifying the disk name, the physical volume ID of the removed disk is specified.
Execute the lspv command to identify the missing disk. Write down the physical
volume ID of the missing disk and compare this ID with the contents of the VGDA. Use
the following command to query the VGDA on a disk:
# lqueryvg -p hdisk4 -At
Note: Use any disk from the volume group.

10-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty If you are sure that you found the missing PVID, pass this PVID to the reducevg
command.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Frequent disk replacement errors (4 of 4)


# lsvg -p datavg
ODM failure ! unable to find device id
...734... in device
configuration database

Analyze failure ! 1. Typo in command ?


2. Analyze the ID of the device:
Which PV or LV causes problems?

ODM problem in No
rootvg? Export and import
volume group
Yes

rvgrecover
Copyright IBM Corporation 2008

Figure 10-26. Frequent disk replacement errors (4 of 4) AW186.0

Notes:

ODM failure
After an incorrect disk replacement, you might detect ODM failures. For example, when
issuing the lsvg -p datavg command, a typical error message could be:
unable to find device id 00837734 in device configuration database
In this case, a device could not be found in the ODM.

Analyze the failure


Before trying to fix it, check the command you typed in. Maybe it just contains a typo.
Find out what device corresponds to the ID that is shown in the error message.

10-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Fix the ODM problem


Weve already discussed two ways to fix an ODM problem:
- If the ODM problem is related to the rootvg, execute the rvgrecover procedure.
- If the ODM problem is not related to the rootvg, export the volume group and then
import it again. Export and import will be explained in more detail in the next topic.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

10-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 10.3.Export and import

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exporting a volume group


moon
hdisk9
To export a volume group:
lv10
lv1 1. Unmount all file systems
loglv1
01 from the volume group:
# umount /dev/lv10
# umount /dev/lv11

myvg 2. Vary off the volume group:


# varyoffvg myvg

3. Export volume group:


# exportvg myvg

The complete volume group


is removed from the ODM.

Copyright IBM Corporation 2008

Figure 10-27. Exporting a volume group AW186.0

Notes:

The scenario
The exportvg and importvg commands can be used to fix ODM problems. These
commands also provide a way to transfer data between different AIX systems. This
visual provides an example of how to export a volume group.
The disk, hdisk9, is connected to the system moon. This disk belongs to the myvg
volume group. This volume group needs to be transferred to another system.

Procedure to export a volume group


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

10-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 2. When all logical volumes are closed, use the varyoffvg command to vary off the
volume group.
3. Finally, export the volume group, using the exportvg command. After this point,
the complete volume group (including all file systems and logical volumes) is
removed from the ODM.
4. After exporting the volume group, the disks in the volume group can be
transferred to another system.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Importing a volume group

To import a volume group:

1. Configure the disk(s).

2. Import the volume group:


# importvg -y myvg hdisk3
mars
3. Mount the file systems:
# mount /dev/lv10
lv10 # mount /dev/lv11
lv11
loglv
01
The complete volume group is
hdisk3 added to the ODM.

myvg

Copyright IBM Corporation 2008

Figure 10-28. Importing a volume group AW186.0

Notes:

Procedure to import a volume group


To import a volume group into a system, for example into a system named mars,
execute the following steps:
1. Connect all disks (in our example we have only one disk) and reboot the system
so that cfgmgr will configure the added disks.
2. You only have to specify one disk (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 -y option, the command will generate a new volume
group name.
The importvg command generates completely new ODM entries.

10-58 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty In AIX V4.3 and subsequent releases, the volume group is automatically varied
on.
3. Finally, mount the file systems.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

importvg and existing logical volumes


mars
lv10
lv11
loglv0
1

hdisk3

myvg

lv 1 0
# importvg -y myvg hdisk3
lv11
loglv importvg: changing LV name lv10 to fslv00
01 importvg: changing LV name lv11 to fslv01

hdisk2

datavg
importvg can also accept the PVID in place of the hdisk name
Copyright IBM Corporation 2008

Figure 10-29. importvg and existing logical volumes AW186.0

Notes:

Renaming logical volumes


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.
The logical volumes /dev/lv10 and /dev/lv11 exist in both volume groups. During the
importvg command, the logical volumes from myvg are renamed to /dev/fslv00 and
/dev/fslv01.

10-60 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

importvg and existing file systems (1 of 2)

/dev/lv10: /home/sarah /dev/lv23: /home/peter


/dev/lv11: /home/michael /dev/lv24: /home/michael

/dev/loglv00: log device /dev/loglv01: log device

# importvg -y myvg hdisk3

Warning: mount point /home/michael already


exists in /etc/filesystems

# umount /home/michael
# mount -o log=/dev/loglv01 /dev/lv24 /home/michael

Copyright IBM Corporation 2008

Figure 10-30. importvg and existing file systems (1 of 2) AW186.0

Notes:

Using umount and mount


If a file system (for example /home/michael) already exists on a system, you will run into
problems when you mount the file system that was imported.
One method to get around this problem is to:
1. Unmount the file system that exists on the system. For example, /home/michael
from datavg.
2. Mount the imported file system. Note that you have to specify the:
- Log device using -o log=/dev/lvlog01
- Logical volume name (/dev/lv24)
- Mount point (/home/michael)
If the file system type is jfs2, you have to specify this as well:
-V jfs2

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

You can get all this informations by running the command:


getlvcb lv24 -At
Another method is to add a new stanza to the /etc/filesystems file. This is covered in the
next visual.

10-62 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

importvg and existing file systems (2 of 2)


# vi /etc/filesystems
/dev/lv10: /home/sarah
/home/michael: /dev/lv11: /home/michael
dev = /dev/lv11
vfs = jfs /dev/loglv00: log device
log = /dev/loglv00
mount = false datavg
options = rw
account = false

/home/michael_moon: /dev/lv23: /home/peter


dev = /dev/lv24 /dev/lv24: /home/michael
vfs = jfs
log = /dev/loglv01 /dev/loglv01: log device
mount = false hdisk3 (myvg)
options = rw
account = false

# mount /home/michael
# mount /home/michael_moon Mount point must exist!
Copyright IBM Corporation 2008

Figure 10-31. importvg and existing file systems (2 of 2) AW186.0

Notes:

Create a new stanza in /etc/filesystems


If you need both file systems (the imported one and the one that already exists)
mounted at the same time, you must create a new stanza in /etc/filesystems. In our
example, we create a second stanza for our imported logical volume,
/home/michael_moon. The fields in the new stanza are:
- dev specifies the logical volume, in our example /dev/lv24.
- vfs specifies the file system type, in our example a journaled file system.
- 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.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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

10-64 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

importvg -L (1 of 2)
moon
lv1
0
lv11
No exportvg !!!
loglv01

hdisk9

myvg

mars
lv10
# importvg -y myvg hdisk3 lv11
# mklv lv99 myvg logl
v
lv9901

hdisk3

myvg
Copyright IBM Corporation 2008

Figure 10-32. importvg -L (1 of 2) AW186.0

Notes:

The learn option (-L) for importvg


The importvg command has a very interesting option, -L, which stands for learn about
possible changes. What does this mean?

The scenario
Lets discuss an example:
- On system moon, a volume group myvg exists which contains three logical
volumes: lv10, lv11, and loglv01.
- The volume group resides on one disk, hdisk9, which is now moved to another
system, mars. Note that we do not export myvg on system moon.
- The myvg volume group is now imported on system mars, by executing the
importvg command. Additionally, a new logical volume, lv99 is created in myvg.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- The disk that contains the volume group myvg, plus the newly created logical
volume lv99, is now moved back to the system moon.
Because we did not export the volume group myvg on moon, we cannot import the
volume group again. Now, how can we fix this problem? This is shown on the next
visual.

10-66 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

importvg -L (2 of 2)
moon
hdisk9

lv10
lv11
loglv
01

myvg
"Learn about possible changes!"

# importvg -L myvg hdisk9


# varyonvg myvg

==> importvg -L fails if a name clash is detected

Copyright IBM Corporation 2008

Figure 10-33. importvg -L (2 of 2) AW186.0

Notes:

The solution
To import an existing volume group, the importvg command has the option -L.
In our example, the following command must be executed to import the volume group
myvg:
# importvg -L myvg hdisk9
After executing this command, the new logical volume lv99 will be recognized by the
system.
The volume group must not be active. Additionally, the volume group is not
automatically varied on, which is a difference to a normal importvg.
The importvg -L command will fail if a logical volume name clash is detected.

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint

1. (True or False) A mirror can be added to an existing logical


volume.
2. If a volume group consists of more than ________ disks, each
disk will contain one VGDA.
3. If a disk can be accessed during a varyonvg, it gets a PV state
of ________ .
4. 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?
_____________________________________________
_____________________________________________
5. (True or False) The exportvg and importvg commands
provide a way to transfer data between different AIX systems.

Copyright IBM Corporation 2008

Figure 10-34. Checkpoint AW186.0

Notes:

10-68 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: Storage management with LVM

Exercise 8

Copyright IBM Corporation 2008

Figure 10-35. Exercise: Storage management with LVM AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 10. Storage management with LVM 10-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

A number of options can be specified for mirrored logical


volumes
More than 50% of the VGDAs for a volume group must be
available for quorum to be fulfilled for that volume group
A physical volume may be in the active, missing, or
removed state
Different procedures are available that can be used to fix
disk problems under various circumstances
exportvg and importvg can be used to easily transfer
volume groups between systems

Copyright IBM Corporation 2008

Figure 10-36. Unit summary AW186.0

Notes:

10-70 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 11.Working with file systems

What this unit is about


This unit covers important concepts and procedures related to AIX 5L
file systems.

What you should be able to do


After completing this unit, you should be able to:
Describe journaled file system (JFS) and enhanced journaled file
system (JFS2) features
Add a JFS or JFS2 file system
Change characteristics of a file system
Add a RAM file system
Add a UDF file system on a DVD-RAM

How you will check your progress


Accountability:
Checkpoint questions
Exercise

References
Online AIX Version 6.1 Commands reference
Online AIX Version 6.1 Operating System and Device
management
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Describe journaled file system (JFS) and enhanced
journaled file system (JFS2) features
Add a JFS or JFS2 file system
Change characteristics of a file system
Add a RAM file system
Add a UDF file system on a DVD-RAM

Copyright IBM Corporation 2008

Figure 11-1. Unit objectives AW186.0

Notes:

11-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Uses of logical volumes


A logical volume may contain one of the following, and only one
at a time:
Journaled (JFS) or enhanced journaled file system (JFS2)
Journal log (/dev/hd8)
Paging space (/dev/hd6)
Boot logical volume (/dev/hd5)
Dump device
Nothing (raw logical volume)
Examples of JFS/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 2008

Figure 11-2. Uses of logical volumes AW186.0

Notes:

Introduction
When you install the system, you automatically create one volume group (rootvg)
which consists of a base set of logical volumes required to start the system. The volume
group rootvg contains such things as paging space, the journal log, and boot data, with
each one usually in its own separate logical volume.
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.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

JFS and JFS2 file systems


The native file system on AIX is the JFS, or the enhanced 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.

Journal log
The journal log is the logical volume where changes made to the file system structure
are written until such time as 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 fixed 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 which 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 simply an empty logical volume. Sometimes an application,
such as a database package, may require a raw logical volume.

11-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

What is a file system?


A file system is:
A method of storing data
A hierarchy of directories

Seven types supported:


Journaled File System (JFS)
Enhanced Journaled File System (JFS2)
CD-ROM File System (CDRFS)
DVD-ROM File System (UDFS)
Network File System (NFS)
Common Internet Filesystem (CIFS)
Proc File System (PROCFS)
Different file systems are connected together via directories to
form the view of files users see

Copyright IBM Corporation 2008

Figure 11-3. What is a file system? AW186.0

Notes:

Introduction
A file system is a directory hierarchy for storing files. It has a root directory and
subdirectories. In an AIX system, the various file systems are joined together so that
they appear as a single file tree with one root. Many file systems of each type can be
created.
Because the available storage is divided into multiple file systems, data in one file
system could be on a different area of the disk than data of another file system.
Because file systems are of a fixed size, file system full errors can occur when that file
system has become full. Free space in one file system cannot automatically be used by
an alternate file system that resides on the same physical volume.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Supported file systems


AIX supports seven file system types:
- JFS - Journaled File System which exists within a logical volume on disk
- JFS2- Enhanced Journaled File System which exists within a logical volume on disk
- CDRFS - CD-ROM File System on a Compact Disc
- UDFS - Universal Disk Format (UDF) file system on DVD
- CIFS - Common Internet File System accessed across a network (via AIX Fast
Connect)
- NFS - Network File System accessed across a network
- PROCFS - Proc file system maps processes and kernel data structures to
corresponding files
Although these are physically different, they appear the same to both users and
applications.

11-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Why have multiple file systems?


Can strategically place it on disk for improved performance
Some tasks are performed more efficiently on a file system
than on each directory within the file system, for example,
back up, move, secure an entire file system
Can limit disk usage of users by file system (quotas)
Maintain integrity of the entire file system structure, for
example, if one file system is corrupted, the others are not
affected
Special security situations
Organize data and programs into groups for ease of file
management and better performance

Copyright IBM Corporation 2008

Figure 11-4. Why have multiple file systems AW186.0

Notes:

Benefits
A file system is a structure that allows you to organize your data. It is one level in the
hierarchy of your data. By placing data in separate file systems, it allows for easier
control and management of the data.
File systems can be placed on the disk in areas that provide the best performance.
Often, backups and recoveries are done at a file system level.

Limit disk usage


Since the administrator determines the size of the file system, users are allocated only a
certain amount of shared disk space. This helps to control disk usage. The
administrator can also impose more granular control over disk space by limiting how
much space an individual user can use in a file system. This is known as file system
quotas.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Data is not all in one place


By having several different file systems, all of your data is not in one place. If a file
system ever becomes corrupted, the other file systems are not affected. Also,
administrators can take a file system offline without affecting other file systems. This is
helpful when performing back ups or when limiting a user's access to the file system for
security reasons.

11-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Standard file systems in AIX


hd4

/ (root)

home sbin opt lpp proc usr dev tftpboot var mnt etc tmp

hd1 hd10opt hd2 hd9var hd3

/ / / / /

csm freeware bin lib sbin spool adm tmp

NOTE: The drawing depicts logical not physical volumes


Copyright IBM Corporation 2008

Figure 11-5. Standard file systems in AIX AW186.0

Notes:

Initial file systems


When AIX is first installed on a stand-alone system there are only seven journaled file
systems and one pseudo file system (/proc) in existence:
- / (root) = /dev/hd4
At the top of the hierarchical file tree. It contains the files and directories critical for
system operations including the device directory and programs that complete the
boot process.
- /usr = /dev/hd2
Operating system commands, libraries, and application programs. Can be shared
across the network.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- /var = /dev/hd9var
Variable spool and log files. The files in this file system vary considerably depending
on system activity.
- /home = /dev/hd1
Users' home directories (was /u in earlier versions of AIX). This is traditionally where
user data files are stored.
- /tmp = /dev/hd3
Space accessible to all users for temporary files and work space. Should be cleared
out frequently.
- /opt = /hd10opt
Special file system to store freeware files.
- /proc = /proc
Special pseudo file system kept in memory to support threads or light weight
processes. This file system is not designed to store user files. It is a type of file
system which is different from a journal file system.
- /admin = /hd11admin
There are two empty directories: lost_found and tmp. The permissions on this
/admin/tmp directory is 755 and is owned by root. This tmp directory has more
security for applications to use.

11-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

/etc/filesystems
/:
dev = /dev/hd4
vol = root
mount = automatic
check = false
vfs = jfs2
log = /dev/hd8
type = bootfs
/home:
dev = /dev/hd1
vol = /home
mount = true
check = true
vfs = jfs2
log = /dev/hd8
/home/team01:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = true
options = rw
account = false
Copyright IBM Corporation 2008

Figure 11-6. /etc/filesystems AW186.0

Notes:

What is /etc/filesystems?
The /etc/filesystems file documents the layout characteristics (or attributes) of file
systems. It is in a stanza format which means a resource is named followed by a colon
and a listing of its attributes in the form of:
attributes = value
Each stanza in the /etc/filesystems file names the directory where the file system is
normally mounted.

File system attributes


The file system attributes specify all the parameters of the file system. They are as
follows:
dev For local mounts, identifies either the block special file where the file
system resides, or the file or directory to be mounted.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

vol Used by the mkfs command when initiating the label on a new file
system.
mount Used by the mount command to determine whether a file system
should be mounted by default. Possible values are:
automatic File system mounted automatically at system startup.
true File system mounted by the mount all command.
This command is issued during system initialization to
automatically mount such file systems.
false File system is not automatically mounted.
check Used by the fsck command to determine the default file systems to be
checked. Setting it to True enables checking.
vfs Specifies the type of mount. For example, vfs=jfs2.
log The device to which log data is written, as the file system is modified.
(This option is only valid for journaled file systems).
type Used to group together related file systems which can all be mounted
with the mount -t command.
account Used to determine the file systems to be processed by the accounting
system.
free A component of traditional UNIX systems. It is ignored by all AIX
commands.
quote Allows the system administrator to control the number of files and data
blocks that can be allocated to a user or group.

11-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Structure of a journaled file system


Superblock
inodes

Indirect
Data Blocks
Blocks

Superblock
File system size and identification
Free list, fragment size, nbpi

inodes
File size, ownership, permissions, times
Pointers to data blocks

Blocks
Data blocks contain data
Indirect blocks contain pointers to data blocks

Copyright IBM Corporation 2008

Figure 11-7. Structure of a journaled file system AW186.0

Notes:

File systems and logical volumes


AIX journaled file systems are built within logical volumes. Because journaled file
systems exist within logical volumes, the size of the file system is always a multiple of
the logical partition size for that logical volume (for example, 4 MB).

Unit of allocation
An individual file within a file system, by default, has units allocated to it in blocks of
4096 bytes. (This may change if you have implemented fragmentation or large files -
both of which are discussed later.)
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.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Superblock
The first addressable logical block on the file system is the superblock. The superblock
contains information such as the file system name, size, number of inodes, and
date/time of creation.
The superblock is critical to the file system and, if corrupted, prevents the file system
from mounting. For this reason a backup copy of the superblock is always written in
block 31.

Inodes
Immediately following the superblock are inodes which contain identifying information
for files, such as the file type, size, permissions, user/group/owner, and
create/modification and last access dates. They also contain pointers to the data blocks
for fragment addresses which hold the data.

Indirect blocks
For larger files, the system creates sets of indirect blocks filled with data block
addresses to point to the data block or fragments which hold the data.

11-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Structure of an inode

Contents of an inode permissions


no. of links
type of file
user ID
group ID
file size
addresses of blocks
time modified
inode for file1 time accessed
time changed
access control information
reserved other

This information can be seen with ls -li:

$ ls -li /home/team01
2132 drwxr-xr-x 2 team01 staff 512 May 2 14:33 c
2136 drwxr-xr-x 2 team01 staff 512 May 2 14:33 doc
2141 -rw-r--r-- 1 team01 staff 28 May 16 10:11 Manuals
Copyright IBM Corporation 2008

Figure 11-8. Structure of an inode AW186.0

Notes:

Function and contents of an inode


Each file is represented by a single inode.
The inode contains information about that file such as the following:
- Ownership
- Access permissions
- Type
- Creation, modification, and access times
- Number of links to the file
- Size
- Addresses of data blocks on disk

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

File system fragmentation


4096 bytes
No fragmentation

File size = 2000 bytes 2000 bytes


This free space cannot
be used by another file

4096 bytes

2000 bytes 1024 1024


Fragmentation enabled
1024 1024
File size = 2000 bytes These free fragments can
Fragment size = 1024 bytes
be used by other files
Copyright IBM Corporation 2008

Figure 11-9. File system fragmentation AW186.0

Notes:

Use of fragmentation
Fragmentation provides a way to allocate pieces (or fragments) of a 4 KB logical block
to files and directories. Fragment support is helpful for small user files and directories.
JFS fragment support provides a view of the file system as a contiguous series of
fragments rather than logical disk blocks.
Fragment support applies to the last direct block of small user files and directories and
long symbolic links.

Fragment size
Fragment size is specified for a file system at creation time. The allowable fragment
size for JFS file systems are 512, 1024, 2048, and 4096 bytes. The default fragment
size is 4096 bytes.

11-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Different file systems can have different fragment sizes, but only one fragment size can
be used within a single file system. Different fragment sizes can also coexist on a single
system so that administrators can select a fragment size which is most appropriate for
each file system.

Balancing competing goals


Both operational overhead (additional disk seeks and allocation activity) and better
utilization of disk space increase as the fragment size for a file system decreases. In
order to maintain the optimum balance between increased overhead and increased
usable disk space, the following factors apply to JFS fragment support:
- Disk space allocations of 4096 bytes of fragments are maintained for a file or
directory's logical blocks where possible.
- Only partial logical blocks for files and directories less than 32 KB in size can be
allocated less than 4096 bytes of fragments.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Variable number of inodes


With the default nbpi = 4096 an inode is created for every 4096 bytes of file system.

File system
4096 4096 4096
INODES
1
128 bytes
2

Using the value nbpi = 1024 an inode is created for every 1024 bytes of file system.

File system
INODES
4096 4096 4096
128 bytes 1
2
3
4
5 4 X 1024
6
7
8

Copyright IBM Corporation 2008

Figure 11-10. Variable number of inodes AW186.0

Notes:

Use of inodes
In all UNIX implementations, when a file system is created, inodes are written to disk.
For each file or directory, one such data structure is used to describe information
pertaining to the file or directory. JFS also reserves a number of inodes for files and
directories in each file system that is created.

Fixed number of inodes


In earlier versions of JFS, the number of inodes created for a file system was fixed. An
inode was generated for every 4 KB of disk space that was allocated to the file system
being created. In a 4 MB file system, this would result in 1024 inodes being generated.
As long as files and directories are allocated at a minimum of 4 KB, this would suffice.

11-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Specifying the number of inodes


However, since fragment support optimizes disk utilization, it increases the number of
small files and directories that can be stored within a file system. Since each file or
directory requires a disk inode, there needs to be a way to specify the number of inodes
needed. JFS allows the number of disk inodes created within a file system to be
specified in case more or less than the default number of disk inodes is desired. This
number can be specified at file system creation as the number of bytes per inode
(NBPI). For example, an NBPI value of 1024 causes a disk inode to be created for
every 1024 bytes of file system space. A small NBPI value results in a large number of
inodes and vice versa.
Decisions regarding fragment size and how many inodes to create for a file system
should be based on the projected number of files contained by the file system and their
size.

Dynamic allocation of inodes by JFS2


With JFS2, it is no longer necessary to project the number of files contained by the file
system and their size. JFS2 dynamically allocates space for inodes as needed, and
frees the space when it is no longer required.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Allocation group size

inodes disk blocks

Groupings of related 16 MB
16 MB
inodes and disk blocks 16 MB agsize

16 MB

inodes disk blocks

64 MB
Groupings of related 64 MB
inodes and disk blocks 64 MB agsize

64 MB

Copyright IBM Corporation 2008

Figure 11-11. Allocation group size AW186.0

Notes:

Importance of allocation groups


The ability to specify allocation group size (AGS or agsize) is supported by AIX V4.2
and later AIX versions. This capability is used to increase the efficiency of the file
system. The inodes are further grouped with the corresponding data blocks in logical
units of 8, 16, 32, or 64 MB within the file system. Building a relationship between the
placement of the data blocks and related inode information reduces the physical action
required by the drive heads when I/O operations are performed.

Specifying allocation group size


The allocation group size value is a JFS configuration parameter which, along with the
NBPI and fragment size, determines the overall characteristics of the file system.

11-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Relationship between allowable NBPI values and allocation group size
The allowable NBPI values are dependent on the agsize. For example, for an agsize
value of 8 MB, the only allowable NBPI values are 512, 1024, 2048, 4096, 8192, and
16384 bytes. If you were to double the agsize from 8 MB to 16 MB, the range of NBPI
values also doubles to 1024, 2048, 4096, 8192, 16384, and 32768 bytes.
Refer to the table below for more details.

Allocation Group Size NBPI


8 MB 512, 1024, 2048, 4096, 8192, 16384
16 MB 1024, 2048, 4096, 8192, 16384, 32768
32 MB 2048, 4096, 8192, 16384, 32768, 65536
64 MB 4096, 8192, 16384, 32768, 65536, 131072

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Compressed file systems


compression = LZ (yes)
fragment size = 1024

4096 4096 4096 4096

Copyright IBM Corporation 2008

Figure 11-12. Compressed file systems AW186.0

Notes:

Use of fragmented and compressed file systems


JFS supports fragmented and compressed file systems. Both types of file systems save
disk space by allowing a logical block to be stored on the disk in units or fragments
smaller than the full block size of 4096 bytes. In a fragmented file system, only the last
logical blocks of files no larger than 32 KB are stored in this manner, so that fragment
support is only beneficial for the file systems containing numerous small files. Data
compression however, allows all logical blocks of any sized file to be stored as one or
more contiguous fragments. On average, data compression saves disk space by about
a factor of two. JFS2 does not support file system compression.

11-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Fragmentation concerns


The use of fragments and data compression does, however, increase the potential for
fragmentation of the disk's free space. Fragments allocated to a logical block must be
contiguous on the disk. A file system experiencing free space fragmentation may have
difficulty locating enough contiguous fragments for a logical block's allocation, even
though the total number of free fragments may exceed the logical block's requirements.

The defragfs utility


JFS and JFS2 alleviate free space fragmentation by providing the defragfs utility,
which defragments a file system by increasing the amount of contiguous space. This
utility can be used for fragmented and compressed file systems.

Special considerations regarding the / and /usr file systems


Warning: The root (/) file system must not be compressed.
Compression of the /usr file system is not recommended.

Additional considerations
In addition to increased disk I/O activity and free space fragmentation problems, file
systems using data compression have the following performance considerations:
- Degradation in file system usability arising as a direct result of the data
compression/decompression activity. If the time to compress and decompress data
is quite lengthy, it may not always be possible to use a compressed file system,
particularly in a busy commercial environment where data needs to be available
immediately.
- All logical blocks in a compressed file system, when modified for the first time, are
allocated 4096 bytes of disk space, and this space is subsequently reallocated when
the logical block is written to disk. Performance costs are, therefore, associated with
this allocation, which does not occur in non-compressed file systems.
- In order to perform data compression, approximately 50 CPU cycles per byte are
required and about 10 CPU cycles per byte are required for decompression. Data
compression, therefore, places a load on the processor by increasing the number of
processor cycles.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Large file enabled file systems


File = 132 MB
(1024 * 4 KB blocks) + (1024 * 128 KB blocks) = 132 MB
4 MB + 128 MB = 132 MB

1025
1026
1 Block 1027
1 4 KB .. 32 Blocks
2 . 128 KB
3 1055
4. 1056
..

1023
1024
File
1057
132 MB 128 KB
1058
1059
.. 32 Blocks
. 128 KB

Copyright IBM Corporation 2008

Figure 11-13. Large file enabled file systems AW186.0

Notes:

Support of file sizes greater than 2 GB


On AIX V4.2 and later versions of AIX, JFS supports large file-enabled file systems.
Only file systems enabled for large files can support files with a size greater than 2 GB.

Use of 128 KB blocks


In a file system enabled for large files, the data stored before the 4 MB file offset is
allocated in 4096 byte blocks. File data stored beyond the 4 MB file offset is allocated
with large disk blocks of 128 KB in size. The large disk blocks are actually 32
contiguous 4096 byte blocks. In the example above, a 132 MB file in a file system
enabled for large files has 1024 4 KB disk blocks and 1024 128 KB disk blocks for a
total of 2048 blocks.

11-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Fewer indirect blocks required with large file geometry


In a regular standard file system, the 132 MB file would require 33 single indirect blocks
(each filled with 1024 4 KB disk addresses). However, the large file geometry requires
only two single indirect blocks for the 132 MB file.

JFS2 support of large files


It is not necessary to use large enabled file systems in JFS2, since large file and file
system support is built in by default.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Journal log
1
Write data

sync / fsync
1) Inode changes to log
2) COMMIT to log
3 3) Update inode 2
4) Sync log

Inodes 4

Data
block JFSLOG

No journaling of data blocks - only journals inode information (and


indirect block information).

Copyright IBM Corporation 2008

Figure 11-14. Journal log AW186.0

Notes:

Writes to files done first in memory


AIX memory maps files in current use. Any writes to files are done first in memory and,
at a later stage, are written out to disk when the sync system call runs (every minute).

The jfslog
The jfslog for each volume group (such as the rootvg /dev/hd8) is a circular log. A jfslog
is created with the size of one physical partition, one per each volume group. The jfslog
ensures file system integrity by writing all metadata information to the jfslog
immediately. It does this in the form of transactions, as illustrated in the diagram. File
system metadata consists of changes to the file system structure itself, such as
changes to the inodes and the free list.

11-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Indication of sync points


When the data is written out to disk, a sync point is indicated in the log and new
transactions are written from that point forward.

Journal log logical volumes


By default, a single logical volume per volume group is used to contain the file system
journal logs. When you create a new file system, the journal is added to the existing
journal log logical volume. With default log logical volumes, the entire volume group
depends on a single log logical volume.
User-created logs override the default log placement and put the file system log on a
specific logical volume.

Inline logs
An inline log is a new feature specific to JFS2 file systems that allows you to log directly
to the file system. The default inline log size is 0.4% of the logical volume size
(in AIX 5L V5.1).
The following table lists the default inline log size in AIX 5L V5.2 and later.

LVsize Inline log size


<32 MB 256 KB
> 32 MB up to 64 MB 512 KB
>64 MB up to 128 MB 1 MB
128 MB 2 MB
128 MB to 1 GB 1/128th of size
1 GB to 2 GB 8 MB
2 GB to 128 GB 1/256th of size
128 GB up to 512 GB 512 MB
512 GB 1/1024th of size

Available logging options


The following table lists the three logging options and indicates which file system types
support these options.

Option JFS JFS2


Default volume group log Yes Yes
Specific user-created log Yes Yes
Log directly to the file system No Yes

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

JFS versus JFS2 file systems


JFS JFS2

Maximum File Size


64 Gigabytes / 64 Gigabytes 1 Petabyte / 1 Terabyte
Architectural / Tested
Maximum File System Size
1 Terabyte / 1 Terabyte 4 Petabytes / 1 Terabyte
Architectural / Tested

Inode Size 128 Bytes 512 Bytes

Number of inodes Fixed, set at creation Dynamic

Directory File Access Sequential B-tree

Journal Log support External JFSlog only Inline or External JFS2log

Compression Yes No

Quotas Yes AIX 5L V5.3 and later

JFS2 uses extent based allocation for high performance and large file size.
.
Copyright IBM Corporation 2008

Figure 11-15. JFS versus JFS2 file systems AW186.0

Notes:

Introduction to JFS2
JFS2 is a new file system type that was introduced in AIX 5L V5.1. It is based on JFS.

Reference information
The following reference information may be useful when you are reviewing the table on
the visual:
1 Petabyte (PB) = 1024 Terabytes (TB) = (250 ) bytes
1 Terabyte (TB) = 1024 Gigabytes (GB) = (240 ) bytes
1 Gigabyte (GB) = 1024 Megabytes (MB) = (230 ) bytes
1 Megabyte (MB) = 1024 Kilobytes (KB) = (220 ) bytes
1 Kilobyte (KB) = 1024 Bytes = (210 ) bytes

11-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Extent-based allocation


JFS2 uses extent-based allocation. An extent is an address-length pair, which identifies
the starting block address and the length of the extent in blocks. This allows multiple
adjacent blocks to be addressed. The advantages of extent-based allocation are high
performance and large file size.

Dynamic inodes
The traditional approach of reserving a fixed amount of space for inodes at file system
creation time required accurate estimates of the number of files that would reside in the
file system. If the estimate was high, disk space was wasted. If the estimate was low, no
files could be added until the file system was expanded. JFS2 dynamically allocates
space for inodes as needed, and frees the space when it is no longer required.

Directory file b-tree


In JFS, the directory files are accessed sequentially. For large directory files, this is
inefficient. In JFS2, the directory files are accessed via a b-tree index. For very large
directories, applications doing large numbers of adds and deletes to a JFS2 directory
can see as much as a 40-fold improvement in performance.

Inline journal logs


Normally, multiple file systems use the same journal log. The associated contention can
impact performance. Creating a separate journal log for each file system takes special
planning and requires an excessive amount of disk storage. JFS2 allows the definition
of inline logs where each file system has its own log allocated out of the file systems
logical volume. The space used by the inline log can be as small as 256 KB (for a file
system < 32 MB). For details, see the notes on the visual covering the role of a journal
log.

JFS2 disk quota system


Prior to AIX 5L V5.3, JFS2 did not support a disk quota system, though the Berkeley
Disk Quota System was supported under JFS.
JFS2 quotas may be set for individual users or groups on a per file system basis. The
quota system issues a warning to the user when a particular quota is exceeded, but
allows some extra space for current work. Remaining over quota beyond a specified
grace period results in further allocation attempts being denied until the total usage is
reduced below the user's or group's quota.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The administration is similar to administration of the BSD Disk Quota System (refer to
http://www.openbsd.org for details) except that AIX added a new method for mapping
the users to the quotas. The quotas are assigned to a Limits class and then the users
are assigned to the class. This greatly simplifies the quota administration. AIX 6.1 has a
command to administer Limits classes:
j2edlimit

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:
- Backup JFS file system data
- Create new JFS2 file systems
- Restore JFS file system data to new JFS2 file systems

11-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Extended attributes (EA)


Extensions to regular attributes
Two versions
AIX 5L V5.2 or earlier supported only EAv1
EAv1 used for local file permission ACLs
EAv2 improved (more and larger attributes)
JFS2 under AIX 5L V5.3 and later support both versions

NFS V4 ACLs stored in JFS2 with EAv2


User-defined information may be in EAv2

$ getea HenryVIII
EAName: Author
EAValue: Shakespeare

Copyright IBM Corporation 2008

Figure 11-16. Extended attributes (EA) AW186.0

Notes:

What are extended attributes?


Extended attributes are an extension of the normal attributes of a file (such as size and
mode). They are (name, value) pairs associated with a file or directory. The name of an
attribute is a null-terminated string. The value is arbitrary data of any length.

Types of extended attributes


There are two types of extended attributes: extended attribute version 1 (EAv1) and
extended attribute version 2 (EAv2). For many years, AIX has supported extended
attributes for Access Control Lists (ACL), which provide for more granular control of file
access. That support was in EAv1 format. Starting with AIX 5L V5.3, EAv2 with JFS2 is
now available.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

EAv1 had restrictions of only eight attributes, 4 KB per attribute, 16-bit encoded names
and no support for user-defined attributes. EAv2 effectively eliminates these
restrictions.
The primary use for EAv2, currently, is support for the NFS V4 ACL capability. The
discussion of NFS V4 ACLs is outside the scope of this class.

Managing attributes
AIX 6.1 provides line commands to manage the user-defined attributes. To set an
attribute value, you would use the setea command. To view a user attribute, you would
use the getea command.

EAv2 compatibility issues


The major concern for the system administrator regarding EAv2 is the lack of
backwards compatibility with earlier versions of AIX. AIX 6.1 continues to support EAv1
as the default format, and provides an option to create a file system with EAv2 and a
runtime command to convert dynamically from EAv1 to EAv2 to create or access
named attributes and advanced ACL. However, once a file system is created with EAv2
or conversion has been initiated, AIX 5L V5.2 cannot access the file system and any
attempt to mount it results in an EFORMAT error.

11-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

File Systems
# smit fs
File Systems

Move cursor to desired item and press Enter

List All File Systems


List All Mounted File Systems
Add/Change/Show/Delete File Systems
Mount a File System
Mount a Group of File Systems
Unmount a File System
Unmount a Group of File Systems
Verify a File System
Backup a File System
Restore a File System
List Contents of a Backup
Create and backup a snapshot

Copyright IBM Corporation 2008

Figure 11-17. File Systems AW186.0

Notes:

Using SMIT to manage file systems


As shown on the visual, SMIT can be used to complete numerous file system
management tasks.

Using the Web-based System Manager to manage file systems


File systems can also be managed using the Web-based System Manager.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Listing file systems

# lsfs
Name Nodename Mount Pt VFS Size Options Auto
/dev/hd4 __ / jfs2 294912 __ yes
/dev/hd1 __ /home jfs2 32768 __ yes
/dev/hd2 __ /usr jfs2 3309568 __ yes
/dev/hd9var __ /var jfs2 65536 __ yes
/dev/hd3 __ /tmp jfs2 131072 __ yes
/proc __ /proc procfs __ ro yes
/dev/hd10opt __ /opt jfs2 163840 __ yes
/dev/hd11admin __ /admin jfs2 262144 __ yes
/budget sys4 /reports nfs2 __ bg,hard,intr
/dev/cd0 __ /cdrom cdrfs __ ro no

Copyright IBM Corporation 2008

Figure 11-18. Listing file systems AW186.0

Notes:

Function of lsfs command


You can list the various file systems that are defined using the lsfs command. This
command displays information from both /etc/filesystems and the logical volumes in a
more readable format.
The lsfs command also displays information about CD-ROM file systems and remote
NFS file systems.

Syntax and options


The general syntax for the lsfs command is as follows:
lsfs [-q] [-c | -l ][ -v vfstype | -u mountgrp | filesystem ]

11-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The data may be presented in line and colon (-c) or stanza (-l) format. It is possible to
list only the file systems of a particular virtual file system type (-v), or within a particular
mount group (-u). The -q option queries the superblock for the fragment size
information, compression algorithm, and the number of bytes per inode.

SMIT fastpath
The SMIT fastpath to get to the screen which accomplishes the same task as the lsfs
command is smit fs. This takes you to the File Systems SMIT menu. Select the List
All File Systems menu item. This selection does not have its own window; rather, it just
runs the lsfs command.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

List all mounted file systems

# mount

node mounted mounted over vfs date options


/dev/hd4 / jfs2 Jul 11 20:14 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Jul 11 20:15 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Jul 11 20:15 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Jul 11 20:15 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Jul 11 20:16 rw,log=/dev/loglv00
/proc /proc procfs Jul 11 20:16 rw
/dev/hd10opt /opt jfs2 Jul 11 20:16 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Jul 11 20:16 rw,log=/dev/hd8
sys4 /budget /reports nfs Jul 11 20:16 rw,hard,bg,intr
/dev/ramdisk /ramdisk jfs Jul 11 20:17 rw,nointegrity
/dev/project /project jfs2 Jul 11 20:18 rw,log=INLINE
/dev/cd0 /cdrom cdrfs Jul 11 20:19 ro

Copyright IBM Corporation 2008

Figure 11-19. List all mounted file systems AW186.0

Notes:

Listing currently mounted file systems


The mount command, when used with no parameters, is used to list all the file systems
which are currently mounted within the overall file system structure.
File systems must be mounted so they can be accessed, that is, you make the file
system available for read or write access from your system.

Performing the mount operation


The mount command, when used with a number of parameters, is also used to perform
the mount operation.

11-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty System-created and user-created file systems


There are two types of file systems: system-created and user-created. System-created
file systems are expected to be there by both the system and many applications.
User-created file systems contain user applications and data.

Standard devices and file systems


Standard device and file system names include the following:
- hd4 /
- hd1 /home
- hd2 /usr
- hd3 /tmp
- hd9var /var
- proc /proc
- hd10opt /opt
- hd11admin /admin

Using SMIT to list mounted file systems


SMIT can also be used to obtain this information. From SMIT, you want to select List all
Mounted File Systems under File Systems.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add/Change/Show/Delete File Systems


# smit manfs
Add / Change / Show / Delete File Systems

Move cursor to desired item and press Enter

Enhanced Journaled File Systems


Journaled File Systems
CDROM File Systems
Network File Systems (NFS)

Copyright IBM Corporation 2008

Figure 11-20. Add/Change/Show/Delete File Systems AW186.0

Notes:

Selecting the file system type


In AIX 6.1 and AIX 5L, when you use the command smit manfs, SMIT presents a menu
which prompts you for the type of file system, be it JFS, Enhanced JFS, CD-ROM file
system, or NFS.

Managing JFS file systems


You can use the fastpath smit jfs if you wish to work with a JFS file system.

Managing JFS2 file systems


You can use the fastpath smit jfs2 if you wish to work with a JFS2 file system.

11-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Working with journaled file systems in SMIT

Journaled File Systems


Move cursor to desired item and press Enter.

Add a Journaled File System


Add a Journaled File System on a Previously Defined Logical Volume
Change / Show Characteristics of a Journaled File System
Remove a Journaled File System
Defragment a Journaled File System

Add a Journaled File System on a Previously Defined Logical Volume


Move cursor to desired item and press Enter.

Add a Standard Journaled File System


Add a Compressed Journaled File System
Add a Large File Enabled Journaled File System

Copyright IBM Corporation 2008

Figure 11-21. Working with journaled files systems in SMIT AW186.0

Notes:

Managing JFS file systems


The visual shows the SMIT menu displayed when the smit jfs fastpath is used.

Two ways of adding a JFS file system


When choosing add a JFS file system, there are two options:
- If you choose Add a Journaled File System, SMIT uses defaults to create the
logical volume in which the file system sits.
- If you choose to Add a Journaled File System on a Previously Defined Logical
Volume, this assumes that the logical volume has already been created according
to your specifications. The size of the file system is the size of the logical volume.
In AIX V4.2 and later, the second SMIT menu shown on the visual is displayed no
matter which option is chosen for adding a JFS file system.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add a standard journaled file system


on a previously defined logical volume

Add a Standard Journaled File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* LOGICAL VOLUME name +
* MOUNT POINT [ ]
Mount AUTOMATICALLY at system restart? no +
PERMISSIONS read/write +
Mount OPTIONS [ ] +
Start Disk Accounting ? no +
Fragment Size (bytes) 4096 +
Number of bytes per inode 4096 +
Allocation Group Size (MBytes) 8 +
Logical Volume for Log [ ] +

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 2008

Figure 11-22. Add a standard journaled file system on a previously defined logical volume AW186.0

Notes:

Using a logical volume


When a logical volume is created, it is simply an empty container waiting to be
formatted for use. The journaled file system is the most common way of using it. Thus,
adding a file system to a previously created logical volume formats the logical volume
for use as a file system. Adding a file system in this way provides you with the greatest
level of control over where the file system resides on disk.

SMIT fastpath for reaching this screen


The SMIT fastpath for this screen:
smit crjfslvstd

11-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Specifying which logical volume to use for the JFS log
AIX 6.1 has a line on this panel: Logical Volume for Log. Prior to
AIX 5L V5.3, you needed to edit /etc/filesystems after creating the file if you wanted to
use anything other than the default /dev/hd8 logical volume for the log. With
AIX 5L V5.3 and later, you can identify what log to use in the initial definition. Note that
the jfslog itself has to be previously defined and formatted.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add a standard journaled file system


Add a Standard Journaled File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Volume group name rootvg
SIZE of file system
Unit Size Megabytes +
* Number of units [ ] #
* MOUNT POINT [ ]
Mount AUTOMATICALLY at system restart? no +
PERMISSIONS read/write +
Mount OPTIONS [ ] +
Start Disk Accounting ? no +
Fragment Size (bytes) 4096 +
Number of bytes per inode 4096 +
Allocation Group Size (MBytes) 8 +
Logical Volume for Log [ ] +

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 2008

Figure 11-23. Add a Standard Journaled File System AW186.0

Notes:

SMIT fastpath for reaching this screen


Use the SMIT fastpath smit crjfsstd to access this screen.

The crfs command


The crfs command is the high-level command to create a file system.
Note: Do not confuse the crfs command with the mkfs command, which simply builds the
file system structure within a logical volume. The crfs command does a lot more; it creates
the logical volume if necessary using mklv, builds the file system structure on that logical
volume using mkfs, and then makes all appropriate changes to the ODM and
/etc/filesystems for that logical volume and file system.

11-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty JFS file system parameters


There are many parameters which can be set as a JFS file system is being created. The
most important of those are given below:
- Volume group (-g volgrp), that is, the volume group within which a new logical
volume is to be created. The volume group must have sufficient free physical
partitions for the new logical volume.
- The unit size (Megabytes | Gigabytes | 512bytes) specifies the selected unit.
- The size (-a size=number of units), that is, the number of units of unit size. The
size of the file system is rounded up to the nearest logical partition boundary.
- The mount point (-m mntpt). The name of a directory within the overall file system
on which the new file system is normally mounted. The mount point must exist
before the file system can be mounted and accessed. Under most circumstances,
the mount point should be empty.
A file system may be mounted at any other valid directory rather than its normal
mount point. In this case, the mount is performed by the administrator, and it is
usually done because of maintenance activity.
- Mount automatically at boot time? (-A yes|no). The new file system may be listed to
mount automatically when the system boots. This places the mount=true line in the
/etc/filesystems file and causes the file system to be mounted automatically at its
default mount point (above) when the system is restarted. If set to no then mount =
false is added to the /etc/filesystems file.
- Permissions (-p rw|ro). A mounted file system may be mounted in read-only (ro)
or read-write (rw) mode. This permission setting is used for the file system if it is
mounted automatically, or if it is mounted without providing overriding permissions.
The permissions setting for a mounted file system may not be bypassed, regardless
of the authority of the user and the permission bits associated with the file or
directory on the file system.
- Mount options specify security related mount options. Possible values are: nosuid,
which prevents the execution of setuid and setgid programs, and nodev, which
prevents open system calls of devices from this mount.
- The fragment size (-a fragment=size) specifies the JFS fragment size in bytes. A
file system fragment is the smallest unit of disk storage that can be allocated to a
file. This variable must be set to either 512, 1024, 2048, or 4096 (the default value is
4096 bytes).
- The number of bytes per inode (-a nbpi=value) affects the total number of inodes
on the file system. The variable must be either 512, 1024, 2048, 4096, 8192, or
16384 (the default value is 4096).
- The compression attribute (-a compress={no | LZ}) specifies the data
compression algorithm LZ, which stands for the IBM version of the compression

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

algorithm Lempel-Ziv. If you do not want data compression, set this attribute value to
no (the default value).
- The allocation group size (-a ag= 8 | 16 | 32 | 64) is a grouping of inodes and
disk blocks within the file system. The default agsize is 8 MB. This attribute only
applies to AIX V4.2 and later.

11-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty
Working with enhanced journaled file systems
(JFS2) in SMIT

Enhanced Journaled File Systems

Move cursor to desired item and press Enter.

Add an Enhanced Journaled File System


Add an Enhanced Journaled File System on a Previously Defined Logical Volume
Change / Show Characteristics of an Enhanced Journaled File System
Remove an Enhanced Journaled File System
Manage Quotas for an Enhanced Journaled File System
Defragment an Enhanced Journaled File System
List Snapshots for an Enhanced Journaled File System
Create Snapshot for an Enhanced Journaled File System
Mount Snapshot for an Enhanced Journaled File System
Remove Snapshot for an Enhanced Journaled File System
Unmount Snapshot for an Enhanced Journaled File System
Change Snapshot for an Enhanced Journaled File System
Rollback an Enhanced Journaled File System to a Snapshot

F1=Help F2=Refresh F3=Cancel Esc+8=Image


Esc+9=Shell Esc+0=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 11-24. Working with enhanced journaled file systems (JFS2) in SMIT AW186.0

Notes:

Managing JFS2 file systems


The visual shows the SMIT menu displayed if the smit jfs2 fastpath is used.

Two ways of adding a JFS2 file system


When choosing to add a JFS2 file system, there are two options:
- If you choose Add an Enhanced Journaled File System, SMIT uses defaults to
create the logical volume in which the file system resides.
- If you choose Add an Enhanced Journaled File System on a Previously Defined
Logical Volume, this assumes that the logical volume has already been created
according to your specifications. The size of the file system is the size of the logical
volume.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add an enhanced journaled file system (JFS2) on


a previously defined logical volume

Add an Enhanced Journaled File System


Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* LOGICAL VOLUME name +
* MOUNT POINT [ ]
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 Version 1 +
Enable Quota Management no +
Enable EFS? no +
Allow internal snapshots? no +

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 2008

Figure 11-25. Add an enhanced journaled file system (JFS2) on a previously defined logical volume AW186.0

Notes:

SMIT fastpath for reaching this screen


The SMIT fastpath for reaching this screen:
crjfs2lvstd

The Block Size parameter


The Block Size parameter refers to the aggregate block size, which is the smallest
piece of disk which can be assigned to a file system. It has the same function as the
fragment size in JFS.

The Logical Volume for Log parameter


The Logical Volume for Log parameter provides a choice between using either
an existing jfs2log logical volume (the first jfs2log for this volume group is the default) or

11-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty an inline log. If you use the inline log, then you have the option to override the default
log size.

AIX Enhancements
With AIX 5L V5.3 and later, there are two attributes on this panel:
- Extended Attribute Format allows you to choose between the default EAv1 or
EAv2.
- Enable Quota Management does what it says for this particular file system. You
should be sure to plan and build the user quota definitions before enabling disk
quotas for a file system.
With AIX 6.1, there are two attributes on this panel:
- Encrypted File System (EFS) specifies whether the file system is an Encrypted File
System. This is only available for JFS2.
- Isnapshot specifies whether the file system supports internal snapshots.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add an Enhanced Journaled File System (JFS2)

Add an Enhanced Journaled File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Volume group name rootvg
SIZE of file system
Unit Size Megabytes +
* Number of units [ ] #
* MOUNT POINT [ ]
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 Version 1 +
Enable Quota Management no +
[MORE2]

Copyright IBM Corporation 2008

Figure 11-26. Add an Enhanced Journaled File System (JFS2) AW186.0

Notes:

SMIT fastpath for reaching this screen


Use the SMIT fastpath smit crjfs2std to access this panel.

11-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Mount a file system

Mount a File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]

FILE SYSTEM name [ ] +


DIRECTORY over which to mount [ ] +
TYPE of file system +
FORCE the mount? no +
REMOTE NODE containing the file system
to mount [ ]
Mount as a REMOVABLE file system? no +
Mount as a READ-ONLY system? no +
Disallow DEVICE access via this mount? no +
Disallow execution of SUID and sgid programs no +
in this file system?

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 2008

Figure 11-27. Mount a File System AW186.0

Notes:

Mounting a file system makes it accessible


The files within a file system can only be accessed when the file system is mounted
within the overall file system structure. Either an individual file system or a group of file
systems can be mounted.

Automatic mounting of file systems


File systems defined with the mount=true or mount=automatic attribute in the
/etc/filesystems file are mounted automatically during system startup.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Use of the mount and unmount commands


The mount command is used to mount a file system, that is, to make it available for use.
We illustrate the basic use of the mount command here, but the full syntax for this
command is quite complex, and there are numerous options that can be used with the
command. Refer to the entry for mount in the AIX 6.1 Commands Reference online (or
the corresponding man page) for the full syntax of this command and a detailed
discussion of its various options.
The following simple examples illustrate the basic use of the mount command:
- Example 1:
# mount /home/george/myfs
In this example, the only parameter specified is the name of a directory to be used
as a mount point. Successful use of this simplified syntax requires predefinition of
the file system in /etc/filesystems. In this case, the mount command checks
/etc/filesystems to determine the device containing the associated file system and
mounts the file system at the specified mount point.
- Example 2:
# mount /dev/lv03 /myfs3
In this case, the directory to be used as a mount point and the device containing the
file system are both specified. The mount command mounts the specified file system
at the specified mount point. Note that the device containing the file system is
specified before the mount point.
The unmount command is used to unmount a previously mounted file system. (Another
name for the unmount command is umount. Either name can be used.)
The full syntax for the unmount command (like that of the mount command) is quite
complex. Refer to the entry for umount in the AIX 6.1 Commands Reference online (or
the corresponding man page) for the full syntax of this command and a detailed
discussion of its various options.
The following simple example illustrates the basic use of the unmount command:
# unmount /myfs3
In this case, the file system previously mounted at the mount point /myfs3 is
unmounted.

Mounting and unmounting of file systems


File systems are usually mounted at startup and are unmounted as part of the shutdown
procedure.
However, the root user may issue mount commands at any time. The root user is not
affected by permissions on the mount point or root directory of the file system to be

11-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty mounted. (A normal user belonging to the system group can also mount file systems at
any time, provided the user has write permission to the mount point and read
permission on the root directory of the file system to be mounted.)

Options of the mount and unmount commands


The mount command has many options which may be specified by the user. Default
values for these options are set by the system or indicated in /etc/filesystems.
The unmount command also has many options.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Change/show characteristics of a journaled file


system

Change/Show Characteristics of a Journaled File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
File system name /var
NEW mount point [/var]
SIZE of file system (in 512-byte blocks)
Unit Size 512bytes +
* Number of units [65536] #
Mount GROUP [bootfs]
Mount AUTOMATICALLY at system restart ? yes +
PERMISSIONS read/write +
MOUNT OPTIONS [ ] +
Start Disk Accounting ? no +
Fragment Size (bytes) 4096
Number of bytes per inode 4096
Compression algorithm no
Large File Enabled true
Allocation Group Size (MBytes) 16

Copyright IBM Corporation 2008

Figure 11-28. Change/Show Characteristics of a Journaled File System AW186.0

Notes:

Changing JFS file system characteristics


A JFS file system may have some of its characteristics changed both while it is in use
(mounted) and when it is not. To do this, use the chfs command or SMIT. Many
characteristics may be changed. The most important of these are described below.

Changing the mount point


The mount point can be changed using the -m flag of chfs (-m mntpnt). The default
mount point may be changed while the file system is in use, but the change is only
effective when the file system is next mounted.

11-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Changing file system size


The file system size can be specified in MBs, GBs or 512-byte blocks. The size of a JFS
may be increased while it is in use
(-a size=number of units). The size of a JFS file system may not be decreased at
any time, so it is often better to create a new file system and mount it at an appropriate
point within the existing file system than to increase the size if it is suspected that the
increased size is only temporarily required.
Increasing the size of the file system extends the logical volume, so the new size is
rounded up to the next logical partition boundary. If you extend the logical volume
directly, the partitions are added, but the file system is not changed. Extending the file
system uses those added partitions.

Changing the mount group


The mount group of a file system may be changed (-u mntgrp), and the change is
effective the next time the new mount group is referenced.

Mount automatically a system restart?


The administrator can specify whether a file system is automatically mounted at system
startup (-A yes|no). If a specification change is made, it is effective at the next startup.

Changing permissions
The permissions associated with the file system may be changed (-p ro|rw), and the
change is effective the next time the file system is mounted.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Change/Show Characteristics
of an Enhanced Journaled File System

Change / Show Characteristics of an Enhanced Journaled File System


Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
File system name /home
NEW mount point [/home]
SIZE of file system
Unit Size 512bytes +
* Number of units [32768] #
Mount GROUP [ ]
Mount AUTOMATICALLY at system restart ? yes +
PERMISSIONS read/write +
MOUNT OPTIONS [ ] +
Start Disk Accounting? no +
Block size (bytes) 4096
Inline Log? no
Inline Log size (MBytes) [ ]
Extended Attribute Format [v1] +
Enable Quota Management no +
Allow Small Inode Extents no +
Enable EFS? no +

Copyright IBM Corporation 2008

Figure 11-29. Change/Show Characteristics of an Enhanced Journaled File System AW186.0

Notes:

Changing JFS2 file system characteristics


A JFS2 may have some of its characteristics changed both while it is in use (mounted)
and when it is not in use. To do this, use the chfs command or SMIT.

JFS and JFS2 similarities


Most of the statements in the notes associated with the last visual (regarding changing
the characteristics of JFS file system) also apply to JFS2 file systems. An important
difference is that it is possible to decrease the size of a JFS2 file system.

11-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Dynamically shrinking a JFS2 file system


Before: LP1 LP2

After: LP1

# chfs -a size="-16M" /myfs

Copyright IBM Corporation 2008

Figure 11-30. Dynamically shrinking a JFS2 file system AW186.0

Notes:

Dynamic file system shrink capability (with JFS2)


On versions of AIX prior to AIX 5L V5.3, there is no way to shrink a file system
dynamically while you are using it, although you can easily extend it as needed. The
procedure to shrink a file system was to create a new smaller version, copy the data,
take the old version offline, then delete the old version. In AIX 5L v5.3 and later,
dynamic file system shrink is available with JFS2.

Changes in chfs and SMIT


The chfs command (and the corresponding SMIT menu) support for the size attribute
has been changed to support either a final size, which is smaller than the current size,
or a decrement (value preceded with the minus sign). The requested difference is
translated into a whole number of physical partitions with any remaining amount beyond
it being ignored. Thus, asking to decrease by 1 MB would have no effect (minimum PP
size for JFS2 is 16 MB).

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Restrictions
There must be enough free space in the remaining physical partitions of the file system
to stored the file data and metadata structures being moved from the freed physical
partitions.

Effect on inline log


If there is an inline log, that log is also proportionally adjusted in size.

11-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Remove a Journaled File System

Remove a Journaled File System

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
FILE SYSTEM name +
Remove Mount Point no +

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 2008

Figure 11-31. Remove a Journaled File System AW186.0

Notes:

Ways to remove a file system


The rmfs command or SMIT can be used to remove a file system. JFS and JFS2 file
system removal work the same way.

Restrictions
In order 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, that is, some user or process is using the file
system or has it as a current directory.
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.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Syntax
The syntax of the rmfs command is:
rmfs [-r] [-i] FileSystem
-r Removes the mountpoint of the file system
-i Displays warning and prompts the user before removing the file system
Example:
# rmfs -r /home/george/myfs

11-58 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Add a RAM file system


Create a RAM disk of 4 MB
# mkramdisk 4M
/dev/rramdisk0

Create a JFS file system on this RAM disk


# mkfs -V jfs /dev/ramdisk0
mkfs: destroy /dev/ramdisk0 (yes)? y

Create mount point


# mkdir /ramdisk

Mount RAM file system


# mount -V jfs -o nointegrity /dev/ramdisk0 /ramdisk

Copyright IBM Corporation 2008

Figure 11-32. Add a RAM file system AW186.0

Notes:

Adding a RAM file system


The visual shows a series of steps that can be used to add a RAM file system.

Use of the mkramdisk command


The purpose of the mkramdisk command is to enable the creation of file systems
directly in memory. This is useful for applications that make many temporary files.

Limitations
Use ramdisk only for data that can be lost. After each reboot, the ramdisk file system is
destroyed and must be rebuilt.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Add a UDF file system on a DVD-RAM


Create a UDF file system
# udfcreate -d /dev/cd0

Change the label on a UDF file system


# udflabel -d /dev/cd0 -l testdvd

Create a mount point


# mkdir /dvddisk

Mount a UDF file system


# mount -V udfs -o rw /dev/cd0 /dvddisk

Check a UDF file system


# udfcheck -d /dev/cd0
Copyright IBM Corporation 2008

Figure 11-33. Add a UDF file system on a DVD-RAM AW186.0

Notes:

Adding a UDF file system


The visual shows a series of steps that can be used to add a UDF file system on a
DVD-RAM.

Using a UDF
Once you have created a UDF on a DVD-RAM, you can treat it just like a normal hard
disk. It enables you to read, write, delete, copy, move, mount, unmount, and edit a file
within the DVD directory.

11-60 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The Universal Disk Format Specification (UDFS)


The UDFS is based on the Micro Design International (MDI) UDF implementation. It
supports UDFS 1.50, 2.00, and 2.01. (The implementation is based on UDFS 2.01, but
backward compatible to 2.00 and 1.50.) It is now possible to read and write to a DVD
media in 32/64 bit mode.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

System storage review


Logical Volume Structure

hd2

hd4 /usr hd2 free hd1 free hd1 free


/(root) /usr /home /home
hd6 hd3 hd1 hd1
Page Space /tmp /home /home
hd8 hd2
log /usr free free
hd61 lv00 lv00
hd5 free Page Space lv00 special DB lv00 special DB
hd9var
/blv /var special DB special DB

hdisk0 hdisk1 hdisk2 hdisk3


rootvg uservg
File Systems
/(root)
File System

Directories File Systems

/bin /dev /etc /lib /usr /tmp /var /home

Copyright IBM Corporation 2008

Figure 11-34. System storage review AW186.0

Notes:

Difference between file system and simple directory


It is important to understand the difference between a file system and a directory. A file
system is a section of disk that has been allocated to contain files. This section of disk is
the logical volume and is accessed by mounting the file system over a directory. Once
the file system is mounted, it looks like any other directory structure to the user.

File systems on the visual


The directories on the right of the bottom portion of the visual are all file systems. These
file systems are all mounted on the directories /usr, /tmp, /var, and /home. Notice the
corresponding logical volume in the graphic at the top of the visual.

11-62 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Simple directories


The directories on the left of the bottom portion of the visual are strictly directories that
contain files and are part of the /(root) file system. There is no separate logical volume
associated with these directories.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Listing free disk space


The df command displays information about the
total and available space on a file system

# df

Filesystem 512-blocks Free %Used Iused %lused Mounted on


/dev/hd4 294912 228088 23% 1925 7% /
/dev/hd2 3309568 339408 90% 36788 47% /usr
/dev/hd9var 65536 37600 43% 479 11% /var
/dev/hd3 131072 129352 2% 54 1% /tmp
/dev/hd1 32768 32064 3% 5 1% /home
/proc - - - - /proc
/dev/hd10opt 163840 20760 88% 1617 36% /opt
/dev/hd11admin 262144 261416 1% 5 1% /admin
/dev/ramdisk0 8192 7848 5% 17 2% /ramdisk

Copyright IBM Corporation 2008

Figure 11-35. Listing free disk space AW186.0

Notes:

Importance of the df command


The df command lists the free space on all mounted file systems.
This is an important command to be aware of as you will use it frequently. If you run out
of space in a file system (especially / or /tmp), system corruption could occur.

11-64 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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 in the following table:

Flag (Option) Brief Description of Output


Displays information on the total number of blocks, the used
df -I space, the free space, the percentage of used space, and the
mount point for the file system
Information displayed is like that shown on the visual, but
df -k statistics in the first two columns are given in units of 1024-byte
blocks
Information displayed is like that shown on the visual, but
df -m statistics in the first two columns are given in units of 1 MB
blocks
Information displayed is like that shown on the visual, but
df -g statistics in the first two columns are given in units of 1 GB
blocks

Note: The -m and -g flags were introduced in AIX 5L V5.2.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Control growing files

/var/adm/wtmp
/etc/security/failedlogin
/var/adm/sulog

/var/spool/*/*

$HOME/smit.log
$HOME/smit.script
$HOME/websm.log
$HOME/websm.script

Copyright IBM Corporation 2008

Figure 11-36. Control growing files AW186.0

Notes:

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 have a few days worth of login activity kept in them.
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:

11-66 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - 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 queueing subsystem by executing the following commands:
1. stopsrc -s qdaemon
2. rm /var/spool/lpd/qdir/*
3. rm /var/spool/lpd/stat/*
4. rm /var/spool/qdaemon/*
5. startsrc -s qdaemon

Records of SMIT and Web-based System Manager activity


Files such as smit.log and websm.log in the home directory of the root user and other
system administration accounts can also become quite large. These files need to be
monitored regularly and managed appropriately.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The skulker command


The skulker command cleans up file systems by removing
unwanted or obsolete files
Candidate files include:
Files older than a selected age
Files in the /tmp directory
a.out files
core files
ed.hup files
skulker is normally invoked daily by the cron command as
part of the crontab file of the root user
Modify the skulker shell script to suit local needs for the
removal of files

Copyright IBM Corporation 2008

Figure 11-37. The skulker command AW186.0

Notes:

Function of the skulker command


The shell script /usr/sbin/skulker includes a series of entries containing 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.)
Currently, items removed by the skulker script include the following:
- Old primary.output that got lost
- Old qdir files
- Files that are left in the mail queues
- Files in /tmp older than 24 hours and not accessed or modified in the past 24 hours
- Files in /var/tmp
- News items older than 45 days
- *.bak, *.bak, a.out, core, proof, galley, ed.hup files that are more than one day old
- Anything in a .putdir directory more than one day old

11-68 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Concerns related to skulker


A particular version of skulker is suited to the operating system and level with which it
was distributed. If the operating system has been upgraded or modified, it may be
inadvisable to use an old version of skulker.
In addition, the skulker shell script is moderately complex. When making
modifications, you should make a copy of the shell script first.
Note that if skulker is modified, or if it is used on the incorrect version of the operating
system, it ceases to be a supported component of AIX.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Listing disk usage


The du command can be used to list the number of blocks used by
a file or a directory

# du /home | sort -r -n

624 /home
392 /home/fred
98 /home/tom
54 /home/mary
52 /home/liz
23 /home/suzy
2 /home/guest
1 /home/steve

To view individual file sizes, use the ls -l command

Copyright IBM Corporation 2008

Figure 11-38. Listing disk usage AW186.0

Notes:

Use of the du command


There may be a number of files or users that are causing the increased use of space in
a particular file system. The du command helps to determine which files and/or users
are causing the problem.

Specifying the units du should use


By default, du gives size information in 512-byte blocks. Use the -k option to display
sizes in 1 KB units, use the -m option to display sizes in 1 MB units, or use the -g option
to display sizes in 1 GB units. The options -m and -g were introduced in AIX 5L V5.2.

Specifying output by file


By default, du gives information by directory. With the -a option, output is displayed by
file rather than by directory.

11-70 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Using du in conjunction with sort


If the output of du is sorted numerically and in descending order (using the -n and -r
flags of the sort command) by the value in the first column, this output can be an aid in
determining which files/directories are the largest. Then using ls -l, you can
determine the file/directory's owner.

The -x flag
The -x flag/option is also very useful. When you use the du -ax command, the report
only shows information from the specified file system. This is the best way to determine
what file is filling a particular file system.

Using the find command to locate large files


The find command is useful for locating files that are over a certain size. For example,
to find all files that contain more than 1,000,000 characters and then list them, use the
following command:
# find . -size +1000000c -exec ls -l {} \;

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Fragmentation considerations
Without fragmentation 4096 bytes

2000 bytes
File size = 2000 bytes

This free space cannot


be used by another file

With fragmentation
4096 bytes

File size = 2000 bytes 2000 bytes


Fragment size = 1024 bytes 1024 1024 1024 1024
These free fragments can
be used by other files
Considerations to be made:
Disk space allocation
Disk space utilization
I/O activity
Free space fragmentation
Fragment allocation map

Copyright IBM Corporation 2008

Figure 11-39. Fragmentation considerations AW186.0

Notes:

Benefits of a small fragment size


In JFS, as many whole fragments as necessary are used to store a file or directory's
data. Consider that we have chosen to use a JFS fragment size of 4 KB and we are
attempting to store file data which only partially fills a JFS fragment. Potentially, the
amount of unused or wasted space in the partially filled fragment can be quite high. For
example, if only 500 bytes are stored in this fragment, then 3596 bytes are wasted.
However, if a smaller JFS fragment size, say 512 bytes, was used, the amount of
wasted disk space would be greatly reduced to only 12 bytes. It is, therefore, better to
use small fragment sizes if efficient use of available disk space is required.

11-72 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Adverse effects of a small fragment size


Although small fragment sizes can be beneficial in reducing wasted disk space, they
can have an adverse effect on disk I/O activity. For a file with a size of 4 KB stored in a
single fragment of 4 KB, only one disk I/O operation would be required to either read or
write the file. If the choice of the fragment size was 512 bytes, a 4 KB file would only be
allocated a 4 KB block if one were available. If a single 4 KB block were not available,
512-byte fragments would be used, with a potential to allocate eight fragments for this
file. If fragments are used, for a read or write to complete, several additional disk I/O
operations (disk seeks, data transfers, and allocation activity) would be required.
Therefore, for file systems which use a fragment size of 4 KB, the number of disk I/O
operations are far less than for file systems which employ a smaller fragment size.
For file systems with a fragment size smaller than 4 KB, there is likely to be an increase
in allocation activity when the sizes of existing files or directories are extended.
Free space fragmentation can occur much more within a file system that uses smaller
fragment sizes.
The fragment allocation map, used to hold information about the state of each fragment
for each file system, is held on the disk and in virtual memory. The use of smaller
fragment sizes in file systems results in an increase in the length of these maps and,
therefore, requires more resources to hold.

JFS2 block size


In JFS2, the block size has a function similar to that of the JFS fragment size. The
default block size is 4096, but it can be altered by the system administrator.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Defragmenting a file system


The defragfs command increases a file system's contiguous free
space

The file system must be mounted

defragfs [-q | -r | -s] filesystem

Options:

-q Reports the current state of the file system


-r Reports the current state of the file system and the state that
would result if the defragfs command is run without either
-q, -r or -s
-s Gives short report regarding the current state
of the file system
Copyright IBM Corporation 2008

Figure 11-40. Defragmenting a file system AW186.0

Notes:

Information returned by defragfs command (JFS file systems)


Information that is returned by the defragfs command for a JFS file system includes
the following:
- Number of Fragments Moved: Displays the total number of fragments that have
been moved
- Number of Logical Blocks Moved: Displays how many logical blocks were
relocated
- Number of Allocation Attempts: The required number of calls to the allocation
routine to defragment the file system
- Number of Exact Matches: The number of times the fragments moved fit exactly in
some free space

11-74 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Note: Sometimes the estimates for these items provided when running defragfs with
the -q or -r option indicate results different from what is actually done when defragfs
is run without any options.

Using defrags with JFS2 file systems


The defragfs command can also be used with a JFS2 file system. The information
returned by defragfs in this case is quite different from that returned when using the
command with a JFS file system. Refer to the entry for defragfs in the AIX 6.1
Commands Reference online for additional information regarding this topic.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Verify a file system

Command syntax:

fsck [-p | -y | -n] [-f] [ file system ]

Checks journal log


Checks inodes, indirect blocks, data blocks, free lists
If no file system name is specified, the fsck command
checks all file systems which have the check=true
attribute set in the /etc/filesystems
Orphan files are placed in the lost+found directory
Unmount the file system before running fsck

Copyright IBM Corporation 2008

Figure 11-41. Verify a file system AW186.0

Notes:

Function of the fsck command


A file system can be verified using the fsck (file system check) command.
This check consists of a number of stages, including:
- Checking the journal log for errors
- Checking the blocks to ensure that each block is either allocated to a single file or is
in the free list
- Checking file sizes
- Checking directory entries

The -p option
The -p (preen) option is used to check a file system and make only minor changes,
without bothering the user. When fsck is run under SMIT, this option is used.

11-76 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Error reporting by fsck


If fsck encounters errors, it reports them to the screen. The -y option (yes) or -n (no)
option is used to indicate a yes or a no answer to all questions asked by fsck. The yes
option is typically used to recover a badly damaged file system. Using the -y option
allows fsck to discard some badly damaged files. Note, however, that mounted file
systems are not repaired.

The lost+found directory


If any files are found that are not allocated to a directory anywhere in the file system
being checked, then fsck creates an entry for that data in the lost+found directory in the
root directory of that file system. If the lost+found directory for a file system does not
exist, it can be created using the AIX command:
mklost+found

Running of fsck during system startup


The fsck command executes each time the system boots up (from the /etc/rc file).

Unmounting the file system


Unmount the file system before using fsck. If a file system is in use, the fsck utility can
get confused and return inaccurate messages. If fsck were to try repairing a file system
that is in use, it could actually create problems. Because of this, fsck refuses to make
corrections to a mounted file system.

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-77
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint

1. Will the size of the file system change when the size of
the logical volume on which it resides is increased?
_________

2. If a file system is the same size as the logical volume on


which it resides, will the size of the logical volume
increase when the size of the file system increases?
___________

3. If you remove a logical volume, is the file system that


resides on it removed as well?
___________________________________________
___________________________________________

Copyright IBM Corporation 2008

Figure 11-42. Checkpoint AW186.0

Notes:

11-78 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: Working with file systems

Exercise 9

Copyright IBM Corporation 2008

Figure 11-43. Exercise: Working with file systems AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 11. Working with file systems 11-79
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

The components of a JFS file system are the superblock,


inodes, data blocks, and indirect blocks

Important issues to consider when creating a journaled


file system are: fragment size, NBPI, allocation group
size, compression, and whether it should be large file-
enabled

JFS2 supports large files, large file systems, and


improves performance

File systems can be added and removed from the


system, and their characteristics can also be changed,
all through SMIT

Copyright IBM Corporation 2008

Figure 11-44. Unit summary AW186.0

Notes:

11-80 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 12. Paging space

What this unit is about


This unit presents the key concepts related to paging space.

What you should be able to do


After completing this unit, you should be able to:
Define why paging space is required in AIX
List and monitor the paging space utilization of the system
Perform corrective actions to rectify too little or too much paging
space scenarios

How you will check your progress


Accountability:
Checkpoint questions
Exercise

References
SG24-7559 AIX Version 6.1 Differences Guide
Online AIX 6.1 Operating system and device management
Online AIX 6.1 Installation and migration

Note: References listed as Online above are available at the


following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Define why paging space is required in AIX
List and monitor the paging space utilization of the system
Perform corrective actions to rectify too little or too much
paging space scenarios

Copyright IBM Corporation 2008

Figure 12-1. Unit objectives AW186.0

Notes:

12-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

What is paging space?


RAM = 256 MB

RAM Usage
Operating System Database TCP/IP 8 MB FREE

Current applications
Total = 248 MB

RAM Usage
New application
Operating System Database TCP/IP Application
needs RAM > 8 MB
4 KB 4 KB

Paging Space

Copyright IBM Corporation 2008

Figure 12-2. What is paging space? AW186.0

Notes:

Use of paging space


For a process to be actively running, it must be loaded into memory. When it is loaded
into memory, it is assigned a number of 4 KB areas called page frames. As more
processes are loaded into memory, it may become full. Not everything that resides in
memory is active. When memory is full, it is scanned to locate those page frames that
are least-recently used. 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 the disk is called paging space.
The paging space is a reserved area on a disk that can contain information that resided
in memory but was inactive and was moved to make room for information that is
currently being used. If paged-out information is needed in memory again, the page is
retrieved and brought back into memory or paged-in.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Role of the Virtual Memory Manager (VMM)


In the AIX environment, paging and virtual storage are managed by the VMM.

12-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Paging space
Is a secondary storage area for over-committed memory
Holds inactive 4 KB pages on disk
Is not a substitute for real memory

Paging Space

Physical Memory

Copyright IBM Corporation 2008

Figure 12-3. Paging space AW186.0

Notes:

A secondary storage area


Paging space is disk storage for information that is resident in virtual memory, but is not
currently being accessed. As memory fills, inactive pages are moved to the paging area
on disk.

A temporary holding area for inactive pages


It is very important to remember that paging is a temporary holding area for inactive
pages; it is not a substitute for real memory. If your machine has many active
processes, it requires more real memory. You must make sure the machine has enough
memory to maintain all the active processes. If you run out of memory, your machine
reaches a constant state of paging called thrashing. As it attempts to make room in
memory, it completes a page-out; as soon as the page reaches the disk, it is needed
again because it is still active. Your machine's resources are wasted performing only
paging activity, and no real work gets done.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Thrashing indicates a need for additional memory


Increasing the amount of paging space when your machine is thrashing does not solve
the problem. Thrashing is a result of not enough real memory.

12-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Sizing paging space


Created at installation up to twice the size of real memory
Amount needed is dependent on applications
Monitor paging space: lsps -a
Running low on paging space is bad

#
ksh: cannot fork no swap space

Copyright IBM Corporation 2008

Figure 12-4. Sizing paging space AW186.0

Notes:

Creation of paging space


Paging space is created during AIX installation.
The initial size is dependent on various factors, particularly the amount of RAM in your
system. Currently, the initial paging space size is determined according to the following
standards:
- Paging space can use no less than 16 MB, except for hd6, which can use no less
than 64 MB in AIX V4.3 and later versions
- Paging space can use no more than 20% of total disk space
- If RAM is greater than or equal to 256 MB, the paging space is 512 MB
- If RAM is less than 256 MB, the paging space is twice the size of RAM

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Adjusting the amount of paging space


The initial size of paging space is just a starting point. This is not necessarily the
amount of the paging space that is right for your machine. The number and types of
applications dictates the amount of paging space needed. Many sizing rules of thumb
have been published, but the only way to correctly size your machine's paging space is
to monitor the utilization of your paging space.

Monitoring paging space


Monitoring the utilization of the paging space is done with the command:
lsps -a
This command and its output are covered shortly.

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 terminate or release allocated memory. This
situation should obviously be avoided. A low paging space condition may be indicated
by the appearance of one or more of the following messages on the console or in
response to a command on any terminal:
"INIT: Paging space is low"

"ksh: cannot fork no swap space"

"Not enough memory"

"Fork function failed"

"fork () system call failed"

"unable to fork, too many processes"

"Fork failure - not enough memory available"

"Fork function not allowed. Not enough memory available."

"Cannot fork: Not enough space"


The situation can get worse. If paging space continues to fill, non-system processes are
terminated, and the system may even crash. Make sure you have enough paging
space.

12-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Paging space placement


Only one paging space per disk
Use disks with the least activity
Paging spaces roughly the same size
Do not extend paging space to multiple physical volumes
Use multiple disk controllers

hd6 paging00 paging01

Copyright IBM Corporation 2008

Figure 12-5. Paging space placement AW186.0

Notes:

Introduction
Placement and size of your paging space does impact its performance. The following
material contains tips regarding the placement and size of paging areas.

Configure only one paging space per disk


Do not have more that one paging space per disk. The paging space is allocated in a
round-robin manner, and uses all paging areas equally. If you have two paging areas on
one disk, then you are no longer spreading the activity across several disks.

Use disks with low levels of activity


Paging space performs best when it is not competing with other activity on the disk. Use
disks that do not have much activity.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Create paging spaces of roughly the same size


Paging spaces should be roughly the same size. Because of the round-robin technique
that is used, if they are not the same size, then the paging space usage is not balanced.
Smaller paging areas fill faster.

Do not span multiple physical volumes


Do not extend a paging space to span multiple physical volumes. Although you can
spread a paging area (like a regular logical volume) across several disks, the
round-robin technique treats the paging area as one single paging area. Therefore, the
activity is not evenly spread across the disks.

Use multiple disk controllers


Use disks on different controllers. If the disks are attached to different controllers you
get better throughput when reading and writing to the disk which improves your
performance.

12-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checking paging space


Check paging activity:
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type chksum
hd6 hdisk0 rootvg 64MB 43 yes yes lv 0
paging00 hdisk2 rootvg 64MB 20 yes yes lv 0

Check total RAM:


# lsattr -El sys0 -a realmem
realmem 262144 Amount of usable physical memory in KB False

Check paging space activated at startup:


# cat /etc/swapspaces
...
hd6:
dev=/dev/hd6
...
paging00:
dev=/dev/paging00
Copyright IBM Corporation 2008

Figure 12-6. Checking paging space AW186.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.
Note that the output of the lsps command in the example shows two paging spaces:
hd6 and paging00. The paging space created during system installation is named hd6.
Paging spaces created by the system administrator after system installation are named
paging00, paging01, and so on.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The /etc/swapspaces file


The file /etc/swapspaces contains a list of the paging space areas that are activated at
system startup.

12-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Adding paging space


# smit mkps
Add Another Paging Space

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Volume group name rootvg
SIZE of paging space (in logical partitions) [4] #
PHYSICAL VOLUME name hdisk2 +
Start using this paging space NOW? no +
Use this paging space each time the system is no +
RESTARTED?

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 2008

Figure 12-7. Adding paging space AW186.0

Notes:

Ways of adding extra paging space


To add extra paging space volumes to the system, you can use SMIT (as illustrated on
the visual), the mkps command, or the Web-based System Manager.

Using the mkps command


When using the mkps command, the syntax and options are:
mkps [-a] [-n] [-t Type] -s NumLPs Vgname [Pvname]
Vgname The volume group within which to create the paging space
Pvname Specifies the physical volume of the volume group
-s NumLPs Sets the size of the new paging space in logical partitions
-a Activate the paging space at the next restart (adds it to
/etc/swapspaces)

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

-n Activate the paging space immediately


-t Type Specifies the type of paging space (lv or nfs)
When a paging space is created, the /etc/swapspaces file is also updated, if needed.
The following example illustrates use of the mkps command:
# mkps -s 4 -n -a rootvg

12-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Change paging space


# smit chps
Change / Show Characteristics of a Paging Space

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Paging space name paging00
Volume group name rootvg
Physical volume name hdisk2
NUMBER of additional logical partitions [] #
Or NUMBER of logical partitions to remove [] #
Use this paging space each time the system is yes +
RESTARTED?

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 2008

Figure 12-8. Change paging space AW186.0

Notes:

Characteristics that can be changed


A paging space may have its size increased or decreased and may have its autostart
options changed while it is in use (this updates /etc/swapspaces).
These changes can be made via SMIT (as illustrated on the visual) or by using the chps
command.

Decreasing paging space


The ability to decrease paging space was introduced in AIX 5L V5.1. The argument -d
to the chps command calls the shrinkps shell script to reduce the size of an active
paging space. The use of a shell script reduces the possibility of getting into an
unbootable state because users are not allowed to run out of paging space. The script
checks paging space actually in use and adds a paging space warning threshold buffer.
The SMIT fastpath is smit chps.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The process chps follows to decrease an active paging space is as follows:

Step Action
Create a new, temporary space from the same volume group as the
1
one being reduced
2 Deactivate the original paging space
3 Reduce the original paging space
4 Reactivate the original paging space
5 Deactivate the temporary space

The primary paging space (usually hd6) cannot be decreased below 32 MB.
When you reduce the primary paging space, a temporary boot image and a temporary
/sbin/rc.boot pointing to this temporary primary paging space are created to make sure
the system is always in a state where it can be safely rebooted.
These command enhancements are also available through the Web-based System
Manager, starting in AIX 5L V5.2.

Activating paging space


Inactive paging spaces may be activated dynamically once they have been defined. To
do this enter: swapon /dev/pagingnn
Note: This operation is supported through SMIT as well using the pgsp fastpath.
Alternatively, use swapon -a to activate all paging spaces defined in /etc/swapspaces.
This command is run in /etc/rc at system startup.

Examples of chps command use


The following examples illustrate use of the chps command:
- Example 1: Delete one logical partition from the paging00 paging space
# chps -d 1 paging00
- Example 2: Add one logical partition to the paging00 paging space
# chps -s 1 paging00
Refer to the entry for chps in the online AIX 6.1 Commands Reference (or the
corresponding man page) for more information regarding the chps command.

12-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Remove paging space


To remove an active paging space:

Make inactive
# swapoff /dev/paging00

Remove inactive paging space


# rmps paging00

NOTE: /dev/hd6 cannot be removed using this process


Copyright IBM Corporation 2008

Figure 12-9. Remove paging space AW186.0

Notes:

Deletion of surplus paging space


As weve discussed, paging space can be added to the system if necessary. Similarly,
surplus paging space can be deleted to free up the disk space for other logical volumes.

Deactivation of paging space


Inactive paging space can be activated dynamically to meet system demand. In order to
delete paging space, it must be inactive (that is, not used by the kernel.) Beginning with
AIX 5L V5.1, active paging spaces can be deactivated while the system is running using
the swapoff command or with the SMIT fastpath swapoff.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Reasons the swapoff command may fail


The swapoff command may fail due to:
- Paging size constraints. The process to remove an active paging space is to move
all the pages of the paging space being removed to another paging space. If there is
not enough active paging space to do this, the command fails.
- I/O errors.

12-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Problems with paging space


Paging space too small:
Dynamically increase the size by allocating more partitions
chps -s LogicalPartitions PagingSpace

Example:
# chps -s 1 paging00

Paging space too large:


Dynamically decrease the size by deallocating partitions
chps -d LogicalPartitions PagingSpace

Example:
# chps -d 1 paging00

Copyright IBM Corporation 2008

Figure 12-10. Problems with paging space AW186.0

Notes:

Overview
All ideas on this visual have already been considered. The visual simply pulls together
all the ideas discussed so far.

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Documenting paging space setup

Run the lsps command


Have a hardcopy of the /etc/swapspaces file

Paging Space Records

Copyright IBM Corporation 2008

Figure 12-11. Documenting paging space setup AW186.0

Notes:

Running lsps
Run lsps to monitor paging space activity. Keep good documentation so that you know
what is normal for that system.

A copy of /etc/swapspaces
Keep a copy of /etc/swapspaces so that you know what paging spaces are defined to
be started at boot.

12-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page Physical Volume Size %Used Active Auto Type chksum
Space Volume Group

hd6 hdisk0 rootvg 64 MB 43% yes yes lv 0


paging00 hdisk1 rootvg 64 MB 7% yes yes lv 0
paging01 hdisk1 rootvg 16 MB 89% yes yes lv 0

______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________

2. True or False? The size of paging00 (in the above example) can
be dynamically decreased.
Copyright IBM Corporation 2008

Figure 12-12. Checkpoint AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exercise 10: Paging space

List paging space


Add another paging space
Change the characteristics of a paging
space
Remove paging space

Copyright IBM Corporation 2008

Figure 12-13. Exercise 10: Paging space AW186.0

Notes:

Introduction
This lab allows you to add, decrease, monitor, and remove paging space.
The exercise can be found in your Student Exercises Guide.

12-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

Paging space is a requirement in AIX for the system to


boot up. The default paging space is /dev/hd6.
The percent utilization of all the paging spaces should be
regularly monitored to ensure that the system has the
correct amount of page space defined. The lsps
command can be used to do this.
Paging space can be inactivated and the size can be
increased or decreased dynamically.

Copyright IBM Corporation 2008

Figure 12-14. Unit summary AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 12. Paging space 12-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

12-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 13.Backup and restore

What this unit is about


This unit describes how a system can be backed up and restored.

What you should be able to do


After completing this unit, you should be able to:
List the different backup methods supported through SMIT and on
the command line
Create a customized installable system image backup

How you will check your progress


Accountability:
Checkpoint questions
Exercises

References
Online AIX Version 6.1 Operating System and Device
management
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp
SG24-5765 AIX 5L Differences Guide Version 5.2 Edition
SG24-5766 AIX 5L Differences Guide Version 5.3 Edition
SG24-7414 AIX 5L Differences Guide Version 5.3 Addendum
SG24-7559 IBM AIX Version 6.1 Differences Guide

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this unit, you should be able to:
List the different backup methods supported through SMIT
and on the command line
Create a customized installable system image backup

Copyright IBM Corporation 2008

Figure 13-1. Unit objectives AW186.0

Notes:

13-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Backup devices - diskette

/dev/fd0 - Built in 3 1/2-inch diskette drive

/dev/fd1 - Second diskette drive

Drive
3 1/2-inch (1.44) 3 1/2-inch (2.88)
/dev/fdxl 720 KB 720 KB
/dev/fdxh 1.44 MB 2.88 MB
/dev/fdx.9 720 KB 720 KB
/dev/fdx.18 1.44 MB 1.44 MB
/dev/fdx.36 - 2.88 MB

Copyright IBM Corporation 2008

Figure 13-2. Backup devices - diskette AW186.0

Notes:

Introduction
Diskettes can be used to backup data. Of course, this media is only practical when
backing up small amounts of data.
The logical device name for a diskette drive is /dev/fdx. Your system most likely has one
diskette drive, fd0. When writing to a diskette, the highest density supported is the
default value. The chart shows that there are multiple logical names associated with the
diskette drive that allow writing at different densities. To read the diskettes on a
low-density drive, you must write using the low-density settings.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Commands
To format a diskette, use the format command. There is a -l option if you want to
format at low density.
The flcopy command is used to copy diskettes (similar to the DOS diskcopy
command).
Diskettes can also be formatted using DOS formatting with the command dosformat.
AIX can read from and write to DOS diskettes using dosread and doswrite. There is
also a dosdir to view the content of the diskette. To use these tools, the fileset
bos.dosutil must be installed.

13-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Backup devices - tape

4 mm DAT 1/2 - inch VXA


8 mm DLT QIC

Low Retension on Rewind on


Capacity Open Close

/dev/rmtx no no yes
/dev/rmtx.1 no no no
/dev/rmtx.2 no yes yes
/dev/rmtx.3 no yes no
/dev/rmtx.4 yes no yes
/dev/rmtx.5 yes no no
/dev/rmtx.6 yes yes yes
/dev/rmtx.7 yes yes no
Copyright IBM Corporation 2008

Figure 13-3. Backup devices - tape AW186.0

Notes:

Tape technologies
The most common device used for backups are tapes. AIX supports a variety of tape
devices, tape subsystems, and tape libraries. Here are some highlights of some of the
tape technologies:
- 4 mm Digital Audio Tape (DAT)
Can hold up to 40 GB of data with a data transfer rate of 6 MB/sec.
- 8 mm Tape
Can hold up to 40 GB of data with a data transfer rate of 6 MB/sec.
- Quarter Inch Cartridge (QIC)
Can hold up to 4 GB with a data transfer rate of 380 KB/sec.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Digital Linear Tape (DLT)


Can hold up to 70 GB at a transfer rate of 10 MB/sec.
- Magstar
Can hold up to 420 GB per cartridge with a transfer rate of 15 MB/sec.
- VXA Tape Data Cartridge
Can hold up to 160 GB with a data transfer rate of 12 MB/sec.
- 8 mm Data Cartridge with smart clean technology
Can hold up to 150 GB with a data transfer rate of 30 MB/sec.
For large scale backups, tape subsystems and tape libraries would be the most
sensible choice. For details on all tape devices supported on AIX systems, go to:
www.ibm.com/storage/tape

Device names
The tape devices use the logical device name of rmtx (raw magnetic tape). In the chart,
you see the seven additional logical names assigned to each tape device. These
names control the following tape device characteristics:
- Write at low capacity
- Retension the tape (fast forward and rewind before starting the operation)
- Rewind the tape at the finish of the operation
The most common devices that are used are rmtx and rmtx.1. For most tape
operations, high capacity and no retension are the norm. Whether or not you want to
rewind the tape depends on your particular operation.
Tapes are formatted at the factory. Tape movement can be controlled using the tctl or
mt commands. If there two tape devices, tcopy allows tape-to-tape transfers. Details on
these commands are discussed later.

13-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Backup device - read/write optical drive


Use with CD-ROM file system for read only operations
Use with journal file systems for read/write operation
For CD:
OEM CD-RW drive
Third-party CD burn software
(AIX Toolbox for Linux Applications)

For DVD:
Need 7210 DVD-RAM drive
No additional software needed for UDF format

Copyright IBM Corporation 2008

Figure 13-4. Backup device - read/write optical drive AW186.0

Notes:

Introduction
AIX supports read/write optical drives as well as standard CD-ROM. The R/W Optical
drives support CD-ROM file systems and JFS file systems. If the optical drive is
mounted as a CD-ROM file system, it will be read only.
The optical drive volume group must be wholly contained on the single optical disk. It
cannot span beyond one optical drive.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

CD-ROM file system


To use the information on the read/write optical drive like a standard CD-ROM. The
steps to access the data is the same as with a regular CD-ROM:
1. Create the file system using one of the following commands:
- smit crcdrfs
- crfs -v cdrfs -p ro -d DeviceName
2. Mount the file system:
mount mount_point

JFS file system


To use the read/write optical drive as a read/write device, you must create a volume
group using the same commands that are used with a hard drive.
1. Make the volume group with one of the following commands:
- smit mkvg
- mkvg -f -y VGName -d 1 DeviceName
2. Create a file system with one of the following commands:
- smit crfs
- crfs -v jfs -g VGName -a size=FSsize -m Mountpt -A [yes|no] -p rw
The -A option designates whether to automatically mount at system start.
3. Mount the file system:
mount mount_point

CD burner
To burn a backup image onto a CD (IS09660), you must install an OEM drive and
software that is capable of CD writes.
To find out what CD writers are supported examine:
/usr/lpp/bos.sysmgt/README.oem_cdwriters.
Two of the CD burner software packages that have been tested with AIX and are
provided on the AIX Toolbox for Linux Applications CD are mkisofs and cdrecord. You
may alternatively download the software from:
http://www.ibm.com/servers/aix/products/aixos/linux/download.html
Whatever software package is installed, you will need to link their executables to the
AIX standard command names of /usr/sbin/mkrr_fs and /usr/sbin/burn_cd. For
more details refer to: /usr/lpp/bos.sysmgt/mkcd.README.

13-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Backing up to DVD


Backing up to DVD using the standard UDF format is supported with the IBM 7210
(discussed further on the next visual and in the associated notes); there is no need to
install special software if using this device and format.
Refer to documentation provided by the vendor for information about required drivers
and software and about the support provided by that vendor if you are planning to use a
DVD burner provided by another vendor.

Booting from CD or DVD


In order to boot from a mksysb CD or DVD, you need to be sure that your hardware is at
the latest firmware level. Procedures for updating pSeries firmware are covered in the
Q1316 AIX System Administration II: Problem Determination course.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Backup device 7210 external DVD-RAM drive

Writes DVD-RAM media


Reads DVD media in 2.6 GB, 4.7 GB, 5.2 GB, and 9.4 GB
Supports CD-ROM media in Modes 1 or 2, XA, and CDDA
and audio formats
Reads multi-session disks, CD-R, CD-ROM, and CD-RW
disks
Loading tray accommodates 8 cm and12 cm media
SCSI-attachable

Copyright IBM Corporation 2008

Figure 13-5. Backup device - 7210 external DVD-RAM drive AW186.0

Notes:

Description
The IBM 7210 External DVD-RAM Drive Model 025 is a DVD-RAM drive designed to
provide a high performance storage solution. This self-powered standalone drive is
designed for the open systems environment, which includes the IBM iSeries, pSeries,
AS/400, and RS/6000 servers.

13-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

SMIT backup menus


System Storage Management (Physical and Logical)
Logical Volume Manager
File Systems
Files and Directories
System Backup Manager

File Systems Files and Directories


Back Up a File System Back Up a File or Directory
Restore a File System Restore a File or Directory
List Contents of a Backup List Contents of a Backup

System Backup Manager Logical Volume Manager


Volume Groups
Back Up the System
Preview Information about a Backup
Verify the Readability of a Backup Volume Groups
View the Backup Log Back Up a Volume Group
List Information about Filesets in a System Image Remake a Volume Group
List Files in a System Image List Files in a Volume Group Backup
Restore Files in a System Image Restore Files in a Volume Group Backup

Back Up the System Back Up a Volume Group


Back Up This System to Tape/File Back Up a Volume Group to Tape/File
Back Up This System to CD Back Up a Volume Group to CD
Back Up This System to DVD Back Up a Volume Group to DVD

Copyright IBM Corporation 2008

Figure 13-6. SMIT backup menus AW186.0

Notes:

Backup menus
The visual shows the SMIT menus that have backup options. Note that the menus in
the visual do not show all the options for a given menu, only those that pertain to
backups.
Backups can also be performed using the Web-based System Manager.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rootvg backup process - mksysb


Backs up rootvg only
Unmounted file systems are not backed up
Bootable tape is created in backup format
Provides facilities for a non-interactive installation
Saves system-created paging space definitions
Saves logical volume policies
There should be minimal user and application activity

Copyright IBM Corporation 2008

Figure 13-7. rootvg backup process - mksysb . AW186.0

Notes:

What does mksysb do?


The mksysb utility provides the following functions:
- Saves the definition of the paging space
- Provides a non-interactive installation that gives information required at installation
time through a data file
- Saves the inter/intra policy 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
installation time
- Saves the file system block size and number of bytes per inode
- Saves the file system compression characteristics

13-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - Saves striped logical volume attributes in AIX V4.2 and later
- Allows the user to restore single or multiple files from a system image
The volume group image is saved in backup format. The rootvg is created as an
installable image.

System backup or clone?


If the mksysb command is used for a backup of the source system, it is considered a
system backup. However, if the intent of the backup is to provide a customized system
for use on other machines, the mksysb is considered a clone. Cloning means preserving
either all or some of a system's customized information for use on a different machine.
The mksysb files are system-specific.
If the mksysb tape, by itself, is used to clone a machine that is not a hardware clone, it
may not work or may not provide support for hardware devices unique to the new
machine. For example, loading a mksysb image made from a uniprocessor machine
does not install correctly on a multiprocessor machine because they use different AIX
filesets. However, this is an easy problem to resolve. In addition to the mksysb tape, you
will also need an AIX installation CD to provide the filesets needed by the other
machine. If the CD is also available, then during installation the proper fileset is
automatically selected and loaded from the CD.

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 install interact through several files. The
mksysb command saves the data used by the installation by taking a snapshot of the
current system and its customized state.

System backup components


The utilities for creating a system backup include messages, SMIT menus, and
commands that are packaged in the bos.sysmgt.sysbr option of the bos.sysmgt
package. They are separately installable, although this fileset is automatically installed
beginning with AIX V4.3. If your system does not include the mksysb command, install
the bos.sysmgt.sysbr option to get mksysb and the BOS installation routines.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/image.data file for rootvg


image data:
IMAGE_TYPE= bff
DATE_TIME= Fri Nov 29 10:23:36 NFT 2007
UNAME_INFO= AIX ibm150 2 5 00428DFB4C00
PRODUCT_TAPE= no
USERVG_LIST=
PLATFORM= chrp
OSLEVEL= 6.1.0.0
CPU_ID= 00428DFB4C00
logical_volume_policy:
SHRINK= no
EXACT_FIT= no
ils_data:
LANG= en_US
#Command used for vg_data, /usr/sbin/lsvg
vg_data:
VGNAME= rootvg
PPSIZE= 16
VARYON= yes
VG_SOURCE_DISK_LIST= hdisk0
BIGVG= no
TFACTOR= 1
#Command used for source_disk_data: /usr/sbin/bootinfo
source_disk_data: (stanza is repeated for each disk in rootvg)
PVID=(physical volume id)
LOCATION=(disk location)
SIZE_MB=(size of disk in megabytes)
HDISKNAME=(disk name)
#Command used for lv_data; /usr/sbin/lslv
lv_data: (stanza for each logical volume in rootvg)
.
fs_data: (stanza for each MOUNTED filesystem in rootvg)
Copyright IBM Corporation 2008

Figure 13-8. /image.data file for rootvg AW186.0

Notes:

/image.data file creation


The /image.data file has information used by the BOS installation for creating the target
rootvg. The /image.data file, while being flexible, is not intended for every user. The
mksysb utility calls mkszfile (if -i or -m options are specified) to create an image.data
file from existing information. If you edit the image.data file, then you should call the
mksysb command without the -i or -m options to use the existing image.data file.
In general, the stanza information found in the /image.data file is generated using one
of the lsxx commands; that is, lsvg for the volume group data, lslv for the logical
volume data, lsfs for the file system data, and so forth. Some fields like LV_MIN_LPS
are created through calculations and are not directly available from commands.
You can provide additional processing (if required) after the BOS installation by using
the BOSINST_FILE= field in the post_install_data stanza or through your own
program. The BOSINST_FILE and SHRINK= fields must be edited by the user before
calling mksysb if changes are desired.

13-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty logical_volume_policy stanza


The logical_volume_policy stanza contains information to be used at reinstallation
time. The SHRINK= field when set to YES, causes the system to create logical
volumes and file systems in the volume group based on the values set for each with the
LV_MIN_LPs and FS_MIN_SIZE fields. This option is always set to NO when created
by mkszfile.
The EXACT_FIT= field when set to YES, causes the system to place the logical
volumes on the disk according to the physical partition maps that were generated with
the -m flag of the mksysb or mkszfile command.
If the only thing you wish to change is the SHRINK or EXACT_FIT field, there is no
need to edit this file. Both of these settings can be controlled by the menus presented
during the installation of a mksysb.

vg_data stanza
The vg_data stanza contains information about the volume group. The
VG_SOURCE_DISK_LIST= field specifies the disks that BOS installation uses on a
best effort basis to place the volume group. If the EXACT_FIT= field is set to YES, the
user is warned before installation begins.

lv_data stanza
The lv_data stanza contains information about logical volumes. This type of data
stanza is also used to contain paging space information. Information about striped
logical volumes and large file enabled file systems are placed in this stanza in AIX V4.2
and later.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/bosinst.data file for rootvg


control_flow:
CONSOLE = Default
INSTALL_METHOD = overwrite
PROMPT = yes
EXISTING_SYSTEM_OVERWRITE = yes
INSTALL_X_IF_ADAPTER = yes
RUN_STARTUP = yes
RM_INST_ROOTS = no
ERROR_EXIT =
CUSTOMIZATION_FILE =
TCB = no
INSTALL_TYPE =
BUNDLES =
RECOVER_DEVICES = Default
BOSINST_DEBUG = no
ACCEPT_LICENSES =
DESKTOP = CDE
INSTALL_DEVICES_AND_UPDATES = yes
IMPORT_USER_VGS =
ENABLE_64BIT_KERNEL = no
CREATE_JFS2_FS = no
ALL_DEVICES_KERNELS = yes
(some bundles ....)
target_disk_data:
LOCATION =
SIZE_MB =
HDISKNAME =
locale:
BOSINST_LANG =
CULTURAL_CONVENTION =
MESSAGES =
KEYBOARD =

Copyright IBM Corporation 2008

Figure 13-9. /bosinst.data file for rootvg AW186.0

Notes:

/bosinst.data creation
This file allows the administrator to specify the requirements at the target system and
how the user interacts with the target system. It provides flexibility by allowing different
target hardware to use the same backup image. The system backup utilities simply
copy the /bosinst.data into the second file in the rootvg 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.
The sample file shown in the visual has been condensed to highlight key areas. The
actual file is well documented with comments contained within the file.

13-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty control_flow stanza


The control_flow stanza contains variables that control the way the installation
program works.
The field definitions are:
- CONSOLE specifies the full path name of the device you want to use as the
console. For example, /dev/lft0.
- INSTALL_METHOD specifies a method of installation: migration, preserve, or
overwrite.
- PROMPT specifies whether the installation program uses menus from which you
can make choices. You must fill in values for all variables in the locale and
control_flow stanzas if you set the PROMPT variable to no with two exceptions: the
ERROR_EXIT and CUSTOMIZATION_FILE variables, which are optional.
- EXISTING_SYSTEM_OVERWRITE confirms that the installation program
overwrites existing files. This variable is only applicable for non-prompted overwrite
installation.
- INSTALL_X_IF_ADAPTER installs AIXWindows if the selected console is a
graphical terminal.
- RUN_STARTUP starts the Installation Assistant on first boot after the BOS
installation completes.
- RM_INST_ROOTS removes all files and directories in the /usr/lpp/*/inst_roots
directories.
- ERROR_EXIT starts an executable program if an error occurs in the installation
program.
- CUSTOMIZATION_FINAL specifies the path name of a customization file you
create. The customization file is a script that starts immediately after the installation
program concludes.
- TCB specifies whether you want to install the Trusted Computing Base.
- INSTALL_TYPE specifies what software to install on the machine. The values are
full (full-function configuration), client (client configuration), personal (personal
workstation configuration), and CC_EVAL (enables CAPP and EAL4+ technology).
The full configuration includes all the software in client and personal. Change full
to either client or personal if you want to install one of these subsets of the
full-function configuration.
- BUNDLES specifies what software bundles to install. Type the bundle names
separated by a space between each name.
- RECOVER_DEVICES specifies whether to reconfigure the devices.
- BOSINST_DEBUG specifies whether to show debug output during BOS installation.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- ACCEPT_LICENSES specifies whether to accept software license agreements


during the BOS installation.
- DESKTOP specifies the desktop to be installed. Choices include CDE (the default),
NONE, GNOME, and KDE. If you choose GNOME or KDE, you install open-source software.
- INSTALL_DEVICES_AND_UPDATES will do additional installations. When
installing a mksysb image to a system with a different hardware configuration, boot
from the 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
will be updated. To prevent either of these additional installations from occurring, set
this field to no. The default is yes.
- IMPORT_USER_VGS specifies whether you want any user volume groups to be
automatically imported after the system has been installed.
- ENABLE_64BIT_KERNEL specifies whether you want to enable the 64-bit kernel.
- CREATE_JFS2_FS specifies whether you want to create enhanced journaled file
systems.
- ALL_DEVICES_KERNELS specifies whether to install all device and kernel filesets.

target_disk_data stanza
The target_disk_data stanza contains variables for disks in the machine where the
program will install BOS. The default bosinst.data file has one target_disk_data stanza,
but you can add new stanzas to install BOS on multiple disks, one stanza for each disk.
Multiple target_disk_data stanzas can exist. They define the disks that are to contain
the root volume group. Only one field (PVID, PHYSICAL_LOCATION, SAN_DISKID,
CONNECTION, LOCATION, SIZE_MB, HDISKNAME) must be non-null for BOS installation to
choose a disk. The order of precedence is PVID, followed by PHYSICAL_LOCATION,
SAN_DISKID, CONNECTION, LOCATION, SIZE_MB, and finally HDISKNAME.
The field definitions are:
- LOCATION specifies a location code for the disk where the program will install BOS.
- SIZE_MB specifies the formatted size of the disk (in megabytes) where the program
will install BOS.
- HDISKNAME specifies the path name of the target disk.
- PVID specifies the physical volume identifier for the disk.
- PHYSICAL_LOCATION provides a way to identify fibre channel disks during BOS
Install. The information in the PHYSICAL_LOCATION field supersedes the information
in the SAN_DISKID field.
- SAN_DISKID specifies the World Wide Port Name and a Logical Unit ID for fibre
channel-attached disks.

13-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - CONNECTION specifies the combination of the parent attribute and the
connwhere attribute associated with a disk.

locale stanza
- The locale stanza contains variables for the primary language the installed
machine will use
- BOSINST_LANG specifies the language the installation program uses for prompts,
menus and error messages
- CULTURAL_CONVENTION specifies the primary locale to install
- MESSAGES specifies the locale for the messages catalogs to install
- KEYBOARD specifies the keyboard map to install

Customizing the bosinst.data file


You must install the BOS before you can access and modify the default bosinst.data
file. Once you have installed BOS, retrieve and edit the file like any other ASCII file.
There are basically three different ways that you will use a customized /bosinst.data file:
- Customize the bosinst.data file, then create a backup image of the system to use in
subsequent installations from a backup tape.
- Customize a bosinst.data file for each client you want to install via the network.
- Customize the bosinst.data file, then copy the modified file to a diskette that
supplements your installation medium (either tape or CD-ROM). Note that if you use
this method, you must also have on your diskette a file called signature. The file
signature must contain the word data.

Unattended reinstallation
With both the /image.data and the /bosinst.data files created, the reinstallation of
AIX V4 and later can be made unattended.
The procedure to accomplish this is as follows:
1. Edit the bosinst.data file as follows:
a) Set CONSOLE=/dev/lft0 or CONSOLE=/dev/tty0 according to your system
b) Set PROMPT=no
c) Set EXISTING_SYSTEM_OVERWRITE=yes
d) Set RUN_STARTUP=no
2. Create the signature file:
echo "data" > signature

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

3. Create the floppy diskette with the command:


ls ./bosinst.data ./signature | backup -iqv
This assumes there is already a preformatted diskette in the drive.
4. Run the command mksysb /dev/rmt0.1
This assumes there is a tape in the first tape drive and that it is large enough to
hold all the data for the root volume group.
Having completed these steps, the diskette is usable with the backup tape.
The diskette is put in the target system's diskette drive prior to starting the installation of
the target machine. When the target machine is booted from the installation media, the
BOS installation program uses the diskette file rather than the default /bosinst.data file
shipped with the installation media.
The purpose of the signature file is to verify that this really is a bosinst.data diskette.
You can break out of an unassisted installation by typing 000, and then pressing Enter
when you see the startup symbols \ | / on the display.

13-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

rootvg - Back Up the System


# smit sysbackup

Back Up the System

Move cursor to desired item and press Enter.

Back Up This System to Tape/File


Back Up This System to CD
Create a Generic Backup CD or DVD
Back Up This System to DVD

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 13-10. rootvg - Back Up the System AW186.0

Notes:

Location of the backup


In AIX 5L, you can use smit sysbackup to preselect if you want to back up the system
(rootvg) to tape/file, CD, or DVD. On the following visuals you see:
- Back up the System to Tape/File
- Back up a Volume Group to Tape/File
- Restore the System from Tape
- Restore a Volume Group from Tape
- Back up the System to CD
- Back up the System to ISO9660 DVD
- Back up the System to UDF DVD
- Back up a Volume Group to CD
- Back up a Volume Group to ISO9660 DVD
- Back up a Volume Group to UDF DVD

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rootvg - Back Up This System to Tape/File


# smit mksysb
Back Up This System to Tape/File
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
WARNING: Execution of the mksysb command will
result in the loss of all material
previously stored on the selected
output medium. This command backs
up only rootvg volume group.
* Backup DEVICE or FILE [] +/
Create MAP files? no +
EXCLUDE files? no +
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.)
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]

Copyright IBM Corporation 2008

Figure 13-11. rootvg - Back Up This System to Tape/File AW186.0

Notes:

Introduction
The SMIT screen shown in the visual, Back Up the System, only backs up mounted
file systems in rootvg. Use one of the other backup commands to backup other volume
groups.

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 listed in the /etc/exclude.rootvg file from
the system image backup.

13-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty List files as they are backed up?


Change the default to see each file listed as it is backed up. Otherwise, you see a
percentage-completed progress message while the backup is created. This option is
supported at AIX V4.2 and later.

Verify readability if tape device?


Verifies the file header of each file on the backup tape and reports any read errors as
they occur.

Generate new /image.data file?


If you have already generated a new /image.data file and don't want a new file created,
change the default to no.

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 packed by this option. If the tape drive you are using
provides packing or compression, set this field to yes. This option is supported at AIX
V4.2 and later.

Backup extended attributes?


This is a new option in AIX 5L V5.3 By default, the mksysb, savevg, and backup utilities
will save any extended attributes. If you plan to restore to a back-level system which
does not understand the format with extended attributes, then this option allows you to
override that default behavior.

Number of BLOCKS to write in a single output


This specifies the number of 512 bytes to write in a single output operation, referred to
as the block size. If a number is not specified, the backup command uses a default
value appropriate for the physical device selected. Larger values result in larger
physical transfers to tape devices. The block size must be a multiple of the physical
block size of the device being used.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

mksysb image

Blocksize = Blocksize = Blocksize = Tape Drive


512 512 512 Blocksize

BOS Boot mkinsttape dummy rootvg


image image .toc data

Kernel ./image.data Dummy TOC Backup


Device Drivers ./bosinst.data by name
./tapeblksz

Copyright IBM Corporation 2008

Figure 13-12. mksysb image AW186.0

Notes:

Introduction
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 needed
to boot from the tape.

mkinsttape image
The mkinsttape image contains two files:
- ./image.data holds the information needed to recreate the root volume group and its
logical volumes and file systems.

13-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - ./bosinst.data contains the customizable installation procedures and dictates how
the BOS installation program will behave. This file allows for the non-interactive
installations.
- ./tapeblksz contains the block size setting of the tape drive used during the backup.

Dummy TOC
The dummy TOC used to make mksysb tapes which have the same number of files as
the BOS installation tapes.

rootvg data
The rootvg data contains all the data from the backup. This data is saved using the
backup command which is discussed shortly.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Back Up a Volume Group


# smit vgbackup

Back Up a Volume Group

Move cursor to desired item and press Enter.

Back Up a Volume Group to Tape/File


Back Up a Volume Group to CD
Back Up a Volume Group to DVD

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 13-13. Back Up a Volume Group AW186.0

Notes:

Back Up a Volume Group SMIT screen


In AIX 5L, you can use smit vgbackup to preselect if you want to back up a non-rootvg
volume group to tape/file, CD or DVD.

13-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back Up a Volume Group to Tape/File


# smit savevg
Back Up a Volume Group to Tape/File
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
WARNING: Execution of the savevg command will
result in the loss of all material
previously stored on the selected
output medium.
* Backup DEVICE or FILE [] +/
* VOLUME GROUP to back up [] +
List files as they are backed up? no +
Generate new vg.data file? yes +
Create MAP files? no +
EXCLUDE files? no +
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 +
Backup Volume Group information files only? no +
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]

Copyright IBM Corporation 2008

Figure 13-14. Back Up a Volume Group to Tape/File AW186.0

Notes:

Backing up rootvg versus a non-rootvg volume group


The Back Up a Volume Group to Tape/File SMIT screen looks very similar to the Back
Up the System SMIT screen. This is because they are both performing a volume group
backup except the Back Up the System SMIT screen is using the mksysb command to
create bootable images. The Back Up the System SMIT screen is using the savevg.
command.
Some of the differences between the Back Up the System SMIT screen and the Back
Up a Volume Group to Tape/File SMIT screen are:
- VOLUME GROUP to back up
Enter the name of the volume you want to back up.
A new vg.data file will be generated. This file is equivalent to the image.data file for
rootvg. Unless you have a customized file that you want to use, let SMIT (using
savevg) create this file for you. The file will be called

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/tmp/vgdata/vg_name/vg_name.data. This file can also be created by running the


mkvgdata vg_name command.
- EXCLUDE files?
This option allows you to exclude files (during the backup) located in mounted file
systems within the volume group. Create a file called /etc/exclude/vg_name in which
you list the files to be excluded.

13-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Restoring a mksysb (1 of 2)
Boot the system in install/maintenance mode:
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)

Maintenance
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

Choose Tape Drive


Tape Drive Path Name
>> 1 tape/scsi/4mm/2GB /dev/rmt0

Copyright IBM Corporation 2008

Figure 13-15. Restoring a mksysb (1 of 2) AW186.0

Notes:

Start a mksysb restoration


To restore a mksysb image, boot the machine just as if you were performing an
installation. Be sure your boot list contains the tape device before the hard drive (run
bootlist -om normal to display). Then, insert the mksysb tape and power the machine
on. 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.
You can also boot from an installation CD. The CD presents the same screens. Just be
sure to put the mksysb tape in the tape drive before answering the last question.
Select 3 Start Maintenance Mode for System Recovery, then 4 Install from a
System Backup and select the tape drive that contains the mksysb tape.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Restoring a mksysb (2 of 2)
Welcome to Base Operating System
Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>.
1 Start Install Now With Default Settings
>> 2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery
4 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


2 Use Maps No
3 Shrink Filesystems No
0 Install with the settings listed above

Copyright IBM Corporation 2008

Figure 13-16. Restoring a mksysb (2 of 2) AW186.0

Notes:

Changing installation settings


After selecting the tape drive (and a language, which is not shown on the visuals), you
return to the Installation and Maintenance menu. Now 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 all disks where you want to install. If your rootvg was mirrored, you need to
select both disks.
- 2 Use Maps
The Use Maps option lets you use the map file created (if you created one) during
the backup process of the mksysb tape. The default is no.

13-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - 3 Shrink Filesystems


The Shrink Filesystems option installs the file systems using the minimum required
space. The default is no. If yes, all file systems in rootvg are shrunk. So, 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 will install using the settings selected. Your mksysb
image is restored.
The system then reboots.
Note: The total restore time varies from system to system. A good rule of thumb is that it
usually takes twice the amount of time than it did to create the mksysb.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Remake/restore a non-rootvg volume group


# smit restvg
Remake a Volume Group

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
* Restore DEVICE or FILE [/dev/rmt0] +/
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)

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 2008

Figure 13-17. Remake/Restore a non-rootvg volume group AW186.0

Notes:

SHRINK the filesystems?


When restoring the volume group, like with rootvg, you have the option to shrink the file
system contained in the volume group. Always be sure to check the size of the file
systems after the restore is complete. You might need to increase them once again.

PHYSICAL VOLUME names


If the PHYSICAL VOLUME names field is left blank, the volume group goes back to the
disks it came from. If you need to change the location, this is the place to do it.

Use existing MAP files?


If map files already exist, they are used by default during recovery. If you do not want to
use them, set this selection to no.

13-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Physical partition SIZE in megabytes


The physical partition size is determined based on disk size. This characteristic makes
it easy to resize the partitions in a volume group. If you want to move the volume group
to a larger disk, the physical partition adjusts automatically during the restore.
AIX properly sizes the physical partitions for the disk it is using. If you prefer to have a
larger physical partition size than the standard, you can set it here. If, for example, you
have a 4.5 GB drive, the partition size is 8 MB. If you want it to be 16 MB, you can set it
here.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

mksysb - ISO9660 burn image

mksysb image
packages
bundle file
cust script
bosinst.data
image.data
burn image

CD or DVD

Copyright IBM Corporation 2008

Figure 13-18. mksysb - ISO9660 burn image AW186.0

Notes:

What is stored?
When creating a system backup on CD or DVD, it is actually creating a file system on
the disk. Within the file system, many things are stored.
The mksysb image file itself is stored (in backup format).
The files that would normally be placed in the second record of a mksysb tape also need
to be stored: bosinst.data and image.data.
If you want to be able to install additional software during the restore (such as device
drivers) you can place them in this file system as packages, or additionally defined as
bundles.
Finally, you may want to run a customization script after the image restore to do
additional configuration.

13-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty When burning the file system onto a CD or DVD using the ISO9660 standard, you need
to first build a burn image on the hard drive. Then, you need to actually burn it to the
disk.
When using ISO9660, you need to identify:
- Where to store the mksysb image
- Where to build the file structure
- Where to build the burn image

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

mksysb - UDF DVD


mksysb image
packages
bundle file
cust script
bosinst.data
image.data

UDF DVD
File system

Copyright IBM Corporation 2008

Figure 13-19. mksysb - UDF DVD AW186.0

Notes:

Advantages of a UDF DVD file system


The Universal Disk Format (UDF) file system on a DVD allows you to write to the DVD
as a mounted file system thus avoiding the need to first build a burn image on your hard
drive.
While you are still storing the same kind of information in a file structure, the directory
tree is built directly on the DVD.
As a result, you do not need to identify any file systems on the hard drives.
The only item that needs to be pre-built before it is written to the DVD is the mksysb
image file itself.

13-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

rootvg - Back Up This System to CD (ISO9660)


# smit mkcd
Back Up This System to CD

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
CD-R Device [] +
mkysyb creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store mksysb image [] /
File system to store CD file structure [] /
File system to store final CD images [] /
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Do you want the CD to be bootable? yes +
Remove final images after creating CD? yes +
Create the CD now? yes +
Install bundle file [] /
File with list of packages to copy to CD [] /
Location of packages to copy to CD [] +/
Customization script [] /
User supplied bosinst.data file [] /
Debug output? no +
User supplied image.data file [] /
Backup encrypted files? yes
Back up DMAPI filesystem files? Yes
[BOTTOM]

Copyright IBM Corporation 2008

Figure 13-20. rootvg - Back Up This System to CD (ISO9660) AW186.0

Notes:

Specifics for backups in ISO9660 format


Backup volume groups in ISO9660 format on CD or DVD-RAM require a significant
amount of space. When you use the smit mkcd fastpath (which uses the mkcd
command), it allows you to specify where you want to create the various structures and
images needed to:
- Create the backup image
- Create the CD file system and copy backup to it
- Create the CD image on hard disk
- Burn to media
Be sure you have sufficient space in the selected file systems to hold the pre-burn data.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

rootvg - Back Up This System to ISO9660 DVD


# smit mkdvd -> Select 1 ISO9660 (CD format)
Back Up This System to ISO9660 DVD

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
DVD-R or DVD-RAM Device [] +
mkysyb creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store mksysb image [] /
File system to store DVD file structure [] /
File system to store final DVD images [] /
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Do you want the DVD to be bootable? yes +
Remove final images after creating DVD? yes +
Create the DVD now? yes +
Install bundle file [] /
File with list of packages to copy to DVD [] /
Location of packages to copy to DVD [] +/
Customization script [] /
User supplied bosinst.data file [] /
Debug output? no +
User supplied image.data file [] /
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]

Copyright IBM Corporation 2008

Figure 13-21. rootvg - Back Up This System to ISO9660 DVD AW186.0

Notes:

Overview
The smit fastpath for the panel shown in the visual is smit mkdvd. When prompted,
choose the ISO9660 option.
The types of information to write to both media and mechanisms are about the same for
CD or DVD when using ISO9660 to first build the image and then burn it to the media.

13-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

rootvg - Back Up This System to UDF DVD


# smit mkdvd -> Select 2 UDF (Universal Disk Format)
Back Up This System to UDF DVD

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]

DVD-RAM Device [] +
mkysyb creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store mksysb image [] /
(If blank, the file system
will be created for you.)

If file system is being created:


Volume Group for created file system [rootvg] +

Advanced Customization Options:


Do you want the DVD to be bootable? yes +
Install bundle file [] /
File with list of packages to copy to DVD [] /
Location of packages to copy to DVD [] +/
Customization script [] /
User supplied bosinst.data file [] /
Debug output? no +
User supplied image.data file [] /
Backup encrypted files? Yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]

Copyright IBM Corporation 2008

Figure 13-22. rootvg - Back Up This System to UDF DVD AW186.0

Notes:
The smit fastpath for the panel shown in the visual is: smit mkdvd. When prompted,
choose the UDF option.
Backup volume groups in UDF format on DVD-RAM requires only the space for the
backup image:
1. Create the backup image
2. Burn to media
This allows modification of files such as bosinst.data, image.data, and vgname.data.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Back Up a Volume Group to CD


# smit savevgcd
Back Up a Volume Group to CD
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
CD-R Device [] +
* Volume Group to back up [] +
savevg creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store savevg image [] /
File system to store CD file structure [] /
File system to store final CD images [] /
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Remove final images after creating CD? yes +
Create the CD now? yes +
Debug output? no +
Backup Volume Group information files only? no +
Backup encrypted files? Yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]
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 2008

Figure 13-23. Back Up a Volume Group to CD AW186.0

Notes:

Overview
You do not have the multiple types of information backed up for a non-rootvg volume
group as you did for the system backups, but the mechanisms are very similar when
using ISO9660.

13-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back Up a Volume Group to ISO9660 DVD


# smit savevgdvd
Back Up a Volume Group to ISO9660 DVD
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
DVD-R or DVD-RAM Device [] +
* Volume Group to back up [] +
savevg creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store savevg image [] /
File system to store DVD file structure [] /
File system to store final DVD images [] /
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Remove final images after creating DVD? yes +
Create the DVD now? yes +
Debug output? no +
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]
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 2008

Figure 13-24. Back Up a Volume Group to ISO9660 DVD AW186.0

Notes:

Overview
Backing up a non-rootvg volume group to ISO9660 DVD is similar to backing up a
rootvg volume group.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Back Up a Volume Group to UDF DVD


# smit savevgdvd
Back Up a Volume Group to ISO9660 DVD
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
DVD-RAM Device [] +
* Volume Group to back up [] +
savevg creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store savevg image [] /
(If blank, the file system
will be created for you.)
If file systems are being created:
Volume Group for created file systems [rootvg] +
Advanced Customization Options:
Debug output? no +
Backup Volume Group information files only? no +
Backup encrypted files? yes +
Back up DMAPI filesystem files? yes +
[BOTTOM]
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 2008

Figure 13-25. Back Up a Volume Group to UDF DVD AW186.0

Notes:

Overview
Backing up a non-rootvg volume group to UDF DVD is similar to backing up a rootvg
volume group.

13-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back up by filename
backup -i [-q] [-v] [-p] [-U] [-Z][-f device]

-q Media is ready
-v Verbose - display filenames during backup
-p Pack files which are less than 2 GB
-U Specifies to backup any ACLs
-Z Backs up the Encrypted File System (EFS)

Filenames are read from standard input

Copyright IBM Corporation 2008

Figure 13-26. Back up by filename AW186.0

Notes:

The backup command


The backup command is the preferred command for making backups of AIX files and
directories. The backup command supports two different methods:
- Backup by filename
- Backup by inode (also called a file system backup)
When performing a backup by filename, the files to be backed up must be in a mounted
file system. Backups by inode back up file systems when they are unmounted.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Syntax for the backup command by filename


The visual shows the syntax for the backup command by filename.
- The -i option is used to indicate a backup by filename.
- The -q option is for quiet. It suppresses the comment, press Enter to continue,
that displays when the backup command is executed. This is helpful for automated
backups.
- The -p option compresses files during the backup process. It can only compress
files smaller than 2 GB. Also, don't use the -p option on active file systems.
Modifying a file during the compression may corrupt the file and make it unusable on
recovery.
- The -v option displays the files and pathnames to standard out as they are backed
up.

13-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back up by filename examples


Example 1: Read input from a file
# cat listfile
/home/roy/file1
/home/roy/file2
/home/roy/file3
# backup -iqvf /dev/rmt0 < listfile

Example 2: Use find to generate list


# find /home/roy | backup -iqvf /dev/rmt0
# cd /home/roy
# find . | backup -iqvf /dev/rmt0

Relative versus full filenames will impact location of files on


recovery!

Copyright IBM Corporation 2008

Figure 13-27. Back up by filename examples AW186.0

Notes:

Introduction
The list of files backup uses can be supplied by a file or by commands. The visual
provides a sample of each.

Example 1
In the first example, the file listfile contains the files you want to back up. That is fed into
the backup command by using a redirection (<).

Example 2
In the second example, there are two examples that can be used to back up the same
data using the find command to generate the file list. Both commands back up the files
stored in /home/roy. Even though both find examples save the same data, the
filenames will be stored differently.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Types of pathnames
There are two types of filenames:
- Relative
- Full (or absolute)
The difference is that a full pathname shows the location referenced from the root
directory. Basically, the name starts with a slash (/). The relative pathname shows the
location referenced by the current directory. This distinction is important when you try to
recover the data.
Full pathname backups restore to the same location in the directory structure since their
position is referenced from the root directory. But, a relative pathname file is restored
based upon the current directory when the restore command is issued. Full pathnames
provide certainty of location and relative pathnames provide flexibility.

13-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Backup a File or Directory


# smit backfile

Backup a File or Directory

Type or select values in entry fields.


Press Enter AFTER making all desired changes.
[Entry Fields]
This option will perform a backup by name.
* Backup DEVICE [/dev/fd0] +/
* FILE or DIRECTORY to backup [.]
Current working DIRECTORY [] /
Backup LOCAL files only? yes +
VERBOSE output? no +
PACK files? no +
Backup extended attributes? yes +
Back up EFS Attributes? Yes +

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 2008

Figure 13-28. Backup a File or Directory AW186.0

Notes:

FILE or DIRECTORY to backup


This is a parameter for the find command that will run behind the scenes. The dot
(.) indicates to start the find command from the current directory. This will provide a
relative pathname backup. If a full pathname was used here (like /home/roy), then
the names would be stored with full pathnames.

Current working DIRECTORY


Performs a cd to that directory before starting the backup. If you want a backup from the
current directory (.), and you want to make sure you are in the right oe, you can put the
name of the directory here.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Backup LOCAL files only?


Ignores any network file systems. The files being backed up are from the local system
only.

13-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back up a file system by inode

Syntax:
backup [-u] [-level] [-f device] filesystem

Levels provide incremental backups:


-0 Full file system back up
-1,-2, etc Backup changes since level -1
-u Updates /etc/dumpdates
( /etc/dumpdates contains a backup history)

# backup -u -1 -f /dev/rmt0 /home

Copyright IBM Corporation 2008

Figure 13-29. Back up a file system by inode AW186.0

Notes:

How to backup by inode


If you do not specify the -i option, the backup command will perform a file system
backup by inode.
To insure integrity of the backup, you must unmount the file system before backing up
by inode. If the file system is mounted, the utility will give a warning, though you can
choose to backup anyway. Unmounting the file system is strongly recommended for
user-created file systems and system file systems (other than /), otherwise errors in
mapping when restoring may occur. This is not required for / (it's difficult to unmount it in
any case!). If you do not specify a file system, the root / is backed up. The file system
parameter can specify either the physical device name or the directory on which the file
system is mounted. You must have read access to the file system device in order to
perform backups by inode.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

-u option
The -u option causes backup to update the /etc/dumpdates file to record the date and
level of the last inode backup for that file system. This file holds file system backup
information for the backup command. The information included in this file is the name of
the file system, the level number of the last backup, and the date of the incremental
backup.

-level option
The -level option allows you to perform incremental backups. The -0 level backs up
all files in the file system. The -1 level backs up all files changed since the last -0
backup, and so on. (If you do not specify a level, -9 is assumed.)

13-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Back up a file system by inode using SMIT


# smit backfilesys
Backup a Filesystem

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
This option will perform a backup by inode.
* FILESYSTEM to backup [] +/
* Backup DEVICE [/dev/fd0] +/
Backup LEVEL (0 for a full backup) [0] #
RECORD backup in /etc/dumpdates? no +
* Backup extended attributes? yes +
* Backup EFS attributes? yes +

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 2008

Figure 13-30. Back up a file system by inode using SMIT AW186.0

Notes:

Using SMIT to backup by inode


SMIT provides a front-end for file system backups as well.
Each line represents the options from the command line.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

restore command (1 of 2)

List files on media (verify the backup):


restore -T [-q] [-v] [-f device]

# restore -Tvf /dev/rmt0

Restore individual files:


restore -x [-q] [-v] [-f device] [file1 file2 ..]

# restore -xvf /dev/rmt0/home/mike/manual/chap1

Restore complete file system:


restore -r [-q] [-v] [-f device]
Restore backups in order, that is, -0 then -1 and so forth
# restore -rqvf /dev/rmt0

Copyright IBM Corporation 2008

Figure 13-31. restore command (1 of 2) AW186.0

Notes:

Listing files on the backup


The restore command is used to restore data backed up with the backup
command.The restore -T command shows the contents of the media and displays the
list of files.

Restoring individual files


Using restore -x can restore selective files from the backup. The file names and paths
on the backup are preserved on the restore. If the backup was created with relative path
names, then the files are restored relative to the current directory when the restore is
issued.The restore -x command can be used to restore selected files from a backup
by name and a file system backup.

13-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Restoring a complete file system


Using restore -r works with backups by inode. It ensures that the proper order is used
to recover incremental backups. During the restore process, a file called
restoresymtable is created in the root directory (top level directory) of the file system.
This file is checked each time restore -r is run to ensure that the recovery sequence
is correct. The recovery should progress in ascending order by level number. When you
have recovered the entire file system, remove the restoresymtable file to be ready for
future recoveries. Otherwise, the next time you need to restore a level 0, you will be told
that you are not going in the correct sequence.
Make sure the file system exists and is mounted before recovering a file system
backup. The data will be recovered into the existing directory structure using the file
names. If the file system is not mounted, the data goes into a different file system so be
careful.
Using restore -i is another option available when working with an inode backup. This
allows for an interactive restore.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

restore command (2 of 2)
Restores the file attributes without restoring the file contents:
restore -Pstring [-q] [-v] [-f device] [file1 file2 ...]

string can be:

A Restore all attributes


a Restore only the permissions of the file
o Restore only the ownership of the file
t Restore only the timestamp of the file
c Restore only the ACL attributes of the file

To restore only the permissions of the file /etc/passwd from


the archive:
# restore -Pa -vf /dev/rmt0 ./etc/passwd

To display only the permissions of the file /etc/passwd on the


archive:
# restore -Ta -vf /dev/rmt0 ./etc/passwd

Copyright IBM Corporation 2008

Figure 13-32. restore command (2 of 2) AW186.0

Notes:

Restoring file attributes


The restore -Pstring option restores only the file attributes. It does not restore the
file contents. This flag restores file attributes selectively depending on the flags
specified in the string parameter. The string parameter can be a combination of the
following characters:
A Restore all attributes
a Restore only the permissions of the files
o Restore only the ownership of the files
t Restore only the timestamp of the files
c Restore only the ACL attributes of the files
The -Pstring option can be used with both file name and file system archives.
These options are only available on AIX 5L V5.2 and later.

13-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Restore a File or Directory


# smit restfile
Restore a File or Directory
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* Restore DEVICE [/dev/fd0] +/
* Target DIRECTORY [.] /
FILE or DIRECTORY to restore []
(Leave blank to restore entire archive.)
VERBOSE output? no +
Number of BLOCKS to read in a single input [] #
operation
Restore Extended Attributes? yes +

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 2008

Figure 13-33. Restore a File or a Directory AW186.0

Notes:

Restore SMIT screens


To restore a file or directory, you can use the SMIT screen shown in the visual. The
fastpath is smit restfile.
There is another SMIT screen (fastpath smit restfilesys), which can be used to
restore an entire file system rather than a file or a directory. The screen contents are
identical to this screen (smit restfile) apart from the one option FILE or
DIRECTORY to restore, which does not appear on the restore a file system screen. All
other options are present.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint
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. On a mksysb tape, if you entered tctl rewind and then tctl -


f/dev/rmt0.1 fsf 3, which element on the tape could you look at?
__________________________________________
_____________________________________________________

3. Which command could you use to restore these files?


_____________________________________________________

4. True or False? The smit mksysb command backs up all file


systems, provided they are mounted.
_____________________________________
_____________________________________________________

Copyright IBM Corporation 2008

Figure 13-34. Checkpoint AW186.0

Notes:

13-56 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: Using backup and restore

Exercise 11

Copyright IBM Corporation 2008

Figure 13-35. Exercise: Using backup and restore . AW186.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

Copyright IBM Corp. 2000, 2008 Unit 13. Backup and restore 13-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

Backups can be initiated on a single file, a file system, or an


entire volume group, all of which are supported through
SMIT.
By modifying the bosinst.data and the image.data files, a
customized system image backup can be created.

Copyright IBM Corporation 2008

Figure 13-36. Unit summary AW186.0

Notes:

13-58 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 14.TCP/IP configuration

What this unit is about


This unit introduces basic TCP/IP configuration in the AIX
environment. It is assumed that you already have an understanding of
basic network concepts such as IP addressing and netmasks.

What you should be able to do


After completing this unit, you should be able to:
Describe the basic components of AIX networking
Describe how the network is configured during AIX startup
Locate the AIX network configuration files
Describe name resolution concepts
Describe how to configure a DNS client
Describe IP routing concepts and how to configure static routes
Use network status tools to gather information about the network
Define static and dynamic routing and determine when its
appropriate to use each of these types of routing

How you will check your progress


Accountability:
Checkpoint
Machine exercises

References
Info Center System Management Guide: Communications and
Networks
Info Center Communications Programming Concepts
Info Center AIX 5L Differences Guide Version 5.3 Edition,
Chapter 7. Networking

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Describe how the network is configured during AIX startup
Locate the AIX network configuration files
Describe name resolution concepts
Describe how to configure a DNS client
Describe IP routing concepts and how to configure static
routes
Use network status tools to gather information about the
network
Define static and dynamic routing and determine when its
appropriate to use each of these types of routing

Copyright IBM Corporation 2008

Figure 14-1. Unit objectives AW186.0

Notes:

14-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

TCP/IP pseudo device

# lsdev -Cc tcpip


inet0 Available Internet Network Extension

# lsattr -EHl inet0


attribute value description user_settable
hostname train24.beaverton.ibm.com Host Name True
gateway Gateway True
route net,,0,9.47.87.1 Route True
bootup_option no Serial Optical Network Interface True
rout6 FDDI Network Interface True
authm 65536 Authentication Methods True

Copyright IBM Corporation 2008

Figure 14-2. TCP/IP pseudo device AW186.0

Notes:

Introduction
AIX implements networking as a series of device drivers:
- inet0 device
- Network interface devices
- Network adapter devices
In the next few visuals, we will look at some of the network devices and show their
attributes. Dont worry about what all the attributes mean at this point. We will be
discussing some of these attributes later in the unit and you will get a chance to work
with them in the exercise.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Where are they?


The devices described in this section are internal to the kernel, that is, they do not
appear in the /dev directory tree. Network configuration can be modified by changing
the attributes of these devices. Application programs access network services provided
by the kernel by making the appropriate network system calls.

TCP/IP
The TCP/IP protocols are implemented in a device driver called inet0. The inet0 device
has a number of attributes associated with it, such as the hostname, bootup_option,
and static routes.

14-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Network adapters and interfaces


Description Adapter Interface
Ethernet ent en
IEEE 802.3 ent et
Token Ring tok tr
Loopback -- lo
Serial Line Internet Protocol (SLIP) tty sl
Point to Point Protocol (PPP) tty pp
Serial Optical Channel Converter ops so
Block Channel Multiplexor cat ca
Asynchronous Transfer Mode (ATM) atm at
Fiber Distributed Data Interface (FDDI) fddi fd
SP Switch css css
Integrated Services Digital Network (ISDN) diva pp
X.25 sx25a xs
Copyright IBM Corporation 2008

Figure 14-3. Network adapters and interfaces AW186.0

Notes:

Network adapters and interfaces


IBM provides network adapters to support a variety of physical networks. The visual
shows the AIX device driver prefixes for many network adapters and their associated
network interfaces.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Interface device drivers

# lsdev -Cc if
en0 Available 10-80 Standard Ethernet Network Interface
en1 Defined 10-88 Standard Ethernet Network Interface
et0 Defined 10-80 IEEE 802.3 Ethernet Network Interface
et1 Defined 10-88 IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
#
# lsattr -El en0
mtu 1500 Maximum IP Packet Size for This Device True
remmtu 576 Maximum IP Packet Size for REMOTE Networks True
netaddr 9.47.87.64 Internet Address True
state up Current Interface Status True
arp on Address Resolution Protocol (ARP) True
netmask 255.255.255.0 Subnet Mask True
. . .

Copyright IBM Corporation 2008

Figure 14-4. Interface device drivers AW186.0

Notes:

Network interface devices


The network interface devices implement the data link layer. Attributes define the IP
address, netmask, and so forth for each specific interface.

14-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Adapter device drivers

# lsdev -Cc adapter


. . .
ent0 Available 10-80 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)
ent1 Available 10-88 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)
. . .
#
# lsattr -El ent0
busio 0xfff000 Bus I/O address False
busintr 2 Bus interrupt level False
intr_priority 3 Interrupt priority False
tx_que_size 8192 TRANSMIT queue size True
rx_que_size 256 RECEIVE queue size True
rxbuf_pool_size 384 RECEIVE buffer pool size True
media_speed 100_Half_Duplex Media Speed True
. . .

Copyright IBM Corporation 2008

Figure 14-5. Adapter device drivers AW186.0

Notes:

Adapter devices
Adapter devices allow us to configure the network adapter, which is part of the physical
layer. Attributes for network adapters define the media speed, queue sizes, and so
forth.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

TCP/IP startup
AIX Initialization Network devices are configured by cfgmgr
rc.boot phase 1 cfgmgr runs configuration methods from Config_Rules
/usr/lib/methods/cfgrcnet configures inet0 and
the network interfaces
rc.boot phase 2
cfgrcnet checks the bootup_option attribute of inet0
bootup_option=no (default)
kernel restarts init cfgrcnet runs /etc/rc.net
(network configuration read from ODM)
init runs bootup_option=yes
rc.boot phase 3
cfgrcnet runs /etc/rc.bsdnet
From /etc/inittab
(network configuration in rc.bsdnet)

rc.tcpip starts selected network daemons:


init runs dhcp
/etc/rc.tcpip
syslogd
from /etc/inittab
lpd
sendmail
init continues portmap
processing inetd
/etc/inittab ...
Copyright IBM Corporation 2008

Figure 14-6. TCP/IP startup AW186.0

Notes:

Introduction
Now that weve looked at the basic components, lets take a look at how the network is
configured at boot time. When the system boots, the network is configured and started
in two steps:
- cfgmgr configures the devices
- /etc/rc.tcpip starts the network daemons

cfgmgr
During rc.boot phase 3, cfgmgr is run to configure the devices which were not
configured during phase 1.
The network adapters are detectable by cfgmgr and are configured using the
configuration methods in PdDv.

14-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The inet0 device and the network interfaces are not detectable. Reading from the
Config_Rules ODM database, cfgmgr runs
/usr/lib/methods/cfgrcnet to configure inet0 and the network interfaces.

bootup_option
The value of bootup_option controls how the network devices will be configured.
Administrators who are used to using BSD-style configuration commands may be more
comfortable setting bootup_option to yes.
The cfgrcnet command runs either /etc/rc.net or /etc/rc.bsdnet based on the
value of the bootup_option attribute of the inet0 device (read from CuAt).

rc.net
If bootup_option = no, rc.net is run. This is the default.The rc.net command runs
configuration methods that use values in the ODM database to configure inet0 and the
network interfaces. This would include IP addresses, static routes, netmasks, and so
forth.

rc.bsdnet
If bootup_option = yes, rc.bsdnet is run. In this case, inet0 and the network
interfaces are configured using BSD-style commands in the rc.bsdnet script itself.

rc.tcpip
After the network devices have been configured, rc.tcpip is run to start the various
networking daemons.

DHCP
Dynamic Host Control Protocol (DHCP) is an application-layer protocol that allows a
client machine on the network to get an IP address and other configuration parameters
from a server. It gets information by exchanging packets between a daemon on the
client and another on the server.
By default, AIX rc.tcpip does not run DHCP. If a machine has been configured to use
DHCP, rc.tcpip will run the DHCP client daemon (/usr/sbin/dhcpcd). The dhcpcd
command will reconfigure the network devices, overriding any configuration that may
have been performed by rc.net or rc.bsdnet.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

# smit tcpip
TCP/IP

Move cursor to desired item and press Enter.

Minimum Configuration & Startup


Further Configuration
Use DHCP for TCPIP Configuration & Startup
IPV6 Configuration
Quality of Service Configuration & Startup

Esc+1=Help Esc+2=Refresh Esc+3=Cancel Esc+8=Image


Esc+9=Shell Esc+0=Exit Enter=Do

Copyright IBM Corporation 2008

Figure 14-7. # smit tcpip . AW186.0

Notes:

Introduction
SMIT is the easiest method of configuring the network. You can also configure the
network using the ifconfig and chdev commands. This visual shows the base SMIT
network menu.
Use the Minimum Configuration & Startup menu to quickly set the basic network
parameters and start the network. This menu uses the default (rc.net/ODM) method
of network configuration.
Note: It is recommended that you only use this menu once.
Use Further Configuration to perform more extensive network configuration,
including selecting BSD-style configuration.
Use DHCP for TCPIP Configuration & Startup menu option to configure your
machine to use DHCP.

14-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Using DHCP


If you select DHCP, smit will uncomment the /usr/sbin/dhcpcd line in /etc/rc.tcpip.
(smit also creates some configuration files in /etc.)
If you decide you do not wish to use DHCP any more, you must manually comment out
this line in /etc/rc.tcpip. (There is no command or SMIT menu to turn off DHCP.)

Using BSD-style configuration


If you select BSD-style configuration (bootup_option=yes), you must manually edit
/etc/rc.bsdnet to configure the hostname, IP addresses, netmask, and so forth.
To select BSD-style configuration, you can use one of the following methods:
- SMIT
(smit tcpip, then select
Further Configuration, then select
Select BSD style rc Configuration)
-chdev -l inet0 -a bootup_option=yes

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/etc/rc.tcpip
Daemon Description
dhcpcd DHCP client daemon.
dhcpsd, dhcprd DHCP server, DHCP Relay Agent daemons.
autoconf6, ndpd-host, IP version 6 (IPv6) daemons.
ndpd-router
syslogd System logging daemon.
lpd Print server daemon.
routed, gated Dynamic routing daemons. Used only if you are using dynamic routing. Either
routed or gated (not both) should be run.
sendmail Routes mail for local or network delivery.
portmap Converts RPC program numbers into internet port numbers.
inetd Network super daemon.
named Provides the server function for the Domain Name System protocol (DNS).
timed, xntpd Time daemons,
rwhod Provides the server function for the rwho and ruptime commands.
snmpd, dpid2, aixmibd Simple Network Management Protocol (SNMP) daemons.
hostmibd
mrouted Multicast routing daemon.
pxed, binld Preboot Execution Environment daemon. PXE is an extension to bootp and
DHCP.
Copyright IBM Corporation 2008

Figure 14-8. /etc/rc.tcpip AW186.0

Notes:

Introduction
The /etc/rc.tcpip script is run by init to start various network daemons. The
network daemons provide various network services. For example, the xntpd daemon
communicates with xntpd daemons running on other systems to synchronize
time-of-day clocks.
The table shows a summary of the daemons which can be started from this script.
Typically, only a subset of these daemons are started. You can comment or uncomment
lines in this file to control which daemons will be started.

Network super daemon (inetd)


Probably the most important single networking daemon is inetd. Called the network
super daemon, this daemon starts many other daemons. The inetd daemon will be
discussed in the next section.

14-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty SRC
The /etc/rc.tcpip script uses the System Resource Controller (SRC) to control the
network daemons.
SRC provides a set of commands and subroutines to make it easier to create and
control subsystems. A subsystem is a program or set of related programs designed as a
unit to perform related functions. The SRC is useful if you want a common way to start,
stop, and collect status information on sets of processes.

Manual control of network daemons


You can manually start, stop, refresh, and list the status of network daemons using
these SRC commands:
-startsrc
-stopsrc
-refresh
-lssrc

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Network super daemon (inetd)


Starts other daemons as needed
Reduces system load
SRC
inetd is an SRC subsystem
Daemons started by inetd are SRC subservers

Configuration files
/etc/inetd.conf
/etc/services

Copyright IBM Corporation 2008

Figure 14-9. Network super daemon (inetd) AW186.0

Notes:

Introduction
Sometimes called the network super daemon, inetd is one of the daemons started by
/etc/rc.tcpip. The inetd daemon reduces system load by invoking other daemons
only when they are needed and by providing several simple Internet services internally
without invoking other daemons.

Why is inetd needed?


Consider a system which normally services three or four simultaneous telnet sessions.
However, during peak usage periods, there might be as many as 30 or 40 simultaneous
sessions. If daemons had to be invoked statically, running many telnetd daemons
continually would waste significant resources during off-peak times. Also, it would be
hard to predict how many daemons to start. The inetd daemon solves this problem by
dynamically starting network daemons only when needed.

14-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty SRC
The inetd daemon is started as an SRC subsystem. Daemons started by inetd are
SRC subservers.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/etc/inetd.conf
## Internet server configuration database
...
## name type NATO program arguments
##
ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd
telnet stream tcp6 nowait root /usr/sbin/telnetd telnetd -a
shell stream tcp6 nowait root /usr/sbin/rshd rshd
kshell stream tcp nowait root /usr/sbin/krshd krshd
login stream tcp6 nowait root /usr/sbin/rlogind rlogind
klogin stream tcp nowait root /usr/sbin/krlogind krlogind
exec stream tcp6 nowait root /usr/sbin/rexecd rexecd
#comsat dgram udp wait root /usr/sbin/comsat comsat
#uucp stream tcp nowait root /usr/sbin/uucpd uucpd
#bootps dgram udp wait root /usr/sbin/bootpd bootpd /etc/bootptab
##
## Finger, systat and netstat give out user information which may be
## valuable to potential "system crackers." Many sites choose to disable
## some or all of these services to improve security.
##
#finger stream tcp nowait nobody /usr/sbin/fingerd fingerd
#systat stream tcp nowait nobody /usr/bin/ps ps -ef
#netstat stream tcp nowait nobody /usr/bin/netstat netstat -f
inet
. . .

Copyright IBM Corporation 2008

Figure 14-10. /etc/inetd.conf AW186.0

Notes:

Configuration files
The inetd daemon reads /etc/inetd.conf and /etc/services when it starts.

/etc/inetd.conf
The /etc/inetd.conf file is a list of network services which inetd will provide. These are
the daemons that inetd will start, if they are needed.
The visual shows a portion of the inetd.conf file.

Syntax
Each line in the file has the following fields:
-ServiceName
-SocketType

14-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty -ProtocolName
-Wait/NoWait
-UserName
-ServerPath
-ServerArgs
The ServiceName field contains the name of a network service defined in the
/etc/services file.
The ServerPath field identifies the file name for the daemon to be started.
The remaining fields provide information on how to start and manage the service.

Modifying inetd.conf
You can control which services inetd will manage by commenting or uncommenting
lines in the /etc/inetd.conf file.
The /etc/inetd.conf file can be updated by using SMIT or by directly commenting or
uncommenting lines in the file.
If you change /etc/inetd.conf using SMIT, then the inetd daemon will be refreshed
automatically and will read the new /etc/inetd.conf file.
If you change the file manually, you need to inform the inetd daemon of the changes to
its configuration file. To do this run either:
- refresh -s inetd
- kill -1 InetdPID

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/etc/services
. . .
# Network services, Internet style
#
tcpmux 1/tcp # TCP Port Service Multiplexer
tcpmux 1/udp # TCP Port Service Multiplexer
. . .
echo 7/tcp
echo 7/udp
. . .
netstat 15/tcp
qotd 17/tcp quote
msp 18/tcp # Message Send Protocol
msp 18/udp # Message Send Protocol
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp 21/tcp
telnet 23/tcp
. . .

Copyright IBM Corporation 2008

Figure 14-11. /etc/services AW186.0

Notes:

/etc/services
The /etc/services file contains a list of all network services and their port numbers. This
is the list of well known port numbers mentioned in the previous section.
The visual shows a portion of this file.

14-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Name resolution
Local
/etc/hosts
NIS/NIS+ (Network Information System)
/etc/rc.nfs
domainname
ypbind
DNS (Domain Name System)
/etc/resolv.conf
nameserver
domain
Lookup order
NSORDER
/etc/netsvc.conf
/etc/irs.conf
Default: DNS, NIS, local

Copyright IBM Corporation 2008

Figure 14-12. Name resolution AW186.0

Notes:

Introduction
Problems with name resolution are a fairly common type of network problem. This
section introduces you to some of the client-side name resolution configuration files and
identifies a few common problems to look for. Configuring and troubleshooting name
resolution servers is outside the scope of this unit.
The visual shows the three most common methods for name resolution and some of the
configuration files.

Local name resolution


Local name resolution is very simple. Each machine on the network has a file
(/etc/hosts) containing the name-to-Internet-address mapping information for every host
on the network. The administrative burden of keeping each machines naming file
current grows as the TCP/IP network grows.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

/etc/hosts
Although /etc/hosts can be used alone in small stable networks, most commonly it is
used together with DNS or NIS. In this case, /etc/hosts will only be used if the system is
unable to locate a name using the other services. The file should always contain at least
two entries: an entry for the system itself and an entry for the localhost (the software
loopback address). For example, the system freddy should have the following entries:
127.0.0.1 loopback localhost
9.47.25.237 freddy freddy.beaverton.ibm.com
If only local name resolution is being used, then there must be an entry in
/etc/hosts for every host you wish to communicate with.

DNS
When TCP/IP networks become large, as on the Internet, managing all the hostnames
and addresses using flat text files presents a huge administrative burden. DNS was
created to address these problems.
Instead of each machine on the network keeping a file containing the name-to-address
mapping for all other hosts on the network, one or more hosts are selected to function
as name servers. Name servers resolve symbolic names assigned to networks and
hosts into IP addresses.
To simplify administration, the DNS name space is hierarchically divided into domains
(or zones). Hostnames need only be unique within a domain. A name server has
complete information about all the systems which belong to a particular domain.

DNS client (/etc/resolv.conf)


To configure a system as a DNS client (that is, to use a DNS name server to resolve
hostnames), create or edit /etc/resolv.conf. At a minimum, two pieces of information are
needed:
- The DNS domain that the system belongs to
- The IP address of at least one DNS server
A maximum of three DNS servers may be specified.
For example:
# cat /etc/resolv.conf
domain beaverton.ibm.com
nameserver 138.95.19.18
nameserver 138.95.24.1

14-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty DNS references


Configuring a system as a DNS server is outside the scope of this lesson. For more
information about configuring and troubleshooting DNS servers, see:
System Management Guide: Communications and Networks, Chapter 3

NIS/NIS+
NIS is another method of resolving names which also uses one or more systems as
servers.
In addition to the hosts database, the NIS and NIS+ protocols are used to provide other
information. For example, NIS is commonly used to provide a centralized source of user
administration information (/etc/passwd, /etc/group, etc.) in networks that share files
using the Network File System (NFS) protocol.

/etc/rc.nfs
In AIX, NIS is configured and started by the /etc/rc.nfs script, which is run by init.
NIS servers run the ypserv daemon; clients run ypbind.
At a minimum, to configure a system as an NIS client, you would need to edit this file to
set the NIS domain name and start the ypbind daemon.

NIS domain versus DNS domain


NIS and DNS both use the concept of domains, however they represent two different
naming spaces.
The NIS domain is set using the domainname command. NIS domains are generally
organized by network topology and the systems in a domain are usually in the same
subnet. Also, NIS domains are not hierarchical.
The DNS domain is specified in /etc/resolv.conf. DNS domains are usually logically
organized. The systems within a DNS domain may not be in the same subnet, or even
geographically close to each other.

NIS references
Configuring an NIS server is outside the scope of this lesson. For more information
about configuring and troubleshooting NIS servers - or using NIS, see:
Network Information Services (NIS and NIS+) Guide

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Lookup order
It is quite common for more than one method of name resolution to be used. If a match
is found in the first source, that address is used. If the resolver routine is unable to find
a hostname in the first source, it tries the next, and so forth.
By default, the system will search in the following order:
- DNS
- NIS (if active)
- Local /etc/hosts
Settings in the /etc/irs.conf file override the defaults.
The /etc/netsvc.conf file overrides irs.conf and the environment variable, NSORDER
overrides all other settings.

Name resolution problems


Here are some questions to ask when you begin working on a name resolution problem:
- Do you have a name resolution problem?
If you cannot ping a host by hostname, but can contact it using the IP address, you
have a name resolution problem.
- Ask the administrator what type of name resolution the system should be using.
- Do /etc/netsvc.conf or /etc/irs.conf exist, or is NSORDER being set? If so, is the lookup
order being set correctly?

DNS client problems


If system was intended to use DNS:
- Does /etc/resolv.conf exist and have entries for domain and nameserver?
- Can you ping the name server?
If you can ping the name server system: Is DNS working on the name server?
(Check with the name server administrator.)
If you cannot ping the name server: Is the name server running and connected?
If so, you may have a routing or network interface problem.

14-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty NIS client problems


If the system was intended to use NIS:
- Is ypbind running?
- Is the domain name set?
(Execute domainname with no arguments.)
- Has ypbind connected to the server?
(Run ypwhich, which should return the server name.)
If the client is not bound to a server:
Which system is the server?
Is the server up, connected, and running ypserv?
If the client is bound to a server:
Is the server correctly configured?

Local name resolution problems


If you are using /etc/hosts:
- Does the file exist?
- Does it have the correct entries?
- Are file permissions correct (664)?

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Address resolution protocol


Translates IP addresses to hardware addresses
ARP is part of inet0
ARP table kept in kernel memory
ARP adds entries to the table by broadcasting ARP packets
Unused ARP table entries are removed after a period of
time
Viewing the ARP table:
# arp -an | pg
? (9.47.10.98) at 0:0:86:7:41:46 [ethernet]

? (9.47.10.1) at 0:0:c:7:ac:0 [ethernet]

? (9.47.10.253) at (incomplete)
. . .

Copyright IBM Corporation 2008

Figure 14-13. Address resolution protocol AW186.0

Notes:

Introduction
Typically IP uses the Address Resolution Protocol (ARP) to resolve physical addresses.

How it works
The ARP table is held in kernel memory and maps IP addresses to physical addresses.
When the IP layer needs to send a packet, it consults the table to get the hardware
address to pass to the data link layer. If there is no entry, an ARP packet is broadcast to
all the systems on the local subnet. If the target system is connected and running, the
ARP protocol responds with a packet that includes its IP address. The ARP table gets
updated on the original host and the original packet gets sent to the data link layer for
transmission.

14-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty ARP is only used for the target if it is on the local subnet. If the target is not on the local
subnet, the packet is sent to the router using the ARP entry for the router, not the target.
When it finally gets to a system which is on the same subnet as the target, it then uses
ARP to get the hardware address of the target.
The ARP table is dynamic. If an ARP entry is unused for a period of time (default 20
minutes), it will be removed from the table.

ARP configuration
ARP does not typically need to be configured. In AIX, ARP functionality is provided as
part of the inet0 device driver. There is no daemon to start. There are several kernel
parameters which can be adjusted to change ARPs behavior.
Use the no command to view the ARP parameters. See the no man page for details
about the purpose of each parameter.
# no -a | grep arp
arpqsize = 12
arpt_killc = 20
arptab_bsiz = 7
arptab_nb = 25
Note: The no command sets or displays current or next boot values for network tuning
parameters. If setting a parameter, the value may not take effect until the adapter has
been disabled and re-enabled, or the system is rebooted. One example is the
inet_stack_size parameter that specifies the size of inet interrupt stack table in
kilobytes. If this parameter is changed, you must reboot the system.

Viewing the ARP table


While problems with ARP are unusual, viewing the ARP table can sometimes be useful
in isolating problems.
Use the arp command to view the ARP table.
In the example in the visual, there are three entries in the table.

Incomplete ARP entries


The third entry in the example is incomplete (no address). This means that ARP did not
receive a reply. The target host may not be up or connected to the network; or it may be
that the system is connected and able to receive packets, but is unable to send packets.
Incomplete entries are removed after three minutes.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Routing

hostA 128.95 hostW


9.47.10.237 network 128.95.0.22
hostB hostX hostE
hostM
9.47.10.14 128.95.0.5 128.87.0.14
9.47.10.1
hostC hostMr hostY hostF
9.47.10.80 128.95.0.1 128.95.0.10 128.87.0.15
hostD hostZ hostG
9.47.10.24 128.95.0.2 128.87.0.110
9.47.10 hostZr
Network 128.87.0.1
(netmask = 128.87
255.255.255.0) network

hostA can only connect with hostE if hostM and hostZ


have been configured as gateways.
Copyright IBM Corporation 2008

Figure 14-14. Routing AW186.0

Notes:

Introduction
Routing is the process of forwarding packets from one IP network to another.

Why is routing needed?


IP was designed to support a group of networks that are connected. Systems on
different networks can only communicate if there is a gateway to forward the packets.
Gateways are systems which connect to more than one network and have been
configured to forward packets.

Gateways
Gateways are a type of router. Routers connect two or more networks and forward
packets between the networks. Some routers, for example, route at the network
interface level or at the physical level.

14-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Gateways, however, route at the network level (IP) and can:
- Receive IP packets from other gateways or hosts for delivery to hosts on the local
network
- Route IP packets from one network to another
For example, a gateway connecting two networks has two network interfaces. The
gateway receives packets through one network interface and sends them out through
the other network interface.
While a general purpose AIX system can be used as a gateway, gateways are often
small dedicated systems which do nothing else.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Static routing
Useful for small, stable networks
No daemons are involved
Adding routes
Implicit or direct
Explicit or static
smit mkroute
route command
Dynamic
ICMP redirect messages
Configuring a system as a router
Add to /etc/rc.net file:
no -o ipforwarding=1
Possible problems

Copyright IBM Corporation 2008

Figure 14-15. Static routing AW186.0

Notes:

Introduction
Static routing (where routes are maintained manually) is practical for small, stable
network environments. For larger networks, or for networks which change frequently,
static routing is impractical.

Adding routes
In a static routing environment, routes are added in three ways:
- Implicit routes
- Explicit routes
- Dynamic routes

14-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Implicit or direct routes


An implicit route is added automatically when you configure a network interface. An
implicit route defines the route for hosts directly connected to a local network. In the
example, an implicit route has been created on hostA for network 9.47.10:
Destination Gateway Flags Refs Use If PMTU Exp
9.47.10/24 9.47.10.237 U 5 4784 en0 - -
This indicates that any traffic for hosts in the 9.47.10 network should be sent to
9.47.10.237 (in other words they should be sent directly to interface en0, they do not
need to be sent to a gateway).

Explicit or static routes


Explicit or static routes are administered manually. Static routes can be added (or
deleted) using SMIT or the route command.
If you use SMIT to add a route, the route is added to the kernels route table and it is
added to ODM so the route will be recreated after a system boot.
If you use the route command, you must manually add a route attribute to inet0 if you
want the route to be permanent.
Use lsattr to view routes in ODM:
# lsattr -EHl inet0 -a route
attribute value description user_settable
route net,,0,9.47.10.1 Route True

Permanent static routes using BSD


If your system is using BSD-style configuration (bootup_option=yes), permanent
routes are set using the route command in the /etc/rc.bsdnet file.

Permanent static routes using DHCP


If your system is using DHCP, network configuration (including routes) will be set by the
DHCP client daemon (dhcpcd). Generally, the client daemon requests this information
from a DHCP server. However, it is also possible to specify some parts of the network
configuration (including static routes) locally. Configuration information for the client
daemon is stored in the /etc/dhcpc.ini and /etc/dhcpc.opt files.
Use smit usedhcp to configure a system as a DHCP client.
To determine if a host is using DHCP, use ps to see if dhcpcd is running. You can also
check in /etc/rc.tcpip to see if dhcpcd is uncommented.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Dynamic routes
Even in a static routing environment, some routes are created dynamically. If configured
for it, a gateway will send an ICMP redirect message if it notices that there is a more
direct route to a destination. Upon receiving an ICMP redirect message, IP on the
sending host can create a new route or modify an existing one.
The D flag in the route table indicates a dynamic route which was created by an ICMP
redirect message. The M flag indicates a route which was modified by an ICMP redirect.

Return routes
In order for two systems on separate networks to communicate, both systems must
have appropriate routes set up. Make sure that the system you are trying to
communicate with has a return route to your machine.
For example, if hostA cannot ping hostW and the route table appears OK on hostA,
the problem may be on hostW. If hostW does not have a route back to hostA, the ping
message will get to hostW, but hostW will be unable to send a reply. Check the route
table on both machines:
- host A:
Destination Gateway
default 9.47.10.1 (Default route)
OR
128.95/16 9.47.10.1 (Network route)

- hostW:
Destination Gateway
default 128.95.10.1 (Default route)
OR
9.47.10/24 128.95.10.1 (Network route)

14-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Dynamic routing
Routing daemons
routed or gated, not both
Started by /etc/rc.tcpip
Protocols
routed
Provides gateway routing functions for the RIP protocol.
gated
Provides gateway routing functions for the RIP, RIPng, EGP, BGP, BGP4+,
HELLO, IS-IS, ICMP, ICMPv6, and SNMP protocols.
Mixed environments
Configuration files
routed: /etc/gateways
gated: /etc/gated.conf
Active vs. passive mode

Copyright IBM Corporation 2008

Figure 14-16. Dynamic routing AW186.0

Notes:

Introduction
With dynamic routing, routing daemons continuously exchange information with routing
daemons running on other systems, and continuously update the routing table.
Dynamic routing removes the administrative burden of having to manually update the
routing tables on many machines.

Routing daemons
AIX provides two daemons for use in TCP/IP dynamic routing, routed and gated.
Either one or the other of these daemons can be run on a system (started by
/etc/rc.tcpip), not both. If both are running, you may get unpredictable results.

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Protocols
The routed daemon only supports Routing Information Protocol (RIP).
The gated daemon supports many different routing protocols as shown in the visual.
In order for dynamic routing to work, all the routers must be running the same protocol -
or must have static routes set up.

Mixed static and dynamic environments


Static and dynamic routing may be used together. For example:
- Hosts which are not configured as gateways may be set up using static routing,
while the gateways are using dynamic routing.
- When you are communicating with systems that are not under your control (for
example, systems in another company), you may find that the gateways you need
are not running the same protocol, or are using static routing. In this case, you may
need to set up one or more static routes on your gateways.
If you need to configure static routes on a gateway that is using dynamic routing, you
should add the static routes to the route daemons configuration file. In this way the
route daemon will advertise the routes to other gateways.

Configuration files
The default configuration file for the gated daemon is the /etc/gated.conf file. This file
defines which protocols gated will use and the static routes (if any). In addition, many
aspects of gateds behavior can be configured in this file.
You can specify static routes for routed in the /etc/gateways file.

Passive and active modes


Routing daemons can operate in two modes, passive or active.
- Active mode:
Routing daemons both broadcast routing information periodically about their local
network to gateways and hosts, and receive routing information from other
gateways.
- Passive mode:
Routing daemons receive routing information from other gateways, but do not
broadcast their own routing information.
If you use dynamic routing on a host which is not a gateway, the route daemon should
be run in passive mode.

14-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Checkpoint
1. Match the terms to the correct description:
Term Description
A. resolv.conf ___ Defines the route for hosts directly connected to a local
network. Added automatically when you configure a
network interface.
B. netsvc.conf ___ A path segment from one host to a gateway.
C. gateway ___ One of two files that can modify the name resolution
lookup order.
D. route ___ Static routes are defined in this file if bootup_option=yes.
E. default route ___ System which forwards packets from one IP network to
another.
F. implicit route ___ File used to configure a DNS client.
G. rc.bsdnet ___ Defines a gateway to be used when there is no specific
host or network route.

2. If a system is using dynamic routing, either the __________________ or


__________________ daemon will be started by __________________.
3. In order to configure a system as a gateway, you must enable
__________________ in the ________________________ file.
4. Use the __________________ command to view the route table.
Copyright IBM Corporation 2008

Figure 14-17. Checkpoint AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Exercise: TCP/IP configuration

Exercise 12

Copyright IBM Corporation 2008

Figure 14-18. Exercise: TCP/IP configuration AW186.0

Notes:

14-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

Having completed this unit, you should be able to:


Configure TCP/IP on an AIX system
Manipulate the AIX network configuration
Define static and dynamic routing and determine when its
appropriate to use each of these types of routing

Copyright IBM Corporation 2008

Figure 14-19. Unit summary AW186.0

Notes:

Routing references
Routing, especially dynamic routing, can be quite complex. In this unit we learned some
basic routing concepts (which may be useful when troubleshooting), but this is only an
introduction. For more information about administering routing, see:
- System Management Guide: Communications and Networks, Chapter 3
- netstat, routed, and gated man pages.
- IBM ITES class:
AU07G/Q1307 AIX 5L Configuring TCP/IP

Copyright IBM Corp. 2000, 2008 Unit 14. TCP/IP configuration 14-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

14-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Unit 15.Error log and syslogd

What this unit is about


This unit provides an overview of the error logging facility available in
AIX and shows how to work with the syslogd daemon.

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 different error notification methods
Log system messages using the syslogd daemon

How you will check your progress


Accountability:
Lab exercise
Checkpoint questions

References
Info Center General Programming Concepts: Writing and
Debugging Programs (Chapter 4. Error-Logging
Overview)
Online AIX Version 6.1 Commands reference
Online General Programming Concepts: Writing and
Debugging Programs (Chapter 4. Error-Logging
Overview)
Note: References listed as Online above are available at the
following address:
http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Analyze error log entries
Identify and maintain the error logging components
Describe different error notification methods
Log system messages using the syslogd daemon

Copyright IBM Corporation 2008

Figure 15-1. Unit objectives AW186.0

Notes:

15-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 15.1.Working with the error log

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Error logging components


console errnotify diagnostics SMIT

error errpt formatted


notification output

CuDv, CuAt
error
CuVPD
daemon
errlog
error record /var/adm/ras/errlog
template
/var/adm/ras/errtmplt
/usr/lib/errdemon
errclear

errstop errlogger
application
errlog()
User
/dev/error Kernel
errsave()
(timestamp)
kernel module Copyright IBM Corporation 2008

Figure 15-2. Error logging components AW186.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 timestamp 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
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 additional
data from other parts of the system.

15-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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) 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 will be listed as part of the error log.

Error log hardening


Under very rare circumstances, such as powering off the system at the same time that
the errdemon is writing into the error log, the error log may become corrupted. In AIX 5L
V5.3, there are minor modifications 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.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Generating an error report using SMIT


# smit errpt
Generate an Error Report
...
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) [] +X
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 2008

Figure 15-3. Generating an Error Report using SMIT AW186.0

Notes:

Overview
The SMIT fastpath smit errpt takes you to the screen used to generate an error
report. Any user can use this screen. As shown on the visual, the screen includes a
number of fields that can be used for report specifications. Some of these fields are
described in more detail below.

CONCURRENT error reporting?


Yes means you want errors displayed or printed as the errors are entered into the error
log (a sort of tail -f ).

15-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 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 created with
errlogger). You can specify more than one error class.

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 used for an error ID.

Error IDs
An error ID is a 32-bit hexadecimal code used to identify a particular failure.

Resource CLASSES
Means device class for hardware errors (for example, disk).

Resource TYPES
Indicates device type for hardware (for example, 355 MB).

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Resource NAMES
Provides common device name (for example hdisk0).

STARTING and ENDING time interval


The format mmddhhmmyy can be used to select only errors from the log that are time
stamped between the two values.

Show only Duplicated Errors


Yes will report only those errors that are exact duplicates of previous errors generated
during the specified interval of time. 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 will report only the number of duplicate errors and timestamps 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-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

The errpt command

Summary report:
# errpt

Intermediate report:
# errpt -A

Detailed report:
# errpt -a

Summary report of all hardware errors:


# errpt -d H

Detailed report of all software errors:


# errpt -a -d S

Concurrent error logging ("Real-time" error logging):


# errpt -c > /dev/console

Copyright IBM Corporation 2008

Figure 15-4. The errpt command AW186.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 only displays 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.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

The -d option
The -d option (flag) can be used to limit the report to a particular class of errors. Two
examples illustrating the 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 used


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 execute:
errpt -c
In the example on the visual, we direct the output to the system console.

The -D flag
Duplicate errors can be consolidated using:
errpt -D
When used with the -a option, errpt -D reports only the number of duplicate errors
and the timestamp for the first and last occurrence of the identical error.

Additional information
The errpt command has many options. Refer to your AIX 5L Version 5.3 Commands
Reference (or the man page for errpt) for a complete description.

15-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

A summary report (errpt)


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

Figure 15-5. A summary report (errpt) AW186.0

Notes:

Content of summary report


The errpt command creates by default a summary report which 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. 2000, 2008 Unit 15. Error log and syslogd 15-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

A detailed error report (errpt -a)


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 2008

Figure 15-6. A detailed error report (errpt -a) AW186.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 displayed is obtained from the ODM (CuDv,
CuAt, CuVPD) and is very useful because it clearly shows 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 could tell you which sector on the disk is failing. This
information can be used by IBM support to analyze the problem.

15-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Interpreting error classes and types


The values shown for error class and error type provide information that is useful in
understanding a particular problem:
1. 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.
2. The combination of an error class value of H and an error type value of PEND
indicates that a piece of hardware may become unavailable soon due to the
numerous errors detected by the system.
3. 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.
4. 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.
5. An error class value of O indicates that an informational message has been logged.
6. An error class value of U indicates that an error class could not be determined.

Link between error log and diagnostics


In AIX 5L V5.1 and later, there is a link between the error log and diagnostics. Error
reports include the diagnostic analysis for errors that have been analyzed. Diagnostics,
and the diagnostic tool diag, will be covered in a later unit.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Types of disk errors


Error
Error Label Recommendations
Type
DISK_ERR1 P Failure of physical volume media
Action: Replace device as soon as possible
DISK_ERR2, P Device does not respond
DISK_ERR3 Action: Check power supply
DISK_ERR4 T Error 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,
terminator
Error Types: P = Permanent
T = Temporary
Copyright IBM Corporation 2008

Figure 15-7. Types of disk errors AW186.0

Notes:

Common disk errors


The following list explains the most common disk errors you should know about:
1. 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 have learned earlier in this course.
2. DISK_ERR2 and DISK_ERR3 error entries are mostly caused by a loss of electrical
power.
3. 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.

15-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 4. Sometimes SCSI errors are logged, mostly with the LABEL SCSI_ERR10. They
indicate that the SCSI controller is not able to communicate with an attached device.
In this case, check the cable (and the cable length), the SCSI addresses, and the
terminator.

DISK_ERR5 errors
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 which can detect and produce more information about
the problem.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LVM error log entries


Class
Error Label and Recommendations
Type
LVM_BBEPOOL, S,P No more bad block relocation.
LVM_BBERELMAX, Action: Replace disk as soon as
LVM_HWFAIL possible.
LVM_SA_STALEPP S,P Stale physical partition.
Action: Check disk, synchronize data
(syncvg).
LVM_SA_QUORCLOSE H,P Quorum lost, volume group closing.
Action: Check disk, consider working
without quorum.

Error Classes: H = Hardware Error Types: P = Permanent


S = Software T = Temporary

Copyright IBM Corporation 2008

Figure 15-8. LVM error log entries AW186.0

Notes:

Important LVM error codes


The visual shows some very important LVM error codes you should know. All of these
errors are permanent errors that cannot be recovered. Very 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.

15-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Maintaining the error log


# smit errdemon
Change / Show Characteristics of the Error Log
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
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.
Remove entries older than this number of days [30] #
Error CLASSES [ ] +
Error TYPES [ ] +
...
Resource CLASSES [ ] +
...

==> Use the errlogger command as a reminder <==


Copyright IBM Corporation 2008

Figure 15-9. Maintaining the error log AW186.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 fastpath smit errdemon. The error log file is
implemented as a ring. When the file reaches its limit, the oldest entry is removed to
allow for adding a new one. The command that SMIT executes is the errdemon
command. See your AIX 5L Version 5.3 Commands Reference for a listing of the
different options.

Cleaning up error log entries


To clean up error log entries, use the SMIT fastpath smit errclear. For example, after
removing a bad disk that caused error logs entries, you should remove the
corresponding error log entries regarding the bad disk. The errclear command is part
of the fileset bos.sysmgt.serv_aid.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Entries in /var/spool/cron/crontabs/root use errclear to remove software and hardware


errors. Software and operator errors are purged after 30 days, hardware errors are
purged after 90 days.

Using errlogger to create reminders


Follow the suggestion at the bottom of the visual. Whenever an important system event
takes place, for example, the replacement of a disk, log this event using the errlogger
command.

Full list of characteristics of the error log


The listing shown in the visual is not the complete smit dialogue screen. Following is the
complete dialog fields:
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-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 15.2. Error notification and syslogd

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Error notification methods

ODM-Based:
/etc/objrepos/errnotify

Error Notification

Concurrent Error Logging: Self-made Error


errpt -c > /dev/console Notification

Copyright IBM Corporation 2008

Figure 15-10. Error notification methods AW186.0

Notes:

What is error notification?


Implementing error notification means taking steps that cause the system to inform you
whenever an error is posted to the error log.

Ways to implement error notification


There are different ways to implement error notification:
1. Concurrent Error Logging: This is the easiest way to implement error notification. If
you execute errpt -c, each error is reported when it occurs. By redirecting the
output to the console, an operator is informed about each new error entry.
2. Self-made Error Notification: Another easy way to implement error notification is to
write a shell procedure that regularly checks the error log. This is illustrated on the
next visual.

15-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty 3. ODM-based error notification: The errdemon program uses the ODM class errnotify
for error notification. How to work with errnotify is discussed later in this topic.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Self-made error notification


#!/usr/bin/ksh

errpt > /tmp/errlog.1

while true
do
sleep 60 # Let's sleep one minute

errpt > /tmp/errlog.2

# Compare the two files.


# If no difference, let's sleep again
cmp -s /tmp/errlog.1 /tmp/errlog.2 && continue

# Files are different: Let's inform the operator:


print "Operator: Check error log " > /dev/console

errpt > /tmp/errlog.1

done

Copyright IBM Corporation 2008

Figure 15-11. Self-made error notification AW186.0

Notes:

Implementing self-made error notification


It is very easy to implement self-made error notification by using the errpt command.
The sample shell script on the visual shows how this can be done.

Discussion of example on visual


The procedure on the visual shows a very easy but effective way of implementing error
notification. Let's analyze this procedure:
- The first errpt command generates a file /tmp/errlog.1.
- The construct while true implements an infinite loop that never terminates.
- In the loop, the first action is to sleep one minute.
- The second errpt command generates a second file /tmp/errlog.2.

15-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - The two files are compared using the command cmp -s (silent compare, which
means no output will be reported). If the files are not different, we jump back to the
beginning of the loop (continue), and the process will sleep again.
- If there is a difference, a new error entry will be posted to the error log. In this case,
we inform the operator that a new entry is in the error log. Instead of print, you
could use the mail command to inform another person.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

ODM-based error notification: errnotify

errnotify:
en_pid = 0
en_name = "sample"
en_persistenceflg = 1
en_label = ""
en_crcid = 0
en_class = "H"
en_type = "PERM"
en_alertflg = ""
en_resource = ""
en_rtype = ""
en_rclass = "disk"
en_method = "errpt -a -l $1 | mail -s DiskError root"

Copyright IBM Corporation 2008

Figure 15-12. ODM-based error notification: errnotify AW186.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 located in the /etc/objrepos/errnotify file. Error
Notification objects are added to the object class by using ODM commands.

15-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

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

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 associated with a particular error.
en_label Specifies the label 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 execute 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 or not the Error Notification object should be
removed when the system is restarted. 0 means removed at boot
time; 1 means persists through boot.

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

en_pid Specifies a process ID for use in identifying the Error Notification


object. Objects that have a PID specified should have the
en_persistenceflg descriptor set to 0.
en_rclass Identifies the class of the failing resource. For hardware errors,
the resource class is the device class (see PdDv). Not used for
software errors.
en_resource Identifies the name of the failing resource. For hardware errors,
the resource name is the device name. Not used for software
errors.
en_rtype Identifies the type of the failing resource. For hardware errors,
the resource type is the device type (see PdDv). Not used for
software errors.
en_symptom Enables notification of an error 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
en_err64 Identifies the environment of the error. TRUE indicates that the
error is from a 64-bit environment.
en_dup Identifies whether or not the kernel identified the error as a
duplicate. TRUE indicates that it is a duplicate error.

15-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

syslogd daemon
/etc/syslog.conf:

daemon.debug /tmp/syslog.debug

/tmp/syslog.debug:
syslogd inetd[16634]: A connection requires tn service
inetd[16634]: Child process 17212 has ended

# stopsrc -s inetd

# startsrc -s inetd -a "-d" Provide debug


information

Copyright IBM Corporation 2008

Figure 15-13. syslogd daemon AW186.0

Notes:

Function of syslogd
The syslogd daemon logs system messages from different software components
(kernel, daemon processes, system applications).

The /etc/syslog.conf configuration file


When started, the syslogd reads a configuration file /etc/syslog.conf. Whenever you
change this configuration file, you need to refresh the syslogd subsystem:
# refresh -s syslogd

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Discussion of example on visual


The visual shows a configuration that is often used when a daemon process causes a
problem. The following line is placed in /etc/syslog.conf and indicates that the daemon
facility should be monitored/controlled:
daemon.debug /tmp/syslog.debug
The line shown also specifies that all messages with the priority level debug and higher,
should be written to the file /tmp/syslog.debug. Note that this file must exist.
The daemon process that causes problems (in our example the inetd) is started with
option -d to provide debug information. This debug information is collected by the
syslogd daemon, which writes the information to the log file /tmp/syslog.debug.

15-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

syslogd configuration examples


/etc/syslog.conf:

auth.debug /dev/console All security messages to the


system console

mail.debug /tmp/mail.debug Collect all mail messages in


/tmp/mail.debug

daemon.debug /tmp/daemon.debug Collect all daemon messages in


/tmp/daemon.debug

*.debug; mail.none @server Send all messages, except


mail messages, to host server

After changing /etc/syslog.conf:


# refresh -s syslogd

Copyright IBM Corporation 2008

Figure 15-14. syslogd configuration examples AW186.0

Notes:

Discussion of examples on visual


The visual shows some examples of syslogd configuration entries that might be placed
in /etc/syslog.conf:
- The following line specifies that all security messages are to be directed to the
system console:
auth.debug /dev/console
- The following line specifies that all mail messages are to be collected in the file
/tmp/mail.debug:
mail.debug /dev/mail.debug
- The following line specifies that all messages produced from daemon processes are
to be collected in the file /tmp/daemon.debug:
daemon.debug /tmp/daemon.debug

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- The following line specifies that all messages, except messages from the mail
subsystem, are to be sent to the syslogd daemon on the host server:
*.debug; mail.none @server
Note that, if this example and the preceding example appear in the same
/etc/syslog.conf file, messages sent to /tmp/daemon.debug will also be sent to the
host server.

General format of /etc/syslog.conf entries


As you see, the general format for entries in /etc/syslog.conf is:
selector action
The selector field names a facility and a priority level. Separate facility
names with a comma (,). Separate the facility and priority level portions of the
selector field with a period (.). Separate multiple entries in the same selector field
with a semicolon (;). To select all facilities use an asterisk (*).
The action field identifies a destination (file, host, or user) to receive the messages. If
routed to a remote host, the remote system will handle the message as indicated in its
own configuration file. To display messages on a user's terminal, the destination field
must contain the name of a valid, logged-in system user. If you specify an asterisk (*) in
the action field, a message is sent to all logged-in users.

Facilities
Use the following system facility names in the selector field:
kern Kernel
user User level
mail Mail subsystem
daemon System daemons
auth Security or authorization
syslog syslogd messages
lpr Line-printer subsystem
news News subsystem
uucp uucp subsystem
* All facilities

Priority Levels
Use the following levels in the selector field. Messages of the specified level (and all
levels above it) and all levels above it are sent as directed.

15-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty emerg Specifies emergency messages. These messages are not distributed to all
users.
alert Specifies important messages such as serious hardware errors. These
messages are distributed to all users.
crit Specifies critical messages, not classified as errors, such as improper login
attempts. These messages are sent to the system console.
err Specifies messages that represent error conditions.
warning Specifies messages for abnormal, but recoverable conditions.
notice Specifies important informational messages.
info Specifies information messages that are useful in analyzing the system.
debug Specifies debugging messages. If you are interested in all messages of a
certain facility, use this level.
none Excludes the selected facility.

Refreshing the syslogd subsystem


As previously mentioned, after changing /etc/syslog.conf, you must refresh the syslogd
subsystem in order to have the change take effect. Use the following command to
accomplish this:
# refresh -s syslogd

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Redirecting syslog messages to error log

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

Copyright IBM Corporation 2008

Figure 15-15. Redirecting syslog messages to error log AW186.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.

15-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Directing error log messages to syslogd


errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "logger Error Log: `errpt -l $1 | grep -v TIMESTAMP`"

errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "logger Error Log: $(errpt -l $1 | grep -v TIMESTAMP)"

Direct the last error entry (-l $1) to the syslogd.


Do not show the error log header (grep -v) or (tail -1).

errnotify:
en_name = "syslog1"
en_persistenceflg = l
en_method = "errpt -l $1 | tail -1 | logger -t errpt -p
daemon.notice"
Copyright IBM Corporation 2008

Figure 15-16. Directing error log messages to syslogd . AW186.0

Notes:

Using the logger command


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, it can be passed to the logger command.

Command substitution
You will need to use command substitution (or pipes) before calling the logger
command. The first two examples on the visual illustrate the two ways to do command
substitution in a Korn shell environment:
- Using the UNIX command syntax (with backquotes) - shown in the first example on
the visual
- Using the newer $(UNIX command) syntax - shown in the second example on the
visual

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint

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?
errclear _________________________________________
errlogger_________________________________________
4. What does the following line in /etc/syslog.conf indicate:
*.debug errlog
__________________________________________________
5. What does the descriptor en_method in errnotify indicate?
___________________________________________________
___________________________________________________
___________________________________________________

Copyright IBM Corporation 2008

Figure 15-17. Checkpoint AW186.0

Notes:

15-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Exercise: Error logging and syslogd

Exercise 13

Copyright IBM Corporation 2008

Figure 15-18. Exercise: Error logging and syslogd . AW186.0

Notes:

Goals for this part of the exercise


After completing this part of the exercise, you should be able to:
- Configure the syslogd daemon
- Redirect syslogd messages to the error log
- Implement error notification with errnotify

Copyright IBM Corp. 2000, 2008 Unit 15. Error log and syslogd 15-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary

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
Some components use syslogd for error logging
The syslogd configuration file is /etc/syslog.conf
You can redirect syslogd and error log messages

Copyright IBM Corporation 2008

Figure 15-19. Unit summary AW186.0

Notes:

15-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP Appendix A. Checkpoint solutions


UNIT 1 System hardware overview

Checkpoint solutions

1. There are a large number of current and past models of IBM


POWER-based servers. Where is a good location to find
information on the available models?
http://www-03.ibm.com/systems/p/
2. True or False: A partition is an independent operating environment.
True
3. A partition is a logical partition if which one of the following is true?
a. Resource assignments are flexible.
b. Resources can be moved between partitions without a restart.
c. Partitioning is not dependent on physical system building blocks.

4. List the three types of resources that are configured in partitions.


Processors, Memory, I/O slots
5. What system component is used to configure and manage LPAR-
supported systems?
The HMC.

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-1


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

UNIT 2 System management tools and documentation

Lets review solutions


1. Specify the SMIT function keys that can be used for the
following:
a) List the command that will be run: F6
b) List the screen name which can be used for the
fastpath: F8
c) Take a screen image: F8
d) Break out into a shell: F9
e) Return to the previous menu: F3
2. Specify two ways you can request the ASCII character
version of SMIT from an X-windows environment
command prompt:
smitty
smit -C

Copyright IBM Corporation 2008

A-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 2 System management tools and documentation

Lets review solutions


1.Which command displays manual entries online? man

2.Complete the following sentences:


The AIX 5L and AIX 6 online documentation is loaded on a
document server. Any other computer in the network with
appropriate Web browser software can then become a
document client.

3.How can you start the documentation from the command


line? infocenter

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-3


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

UNIT 2 System management tools and documentation

Checkpoint solutions
1. True or False? The Web-based System Manager is available
for client access automatically after the BOS is installed.
False. The Web-based System Manager server must be configured
and enabled for client access.
2. Which of the statements are true regarding the Web-based
System Manager?
a) An AIX V6.1 system can be managed from a remote PC with
appropriate WebSM client installed.
b) In stand-alone mode, use the wsm command to access the Web-
based system manager.
c) It is possible to manage an AIX V6.1 system from a remote AIX V6.1
system using an ASCII terminal.
C is false. WebSM is a graphic interface and thus requires a graphic
display.

Copyright IBM Corporation 2008

A-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 3 Software installation and maintenance

Checkpoint solutions
1. Which of the following states can 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?
lslpp -l
3. Which of the following can you install as an entity? (select all that apply)
a. Fileset
b. LPP
c. Package
d. Bundle
4. What is the difference between the SMIT menus: Install Software and
Update Installed Software to Latest Level (Update All)?
Install Software by default installs everything from the installation media
(except printer and devices) onto the system.
Update Installed Software to Latest Level (Update All) installs only updates
to filesets already installed on your system.

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-5


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

UNIT 4 Devices

Checkpoint solutions
1. Is it possible to use SCSI ID 7 for a new tape drive?
No. The SCSI adapter itself uses ID 7. So, it cannot be used
for other devices.

2. Use the output on the next visual (lsdev -C -H) to answer the
following four questions:
a) What will happen if we attempt to add another device with the SCSI address set to
4?
The operation will fail as there is already a device (SCSI Disk Drive)
configured at this location.
b) Can the 8 mm tape drive be currently used? Why?
No, because it is in the defined state. You have to first make it available by either
using SMIT or the mkdev command.
c) Where is the printer connected? The parallel port
d) The Ethernet adapter is installed in what slot?
It is an integrated adapter which does not occupy a slot on the PCI bus.

Copyright IBM Corporation 2008

A-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 5 The Object Data Manager (ODM)

Checkpoint solutions
1. In which ODM class do you find the physical volume IDs of
your disks?
CuAt

2. What is the difference between defined state and available


state?
When a device is defined, there is an entry in ODM class
CuDv. When a device is available, the device driver has
been loaded. The device driver can be accessed by the
entries in the /dev directory.

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-7


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

UNIT 6 System boot: Hardware

Checkpoint solutions (1 of 2)
1. True or False? You must have AIX loaded on your system to use the
System Management Services programs. False. SMS is part of the
built-in firmware.

2. Your AIX system is currently powered off. AIX is installed on hdisk1


but the boot list is set to boot from hdisk0. How can you fix the
problem and make the machine boot from hdisk1? You need to boot
the SMS programs. Press F1 or 1 when the logos appear at boot time
and set the new boot list to include hdisk1.
3. Your machine is booted and at the # prompt.
a) What is the command that will display the boot list? bootlist -m
normal -o
b) How could you change the boot list? bootlist -m
normal device1 device2

4. What command is used to build a new boot image and write it to the
boot logical volume? bosboot -ad /dev/hdiskx

5. What script controls the boot sequence? rc.boot


Copyright IBM Corporation 2008

A-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 6 System boot: Hardware

Checkpoint solutions (2 of 2)

6. True or False? During the AIX boot process, the AIX kernel is
loaded from the root file system.
False. The AIX kernel is loaded from hd5.
7. True or False? A service processor allows actions to occur even
when the regular processors are down.
8. List the five components of the boot logical volume (assume a
CHRP system). SOFTROS, bootexpand, kernel, RAM file
system, base ODM
9. How do you boot an AIX machine in maintenance mode?
You need to boot from an AIX CD, mksysb, or NIM server.
10. Your machine keeps rebooting and repeating the POST.
What could be the reason for this?
Invalid boot list, corrupted boot logical volume, or hardware
failures of boot device.
Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-9


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

UNIT 7 System boot: Software

Checkpoint solutions (1 of 2)

1. What is the primary function of each phase of rc.boot?


Phase 1 Configure base devices
Phase 2 Mount rootvg file systems
Phase 3 Configure the remaining devices

2. Your system stops booting with LED 557:


a) In which rc.boot phase does the system stop? 2
b) What command was trying to execute? mount -f /
c) What are some reasons for this problem?
Corrupted boot logical volume
Corrupted JFS log
Damaged file system

Copyright IBM Corporation 2008

A-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 7 System boot: Software

Checkpoint solutions (2 of 2)
3. Which ODM file is used by cfgmgr during boot to configure
the devices in the correct sequence?
Config_Rules

4. What command shows the contents of the boot log?


alog -o -t boot

5. What is the function of shdaemon?


shdaemon monitors the system to see if any process with a process priority
number higher than a set threshold has been run during a set time-out period

6. Which AIX feature can be used to start and stop groups of


daemons or programs? System Resource Controller (SRC)

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-11


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

UNIT 8 AIX 5L v5.3 installation

Checkpoint solutions
1. AIX 5L or AIX 6 can be installed from which of the following:
(select all that are correct)
a. CD-ROM
b. Diskette
c. 4 mm tape
2. True or False? A Preservation Install preserves all data
on the disks.
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 (application) files and configuration data are destroyed.
3. What is the console used for during the installation process?
The console is used to display all the system messages and
interact with the installation.
Copyright IBM Corporation 2008

A-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 9 The Logical Volume Manager (LVM)

Checkpoint solutions
1. A scalable volume group can contain up to 1024 disks
and 4096 logical volumes.
2. (True or False) Each volume group has a unique
identifier.
3. (True or False) Disks can be added to an existing
volume group.
4. The mklv command can be used to create a logical
volume.
5. (True or False) No LVM information is stored outside of
the ODM. False. Information is also stored in other
AIX files and in disk control blocks (like the VGDA
and LVCB).

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-13


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

UNIT 10 Storage management with LVM

Checkpoint solutions

1. (True or False) A mirror can be added to an existing logical


volume.
2. If a volume group consists of more than two disks, each disk will
contain one VGDA.
3. If a disk can be accessed during a varyonvg, it gets a PV state
of active.
4. 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?
Procedure 2: Disk still working. There are some additional steps
necessary for hd5 and the primary dump device hd6.
5. (True or False) The exportvg and importvg commands
provide a way to transfer data between different AIX systems.

Copyright IBM Corporation 2008

A-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 11 Working with file systems

Checkpoint solutions

1. Will the size of the file system change when the size of
the logical volume on which it resides is increased? No

2. If a file system is the same size as the logical volume on


which it resides, will the size of the logical volume
increase when the size of the file system increases?
Yes

3. If you remove a logical volume, is the file system that


resides on it removed as well?
The contents are removed, but the information about the
file system that is contained in /etc/filesystems is not
removed.

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-15


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

UNIT 12 Paging space

Checkpoint solutions
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page Physical Volume Size %Used Active Auto Type chksum
Space Volume Group

hd6 hdisk0 rootvg 64 MB 43% yes yes lv 0


paging00 hdisk1 rootvg 64 MB 7% yes yes lv 0
paging01 hdisk1 rootvg 16 MB 89% yes yes lv 0

Obviously, it is difficult to come to any conclusions regarding the state of this system
just by looking at a snapshot picture like the one above. However, at first glance, the
following potential problems can be noticed:
paging00 is underutilized, and it is too large. It needs to be reduced in size.
paging01 is over utilized, and the size seems to be too small. It needs to be
increased in size.
Both user-defined paging spaces are on the same disk. It would be better if one of
them were moved onto a disk which is less utilized.

2. True or False? The size of paging00 (in the above example) can be
dynamically decreased.

Copyright IBM Corporation 2008

A-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 13 Backup and restore

Checkpoint solutions
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
(a) will backup the files using the full path names, whereas
(b) will backup the file names using the relative path names.
So (b)s files can be restored into any directory.

2. On a mksysb tape, if you entered tctl rewind and then tctl -


f/dev/rmt0.1 fsf 3, which element on the tape could you look at?
You would be at the start of the backed up images of the files, having
skipped over the boot portion of the tape.

3. Which command could you use to restore these files? The files were
backed up using the backup command so you would have to use the
restore command.

4. True or False? The smit mksysb command backs up all file systems,
provided they are mounted. mksysb only backs up rootvg file systems. To
back up other volume groups, you must use the savevg command.
Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-17


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

UNIT 14 TCP/IP configuration

Checkpoint solutions
1. Match the terms to the correct description:
Term Description
A. resolv.conf _F_ Defines the route for hosts directly connected to a local
network. Added automatically when you configure a
network interface.
B. netsvc.conf _D_ A path segment from one host to a gateway.
C. gateway _B_ One of two files that can modify the name resolution
lookup order.
D. route _G_ Static routes are defined in this file if bootup_option=yes.
E. default route _C_ System which forwards packets from one IP network to
another.
F. implicit route _A_ File used to configure a DNS client.
G. rc.bsdnet _E_ Defines a gateway to be used when there is no specific
host or network route.

2. If a system is using dynamic routing, either the __Gated___________ or


_____Routed_______ daemon will be started by __/etc/rc.tcpip______.
3. In order to configure a system as a gateway, you must enable
___ipforwarding_____ in the _/etc/rc.net or /etc/rc.bsdnet __ file.
4. Use the __netstat -rn______ command to view the route table.
Copyright IBM Corporation 2008

A-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP UNIT 15 Errorlog and syslogd .

Checkpoint solutions

1. Which command generates error reports? Which flag of this


command is used to generate a detailed error report?
errpt
errpt -a
2. Which type of disk error indicates bad blocks?
DISK_ERR4
3. What do the following commands do?
errclear Clears entries from the error log.
errlogger Is used by root to add entries into the error log.
4. What does the following line in /etc/syslog.conf indicate:
*.debug errlog
All syslogd entries are directed to the error log.
5. What does the descriptor en_method in errnotify indicate?
It specifies a program or command to be run when an error
matching the selection criteria is logged.

Copyright IBM Corporation 2008

Copyright IBM Corp. 2000, 2008 Appendix A. Checkpoint solutions A-19


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

A-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Appendix B. Performance and workload


management

What this unit is about


This information is from a unit in the system administration series of
courses. It helps system administrators identify the cause for
performance problems. Workload management techniques will be
discussed.

What you should be able to do


After reviewing this appendix, you should be able to:
Provide basic performance concepts
Provide basic performance analysis
Manage the workload on a system
Use with the Performance Diagnostic Tool (PDT)

References
Info Center AIX 5L Performance Management Guide
Info Center AIX 5L Performance Tools Guide and Reference
Info Center AIX 5L Commands Reference, Volumes 1-6
Info Center AIX 5L Practical Performance Tools and Tuning Guide
Redbooks AIX 5L Performance Tools Handbook Redbook

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives

After completing this unit, you should be able to:


Provide basic performance concepts
Provide basic performance analysis
Manage the workload on a system
Use the Performance Diagnostic Tool (PDT)

Copyright IBM Corporation 2008

Figure B-1. Unit objectives AW186.0

Notes:

Scope of this appendix


This appendix is just an introduction to the performance and workload management
tools available. For a more thorough understanding of the subject, you should take the
AIX 5L System Administration III: Performance Management course (AU18/Q1318).

B-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Basic performance analysis


Check CPU sar -u

Possible yes High


CPU constraint CPU %

no

Check memory vmstat iostat

High no
paging Check disk

yes Disk
no
Balance disk balanced
Possible
memory yes
constraint
Possible
disk/SCSI
constraint
Copyright IBM Corporation 2008

Figure B-2. Basic performance analysis AW186.0

Notes:

Steps for performance analysis


There is a basic methodology that can make it easier to identify performance problems.
Look at the big picture. Is the problem CPU, I/O, or memory related?
The steps are as follows:
- If you have a high CPU utilization, this could mean that there is a CPU bottleneck.
- If it is I/O-related, then is it paging or normal disk I/O?
- If it is paging, then increasing memory might help. You may also want to try to isolate
the program and/or user causing the problem.
- If it is disk, then is disk activity balanced?
If not, perhaps logical volumes should be reorganized to make more efficient use
of the subsystem. Tools are available to determine which logical volumes to
move.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

If balanced, then there may be too many physical volumes on a bus. More than
three or four on a single SCSI bus may create problems. You may need to install
another SCSI adapter. Otherwise, more disks may be needed to spread out the
data.

B-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Performance analysis tools


CPU Memory System I/O Subsystem Network Subsystem
vmstat, iostat vmstat iostat lsattr
ps lsps vmstat netstat, entstat
sar svmon lsps nfsstat
tprof, gprof, filemon lsattr netpmon
prof
time, timex lsdev ifconfig
netpmon lspv, lslv, lsvg iptrace, ipreport
fileplace tcpdump
locktrace filemon
emstat, alstat lvmstat
topas, topas, performance topas, topas, performance
performance toolbox performance toolbox
toolbox toolbox
trace, trcrpt, trace, trcrpt, trace, trcrpt, trace, trcrpt,
curt, splat, truss truss truss
truss
cpupstat, procmon, lparstat nfs4cl
lparstat, mpstat,
smtctl
Copyright IBM Corporation 2008

Figure B-3. Performance analysis tools AW186.0

Notes:

CPU analysis tools


CPU metrics analysis tools include:
- vmstat, iostat, sar, lparstat and mpstat which are packaged with bos.acct
- ps which is in bos.rte.control
- cpupstat which is part of bos.rte.commands
- gprof and prof which are in bos.adt.prof
- time (built into the various shells) or timex which is part of bos.acct
- emstat and alstat are emulation and alignment tools from bos.perf.tools
- netpmon, tprof, locktrace, curt, splat, and topas are in bos.perf.tools
- trace and trcrpt which are part of bos.sysmgt.trace
- truss is in bos.sysmgt.ser_aids

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- smtctl is in bos.rte.methods
- Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr

Memory subsystem analysis tools


Some of the memory metric analysis tools are:
- vmstat which is packaged with bos.acct
- lsps which is part of bos.rte.lvm
- topas, svmon and filemon are part of bos.perf.tools
- Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr
- trace and trcrpt which are part of bos.sysmgt.trace
- lparstat is part of bos.acct

I/O subsystem analysis tools


I/O metric analysis tools include:
- iostat and vmstat are packaged with bos.acct
- lsps, lspv, lsvg, lslv and lvmstat are in bos.rte.lvm
- lsattr and lsdev are in bos.rte.methods
- topas, filemon, and fileplace are in bos.perf.tools
- Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr
- trace and trcrpt which are part of bos.sysmgt.trace

Network subsystem analysis tools


Network metric analysis tools include:
- lsattr and netstat which are part of bos.net.tcp.client
- nfsstat and nfs4cl as part of bos.net.nfs.client
- topas and netpmon are part of bos.perf.tools
- ifconfig as part of bos.net.tcp.client
- iptrace and ipreport are part of bos.net.tcp.server
- tcpdump which is part of bos.net.tcp.server
- Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr
- trace and trcrpt which are part of bos.sysmgt.trace

B-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty AIX 5L V5.3 enhancements to analysis tools


Several changes were made in AIX 5L V5.3 to the analysis tools. Changes were made
at different maintenance levels for V5.3.
The tprof command has new -E option to enable event based profiling and the new -f
option allows you to set the sampling frequency for event-based profiling. There were
updates to PMAPI including updates to pmlist and there are two new commands for
hardware analysis: hpmcount and hpmstat. These are not covered in this course.
The topas command has a new -D panel for disk analysis.
There are new commands for obtaining statistics specific to a logical partition. These
give statistics for POWER Hypervisor activity or for tracking real CPU utilization in a
simultaneous multi-threading or shared processor (Micro-Partition) environment. A new
register was added called the Processor Utilization Resource Register (PURR) to track
logical and virtual processor activity. Commands such as sar and topas will
automatically use the new PURR statistics when in a simultaneous multi-threading or
shared processor (Micro-Partition) environment and you will see new columns reporting
partition statistics in those environments. Trace-based commands now have new hooks
for viewing PURR data. Some commands such as lparstat, mpstat, and smtctl are
new for AIX 5L V5.3 and work in a partitioned environment.
The AIX 5L Virtualization Performance Management course covers all differences in
performance analysis and tuning in a partitioned environment.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Identify CPU-intensive programs: ps aux

# ps aux
USER PID %CPU %MEM ... STIME TIME COMMAND
root 516 98.2 0.0 ... 13:00:00 1329:38 wait
johnp 7570 1.2 1.0 ... 17:48:32 0:01 -ksh
root 1032 0.8 0.0 ... 15:13:47 78:37 kproc
root 1 0.1 1.0 ... 15:13:50 13:59 /etc/init

Percentage of time
the process has Percentage of real Total Execution
used the CPU memory Time

Copyright IBM Corporation 2008

Figure B-4. Identify CPU-intensive programs: ps aux . AW186.0

Notes:

Identifying CPU and memory usage with ps aux


For many performance-related problems, a simple check using the ps command may
reveal the reason. Execute ps aux to identify the CPU and memory usage of your
processes. Concentrate on the following two columns:
- %CPU: This column indicates the percentage of time the process has used the CPU
since the process started. The value is computed by dividing the time the process
uses the CPU by the elapsed time of the process. In a multiprocessor environment,
the value is further divided by the number of available CPUs.
- %MEM: The percentage of real memory used by this process.
You can identify your top applications related to CPU and memory usage using ps aux.
Many administrators use the ps aux command to create an alias definition that sorts
the output according to the CPU usage:
alias top="ps aux | tail +2 | sort -nr -k 3,3"

B-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty The wait process


The example in the visual shows a process with PID 516. This is the wait process that
is assigned to the CPU, if the system is idle. With AIX, the CPU must always be doing
work. If the system is idle, the wait process will be executed.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Identify high priority processes: ps -elf

# ps -elf
F S UID PID PPID C PRI NI ... TIME CMD
200003 A root 1 0 0 60 20 ... 0:04 /etc/init
240001 A root 69718 1 0 60 20 ... 1:16 /usr/sbin/syncd 60
200001 A root 323586 188424 24 72 20 ... 0:00 ps -elf

Priority of
the process Nice value

The smaller the PRI value, the higher the priority of the process.
The average process runs a priority around 60.
The NI value is used to adjust the process priority. The higher
the nice value is, the lower the priority of the process.

Copyright IBM Corporation 2008

Figure B-5. Identify high priority processes: ps -elf . AW186.0

Notes:

Priority introduction
After identifying CPU and memory-intensive processes, check the priorities of the
processes.
The priority of a process controls when a process will be executed.

Fixed versus non-fixed priorities


AIX distinguishes between fixed and non-fixed priorities. If a process uses a fixed
priority, the priority will not be changed throughout the lifetime of the process. Default
priorities are non-fixed, that means after a certain timeslice, the priority will be
recalculated. The new priority is determined by the amount of CPU time used and the
nice value.

B-10 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty NI and PRI columns


The nice value is shown in column NI. The default nice value is 20. The higher the nice
value is, the lower the priority of the process. We will learn later how to change the nice
value.
The actual priority of the process is shown in the PRI column. The smaller this value,
the higher the priority. Note that processes generally run with a PRI in the 60s. Keep an
eye on processes that use a higher priority than this value.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Monitoring CPU usage: sar -u

Interval Number

# sar -u 60 30

AIX www 3 5 000400B24C00 08/09/05

System configuration: lcpu=2

08:24:10 %usr %sys %wio %idle


08:25:10 48 52 0 0
08:26:10 63 37 0 0
08:27:10 59 41 0 0
...
Average 57 43 0 0

A system may be CPU bound, if:


%usr + %sys > 80%
Copyright IBM Corporation 2008

Figure B-6. Monitoring CPU usage: sar -u . AW186.0

Notes:

The sar -u command


The sar command collects and reports system activity information.
The sar -u 60 30 command on the visual will collect CPU usage data (-u) every 60
seconds. It will do this for 30 intervals.

sar output
The columns provide the following information:
- %usr
Reports the percentage of time the CPU spent in execution at the user (or
application) level.

B-12 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty - %sys
Reports the percentage of time the CPU spent in execution at the system (or kernel)
level. This is the time the CPU spent in execution of system functions.
- %wio
Reports the percentage of time the CPU was idle waiting for disk I/O to complete.
This does not include waiting for remote disk access.
- %idle
Reports the percentage of time the CPU was idle with no outstanding disk I/O
requests.

Analyzing the output


The CPU usage report from sar is a good place to begin narrowing down whether a
bottleneck is a CPU problem or an I/O problem. If the %idle time is high, it is likely there
is no problem in either.
If the sum from %usr and %sys is always greater than 80%, it indicates that the CPU is
approaching its limits. Your system could be CPU bound.
If you detect that your CPU always has outstanding disk I/Os, you must further
investigate in this area. The system could be I/O bound.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

AIX tools: tprof


# tprof -x sleep 60
# more sleep.prof

Process Freq Total Kernel User Shared Other


======= ==== ===== ====== ==== ====== =====
./cpuprog 5 99.56 92.86 3.05 3.64 0.00
/usr/bin/tprof 2 0.41 0.01 0.01 0.39 0.00
/usr/sbin/syncd 4 0.02 0.02 0.00 0.00 0.00
gil 2 0.01 0.01 0.00 0.00 0.00
/usr/bin/sh 1 0.00 0.00 0.00 0.00 0.00
/usr/bin/trcstop 1 0.00 0.00 0.00 0.00 0.00
======= ==== ===== ====== ==== ====== =====
Total 15 100.00 92.91 3.06 4.03 0.00

Process PID TID Total Kernel User Shared Other


======= === === ===== ====== ==== ====== =====
./cpuprog 184562 594051 20.00 18.72 0.63 0.66 0.00
./cpuprog 262220 606411 19.96 18.64 0.58 0.74 0.00
./cpuprog 168034 463079 19.89 18.57 0.61 0.71 0.00
./cpuprog 254176 598123 19.87 18.51 0.61 0.74 0.00
./cpuprog 282830 618611 19.83 18.43 0.61 0.79 0.00
/usr/bin/tprof 270508 602195 0.40 0.01 0.01 0.39 0.00
/usr/sbin/syncd 73808 163995 0.01 0.01 0.00 0.00 0.00
/usr/bin/trcstop 196712 638993 0.00 0.00 0.00 0.00 0.00
/usr/bin/sh 196710 638991 0.00 0.00 0.00 0.00 0.00
gil 49176 61471 0.00 0.00 0.00 0.00 0.00
...
======= === === ===== ====== ==== ====== =====
Total 100.00 92.91 3.06 4.03 0.00
Total Samples = 24316 Total Elapsed Time = 121.59s
Copyright IBM Corporation 2008

Figure B-7. AIX tools: tprof . AW186.0

Notes:

When to use tprof


If you have determined that your system is CPU-bound, how do you know what process
or processes are using the CPU the most? tprof is used to spot those processes.

What does tprof do?


tprof is a trace tool which means it monitors the system for a period of time and when
it stops, it produces a report. The -x option in tprof allows you to monitor for a period
of time without associating tprof with any one particular process. To monitor for a
period of time, have the argument to the -x option be the sleep command for the time
period, such as sleep 60 for 1 minute. After this period is completed, tprof will
generate a file called sleep.prof (AIX 5L V5.2 and later) or __prof.all (that is two
underscores then prof.all prior to AIX 5L V5.2).

B-14 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Report format


The report will show the most dominant processes listed in order of the highest CPU
percentage (starting with AIX 5L V5.2) or using the most CPU ticks (before AIX 5L
V5.2). By looking at this file, you can see the CPU demand by process in decreasing
order.
The top part of the report contains a summary of all the processes on the system. This
is useful for characterizing CPU usage of a system according to process names when
there are multiple copies of a program running. The second part of the report shows
each thread that executed during the monitoring period. The output prior to AIX 5L V5.2
shows the information on each thread first, then the summary in the second part.
The sample output has been reduced to simplify the areas to focus on.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Monitoring memory usage: vmstat


Summary report every 5 seconds

# vmstat 5

System Configuration: lcpu=2 mem=512MB

kthr memory page ... cpu


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

r b avm fre re pi po fr sr cy ... us sy id wa

0 0 8793 81 0 0 0 1 7 0 1 2 95 2
0 0 9192 66 0 0 16 81 167 0 1 6 77 16
0 0 9693 69 0 0 53 95 216 0 1 4 63 33
0 0 10194 64 0 21 0 0 0 0 20 5 42 33
0 0 4794 5821 0 24 0 0 0 0 5 8 41 46

pi, po: wa:


Paging space page ins and outs I/O wait percentage of CPU
If any paging space I/O is taking If non-zero, a significant
place, the workload is approaching amount of time is being spent
the system's memory limit waiting on file I/O
Copyright IBM Corporation 2008

Figure B-8. Monitoring memory usage: vmstat . AW186.0

Notes:

The vmstat command


The vmstat command reports virtual memory statistics. It reports statistics about kernel
threads, virtual memory, disks, traps, and CPU activity.
In the example, the command vmstat 5 is executed. For every 5 seconds, a new
report will be written until the command is stopped. In AIX 5L V5.3 and AIX 6.1, vmstat
displays a system configuration line, which appears as the first line displayed after the
command is invoked. If a configuration change is detected during a command execution
iteration, a warning line will be displayed before the data which is then followed by a
new configuration line and the header.
Prior to AIX 5L V5.3, the first report was the cumulative statistic since system startup. In
In with AIX 5L V5.3 and later, the first interval does not represent statistics collected
since system boot. Internal to the command, the first interval is never displayed, and
therefore there may be a slightly longer wait for the first displayed interval to appear.

B-16 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Because the target of this course is to provide a basic performance understanding, we
concentrate on the pi, po and wa columns.

pi and po columns
The pi and po columns indicate the number of 4 KB pages that have been paged in
or out.
Simply speaking, paging means that the real memory is not large enough to satisfy
all memory requests and uses a secondary storage area on disks. If the systems
workload always causes paging, you should consider increasing real memory.
Accessing pages on disk is relatively slow.

wa column
The wa column gives the same information as the %wio column of sar -u. It
indicates that the CPU has outstanding disk I/Os to complete. If this value is always
non-zero, it might indicate that your system is I/O bound.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

AIX tools: svmon


Global report
# svmon -G
size inuse free pin virtual
memory 32744 20478 12266 2760 11841
pg space 65536 294

work pers clnt lpage


pin 2768 0 0 0
in use 13724 6754 0 0

Sizes are in # of
Top 3 users of 4K frames
# svmon -Pt 3 memory

Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd Lpage


14624 java 6739 1147 425 4288 N Y N
...
9292 httpd 6307 1154 205 3585 N Y N
...
3596 X 6035 1147 1069 4252 N N N
...

* output has been modified


Copyright IBM Corporation 2008

Figure B-9. AIX tools: svmon . AW186.0

Notes:

What does svmon do?


The svmon tool is used to capture and analyze information about virtual memory. This
is a very extensive command that can produce a variety of statistics, most of which is
beyond our scope for this course.

Examples
In both examples on the visual, the output has been reduced for simplicity and to show
the information that is of interest to this discussion.
In the first example, svmon -G provides a global report. You can see the size of
memory, how much is in use and the amount that is free. It provides details about how it
is being used and it also provide statistics on paging space.
All numbers are reported as the number of frames. A frame is 4 KB in size.

B-18 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty In the second example, svmon -Pt 3 displays memory usage of the top three
processes using memory, sorted in decreasing order of memory demand. The flags are:
P shows processes
t gives the top # to display

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Monitoring disk I/O: iostat


# iostat 10 2

System configuration: lcpu=2 drives=3 ent=0.30 paths=4 vdisks=1

tty: tin tout avg-cpu: %user %sys %idle %iowait physc %entc
0.1 110.7 7.0 59.4 0.0 33.7 0.0 1.4

Disks: %tm_act Kbps tps Kb_read Kb_wrtn

hdisk0 77.9 115.7 28.7 456 8


hdisk1 0.0 0.0 0.0 0 0
cd0 0.0 0.0 0.0 0 0

tty: tin tout avg-cpu: %user %sys %idle %iowait physc %entc
0.1 96.3 6.5 58.0 0.0 35.5 0.0 1.3

Disks: %tm_act Kbps tps Kb_read Kb_wrtn

hdisk0 79.8 120.1 28.7 485 9


hdisk1 0.0 0.0 0.0 0 0
cd0 0.0 0.0 0.0 0 0

Copyright IBM Corporation 2008

Figure B-10. Monitoring disk I/O: iostat . AW186.0

Notes:

The iostat command


The iostat command reports statistics for tty devices, disks and CD-ROMs.
Beginning with AIX 5L V5.3, iostat displays a system configuration line, which
appears as the first line displayed after the command is invoked. If a configuration
change is detected during a command execution iteration, a warning line will be
displayed before the data which is then followed by a new configuration line and the
header.
Prior to AIX 5L V5.3, the first report was the cumulative statistic since system startup.
Beginning with AIX 5L V5.3, the first interval does not represent statistics collected
since system boot. Internal to the command, the first interval is never displayed, and
therefore there may be a slightly longer wait for the first displayed interval to appear.

B-20 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty iostat output


Following are descriptions of the sections in the iostat output:
- tty displays the number of characters read from (tin) and sent to (tout) terminals
- avg-cpu gives the same information as the sar -u and vmstat outputs (CPU
utilization)
- Disks show the I/O statistics for each disk and CD-ROM on the system
%tm_act is the percent of time the device was active over the period
Kbps is the amount of data, in kilobytes, transferred (read and written) per
second
tps is the number of transfers per second
Kb_read and Kb_wrtn are the numbers of kilobytes read and written in the
interval

What to look for


This information is useful for determining if the disk load is balanced correctly. In the
above example, for that particular interval, one disk is used nearly 80% of the time
where the other is not used at all. If this continues, some disk reorganization may be
appropriate. You should use the %tm_act and Kbps statistics to determine this.
The %iowait displays the same information as %wio shown when using sar -u and wa
in vmstat. High %iowait values, while indicating that system overall has I/O as a
bottleneck (in comparison to CPU utilization), do not mean that there is definitely an I/O
problem.
An idle CPU is marked as waiting on I/O if an I/O was started on that CPU and is still in
progress. On a system with a fairly high level of I/O which is not keeping the CPU busy,
a fairly high %iowait is to be expected even when there is no I/O performance
problem. On the other hand, a system with serious I/O performance problems can have
a very low I/O %iowait value if there are CPU intensive jobs running on the system to
keep the CPUs busy. Also, the %iowait value given in iostat is the average I/O wait
for all CPUs. Such an average does not detect when one disk out of many disks is
overloaded.
The better measurements to focus on in the iostat report is the %tm_act and Kbps
statistics expressed on a disk by disk basis. If a disk is mostly 100% active then the
throughput in Kbps may be a clue of what is happening. When throughput is seriously
below the rated ability of the drive there can be some factor preventing the system form
utilizing the potential of the hardware. When throughput is at the rated speed of the
disk, we may be over driving the capacity of the disk and experiencing extensive
queueing of the I/O requests.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

If your system is having performance problems and has indication that there might be
an I/O problem, additional investigation is needed in this particular area. Other tools
such as filemon and kernel trace analysis can provide additional details which will
clarify what the situation is.

B-22 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

AIX tools: filemon

# filemon -o fmout Starts monitoring disk


activity

# trcstop Stops monitoring


# more fmout and creates report

Most Active Logical Volumes


util #rblk #wblk KB/s volume description
----------------------------------------------------------
0.03 3368 888 26.5 /dev/hd2 /usr
0.02 0 1584 9.9 /dev/hd8 jfs2log
0.02 56 928 6.1 /dev/hd4 /

Most Active Physical Volumes


util #rblk #wblk KB/s volume description
----------------------------------------------------------
0.10 24611 12506 231.4 /dev/hdisk0 Virtual SCSI Disk Drive
0.02 56 8418 52.8 /dev/hdisk1 N/A

Copyright IBM Corporation 2008

Figure B-11. AIX tools: filemon. AW186.0

Notes:

What does filemon do?


If you have determined your system is I/O bound, you now need to determine how to
resolve the problem. You need to identify what is causing your disk activity if you would
like to spread the workload among your disks. filemon is the tool that can provide that
information.
filemon is a trace tool. Use the filemon command to start the trace. You need to use
trcstop to stop the trace and generate the report.

Example
In the example in the visual, filemon -o fmout starts the trace. The -o directs the
output to the file called fmout. There will be several sections included in this report. The
sample output has been reduced to only show two areas: logical volume activity and
physical volume activity.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Following is a description of the report columns:


util Utilization over the measured interval (0.03 = 3%)
#rblk Number of 512-byte blocks read
#wblk Number of 512-byte blocks written
KB/s Average data transfer rate
volume Logical or physical volume name
description File system name or logical volume type
Since they are ranked by usage, it is very easy to spot the file systems, logical volumes
and disks that are most heavily used.
To break it down even further, you can use filemon to see activity of individual files with
the command, filemon -O all -o fmout.
The additional filemon reports provide detailed statistics on block sizes, I/O request
processing times, seeks, and more, at both the logical volume and physical volume
layers. The ability to understand these statistics depends on a more detailed
understanding of the mechanisms used by AIX in writing and reading data.

B-24 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

topas
# topas
Topas Monitor for host: kca81 EVENTS/QUEUES FILE/TTY
Mon Aug 9 11:48:35 2005 Interval: 2 Cswitch 370 Readch 11800
Syscall 461 Writech 95
Kernel 0.1 | | Reads 18 Rawin 0
CPU
User 0.0 | | Writes 0 Ttyout 0
info Wait 0.0 | | Forks 0 Igets 0
Idle 99.8 |############################| Execs 0 Namei 1
Physc = 0.00 %Entc= 1.5 Runqueue 0.0 Dirblk 0
Waitqueue 0.0
Network KBPS I-Pack O-Pack KB-In KB-Out
en0 0.1 0.4 0.4 0.0 0.1
lo0 0.0 0.0 0.0 0.0 0.0 PAGING MEMORY
Faults 1 Real,MB 4095
iostat Disk Busy% KBPS TPS KB-Read KB-Writ Steals 0 % Comp 15.4
info hdisk0 0.0 0.0 0.0 0.0 0.0 PgspIn 0 % Noncomp 9.3
hdisk1 0.0 0.0 0.0 0.0 0.0 PgspOut 0 % Client 1.8
PageIn 0
PageOut 0 PAGING SPACE
Sios 0 Size,MB 3744
Name PID CPU% PgSp Owner % Used 0.6
topas 18694 0.1 1.4 root % Free 99.3
rmcd 10594 0.0 2.0 root NFS (calls/sec)
nfsd 15238 0.0 0.0 root ClientV2 0 WPAR Activ 0
syncd 3482 0.0 1.3 root ServerV2 0 WPAR Total 0
gil 2580 0.0 0.0 root ClientV2 0 Press:
vmstat ServerV3 0 "h" for help
info ClientV3 0 q" for quit

Copyright IBM Corporation 2008

Figure B-12. topas . AW186.0

Notes:

The topas utility


topas continuously updates the screen to show the current state of the system. In the
upper left is the same information that is given with sar. The middle of the left side
shows the same information as iostat. The right lower quadrant shows information
from the virtual memory manager which can be seen with vmstat.
To exit from topas, just press q for quit. h is also available for help.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

There is always a next bottleneck!

Our system is I/O bound.


Let's buy faster disks!

# iostat 10 60

Our system is now


memory bound! Let's buy
more memory!!!

# vmstat 5

Oh no! The CPU is


completely overloaded!

# sar -u 60 60

Copyright IBM Corporation 2008

Figure B-13. There is always a next bottleneck! AW186.0

Notes:

You are never really done


The visual shows a performance truism, There is always a next bottleneck. It means
that eliminating one bottleneck might lead to another performance bottleneck. For
example, eliminating a disk bottleneck might lead to a memory bottleneck. Eliminating
the memory bottleneck might lead to a CPU bottleneck.
When you have exhausted all system tuning possibilities and performance is still
unsatisfactory, you have one final choice, adapt workload-management techniques.
These techniques are provided on the next pages.

B-26 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Workload management techniques (1 of 3)

Run programs at a specific time

# echo "/usr/local/bin/report" | at 0300


# echo "/usr/bin/cleanup" | at 1100 friday

# crontab -e

0 3 * * 1-5 /usr/local/bin/report

minute hour day_of_month month weekday command

Copyright IBM Corporation 2008

Figure B-14. Workload management techniques (1 of 3) AW186.0

Notes:

Defining workload management


Workload management simply means assessing the components of the workload to
determine whether they are all needed as soon as possible. Usually, there is work that
can wait for a while. A report that needs to be created for the next morning, could be
started at 4 A.M. or at 4 P.M. The difference is that at night the CPU is probably idle.

Tools to change the workload


The cron daemon can be used to spread out the workload by running at different times
of the day. To take advantage of the capability, use the at command or set up a crontab
file.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Workload management techniques (2 of 3)


Sequential execution of programs
# vi /etc/qconfig
ksh:
device = kshdev
discipline = fcfs

kshdev:
backend = /usr/bin/ksh

# qadm -D ksh
Queue is down
# qprt -P ksh report1
# qprt -P ksh report2 Jobs will be queued
# qprt -P ksh report3

# qadm -U ksh
Queue is up:
Jobs will be executed
sequentially
Copyright IBM Corporation 2008

Figure B-15. Workload management techniques (2 of 3) AW186.0

Notes:

Using a job queue


Another workload management technique is to put programs or procedures in a job
queue. In the example, a ksh queue is defined that uses the /usr/bin/ksh as backend
(the backend is the program that is called by qdaemon).

Bringing the queue down


In the example, the queue is brought down with the command:
# qadm -D ksh

B-28 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Queueing jobs


During the day (or when the workload is very high), users put their jobs into this queue,
but they are held because the queue is down:
# qprt -P ksh report1
# qprt -P ksh report2
# qprt -P ksh report3

Bringing the queue back up


During the night (or when the workload is lower), the queue is brought back up, which
leads to a sequential execution of all jobs in the queue:
# qadm -U ksh

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Workload management techniques (3 of 3)

Run programs at a reduced priority

# nice -n 15 backup_all &


# ps -el
F S UID PID PPID C PRI NI ... TIME CMD

240001 A 0 3860 2820 30 90 35 ... 0:01 backup_all

Very low Nice value:


priority 20+15

# renice -n -10 3860


# ps -el
F S UID PID PPID C PRI NI ... TIME CMD

240001 A 0 3860 2820 26 78 25 ... 0:02 backup_all

Copyright IBM Corporation 2008

Figure B-16. Workload management techniques (3 of 3) AW186.0

Notes:

Changing the priority


Some programs that run during the day can be run with a lower priority. They will take
longer to complete, but they will not be in competition with time-critical processes.

The nice command


To run a program at a lower priority, use the nice command. For example:
# nice -n 15 backup_all &
This command specifies that the program backup_all runs at a very low priority. The
default nice value is 20 (24 for a ksh background process), which is increased here to
35. The nice value can range from 0 to 39, with 39 being the lowest (worst) priority.
As root user you can use nice to start processes with a higher priority. In this case you
would use a negative value:

B-30 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty # nice -n -15 backup_all &


Here the nice value is decreased to 5, which results in a very high priority of the
process.

The renice command


If the process is already running, you can use the renice command to reduce or
increase the priority:
# renice -n -10 3860
In the example, the nice value is decreased from 35 to 25, which results in a higher
(better) priority. Note that you must specify the process ID or group ID when working
with renice.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Simultaneous multi-threading (SMT)


Each chip appears as a two-way SMP to software:
Appear as 2 logical CPUs
Performance tools may show number of logical CPUs

Processor resources optimized for enhanced SMT


performance:
May result in a 25-40% boost and even more

Benefits vary based on workload

To enable:
smtctl [ -m off | on [ -w boot | now]]

Copyright IBM Corporation 2008

Figure B-17. Simultaneous multi-threading (SMT) AW186.0

Notes:

Execution units
Modern processors have multiple specialized execution units, each of which is capable
of handling a small subset of the instruction set architecture; some will handle integer
operations, some floating point, and so on. These execution units are capable of
operating in parallel so several instructions of a program may be executing
simultaneously.
However, conventional processors execute instructions from a single instruction
stream. Despite microarchitectural advances, execution unit utilization remains low in
todays microprocessors. It is not unusual to see average execution unit utilization rates
of approximately 25% across a broad spectrum of environments. To increase execution
unit utilization, designers use thread-level parallelism, in which the physical processor
core executes instructions from more than one instruction stream. To the operating
system, the physical processor core appears as if it is a symmetric multiprocessor
containing two logical processors.

B-32 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty Simultaneous multi-threading (SMT)


AIX 5L V5.3 introduced simultaneous multi-threading (SMT) to handle multiple threads
on either a POWER5 or POWER6 processor. If SMT is enabled, the POWER5 or
POWER6 processor uses two separate instruction fetch address registers to store the
program counters for the two threads. This implementation provides the ability to
schedule instructions for execution from all threads concurrently. With SMT, the system
dynamically adjusts to the environment, allowing instructions to execute from each
thread if possible, and allowing instructions from one thread to utilize all the execution
units if the other thread encounters a long latency event.

Simultaneous multi-threading performance benefits


The performance benefit of simultaneous multi-threading is workload dependent. Most
measurements of commercial workloads have received a 25-40% boost and a few have
been even greater. Any workload where the majority of individual software threads
highly utilize any resource in the processor or memory will benefit little from
simultaneous multi-threading. For example, workloads that are heavily floating-point
intensive are likely to gain little from simultaneous multi-threading and are the ones
most likely to lose performance.

Enabling simultaneous multi-threading


To enable and disable use the smtctl command. The smtctl command syntax is:
smtctl [ -m off | on [ -w boot | now ]]
where:
-m off Sets simultaneous multi-threading mode to disabled.
-m on Sets simultaneous multi-threading mode to enabled.
-w boot Makes the simultaneous multi-threading mode change effective on the
next and subsequent reboots. (You must run the bosboot command
before the next system reboot.)
-w now Makes the simultaneous multi-threading mode change immediately but
will not persist across reboot.
If neither the -w boot or the -w now options are specified, then the mode change is
made now and when the system is rebooted. (You must run the bosboot command
before the next system reboot.)
Note, the smtctl command does not rebuild the boot image. If you want your change to
persist across reboots, the bosboot command must be used to rebuild the boot image.
The boot images in AIX 5L V5.3 and AIX 6.1 have been extended to include an
indicator that controls the default simultaneous multi-threading mode.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Tool enhancements for micro-partitioning


Added two new values to the default topas screen
Physc and %Entc
The vmstat command has two new metrics:
pc and ec
The iostat command has two new metrics:
%physc and %entc
The sar command has two new metrics:
physc
%entc

Copyright IBM Corporation 2008

Figure B-18. Tool enhancements for micro-partitioning AW186.0

Notes:

topas enhancements
If topas runs on a partition with a shared processor partition, beneath the CPU
utilization, there are two new values displayed:
- Physc displays the number of physical processors granted to the partition (if
Micro-Partitioning)
- %Entc displays the percentage of entitled capacity granted to a partition (if
Micro-Partitioning)
The -L flag will switch the output to a logical partition display. You can either use -L
when invoking the topas command, or as a toggle when running topas. In this mode,
topas displays data similar to the mpstat and lparstat commands.

B-34 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty vmstat enhancements


The vmstat command has been enhanced to support Micro-Partitioning and can now
detect and tolerate dynamic configuration changes.
The vmstat command has two new metrics that are displayed. These are physical
processor granted (pc) and percentage of entitlement granted (ec). The pc value
represents the number of physical processors granted to the partition during an interval.
The ec value is the percentage of entitled capacity granted to a partition during an
interval. These new metrics will be displayed only when the partition is running as a
shared processor partition or with SMT enabled. If the partition is running as a
dedicated processor partition and with SMT off, the new metrics will not be displayed.

iostat enhancements
In AIX 5L V5.3 and AIX 6.1, the iostat command reports the percentage of physical
processors consumed (%physc), the percentage of entitled capacity consumed (%entc),
and the processing capacity entitlement when running in a shared processor partition.
These metrics will only be displayed on shared processor partitions.
In the system configuration information, you can see the currently assigned processing
capacity specified as ent.

Additional sar output for LPAR systems


In AIX 5L V5.3 and AIX 6.1, there is additional information in the output of all of the
performance commands. If the POWER5 or POWER6 LPAR has shared CPU
resources allocated, the sar command output would look something like the following:
# sar -u 2 10

AIX console59 3 5 00C0288E4C00 11/19/04

System configuration: lcpu=2 ent=0.40

11:13:03 %usr %sys %wio %idle physc %entc


11:13:05 0 1 0 99 0.01 1.4
11:13:07 0 0 0 100 0.00 0.8
11:13:09 0 0 0 100 0.00 0.8
11:13:11 0 0 0 100 0.00 0.8
11:13:13 0 0 0 100 0.00 0.8
11:13:15 0 0 0 100 0.00 0.8
11:13:17 0 0 0 100 0.00 0.8
11:13:19 0 0 0 100 0.00 0.8
11:13:21 0 0 0 100 0.00 0.8
11:13:23 0 0 0 100 0.00 0.8
Average 0 0 0 100 0.00 0.9

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

In the System configuration: lcpu=2 ent=0.40 line, the lcpu field shows
logical CPUs and the ent field gives the LPARs entitled capacity.
Notice the physc and %entc columns. physc reports the number of physical
processors consumed. This will be reported only if the partition is running with
shared processors or simultaneous multi-threading enabled. entc reports the
percentage of entitled capacity consumed.

B-36 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Performance Diagnostic Tool (PDT)


PDT assesses the current state of a system and
tracks changes in workload and performance.

Balanced use of Operation within


resources bounds

Identify workload Error-free


trends
PDT Operation

Changes should be Appropriate setting of


investigated system parameters

Copyright IBM Corporation 2008

Figure B-19. Performance Diagnostic Tool (PDT) AW186.0

Notes:

Introduction
The Performance Diagnostic Tool (PDT) assesses the current state of a system and
tracks changes in workload and performance. It attempts to identify incipient problems
and suggest solutions before the problems become critical. PDT is available on all
AIX V4 and later systems. It is contained in fileset bos.perf.diag_tool. The PDT data
collection and reporting is very easy to implement.
PDT attempts to apply some general concepts of well-performing systems to its search
for problems.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Balanced use of resources


In general, if there are several resources of the same type, then a balanced use of
those resources produces better performance:
- Comparable numbers of physical volumes on each adapter
- Paging space distributed across multiple physical volumes
- Roughly equal measured load on different physical volumes

Operation within bounds


Resources have limits to their use. Trends that would attempt to exceed those limits are
reported:
- File system sizes cannot exceed the allocated space
- A disk cannot be utilized more than 100% of the time

Identify workload trends


Trends can indicate a change in the nature of the workload as well as increases in the
amount of resource used:
- Number of users logged in
- Total number of processes
- CPU-idle percentage

Error-free operation
Hardware or software errors often produce performance problems:
- Check the hardware and software error logs
- Report bad VMM pages (pages that have been allocated by applications but have
not been freed properly)

Changes should be investigated


New workloads or processes that start to consume resources may be the first sign of a
problem:
- Appearance of new processes that consume lots of CPU or memory resources

Appropriate setting of system parameters


There are many parameters in the system, for example the maximum number of
processes allowed per user (maxuproc). Are all of them set appropriately?

B-38 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Enabling PDT
# /usr/sbin/perf/diag_tool/pdt_config

-----------PDT customization menu-----------


1. show current PDT report recipient and severity level
2. modify/enable PDT reporting
3. disable PDT reporting
4. modify/enable PDT collection
5. disable PDT collection
6. de-install PDT
7. exit pdt_config

Please enter a number: 4

Copyright IBM Corporation 2008

Figure B-20. Enabling PDT AW186.0

Notes:

Enabling PDT
PDT must be enabled in order to begin collecting data and writing reports. Enable PDT
by executing the script /usr/sbin/perf/diag_tool/pdt_config. Only the root user is
permitted to run this script. From the PDT menu, option 4 enables the default data
collection functions. Actual collection occurs via cron jobs run by the cron daemon.
The menu is created using the Korn Shell select command. This means the menu
options are not reprinted after each selection. However, the program will show the
menu again if you press Enter without making a selection.

Other options
To alter the recipient of reports, use option 2. The default recipient is the adm user.
Reports have severity levels. There are three levels; level 1 gives the smallest report,
while level 3 will analyze the data in more depth.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Option 6 does not deinstall the program, it simply advises how you might do that.

Types of analysis
Analysis by PDT is both static (configuration focused; that is, I/O and paging) and
dynamic (over time). Dynamic analysis includes such areas as network, CPU, memory,
file size, file system usage, and paging space usage. An additional part of the report
evaluates load average, process states, and CPU idle time.

Diagnostic reports
Once PDT is enabled, it maintains data in a historical record for 35 days (by default). On
a daily basis, by default, PDT generates a diagnostic report that is sent to user adm and
also written to /var/perf/tmp/PDT_REPORT.

B-40 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

cron control of PDT components


# cat /var/spool/cron/crontabs/adm

0 9 * * 1-5 /usr/sbin/perf/diag_tool/Driver_ daily

Collect system data, each workday at 9:00 A.M.

0 10 * * 1-5 /usr/sbin/perf/diag_tool/Driver_ daily2

Create a report, each workday at 10:00 A.M.

0 21 * * 6 /usr/sbin/perf/diag_tool/Driver_ offweekly

Clean up old data, each Saturday at 9:00 P.M.

Copyright IBM Corporation 2008

Figure B-21. cron control of PDT components AW186.0

Notes:

PDT components
The three main components of the PDT system are:
- Collection control
- Retention control
- Reporting control

crontab entries
When PDT is enabled, by default, it adds entries to the crontab file for adm to run
these functions at certain default times and frequencies. The entries execute a shell
script called Driver_ in the /usr/sbin/perf/diag_tool directory. This script is passed
through three different parameters, each representing a collection profile, at three
different collection times.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

# cat /var/spool/cron/crontabs/adm
0 9 * * 1-5 /usr/sbin/perf/diag_tool/Driver_ daily
0 10 * * 1-5 /usr/sbin/perf/diag_tool/Driver_ daily2
0 21 * * 6 /usr/sbin/perf/diag_tool/Driver_ offweekly
The crontab entries and the Driver_ script indicate that daily statistics (daily) are
collected at 9:00 A.M. and reports (daily2) are generated at 10:00 A.M. every work
day, and historical data (offweekly) is cleaned up every Saturday night at 9:00 P.M.

B-42 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

PDT files
Collection

Driver_ daily
/var/perf/cfg/diag_tool/.collection.control
Retention
Driver_ offweekly
/var/perf/cfg/diag_tool/.retention.control

/var/perf/tmp/.SM /var/perf/tmp/.SM.last
Reporting

Driver_ daily2 35 days


/var/perf/cfg/diag_tool/.reporting.control .retention.list

/var/perf/tmp/PDT_REPORT /var/perf/tmp/.SM.discards
Next Day
adm
/var/perf/tmp/PDT_REPORT.last
Copyright IBM Corporation 2008

Figure B-22. PDT files AW186.0

Notes:

Collection component
The parameter passed to the Driver_ shell script is compared with the contents of the
.control files found in the /var/perf/cfg/diag_tool directory to find a match. These
control files contain the names of scripts to run to collect data and generate reports.
When a match is found, the corresponding scripts are run. The scripts that are executed
for daily are in .collection.control, those for daily2 are in .reporting.control, and
offweekly are in .retention.control.
The collection component comprises a set of programs in /usr/sbin/perf/diag_tool that
periodically collect and record data on configuration, availability, and performance.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Retention component
The retention component periodically reviews the collected data and discards data that
is out of date. The size of the historical record is controlled by the file
/var/perf/cfg/diag_tool/.retention.list. This file contains the default number, 35, which
is the number of days to keep. Data that is discarded during the cleanup, is appended to
the file /var/perf/tmp/.SM.discards. The cleansed data is kept in /var/perf/tmp/.SM.
One last backup is held in the file /var/perf/tmp/.SM.last.

Reporting component
The reporting component periodically produces a diagnostic report from the current set
of historical data. On a daily basis, PDT generates a diagnostic report and mails the
report (by default) to adm and writes it to /var/perf/tmp/PDT_REPORT. The previous
days report is saved to /var/perf/tmp/PDT_REPORT.last.
Any PDT execution errors will be appended to the file /var/perf/tmp/.stderr.

B-44 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Customizing PDT: Changing thresholds

# vi /var/perf/cfg/diag_tool/.thresholds

DISK_STORAGE_BALANCE 800
PAGING_SPACE_BALANCE 4
NUMBER_OF_BALANCE 1
MIN_UTIL 3
FS_UTIL_LIMIT 90
MEMORY_FACTOR .9
TREND_THRESHOLD .01
EVENT_HORIZON 30

Copyright IBM Corporation 2008

Figure B-23. Customizing PDT: Changing thresholds AW186.0

Notes:

Thresholds
The /var/perf/cfg/diag_tool/.thresholds file contains the thresholds used in analysis
and reporting. The visual shows the content of the default file. The file may be modified
by root or adm. Following is a list of all the thresholds:
- DISK_STORAGE_BALANCE
- PAGING_SPACE_BALANCE
- NUMBER_OF_BALANCE
- MIN_UTIL
- FS_UTIL_LIMIT
- MEMORY_FACTOR
- TREND_THRESHOLD
- EVENT_HORIZON

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

DISK_STORAGE_BALANCE (MB)
The SCSI controllers having the largest and smallest disk storage are identified. This is
a static size, not the amount allocated or free.The default value is 800. Any integer
value between zero (0) and 10000 is valid.

PAGING_SPACE_BALANCE
The paging spaces having the largest and the smallest areas are identified. The default
value is 4. Any integer value between zero (0) and 100 is accepted. This threshold is
presently not used in analysis and reporting.

NUMBER_OF_BALANCE
The SCSI controllers having the greatest and fewest number of disks attached are
identified.The default value is one (1). It can be set to any integer value from zero (0) to
10000.

MIN_UTIL (%)
Applies to process utilization. Changes in the top three CPU consumers are only
reported if the new process had a utilization in excess of MIN_UTIL. The default value is
3. Any integer value from zero (0) to 100 is valid.

FS_UTIL_LIMIT (%)
Applies to journaled file system utilization. Any integer value between zero (0) and 100
is accepted.

MEMORY_FACTOR
The objective is to determine whether the total amount of memory is adequately backed
up by paging space. The formula is based on experience and actually compares
MEMORY_FACTOR * memory with the average used paging space. The current
default is .9. By decreasing this number, a warning is produced more frequently.
Increasing this number eliminates the message altogether. It can be set anywhere
between .001 and 100.

TREND_THRESHOLD
Used in all trending assessments. It is applied after a linear regression is performed on
all available historical data. This technique basically draws the best line among the
points. The slope of the fitted line must exceed the last_value * TREND_THRESHOLD.
The objective is to try to ensure that a trend, however strong its statistical significance,

B-46 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty has some practical significance. The threshold can be set anywhere between 0.00001
and 100000.

EVENT_HORIZON (Days)
Also used in trending assessments. For example, in the case of file systems, if there is
a significant (both statistical and practical) trend, the time until the file system is 100%
full is estimated. The default value is 30, and it can be any integer value between zero
(0) and 100000.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Customizing PDT: Specific monitors

# vi /var/perf/cfg/diag_tool/.files

/var/adm/wtmp
Files and
/var/spool/qdaemon/
/var/adm/ras/
directories
/tmp/ to monitor

# vi /var/perf/cfg/diag_tool/.nodes

pluto
neptun
Systems
mars to monitor

Copyright IBM Corporation 2008

Figure B-24. Customizing PDT: Specific monitors AW186.0

Notes:

Specifying files and directories to monitor


By adding files and directories into the file /var/perf/cfg/diag_tool/.files, you can
monitor the sizes of these files and directories. Some files and directories to consider
adding are:
- /var/adm/wtmp which is a file used for login recording
- /var/spool/qdaemon which is a directory used for print spooler
- /var/adm/ras which is a directory used for AIX error logging

Specifying systems to monitor


By adding hostnames to /var/perf/cfg/diag_tool/.nodes you can monitor different
systems. By default, no network monitoring takes place, as the .nodes file must be
created.

B-48 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

PDT report example (part 1)


Performance Diagnostic Facility 1.0
Report printed: Sun Aug 21 20:53:01 2005
Host name: master
Range of analysis included measurements
from: Hour 20 on Sunday, August 21st, 2005
to: Hour 20 on Sunday, August 21st, 2005

Alerts

I/O CONFIGURATION
- Note: volume hdisk2 has 480 MB available for
allocation while volume hdisk1 has 0 MB available

PAGING CONFIGURATION
- Physical Volume hdisk1 (type:SCSI) has no paging space defined

I/O BALANCE
- Physical volume hdisk0 is significantly busier than others
volume hdisk0, mean util. = 11.75
volume hdisk1, mean util. = 0.00

NETWORK
- Host sys1 appears to be unreachable

Copyright IBM Corporation 2008

Figure B-25. PDT report example (part 1) AW186.0

Notes:

Disclaimer
Note that this is a doctored report example. Some sections have been deliberately
altered for enhanced dramatic effect; some small parts have been left out for simplicity.

Header section
The PDT report consists of several sections. The header section provides information
on the time and date of the report, the host name and the time period for which data
was analyzed. The content of this section does not differ with changes in the severity
level.

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Alerts section
After a header section, the Alerts section reports on identified violations of concepts and
thresholds. If no alerts are found, the section is not included in the report. The Alerts
section focuses on identified violations of applied concepts and thresholds. The
following subsystems may have problems and appear in the Alerts section:
- File system
- I/O configuration
- Paging configuration
- I/O balance
- Page space
- Virtual memory
- Real memory
- Processes
- Network
For severity 1 levels, the Alerts section focuses on file systems, physical volumes,
paging and memory. If you ask for severity 2 or 3 reporting, it adds information on
configuration and processes, as seen in the example in the visual.
Alerts indicate suspicious configuration and load conditions. In this example, it appears
that one disk is getting all the I/O activity. Clearly, the I/O load is not distributed to make
the best use of the available resources.

B-50 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

PDT report example (part 2)


Upward Trends

FILES
- File (or directory) /var/adm/ras/ SIZE is increasing
now, 364 KB and increasing an avg. of 5282 bytes/day
FILE SYSTEMS
- File system lv01(/fs3) is growing
now, 29.00% full, and growing an avg. of 0.30%/day
At this rate lv01 will be full in about 45 days

ERRORS
- Hardware ERRORS; time to next error is 0.982 days

System Health

SYSTEM HEALTH
- Current process state breakdown:
2.10 [0.5%]: waiting for the CPU
89.30 [22.4%]: sleeping
306.60 [77.0%]: zombie
398.00 = TOTAL
Summary
This is a severity level 1 report
No further details available at severity level >1
Copyright IBM Corporation 2008

Figure B-26. PDT report example (part 2) AW186.0

Notes:

Trends sections
The report then deals with Upward Trends and Downward Trends. These two sections
focus on problem anticipation rather than on the identification of existing problems. The
same concepts are applied, but used to project when violations might occur. If no trends
are detected, the section does not appear.
PDT employs a statistical technique to determine whether or not there is a trend in a
series of measurements. If a trend is detected, the slope of the trend is evaluated for its
practical significance. For upward trends, the following items are evaluated:
- Files
- File systems
- Hardware and software errors
- Paging space
- Processes
- Network

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

For downward trends the following can be reported:


- Files
- File systems
- Processes
The example Upward Trends section identifies a possible trend with file system growth
on Iv01. An estimate is provided for the date at which the file system will be full, based
on an assumption of linear growth.

System Health section


The System Health section gives an assessment of the average number of processes
in each process state on the system. Additionally, workload indicators are noted for any
upward trends.

Summary section
In the Summary section, the severity level of the current report is listed. There is also an
indication given as to whether more details are available at higher severity levels. If so,
an adhoc report may be generated to get more detail, using the
/usr/sbin/perf/diag_tool/pdt_report command.

B-52 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

Uempty

Unit summary

The following commands can be used to identify potential


bottlenecks in the system:
ps
sar
vmstat
iostat

If you cannot fix a performance problem, manage your


workload through other means (at, crontab, nice,
renice)
Use the Performance Diagnostic tool (PDT) to assess and
control your systems performance

Copyright IBM Corporation 2008

Figure B-27. Unit summary AW186.0

Notes:

Copyright IBM Corp. 2000, 2008 Appendix B. Performance and workload management B-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

B-54 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP Appendix C. 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 distrib- package Product
uted and installed as a unit
Logical grouping of packages bundle bundle
Logical grouping of packages and software Bundle offering, for example:
clusters App-Dev: Application Development
Environment
Client:
Pers-Prod
DCE-Client
Media-Defined

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

Copyright IBM Corp. 2000, 2008 Appendix C. Quick reference: HP-UX to AIX C-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Tasks AIX HP-UX


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

C-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

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 the sys- pdc: Firmware processor-dependent
tem mother board, perform Power-On code (pdc) is executed to verify hard-
Self-Test (POST), locate the boot image, ware and general system integrity.
load the boot image into memory, begin isl: The initial system loader is loaded
system initialization and execute phase 1 and executed. isl finds and executes the
of the /etc/rc.boot script autoexecute file.
Base Device Configuration: Start Config- hpux: boot image loaded and control is
uration Manager to configure base passed to the init process. /etc/inittab file
devices is read to complete initialization.
System Boot: Start init process phase 2,
switch to hard-disk root file system, start
other processes defined by records in the
/etc/inittab file and execute phase 3 of
the /etc/rc.boot script
Kernel modules directory Kernel and kernel extension modules are Kernel modules are stored in:
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 as
services for a current system run as defined in /etc/rc defined in /sbin/rc
level based on the /etc/inittab file.
System run levels Defined run levels: Defined run levels:
0-1: Reserved for future use 0: Halted.
2: Multiuser state with NFS resources S: Single user mode.
shared (default run level) 1: Minimal system configuration
3-9: Defined according to the users pref- 2: Multi-user mode.
erences 3: Exported file system
m,M,s,S: Single-user state (maintenance 4: HP-VUE
level) 5,6: Not currently used.
a,b,c: Starts processes assigned to the new
run levels while leaving the existing pro- Note: When entering from lower state, all
cesses at the current level running
Q,q: init command to reexamine the start scripts are executed. When entering
/etc/inittab file from higher state, all kill scripts are exe-
cuted
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 systems run level who -r who -r
Change a systems 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. 2000, 2008 Appendix C. Quick reference: HP-UX to AIX C-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 environment smit (smitty in non-GUI) or wsm sam

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 environment smit (smitty in non-GUI) or wsm sam
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

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 environment smit (smitty in non-GUI) or wsm sam
Check a file system fsck fsck
Mount a file system mount mount
Display available file-system space df -k bdf
List a volumes 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

C-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP Logical Volume Management


The following is a list of tasks that are used when performing logical volume management
in AIX and HP-UX. The information in this table includes HP-UX LVM and AIX 5L LVM.
Task AIX HP-UX
Storage Structure A disk is composed of physical partitions. A disk is composed of extends.(physical
A physical volume is the same thing as a partition in AIX).
disk. A physical volume is a hard disk.
A volume group is composed of physical A file system is placed onto a logical vol-
volumes. ume.
A volume group is divided into logical vol- A logical volume (similar to AIX logical
umes. volume) is composed of extends.
A file system is placed onto a logical vol- A volume group (similar to AIX volume
ume. group) is composed of physical volumes.
A volume group is divided into logical vol-
umes
Run multiple tasks in a GUI environment smit (smitty in non-GUI) or wsm sam
Move logical volume to another physical migratepv pvmove
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 storage mkvg vgcreate
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 structures Choose one of the following: pvdisplay
lspv lvdisplay
lsvg vgscan
lslv
Manage volume Choose one of the following: lvchange
chlv lvcreate
mklv lvremove
rmlv
Back up operating system mksysb (to tape or file) /opt/ignite/bin/make_recovery
or
mkcd (CD-ROM)
Restore operating system frestore

Copyright IBM Corp. 2000, 2008 Appendix C. Quick reference: HP-UX to AIX C-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

C-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP Appendix D. 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. 2000, 2008 Appendix D. Quick Reference: Solaris to AIX D-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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

D-2 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

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 the sys- Boot PROM: Display system informa-
tem mother board, perform Power-On tion, run POST, load bootblk, locate ufs-
Self-Test (POST), locate the boot image, boot
load the boot image into memory, begin Boot Programs: bootblk loads and exe-
system initialization and execute phase 1 cutes the ufsboot
of the /etc/rc.boot script Kernel Initialization: ufsboot loads and
Base Device Configuration: StartConfig- executes the core kernel, initializes core
uration Manager to configure base kernel data structures, loads other kernel
devices modules based on the /etc/system file,
System Boot: Start init process phase 2, starts /sbin/init program
switch to hard-disk root file system, start init: Starts other processes based on the
other processes defined by records in 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 are Kernel modules are stored in three directo-
stored in two directories: ries:
/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 as
services for a current system run as defined in /etc/rc defined in /etc/default/init.
level based on the /etc/inittab file.
System run levels Defined run levels: Eight run levels:
0-1: Reserved for future use 0: Power-down state
2: Multiuser state with NFS resources s or S: Single-user state
shared (default run level) 1: Administrative state
3-9: Defined according to the users pref- 2: Multiuser state
erences 3: Multiuser state with NFS resources
m,M,s,S: Single-user state (maintenance shared (default run level)
level) 4: Alternative multiuser (not in use)
a,b,c: Starts processes assigned to the new 5: Power-down state
run levels while leaving the existing pro- 6: Reboot state
cesses at the current level running
Q,q: init command to reexamine the
/etc/inittab file

Note: When a level from 1 to 9 is


specified, the init command kills all
processes at the current level and
restarts any processes associated with
the new run level based on the
/etc/inittab file.
Determine a systems run level who -r who -r

Copyright IBM Corp. 2000, 2008 Appendix D. Quick Reference: Solaris to AIX D-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Tasks AIX Solaris


Change a systems run level telinit level number Choose one of the following:
halt
init
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 environment smit (smitty in non-GUI) or wsm admintool

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

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 environment smit (smitty in non-GUI) or wsm N/A
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

D-4 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP 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 environment smit (smitty in non-GUI) or wsm N/A
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 volumes 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

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 environment smitty chjfs or wsm metatool
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

Copyright IBM Corp. 2000, 2008 Appendix D. Quick Reference: Solaris to AIX D-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 partitions. A disk is composed of partitions/slices.
A physical volume is the same thing as a A file system is placed onto a partition.
disk. A subdisk (somewhat similar to AIX physi-
A volume group is composed of physical cal partition) is composed of parti-
volumes. tions/slices.
A volume group is divided into logical vol- A plex (similar to AIX logical partition) is
umes. composed of subdisks.
A file system is placed onto a logical vol- A volume (similar to AIX logical volume)
ume. is composed of plexes.AVM disk is com-
posed of subdisks.
A disk group (similar to AIX volume
group) is composed of VM disks.g
Run multiple tasks in a GUI environment smit (smitty in non-GUI) or wsm vxva
Move logical volume to another physical migratepv vxassist move
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 disk N/A vxbootsetup
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
Administer disks reducevg vxdiskadm
or
extendvg
Set up disks extendvg vxdisksetup
Change logical volume settings chlv vxedit set
Create configuration records for storage mkvg vxmake
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 structures Choose one of the following: vxstat
lspv
lsvg
lslv
Manage volume Choose one of the following: vxvol
chlv
mklv
rmlv

D-6 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1
Student Notebook

AP Task AIX Solaris


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. 2000, 2008 Appendix D. Quick Reference: Solaris to AIX D-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

D-8 AIX 6 for UNIX Professionals Copyright IBM Corp. 2000, 2008
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.1

backpg
Back page

Вам также может понравиться