You are on page 1of 860

V3.1.0.

cover

 Front cover

AIX 5L Jumpstart for


UNIX Professionals
(Course Code AW18)

Student Notebook
ERC 5.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 Blue Gene
Chipkill CICS/6000 DB2
DB2 Universal Database eServer Electronic Service Agent
Informix iSeries LoadLeveler
Lotus Magstar Micro Channel
OS/400 Parallel Sysplex POWER2
POWER3 POWER4 POWER4+
POWER5 POWERparallel PowerPC
PowerPC Architecture PowerPC 601 pSeries
Redbooks RISC System/6000 RS/6000
SP ThinkVantage Tivoli
TotalStorage WebSphere
Adobe and Acrobat are tradmarks of Adobe Systems Inc.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft and Windows 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.
Linux is a registered trademark of Linus Torvalds in the United States and other countries.
Other company, product and service names may be trademarks or service marks of others.

December 2005 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, 2005. 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.
V3.1.0.1
Student Notebook

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

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

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

Unit 1. System Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
IBM System p5 Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
IBM System p5 Servers Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
p5-520 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
p5-570 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
p5-590, p5-595 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
I/O Drawer Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Example I/O Drawer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Service Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Hardware Management Console (HMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
HMC Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
IBM eServer Cluster 1600 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
High Availability Server Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
What is a Partition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
Physical Partition (PPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
Logical Partition (LPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-30
Partition Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
Partition Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
Logical Partition Resource Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
IBM System p5 LPAR-capable Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
POWER Hypervisor Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
The Big Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
Advanced Partition Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42
Dynamic Partitioning (DLPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43
Processor Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
Micro-Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-47
Virtual I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48
Virtual I/O Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-50
Capacity on Demand (CoD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-52
Advanced POWER Virtualization Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-54
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-56
Exercise: System Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-57
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-58

Unit 2. Installation and Initial Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Installation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

Copyright IBM Corp. 2000, 2005 Contents iii


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

Installation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-5


Console and Language Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-7
Installation and Maintenance Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-9
Installation and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10
Method of Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-11
Installation Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13
Erasure Options for Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-14
Primary Language Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16
Install Options for 32-bit Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
Install Options for 64-bit Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
Install More Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-21
Begin Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22
Installation Flowchart - All Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-23
Configuration Assistant Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-24
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-26
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27

Unit 3. System Management Tools and Documentation . . . . . . . . . . . . . . . . . . 3-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2
3.1 System Management Interface Tool (SMIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Topic 1 Objectives: System Management Interface Tool (SMIT) . . . . . . . . . . . . . . .3-4
AIX Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
System Management Interface Tool (SMIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7
SMIT Main Menu (ASCII) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
SMIT Main Menu (Motif) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11
Dialog Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Output Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16
SMIT Log and Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
smit Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19
Lets Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21
3.2 Configuring AIX Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Topic 2 Objectives: Configuring AIX Documentation . . . . . . . . . . . . . . . . . . . . . . .3-24
Configuring AIX 5L V5.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25
Configuring AIX 5L V5.3 Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .3-26
Change/Show Documentation Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-28
IBM pSeries Information Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30
Information Center Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
Information Center Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-33
Lets Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34
3.3 Web-based System Manager (WebSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35
Topic 3 Objectives: Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . .3-36
Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37
Accessing the Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39
Using the Web-based System Manager (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42
Using the Web-based System Manager (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43
Using the Web-based System Manager (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44
Installation for a Remote Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45

iv AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005


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

TOC Configure the HTTP (Web) Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48


Remote Client Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
HMC Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51
Remote Access to the HMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53
HMC Application Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56
Exercise: System Administration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58

Unit 4. Software Installation and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
AIX Product Offerings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Packaging Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Fileset Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Software Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Software States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Software Installation and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Install and Update Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Install Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Software Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
List Installed Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
Fix Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Fix Central Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21
More Fix Services Screen (from Fix Central) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Compare Report Screen (from Fix Central) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Comparison Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
Software Service Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Software Maintenance and Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
instfix Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38
Exercise: AIX Software Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-39
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-40

Unit 5. Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Listing of /dev Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Device Configuration Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
List All Supported Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
List All Defined Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Device States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Self-Configuring Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
SMIT Devices Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Device Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
Location Code Format for PCI Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Location Code Example: Non-SCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Location Code Format for SCSI Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
Location Code Example for SCSI Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25

Copyright IBM Corp. 2000, 2005 Contents v


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

Location Code Example: PCI and ISA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26


pSeries 690 Location Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Listing Device Physical Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-29
Adding an ASCII Terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-30
Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-31
Device Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-33
Add a TTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-34
Documenting Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-36
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-38
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-39
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-40

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


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
6.1 Introduction to the ODM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
What Is the ODM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-4
Data Managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-5
ODM Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-7
ODM Database Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-8
Device Configuration Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-11
Location and Contents of ODM Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-12
How ODM Classes Act Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-14
Data Not Managed by the ODM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-15
Lets Review: Device Configuration and the ODM . . . . . . . . . . . . . . . . . . . . . . . . .6-16
ODM Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-17
Changing Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-19
Using odmchange to Change Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-21
6.2 ODM Database Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
Software Vital Product Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-24
Software States You Should Know About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-26
Predefined Devices (PdDv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-28
Predefined Attributes (PdAt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-32
Customized Devices (CuDv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-34
Customized Attributes (CuAt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-37
Additional Device Object Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-38
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-40
Exercise: The Object Data Manager (ODM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-41
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-42

Unit 7. System Boot: Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
AIX Startup Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-3
Loading the Boot Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-4
Boot Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7
Creating the Boot Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-10
How to Fix a Corrupted BLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-13

vi AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005


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

TOC Working with Boot Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16


Starting System Management Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Working with Boot Lists in SMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Service Processors and Boot Failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Accessing a System That Will Not Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24
Booting in Maintenance Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26
Working in Maintenance Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27
Progress and Error Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29
Firmware Checkpoints and Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Firmware Fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33
Getting Firmware Updates from the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-35
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-37
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-38
Exercise: System Boot: Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-39
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-40

Unit 8. System Boot: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
AIX 5L Startup Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
AIX 5L Initialization Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
rc.boot 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
rc.boot 2 (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
RAM File System and rootvg (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
rc.boot (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
RAM File System and rootvg (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
rc.boot 3 (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
rc.boot 3 (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
rc.boot Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18
Boot Problem Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-20
Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-23
Config_Rules Object Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-25
Device Names and CD-ROM Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-27
The alog Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-29
System Hang Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-32
Configuring shdaemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-34
System Resource Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-36
Using the System Resource Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-37
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-38
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-39
Exercise: System Boot: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-40
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-41

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


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
9.1 LVM Terminology and Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Logical Volume Manager Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Normal and Big Volume Group Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7

Copyright IBM Corp. 2000, 2005 Contents vii


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

Scalable Volume Groups - AIX 5L V5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-9


Configuration Limits for Volume Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-11
Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Striping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14
Mirroring and Striping with RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16
Common RAID Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
9.2 LVM Data Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21
LVM Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
LVM Data on Disk Control Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
LVM Data in the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-26
Contents of the VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-27
VGDA Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-29
The Logical Volume Control Block (LVCB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-32
How LVM Interacts with ODM and VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-34
ODM Entries for Physical Volumes (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-36
ODM Entries for Physical Volumes (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-37
ODM Entries for Physical Volumes (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-38
ODM Entries for Volume Groups (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-39
ODM Entries for Volume Groups (2 of 2)) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-40
ODM Entries for Logical Volumes (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-41
ODM Entries for Logical Volumes (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-42
ODM-Related LVM Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-43
Fixing ODM Problems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-45
Fixing ODM Problems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-47
9.3 Working with Volume Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-51
SMIT LVM Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-52
SMIT Volume Groups (VG) Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-54
List All Volume Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-55
List Volume Group Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-56
List VG Information (Physical Volumes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-57
List VG Information (Logical Volumes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-58
Add a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-59
Add a Scalable Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-61
Set Characteristics of a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-62
Change a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-63
Logical Track Group (LTG) Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-65
Hot Spare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-68
Extending and Reducing Volume Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-71
Remove a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-73
Activate/Deactivate a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-74
Import/Export a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-76
Advanced RAID Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-77
9.4 Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-79
Logical Volume Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-80
SMIT Logical Volumes Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-82
Show Logical Volume Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-83
Add a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-85

viii AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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


Set Characteristics of a Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-87
List All Logical Volumes By Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-89
Show Logical Volume Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-90
Reorganize a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-91
9.5 Physical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-93
SMIT Physical Volumes Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-94
List Physical Volume Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-95
List Logical Volumes on a Physical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-96
List a Physical Volume Partition Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-97
Add or Move Contents of Physical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-98
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-100
Exercise: The Logical Volume Manager (LVM) . . . . . . . . . . . . . . . . . . . . . . . . . . 9-101
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-102

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


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
10.1 Mirroring and Quorum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Tracking Information about Mirrors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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-25
Nonquorum Volume Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27
Forced Varyon (varyonvg -f) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29
Physical Volume States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31
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-51
10.3 Export and Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-53
Exporting a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-54
Importing a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-56

Copyright IBM Corp. 2000, 2005 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 Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-58


importvg and Existing File Systems (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-59
importvg and Existing File Systems (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-61
importvg -L (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-63
importvg -L (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-65
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-66
Exercise: Storage Management with LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-67
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-68

Unit 11. Working with File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1


Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2
Logical Volumes and File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-3
Supported File System Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-5
Standard File Systems in AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-7
/etc/filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-9
Structure of a Journaled File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-11
Structure of an Inode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-13
File System Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-14
Variable Number of Inodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-16
Allocation Group Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-18
Compressed File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-20
Large File Enabled File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-22
Journal Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-24
JFS versus JFS2 File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-26
Extended Attributes (EA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-29
File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-31
Listing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-32
List All Mounted File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-34
Add/Change/Show/Delete File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-36
Working with Journaled Files Systems in SMIT . . . . . . . . . . . . . . . . . . . . . . . . . .11-37
Add a Standard Journaled File System on a Previously Defined Logical Volume 11-38
Add a Standard Journaled File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-40
Working with Enhanced Journaled File Systems (JFS2) in SMIT . . . . . . . . . . . .11-43
Add an Enhanced Journaled File System (JFS2) on a Previously Defined Logical
Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-44
Add an Enhanced Journaled File System (JFS2) . . . . . . . . . . . . . . . . . . . . . . . . .11-46
Mount a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-47
Change/Show Characteristics of a Journaled File System . . . . . . . . . . . . . . . . . .11-50
Change/Show Characteristics of an Enhanced Journaled File System . . . . . . . .11-52
Dynamically Shrinking a JFS2 File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-53
Remove a Journaled File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-55
Add a RAM File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-57
Add a UDF File System on a DVD-RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-58
System Storage Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-60
Listing Free Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-62
Control Growing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-64
The skulker Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-66
Listing Disk Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-68

x AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005


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

TOC Fragmentation Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-70


Defragmenting a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-72
Verify a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-74
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-76
Exercise: Working with File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-77
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-78

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: 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 the System to Tape or 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 the System to CD (ISO9660) . . . . . . . . . . . . . . . . . . . . . . . . . . 13-37
rootvg - Back Up the System to ISO9660 DVD . . . . . . . . . . . . . . . . . . . . . . . . . . 13-38
rootvg - Back Up the 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, 2005 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
Back Up a File or a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-47
Back Up a File System by Inode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-48
Back Up a File System by Inode Using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-50
restore Command (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-51
restore Command (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-53
Restore a File or a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-54
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-55
Exercise: Using backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-56
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-57

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

xii AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

TOC Self-made Error Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-22


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 syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-33
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-34
Exercise: Error Logging and syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-35
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36

Appendix A. Checkpoint Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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-7
Identify High Priority Processes: ps -elf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-9
Monitoring CPU Usage: sar -u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11
AIX Tools: tprof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-13
Monitoring Memory Usage: vmstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-15
AIX Tools: svmon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-17
Monitoring Disk I/O: iostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-19
AIX Tools: filemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-21
topas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-23
There Is Always a Next Bottleneck! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-24
Workload Management Techniques (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-25
Workload Management Techniques (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-26
Workload Management Techniques (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-28
Simultaneous Multi-Threading (SMT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-30
Tool Enhancements for Micro-Partitioning (AIX 5L V5.3) . . . . . . . . . . . . . . . . . . . B-32
Performance Diagnostic Tool (PDT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-35
Enabling PDT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-37
cron Control of PDT Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-39
PDT Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-41
Customizing PDT: Changing Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-43
Customizing PDT: Specific Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-46
PDT Report Example (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-47
PDT Report Example (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-49
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-51

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

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

Copyright IBM Corp. 2000, 2005 Contents xiii


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

xiv AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 Blue Gene
Chipkill CICS/6000 DB2
DB2 Universal Database eServer Electronic Service Agent
Informix iSeries LoadLeveler
Lotus Magstar Micro Channel
OS/400 Parallel Sysplex POWER2
POWER3 POWER4 POWER4+
POWER5 POWERparallel PowerPC
PowerPC Architecture PowerPC 601 pSeries
Redbooks RISC System/6000 RS/6000
SP ThinkVantage Tivoli
TotalStorage WebSphere
Adobe and Acrobat are trademarks of Adobe Systems Inc.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft and Windows 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.
Linux is a registered trademark of Linus Torvalds in the United States and other countries.
Other company, product and service names may be trademarks or service marks of others.

Copyright IBM Corp. 2000, 2005 Trademarks xv


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

xvi AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

pref Course Description


AIX 5L Jumpstart for UNIX Professionals

Duration: 5 days

Purpose
The purpose of this course is to add to the UNIX system
administrators skills the necessary information to install, customize,
and administer the AIX 5L Version 5.3 operating system.

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

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

Copyright IBM Corp. 2000, 2005 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 should be able to:
Describe how to install the AIX 5L Version 5.3 operating system
Understand 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: AIX 5L V5.3 Installation and Initial Configuration
Unit 3: System Management Tools and Documentation
Unit 4: Software Installation and Maintenance
Unit 5: Devices
Unit 6: ODM
Unit 7: System Boot: Hardware
Unit 8: System Boot: Software
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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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,
and identifies parameters whose actual names or values are to
be supplied by the user.
Monospace Identifies attributes, variables, file listings, SMIT menus, code
examples and command output that you would see displayed
on a terminal, and messages from the system.
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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005


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

pref Agenda
Day 1
Welcome
Unit 1 - System Hardware Overview
Exercise 1 - System Hardware Overview
Unit 2 - Installation and Initial Configuration
Unit 3 - System Management Tools and Documentation
Exercise 2 - System Management Tools and Documentation

Day 2
Unit 4 - Software Installation and Maintenance
Exercise 3 - Software Installation
Unit 5 - Devices
Unit 6 - The Object Data Manager (ODM)
Exercise 4 - The Object Data Manager (ODM)
Unit 7 - System Boot: Hardware
Exercise 5 - System Boot: Hardware

Day 3
Unit 8 - System Boot: Software
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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 1. System Hardware Overview

What This Unit Is About


This unit is an introduction to the IBM System p5 product range,
including workstations, workgroup servers, enterprise servers, and
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, Sserver p5, and pSeries 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, 2005 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, eServer p5 and pSeries
servers

Describe the features of logical partitioning

Copyright IBM Corporation 2005

Figure 1-1. Unit Objectives AW185.0

Notes:

1-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
IBM System p5 Family
pSeries and iSeries hardware convergence at POWER5
Both support mix of AIX 5L, Linux, and i5/OS operating
systems
All support Advanced POWER Virtualization features
Entry systems: 1- to 4-way processor systems
p5-505, p5-520, p5-550
Mid-range systems: 2- to 16-way processor systems
p5-570
High end systems: 8- to 64-way processor systems
p5-575, p5-590, p5-595
g
Scalin
-way
1- to 64
s
p5-505 System p5-595

Copyright IBM Corporation 2005

Figure 1-2. IBM System p5 Family AW185.0

Notes:

Introduction
With the introduction of POWER5, the pSeries and iSeries 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 iSeries and pSeries managed
systems.
The machine type and model numbers shown in the visual above are specific to the
Sserver p5 systems. There are differences between the Sserver p5 and Sserver i5
systems in packaging and licensing. Check the http://www.ibm.com Web site for the
most up-to-date information.
Not all system models support all three operating systems.

Copyright IBM Corp. 2000, 2005 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

Hardware Management Console (HMC) required for LPAR management


and CoD
An IBM 7310-CR3 rack-mounted HMC or 7310-C04 desktop HMC is required to
manage partitions or use Capacity on Demand (CoD). Older model HMCs can have a
software upgrade to support POWER5 managed systems. Multiple partitions and
multiple POWER5 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 POWER5 systems, but it cannot support a mixture of
POWER4 and POWER5 systems.

1-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 1-3. IBM System p5 Servers Information AW185.0

Notes:

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

Copyright IBM Corp. 2000, 2005 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

p5-520 Overview
Rack-mount (19 4U)

1- or 2-way 1.65 GHz processors


1 32 GB memory
8 internal disks (up to 2.4 TB)
6 system PCI-X slots
Supports up to four I/O drawers
Deskside
Up to 14.4 TB disk
Up to 20 LPARs

Copyright IBM Corporation 2005

Figure 1-4. p5-520 Overview AW185.0

Notes:

Introduction
The p5-520 is 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 unit provided that the rack conforms to the EIA-310-D standard.
Eight hot-swap disk bays and six-hot swap PCI-X slots, and 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 Advanced POWER
Virtualization (feature code 7940 for the p5-520). Without this feature, dedicated
processors must be used, so a maximum of two partitions is supported.

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

Uempty Clusters support


The p5-520 is one of the hardware models supported with the IBM Sserver pSeries
Cluster 1600 running Cluster Systems Management (CSM) V1.4 for AIX 5L or Linux. An
HMC is required for hardware control using CSM.

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 is supported. Memory DIMMS must
be installed in certain slots; refer the Technical Overview redpaper for details and sizes.

System components
The symmetric multiprocessor (SMP) uses a 2-way, 64-bit, copper-based POWER5
microprocessor running at 1.65 GHz. The 2-way processor has 1.9 MB L2 cache and
36 MB of Level 3 cache.
The p5-520 contains 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 August 2005:
- 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, 5. If two 4-packs are installed, disks are filled

Copyright IBM Corp. 2000, 2005 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

in slots in this order: 4, 7, 3, 6, 2, 5, and 1. This balancing is for manufacturing test


purposes only and not because of 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
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.

I/O slot configuration


The six PCI-X slots are configured in this way.
- Slot 1 is short, 64-bit, and runs at 133 MHz
- Slots 2 and 3 are short 32-bit, 3.3 V, and run at 66 MHz (64-bit adapters are not
allowed in 32-bit slots.)
- Slots 4, 5 and 6 are long, 64-bit, 3.3 V, and run at 133 MHz

USB 2.0 ports


The two USB ports can be used for a keyboard, mouse, or diskette drive. A USB
adapter can also be purchased to attach more USB devices.

Ethernet ports
The internal dual port 10/100/1000 Mbps RJ-45 Ethernet controller is integrated on the
system planar. Both ports must be allocated to the same partition.

Serial ports
The two serial ports are only available if the system is not being managed by an HMC. If
an HMC is connected, a virtual serial console is provided by the HMC (logical device
vsa0).

System Power Control Network (SPCN) ports


The SPCN is used to control and monitor the status of power and cooling within the I/O
drawer. The SPCN is a loop, the cabling starts from the first SPCN port on the p5-520
system to the SPCN port 0 on the first drawer. The loop is closed connecting the SPCN
port 1 of the I/O drawer to the port 1 on the p5-520 system. For more than one drawer,
you continue the loop connecting the next drawer(s) with the same rule. See the
Technical Overview redpaper for details.

1-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty p5-520 Express system


The p5-520 system is also sold as the p5-520 Express system which has one-way and
two-way processor options. See http://www.ibm.com for the available options.

Copyright IBM Corp. 2000, 2005 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

p5-570 Overview

2, 4, 8, 12, 16-way 1.65 GHz or


1.9 GHz processors
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 2005

Figure 1-5. p5-570 Overview AW185.0

Notes:

Model 570 components


The p5-570 uses a rack-mounted server drawer as its basic building block and can be
configured with one to four drawers in a single rack that are cabled together to create a
single symmetric multiprocessing (SMP) system.
With two processor card positions per drawer, the Model 570 is available in 2-, 4-, 8-,
12-, and 16-way configurations. One of the main p5-570 differences from the entry level
models, is that the processors are installed in cards rather than on a planar.
The processor cards have 64-bit, POWER5 microprocessors running at either 1.5 GHz,
1.65 GHz, or 1.9 GHz. The 1.5 GHz processor option is available only as 2-, 4-, or
8-way.
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.

1-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Other integrated features include:


- Service processor
- Two 10/100/1000 Ethernet ports per drawer
- 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-way p5-570, is supported with the purchase of the
Advanced POWER Virtualization (feature code 7942 for the p5-570). Without this
feature, dedicated processors must be used, so a maximum of one partition per
physical processor is supported.

Memory
The minimum amount of memory per p5-570 system drawer is 2 GB. The maximum
using DDR1 memory DIMM technology is 512 GB (128 GB per drawer). Memory
DIMMS must be installed in quads where all four DIMMS are identical.

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 2, 3, or 4 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 (4-way 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,
upgradability and serviceability enhancements in the future.

Copyright IBM Corp. 2000, 2005 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

I/O drawer maximums


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

1-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
p5-590, p5-595 Overview
p5-590
8-, 16-, 24- or 32-way 1.65 GHz
processors
8 GB to 1 TB memory
Up to 8 I/O drawers
Up to 254 partitions
160 PCI-X slots
128 disks for (9.3 TB)

p5-595 differences
16 to 64-way 1.65 GHz or 1.9
GHz POWER5 processors
Up to 2 TB memory
Up to 12 I/O drawers
Rack-mount (24 42U)

Copyright IBM Corporation 2005

Figure 1-6. p5-590, p5-595 Overview AW185.0

Notes:

p5-590 Overview
The p5-590 uses an 8-, 16-, 24- or 32-way Multi-chip Module (MCM) symmetric
multiprocessing (SMP) design. It supports up to 254 partitions and up to 8 I/O drawers,
with the first one required. Mainframe-inspired RAS features on this system include
selective dynamic firmware updates, redundant service processor, and redundant
power subsystem with 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 an 16-, 24-, 32-, 40-, 48-, 56- or 64-way MCM SMP design. It also supports up to
254 partitions, but it can support up to 12 I/O drawers. The p5-595 also offers the option
of 1.9 GHz POWER5 processors. There are no physical differences between the
p5-590 backplane and the p5-595 backplane.

Copyright IBM Corp. 2000, 2005 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

MCM overview
POWER5 chips can be packaged in different ways such as multichip 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-way building block with four POWER5 chips (8 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-way and more than 4 I/O drawer configurations.

I/O drawers
The I/O drawers provide internal storage and I/O connectivity to the system. 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
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 6 single-looped drawers or 3 dual-looped drawers.
- Two processor books support 8 (p5-590) or 12 (p5-595) single-looped drawers or 9
(p5-595) dual-looped drawers.
- Three processor books on a p5-595 support 12 single-looped drawers or 9
dual-looped drawers.

1-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

I/O Drawer Options


7311 Model D20 (p5-520, 550, 570)
12 disks and 7 PCI-X slots

7311 Model D11 (p5-570)


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


http://www.ibm.com for more information

Copyright IBM Corporation 2005

Figure 1-7. I/O Drawer Options AW185.0

Notes:

I/O drawers
These drawers, using the standard and optional RIO-2 ports, are supported by the
systems listed in the visual above.

1-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 1-8. Example I/O Drawer AW185.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.
This drawer is also supported by the p5-570. The 570 (if configured with 4 processor
drawers) supports up to 20 of these.
Disks 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 standard configuration of the drawer comes with one hot-pluggable power supply.
An optional redundant power supply may be configured.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 1-9. Service Processor AW185.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 PowerPC 405GP
processor running the service processor internal operating system which contains
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,
several remote power controls, environmental monitoring (only critical errors are
supported under Linux), reset, and boot features, remote maintenance and diagnostic

1-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 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
which provide terminal access to the service processor. Serial port 1 will give access to
the Advanced System Management Interface (ASMI) and port 2 will receive only boot
sequence information. When the HMC is connected, the serial ports are disabled.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 1-10. Hardware Management Console (HMC) AW185.0

Notes:

HMC description
The HMC is a PC-based console that is available in a desktop or a 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 Sserver i5 systems.
There are desktop and rack-mount models of HMCs, all with the machine type of 7310.
Desktop models have the model numbers C01, C02, C03, and C04 as of August 2005.
Rack-mount models have model numbers CR2 and CR3 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.

1-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Remote access to the HMC functions


Remote access to the HMC application is provided by using the Web-based System
Manager (WebSM). The WebSM client runs on Microsoft Windows PCs and on Linux
and AIX 5L workstations. 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 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.

Copyright IBM Corp. 2000, 2005 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

HMC Interface

Navigation pane Content pane

Copyright IBM Corporation 2005

Figure 1-11. HMC Interface AW185.0

Notes:

HMC interface
The HMC application is split into two window panes. The navigation pane on the left
side allows you to access the individual applications. The content pane on the right side
gives access to the application options.
In the visual above, the example shows the Server Management application which
allows you to create, configure, and manage partitions. In this example, the HMC is
connected to one managed system named lou. The managed system has three
partitions listed in the content pane, one of which is running. You can see other HMC
applications listed in the navigation pane.

1-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
IBM Sserver Cluster 1600

IBM

IBM

pSeries

server

IBM

HMC HMC

Copyright IBM Corporation 2005

Figure 1-12. IBM eServer Cluster 1600 AW185.0

Notes:

Introduction
A cluster is made up of two or more interconnected servers, or logical partitions
(LPARs) of servers, which are aggregated together and managed as a single, unified
computing resource. The combined power of the cluster can be dedicated to a single,
very large corporate data warehouse. Relational database management software, such
as DB2 Universal Database or Oracle, are designed to take advantage of modular
cluster architectures to accommodate growth. Database capacity can easily be scaled
up incrementally and non-disruptively.

Cluster 1600
A Cluster 1600 can be built using the latest, most powerful IBM pSeries servers,
including the pSeries 690, 670, 655, 650 and 630.

Copyright IBM Corp. 2000, 2005 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

CSM Cluster
With the release of AIX 5L Version 5.3 and CSM v1.4, the Sserver p5 servers p5-520,
p5-550, and p5-570 can be included in a CSM cluster. Many of these pSeries servers
can be logically partitioned, providing even more flexibility in the way computing
resources are mapped to applications.

Configuration options
New pSeries servers can e added to existing clusters which include RS/6000 SP
systems or RS/6000 servers for excellent investment protection.

1-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
High Availability Server Solutions

Duplicate Servers
Disk Subsystems
High Availability Software (HACMP)
Service Processor
Redundant Power and Cooling
AIX Operating System

Estimated average system availability = 99.999%


(Less than six minutes annual unplanned downtime -
unplanned system failures and outages)

Copyright IBM Corporation 2005

Figure 1-13. High Availability Server Solutions AW185.0

Notes:

Introduction
Availability of hardware and software resources is critical to many enterprises, who
cannot afford for their applications (ERP, e-business, data warehouses, and so forth) to
be unavailable.

High availability server solutions


The RS/6000 HA50, HA-H70, HA-pSeries 640, HA-F80, HA-M80, HA-S70 Advanced,
HA-H80 Cluster Servers are special package-priced, high-availability solutions which
consists of:
- Duplicate Servers
- Disk Systems
- HACMP/ES high-availability cluster software

Copyright IBM Corp. 2000, 2005 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

- AIX operating system


Each server also incorporates redundancy features, such as: mirrored hot swap disks,
service processors and redundant power.

1-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 1-14. What is a Partition? AW185.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, 2005 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

Physical Partition (PPAR)


Physical partition
Resources are allocated in physical building blocks
Blocks contain groups of processors, memory, 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 2005

Figure 1-15. Physical Partition (PPAR) AW185.0

Notes:

Introduction
This page defines physical partitioning which we will contrast with logical partitioning on
the next visual. IBM pSeries systems 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 1, 2, or 3 partitions each made up of one or
more entire building blocks. The size of the building blocks depends on the vendor and
system model.

1-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

Logical Partition (LPAR)


A partition is the allocation of system resources to create
logically separate systems within the same physical footprint
A logical partition is 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

ORDEMEP

AIX 5L Linux AIX 5L i5/OS

Copyright IBM Corporation 2005

Figure 1-16. Logical Partition (LPAR) AW185.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-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 Sserver p5 systems, this includes the software used by the
Flexible Service Processor (FSP) and the POWER Hypervisor.

Copyright IBM Corp. 2000, 2005 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

Partition Characteristics
Each partition has its own:
Operating system
Licensed Internal Code (LIC) / Open Firmware
Console
Resources
And other things expected in a standalone operating
system environment:
Problem logs
Data (libraries, objects, file systems)
Performance characteristics
Network identity
Date and time

Copyright IBM Corporation 2005

Figure 1-17. Partition Characteristics AW185.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 is the same then 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-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 1-18. Partition Resources AW185.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 8 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 on Sserver p5 systems.

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.

Copyright IBM Corp. 2000, 2005 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

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. 1.0 processing units is equivalent
to the processing power of one processor. 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, for example, 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-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty POWER4 and POWER5-based servers comparison


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

Copyright IBM Corp. 2000, 2005 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

Logical Partition Resource Example


Flexibility to allocate resources depending on need
With DLPAR operations, resources can be moved, removed or
added with a restarting the partition

LPAR 1 LPAR 2 LPAR 3 LPAR 4

Processors

Memory

I/O Slots

Copyright IBM Corporation 2005

Figure 1-19. Logical Partition Resource Example AW185.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 theyre 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-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
IBM System p5 LPAR-capable Systems
IBM System p5 models LPAR-capable systems
p5-505 (9110-505)
p5-520 (9111-520)
p5-550 (9113-550)
p5-570 (9117-570)
p5-575 (9118-575)
p5-590 (9119-590)
p5-595 (9119-595)

Copyright IBM Corporation 2005

Figure 1-20. IBM System p5 LPAR-capable Systems AW185.0

Notes:

Introduction
This visual shows the IBM System p5 systems which support logical partitioning. The
p5 systems support AIX 5L and Linux, with certain models also supporting i5/OS.

p5 Express Systems
The IBM System p5 Express Systems are specially priced Value Pak offerings of
various system models which provide pre-configured solutions with financial incentives
for processor, memory and disk storage.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 1-21. POWER Hypervisor Functions AW185.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-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 1-22. The Big Picture AW185.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 via an Ethernet connection to the
service processor. The service processor is a separate, independent processor that

1-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corp. 2000, 2005 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

Advanced Partition Features

Dynamic resource allocation


Advanced processor concepts
Virtual I/O
Capacity on Demand

Copyright IBM Corporation 2005

Figure 1-23. Advanced Partition Features AW185.0

Notes:

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

POWER4 and POWER5-based servers comparison


POWER4-based servers have dynamic allocation of resources, although there are new
dynamic options in the POWER5-based servers.
The advanced processor configuration options and virtual I/O are new features for
POWER5-based servers.
POWER4-based servers also have Capacity on Demand, however, the features have
been enhanced on the POWER5-based servers.

1-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 1-24. Dynamic Partitioning (DLPAR) AW185.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, 2005 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

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 via 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
which 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 application(s).

1-44 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Processor Concepts
Logical

LPAR LPAR LPAR Virtual

Shared

Dedicated

Inactive
(CoD)

Deconfigured

Physical
(Installed)

Copyright IBM Corporation 2005

Figure 1-25. Processor Concepts AW185.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 of 1.0 of a physical processor. 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, 2005 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

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. Theres 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. Other partitions will not use any time slices on those
processors while that partition is active. Shared processors are put into a shared pool.
Partitions use processing units from that pool as needed within configuration guidelines.

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, then each virtual
processor is utilized as if it were two processors.

POWER4 and POWER5-based servers comparison


POWER4-based servers may have deconfigured and CoD processors. Processors are
dedicated when allocated to a partition. Shared and virtual processors are new for
POWER5-based servers.

1-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
10ms
Partition 3
Partition 4
Partition 5
Partition 6
Partition 7

Shared Processing Pool


Copyright IBM Corporation 2005

Figure 1-26. Micro-Partitioning AW185.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. Dont worry! Well 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, 2005 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

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 2005

Figure 1-27. Virtual I/O AW185.0

Notes:

Virtual I/O basics


Each partition, by default, is configured to support ten 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-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Virtual Ethernet


Virtual Ethernet provides the same function as using an Ethernet adapter and is
implemented via 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, 2005 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

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 2005

Figure 1-28. Virtual I/O Example AW185.0

Notes:

Client/server relationship
Virtual I/O devices provide for 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-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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
Advanced POWER Virtualization feature. It supports AIX 5L Version 5.3 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, 2005 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

Capacity on Demand (CoD)


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
Ability to activate processor or memory resources
temporarily
Reserve CoD
Processors automatically added to Add Reserve
Resources
shared pool as needed
Prepaid for certain number of days

Copyright IBM Corporation 2005

Figure 1-29. Capacity on Demand (CoD) AW185.0

Notes:

Introduction to CoD
CoD is a list of features which may be purchased for some of the Sserver p5 models.
The main bullets in the visual above list purchasing options. These options are
managed from the HMC and require a license key to activate.
Capacity 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 days at no additional cost to allow testing and
emergency relief while the customer processes the purchase of permanent CUoD
resources.
On/Off CoD provides temporary additional processor or memory resources. Activity is
reported to IBM monthly and there must be an On/Off Capacity agreement.

1-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Reserve CoD adds reserve processor capacity to the shared processor pool. There
must be a prepaid debit agreement for a set number of days and the customer is
charged when the workload uses more than 100% of the (non-CoD) base.

Reference
For more information, visit the IBM web site (www.ibm.com) and search for CoD or
use this link: http://www-1.ibm.com/servers/eserver/pseries/ondemand/cod/types.html

Copyright IBM Corp. 2000, 2005 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

Advanced POWER Virtualization Feature


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
Virtual I/O Server software
Shared Ethernet Adapter
Virtual SCSI
Partition Load Manager software
Operating systems which support this feature (as a client)
AIX 5L for POWER V5.3

Copyright IBM Corporation 2005

Figure 1-30. Advanced POWER Virtualization Feature AW185.0

Notes:

Feature description
The Advanced POWER Virtualization feature provides:
- Shared processor pool and Micro-Partitioning
- Virtual I/O Server software for sharing virtual SCSI and Shared Ethernet adapters
- 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. http://www.912.ibm.com/pod/pod is the IBM Web site.
Once the Virtualization feature is installed in a system, it cannot be removed.

1-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Advanced POWER Virtualization feature codes

System Feature Code


p5-510 7432
p5-520 7940
p5-550 7941
p5-570 7942
p5-575 7944

Copyright IBM Corp. 2000, 2005 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

Checkpoint
1. There are a large number of current an 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 system?

Copyright IBM Corporation 2005

Figure 1-31. Checkpoint AW185.0

Notes:

1-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: System Hardware Overview

Exercise 1

Copyright IBM Corporation 2005

Figure 1-32. Exercise: System Hardware Overview AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 1-33. Unit Summary AW185.0

Notes:

1-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 2. Installation and Initial Configuration

What This Unit Is About


This unit describes the process of installing the AIX 5L V5.3 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 5L V5.3 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
Info Center AIX 5L Version 5.3 Installation Guide
Info Center AIX 5L Version 5.3 Release Notes

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 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:


List the different installation and media options available
List the steps necessary to install the AIX 5L V5.3 base
operating system
Identify the tasks that can be carried out using the
Configuration Assistant

Copyright IBM Corporation 2005

Figure 2-1. Unit Objectives AW185.0

Notes:

2-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Installation Methods
CD-ROM
Preinstallation Option (for a new system order)
Network Installation Manager (NIM)
Ethernet
Token Ring
FDDI

Copyright IBM Corporation 2005

Figure 2-2. Installation Methods AW185.0

Notes:

Required memory
In AIX 5L V5.2 and AIX 5L V5.3, 128 MB of RAM is required to install the Base
Operating System (BOS).
In AIX 5L V5.1, 64 MB of RAM is required to install the Base Operating System.

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 see if you have a 64-bit or a 32-bit machine. A 64-bit machine can run
the 64-bit kernel as well as the 32-bit kernel.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-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


Network installations are carried out using the AIX Network Installation Manager (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 comprised of client and server machines. The server machine
holds NIM resources required for software installations. The client's operating system
installation is initiated at the server machine which is commonly known as the NIM
master.
An existing pSeries 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.

2-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Installation Process
Insert CD in CD-ROM drive

Power on peripheral SCSI devices

Power on system

Press <F5>
Copyright IBM Corporation 2005

Figure 2-3. Installation Process AW185.0

Notes:

Installation media and peripheral devices


The system needs to boot from the installation media. The base operating system
(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 does 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 will need to power on the system before inserting the installation
media.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Power on the system


Power on the system to start the boot sequence. The LEDs will display numbers
indicating the system components that are being tested. Also, if you are using a
graphical display, you will 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.
Once the POST is complete, the system searches the boot list for a bootable image.
When it finds the bootable image, you will see menus appear on the screen.

When to press the 5 key


If the machines 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, during the POST, depress and release the
5 key on the keyboard. The number 5 is required on POWER4 and POWER5 systems.
The F5 required on the older pSeries and RS6000 systems The correct time to press
the 5 (F5) key is when the console displays the icons.
This invokes the default service boot list. The CD is on that list. If you are attempting to
install by tape, you will need to add a tape device to a bootlist. This is done via the
System Management Services (SMS) program. This will be discussed later.

2-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Console and Language Definition
Select your console
This message will be 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 2005

Figure 2-4. Console and Language Definition AW185.0

Notes:

Selecting the console


Each native (graphics) display and the ASCII terminal attached to the first built-in serial
port (S1) will display the console messages. Whichever display you respond to will
become the console display during the installation. The console display can be changed
at a later time if required.
Graphic displays request that you press the <F1> key and then <Enter> to make it the
system console. If you are using an ASCII terminal as the system console, you will need
to press 1 and then <Enter>.
The key to select depends on which port the ASCII terminal is attached to. A terminal
can be attached to S1 or S2. Press a 1 if the terminal is attached to the S1 port and a 2
at S2.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 will assume these
characteristics for the terminal on S1:
- 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 type 1 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 the
messages and the status information during the installation process. This language
does not have to be the same as the language intended for the primary environment of
the system.

2-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 Setting


>>> 2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery

88 Help ?
99 Previous Menu
>>> Choice [1]: 2

Copyright IBM Corporation 2005

Figure 2-5. Installation and Maintenance Menu AW185.0

Notes:

Overview
To confirm or change the installation and system settings that have been set for this
system, type a 2 and press <Enter>. Select 88 to display help on this or any
subsequent installation screen.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-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 More Options (Desktop, Security, Kernel, Software, ...)
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 2005

Figure 2-6. Installation and Settings AW185.0

Notes:

Overview
The Installation Settings screen 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

2-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 usr (/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 2005

Figure 2-7. Method of Installation AW185.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 is
displayed, the contents of which depends on the current state of the machine. For
example, new systems which do not have an OS installed, will not have the Migration
Install option in the next menu as it would be unusable.

Complete Overwrite Install


On a new machine, New and Complete Overwrite is the only possible method of
installation. On an existing machine, if you want to completely overwrite the existing
version of BOS, then you should use this method.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Preservation Install
Use the Preservation Install method when a previous version of BOS is installed on
your system and you want to preserve the user data in the root volume group. This
method removes only the contents of /usr, / (root), /var and /tmp. The Preservation
Install option preserves page and dump devices as well as /home and other
user-created file systems. System configuration 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 method to
upgrade an AIX V4.2.1 or later system to an AIX 5L 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. Migration is the default installation method for an AIX system running Version
4.x.
The installation process determines which optional software products will be installed.

2-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 More Disk Information
88 Help?
99 Previous Menu
>>> Choice [0]:
Copyright IBM Corporation 2005

Figure 2-8. Installation Disks AW185.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.
This screen also gives you the option to install to an unsupported disk by adding the
code for the device first.
When you have finished selecting the disks, type 0 in the Choice field and press
<Enter>.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Erasure Options For Disks


Erasure Options for Disks
Select the number of times the disk(s) will be erased, and select the
corresponding pattern to use for each disk erasure. If the number of
patterns to write is 0 then no disk erasure will occur. This will be a time
consuming process. Either type 0 and press Enter to continue with the
current settings, or type the number of the setting you want to change
and press Enter.
1 Number of patterns to write............ 0
2 Pattern #1.......................................... 00
3 Pattern #2.......................................... ff
4 Pattern #3.......................................... a5
5 Pattern #4.......................................... 5a
6 Pattern #5.......................................... 00
7 Pattern #6.......................................... ff
8 Pattern #7.......................................... a5
9 Pattern #8.......................................... 5a
>>> 0 Continue with choices indicated above
88 Help ?
99 Previous Menu
>>> Choice[0]:
Copyright IBM Corporation 2005

Figure 2-9. Erasure Options for Disks AW185.0

Notes:

Introduction
There are times when you may want to reuse a disk that previously contained some
sensitive material and you want to be sure that information is no longer accessible.
If this is an overwrite installation, you can specify to erase the disks chosen to be
installed before the installation occurs by typing 55 and pressing the <Enter> key for the
More Disk Options option shown on the previous visual.

Erasure Options for Disks menu


The More Disk Options option opens a new menu (Erasure Options for Disks shown
in the visual) that prompts for the number of patterns to write, which is the number of
times the drive is overwritten. If you choose 0 for the number of patterns to write, the
disks will not be erased prior to installation.

2-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty This menu also prompts for the patterns to be used for each disk erasure. The patterns
are a choice of the hexadecimal values 00,a5,5a, or ff. For example, a pattern of 00 will
write all zeros to the drive. Erasing a drive is a time-consuming process and only drive
types that are supported by the diag command can take advantage of this option (for
example, erasure of IDE drives are not supported).

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-15
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)
... several screens later ...
106. Create your own combination of Cultural Convention, Language and
Keyboards.

88 Help ?
99 Previous menu

Choice [1]:

Copyright IBM Corporation 2005

Figure 2-10. Primary Language Environment AW185.0

Notes:

Overview
At this point in the installation process, you can change the language and cultural
convention that will be 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, 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.

2-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Install Options for 32-bit Machines
Option 3 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 Desktop .................................................................... CDE
2 Enable Trusted Computing Base........................... No
3 Import User Volume Groups................................... Yes
4 Graphics Software..................................................... Yes
5 Enable System Backups to install any system...... Yes
(Installs all devices and kernels)

>>> 6 Install More Software


0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [6]: _

Copyright IBM Corporation 2005

Figure 2-11. Install Options for 32-bit Machines AW185.0

Notes:

Desktop
The screen shown is what is presented if running on a 32-bit hardware platform.
The first prompt is either:
- Installation Package Set for ASCII consoles
Options are Minimal or Default
- Desktop for graphical consoles
Options are CDE, Gnome, KDE, or NONE
The example in the visual has a graphical console.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Minimal or default configuration


For an ASCII console or a system with a graphical console where the desktop selected
is NONE, a minimal configuration is installed which includes X11, Java, Perl, SMIT, and
the Web-based System Manager.
For a system with a graphical console, if you choose CDE, Gnome, or KDE, the
desktop and documentation service libraries are also installed. This is considered a
default configuration. If you choose Gnome or KDE, the interface prompts you for the
Toolbox for Linux Applications CD. If this CD is not available, you can type q to
continue the installation without it.
The default configuration may prompt for additional CD volumes during the BOS
installation. When prompted, if you decide not to continue with additional volumes or if a
volume is not available, you can type q and press <Enter> to continue the installation
process. The system has enough of the BOS loaded to be usable.
Migration installations use the default configuration and update currently installed
filesets to the new level.

Enable Trusted Computing Base


When you install the Trusted Computing Base (TCB), the trusted path, the trusted shell,
and system integrity checking are installed. The trusted path protects your system in
case a program is masquerading as the program you want to use. The trusted path tries
to ensure that the programs you run are trusted programs.
If you want to install the TCB, you must indicate yes now. The TCB cannot be installed
later.

Import User Volume Groups


The Import User Volume Groups option is available in a Migration installation and a
Preservation installation. You have the option to have user volume groups imported
after the installation completes. These volume groups can be manually imported at a
later time.

Graphics Software
The Graphics Software option is available in a New and Complete Overwrite
installation, as well as Preservation installation. It will install graphics software support.

Enable System Backups to install any system


If Enable System Backups to install any system is selected, all devices and kernels
are installed, so that a system backup can be installed on a different system.

2-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Install Options for 64-bit Machines
Option 3 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 Desktop..................................................................... CDE
2 Enable Trusted Computing Base........................... No
3 Enable CAPP and EAL4+ Technology.................... No
(English only, 64-bit kernel enablement, JFS2 file systems)
4 Enable 64-bit Kernel................................................. Yes
5 Create JFS2 File Systems........................................ Yes
6 Graphics Software.................................................... Yes
7 Enable System Backups to install any system...... Yes
(Installs all devices and kernels)
>>> 8 Install More Software
0 Install with the current settings listed above.

88 Help ?
99 Previous Menu
>>> Choice [8]: _
Copyright IBM Corporation 2005

Figure 2-12. Install Options for 64-bit Machines AW185.0

Notes:

Introduction
If you are installing on a 64-bit hardware platform, the installation software detects that
and presents some additional installation options.

Enable CAPP and EAL4+ Technology


This option is available in a New and Complete Overwrite installation. A CAPP system
is a system that has been designed and configured to meet the Controlled Access
Protection Profile (CAPP) for security evaluation according to the Common Criteria. The
CAPP specifies the functional requirements for the system, similar to the earlier TCSEC
C2 standard (also known as the Orange Book). A Common Criteria (CC) Evaluated
System is a system that has been evaluated according to the Common Criteria, an ISO
standard (ISO 15408) for the assurance evaluation of IT products. The system
configuration that meets these requirements is referred to as a CAPP/EAL4+ system.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

If When the CAPP/EAL4+ option is selected, the contents of the


/usr/sys/inst.data/sys_bundles/CC_EVAL.BOS.autoi installation bundle are
installed.
If you enable Controlled Access Protection Profile (CAPP) and Evaluation Assurance
Level 4+ (EAL4+), other restrictions exist on installation choices, such as:
- Desktop = CDE or NONE
- TCB = yes
- 64-bit kernel = yes
- JFS2 = yes
- Enable System Backups to install any system (Installs all devices and kernels) = no
- Install more software options = no
For more information on this option refer to the AIX 5L V5.3 Security Guide.

Enable 64-bit Kernel


This option is available only on 64-bit Common Hardware Reference Platform (CHRP)
systems. To toggle the choice between No (the default) and Yes, type 3 and press
<Enter>. If you choose No, the 64-bit kernel is still installed, but it is not linked to the
running /unix. If you choose Yes, the 64-bit kernel is installed and begins running when
your system reboots.
If you want the 64-bit kernel to be the running kernel, but do not select it as part of the
initial installation, after the install completes, use the following commands to check
which kernel is running and switch to the 64-bit kernel:
# getconf KERNEL_BITMODE
# ln -fs /usr/lib/boot/unix_64 /unix
# ln -fs /usr/lib/boot/unix_64 /usr/lib/boot/unix
# bosboot -ad/dev/ipldevice
Reboot your system.

Create JFS2 File Systems


This option is available in a New and Complete Overwrite installation, as well as
Preservation installation with 64-bit kernel enabled option. If you chose Yes, the file
systems are created as JFS2 (Journaled File System 2) instead of JFS during BOS
installation.
Prior to AIX 5L V5.3, installing the 64-bit kernel also would create JFS2 file systems.

2-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 Mozilla (Mozilla CD) ........................................................ No


2 Kerberos_5 (Expansion Pack)........................................ No
3 Server (Volume 2)............................................................. No
4 GNOME Desktop (Toolbox for Linux Applications) ......No
5 KDE Desktop (Toolbox for Linux Applications) ............No

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

88 Help ?
99 Previous Menu

>>> Choice [0]: _

Copyright IBM Corporation 2005

Figure 2-13. Install More Software AW185.0

Notes:

Overview
The Install More Software option 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.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 2005

Figure 2-14. Begin Installation AW185.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
will also be installed.
Once the installation has completed, the system automatically reboots from the newly
installed operating system on disk.

2-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 2-15. Installation Flowchart - All Systems AW185.0

Notes:

Introduction
The flowchart in this visual summarizes the installation steps we have discussed.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Configuration Assistant Menu

Copyright IBM Corporation 2005

Figure 2-16. Configuration Assistant Menu AW185.0

Notes:

Introduction
After installing AIX, the operating system runs with default settings; one user (root), the
date and time set 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 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.
If using a graphics terminal for the installation, the newly installed BOS reboots and
starts the Configuration Assistant, which guides you through completing customization

2-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty tasks. When you use the Configuration Assistant immediately after BOS installation,
you have at first to accept the license agreement and only the tasks that apply to your
type of installation will be 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 will
prevent 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, use the install_assist command to access the
Installation Assistant
You must have root user authority to use the Configuration Assistant / Installation
Assistant.

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint
1. AIX 5L 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 2005

Figure 2-17. Checkpoint AW185.0

Notes:

2-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Unit Summary

AIX 5L is 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 2005

Figure 2-18. Unit Summary AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 2. Installation and Initial Configuration 2-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

2-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 3. 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 Version 5.3
Define the functionality of SMIT
Define how SMIT activity is logged
Define the use of the Web-based System Manager
Set up and use AIX Web-based documentation

How You Will Check Your Progress


Accountability:
Checkpoint questions
Machine exercises

References
Info Center AIX 5L Version 5.3 System Management Concepts:
Operating System and Devices (Chapter 13)
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices
Info Center AIX 5L Version 5.3 Web-based System Manager
Administration Guide

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 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:
Describe the benefits of the system management tools
available with AIX 5L V5.3
Discuss the functionality of SMIT
Explain how SMIT activity is logged
Describe the process to install the Information Center
Use the Information Center to browse and search AIX
documentation
Describe the steps to install and configure the Web-based
System Manager
Use the Web-based System Manager to manage AIX

Copyright IBM Corporation 2005

Figure 3-1. Unit Objectives AW185.0

Notes:

3-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 3.1 System Management Interface Tool (SMIT)

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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
Discuss the functionality of SMIT
Explain how SMIT activity is logged

Copyright IBM Corporation 2005

Figure 3-2. Topic 1 Objectives: System Management Interface Tool (SMIT) AW185.0

Notes:

3-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
AIX Administration

Web-based
SMIT System
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 2005

Figure 3-3. AIX Administration AW185.0

Notes:

Overview of SMIT
The System Management Interface Tool (SMIT) provides a menu-driven interface that
provides access to most of the common system management functions within one
consistent environment.
SMIT 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, 2005 Unit 3. System Management Tools and Documentation 3-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. (They 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.

3-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 3-4. System Management Interface Tool (SMIT) AW185.0

Notes:

Available interfaces
SMIT provides a flexible user environment. The user can use an ASCII or an
Xwindows-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, 2005 Unit 3. System Management Tools and Documentation 3-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 will allow 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 which will guide you through the use of
SMIT, and will also provide contextual information about each submenu, dialog
screen, and also each field within a dialog screen.

3-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
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 2005

Figure 3-5. SMIT Main Menu (ASCII) AW185.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, 2005 Unit 3. System Management Tools and Documentation 3-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.

3-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
SMIT Main Menu (Motif)

Copyright IBM Corporation 2005

Figure 3-6. SMIT Main Menu (Motif) AW185.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 will automatically call graphical 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 the Cancel box 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 through pull-down menus on the top of the screen.
To exit SMIT, for example, click the Exit pull-down.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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).

3-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 [05] #
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 2005

Figure 3-7. Dialog Screen AW185.0

Notes:

Dialog screens and selector screens


A dialog screen allows you to enter values which are used in the operation performed.
Some fields will already be filled in from information held in the system. Usually, you can
change this data from the default values.
A selector screen is a special case of a dialog screen in which there is only one value to
change. This usually indicates the object which will be acted upon by the subsequent
dialog and AIX command.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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 is larger than the space available to
display it are indicated by angle brackets < >, to indicate that there is data further to the
left or right (or both) of the display area.

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 will not be displayed
+ A pop-up list or ring is available
An * 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 list of possible values (A)
F5 (or ESC-5) Reset - restore the original value of an entry field
F6 (or ESC-6) Command - show the AIX command that will be executed
F7 (or ESC-7) Edit - edit a field in a pop-up box or select from a multi-selection
pop-up list

3-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 list
/text Finds the text in the output
n Finds the next occurrence of the text

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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 2005

Figure 3-8. Output Screen AW185.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 will be
displayed in the body section of this screen.
The value of the stderr field indicates whether there are error messages. In this case,
there are no error messages.
Note that, in the Motif version of SMIT, a representation of a 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.

3-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 3-9. SMIT Log and Script Files AW185.0

Notes:

Overview
SMIT creates two files in the $HOME directory of the user running SMIT. If these files
already exist, then SMIT will append to them. These files can grow quite large over
time, especially during software 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, 2005 Unit 3. System Management Tools and Documentation 3-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 just 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.

3-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
smit Command Options
General syntax:
smit [-options] [ FastPath ]

Invoke ASCII version:


# smitty
or
# smit C

Log (but dont 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 2005

Figure 3-10. smit Command Options AW185.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 will be 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, 2005 Unit 3. System Management Tools and Documentation 3-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 will 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.

3-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 3-11. Lets Review AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

3-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 3.2 Configuring AIX Documentation

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Topic 2 Objectives:
Configuring AIX Documentation
After completing this Topic, you should be able to:
Use the Information Center to browse and search AIX
documentation
Describe the process to install the Information Center

Copyright IBM Corporation 2005

Figure 3-12. Topic 2 Objectives: Configuring AIX Documentation AW185.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 installation and configuration of the information center.

3-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Configuring AIX 5L V5.3 Documentation
Documentation Server
AIX 5L V5.3 softcopy documentation
Information Center runtime environment Documentation Client
Web browser software Web browser software

Documentation Client
Web browser software

View AIX documentation from anywhere with a browser


Copyright IBM Corporation 2005

Figure 3-13. Configuring AIX 5L V5.3 Documentation AW185.0

Notes:

Overview
In addition to providing SMIT to make system administration tasks easy, softcopy
documentation can be loaded on a documentation server. Any other computer in the
network with appropriate Web browser software (for example, the Netscape Navigator)
can then become a documentation client.
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, 2005 Unit 3. System Management Tools and Documentation 3-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Configuring AIX 5L V5.3 Online Documentation


Configure TCP/IP
Install the Web browser software
Mozilla Web Browser for AIX
Prerequisite libraries on AIX Toolbox for Linux
Applications
Install the AIX documentation
AIX 5L V5.3 Documentation CD
infocenter.aix.[lang]
Install the Information Center run time environment
AIX 5L V5.3 Documentation CD
Includes internal eclipse Web server
infocenter.aix.rte
Configure Documentation Services
smit change_documentation_services
Copyright IBM Corporation 2005

Figure 3-14. Configuring AIX 5L V5.3 Online Documentation AW185.0

Notes:

Configuration steps
The steps outlined above are used to configure an AIX 5L V5.3 documentation server or
online documentation for a standalone pSeries system.
1. Configure TCP/IP on the AIX system. This is discussed later in the course.
2. Install the Web browser software. The Mozilla web browser for AIX is available on a
CD that can be ordered with AIX. It is Mozilla for AIX. It can also be downloaded
from the Web site: http://www.ibm.com/servers/aix/browsers
3. Install the AIX documentation. AIX provides a separate 2 CD set AIX 5L V5.3
Documentation (5765-G03). It contains the full AIX documentation library in many
different languages. The package names are of the format: infocenter.aix.[lang].
For example you may choose to install: infocenter.aix.EN_US. You may choose
between several categories of documentation within the package.

3-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 4. Install the Information Center run-time environment. On the same AIX 5L V5.3
Documentation CD, there is a fileset: infocenter.aix.rte. This will provide the eclipse
based web server engine and documentation access application.
5. Configure the Documentation Services. This is typically done through SMIT and is
covered next.
6. The AIX 5L V5.3 Documentation includes System Users Guides, Installation
Guides, System Management Guides, Programming Guides, Product and
Application Documentation, and References and Technical References. This
documentation can be installed to disk.

Client configuration steps


Installation of the documentation client involves a subset of the steps outlined above:
1. Install and configure TCP/IP.
2. Install the Web browser software.
3. Optional: If you wish to use the infocenter command rather than typing the URL
into your browser panel, configure documentation services but indicate some other
machine as the documentation server machine name.
Most of the documentation configuration can be done with the Configuration Assistant.
The Configuration Assistant was discussed in the AIX Installation unit.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Change/Show Documentation Services


# smit change_documentation_services

Change/Show Documentation Services

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
DEFAULT_BROWSER = [mozilla]
IC_DOCUMENT_SERVER_MACHINE_NAME = [sys103]
IC_DOCUMENT_SERVER_PORT = [64111] #
IC_DOCUMENT_SERVER_TYPE = DOCSERVER +
IC_DOCUMENT_DIRECTORY = /opt

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 2005

Figure 3-15. Change/Show Documentation Services AW185.0

Notes:

Introduction
Use the SMIT fastpath smit change_documentation_services to access this menu.
This menu is also accessed via the System Environments option on the main SMIT
menu. Choose the option Change/Show Documentation Services.
The Web-based System Manager can also be used to configure the AIX 5L V5.3 online
documentation.

Menu fields
The IC_DOCUMENT_SERVER_MACHINE_NAME should be set to the host name of
the documentation server machine. If acting as both the client and the server, this would
be set to your own hostname.

3-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty The IC_DOCUMENT_SERVER_PORT defaults to 64111, but can be changed if there


are port conflicts. Be sure to report any change in port number to all clients that use you
as a server.
The IC_DOCUMENT_SERVER_TYPE can be NONE, STANDALONE, REMOTE, or
DOCSERVER.
The IC_DOCUMENT_DIRECTORY defaults to /opt, though you may choose to change
this.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

IBM pSeries Information Center

Copyright IBM Corporation 2005

Figure 3-16. IBM pSeries Information Center AW185.0

Notes:

Introduction
The IBM Eserver pSeries Information Center is a Web application that serves as a
focal point for all information pertaining to pSeries and AIX. It provides access to the
with AIX 5L V5.3 documentation, as well as access to a message database to search
on error numbers, identifiers and LEDs. FAQs, How-Tos, and many more features are
provided.

Accessing the Information Center server


In AIX 5L V5.3, you can use your own pSeries system as an Information Center server.
From any browser (ex. Internet Explorer on a PC) you may access the server via the
URL: http://yourservername:64111.
You can also access the central IBM Information Center server by using the URL:
http://publib16.boulder.ibm.com/pseries/en_US/infocenter/base.

3-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty On any AIX 5L V5.3 system with the Information Center installed and configured, you
can access it by:
- Running the command infocenter from the command line. This command starts
the default browser with the URL defined by your configuration.
- Starting the Information Center with the Information Center icon located on the
Help panel of the CDE desktop.
Once in the Information Center, you are presented with a main Web page which has a
variety of hyperlinks to get to the many sources of information. Some links are to Web
sites on the Internet (in the main panel). Others are to the documentation installed on
the Information Center server (in the Contents panel on the left).

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Information Center Documents

Copyright IBM Corporation 2005

Figure 3-17. Information Center Documents AW185.0

Notes:

Overview
The contents list in the left panel of the Web page has categories of documents that you
can access. You can repeat clicking on these to drill down to the individual document
you are interested in reading. As you narrow it down, the appropriate collection of
documents or manuals appears in the main panel.
The main panel has three documents you may access for each manual. The HTML
Web pages, an abstract, and the PDF file. Use the PDF file if you wish to either print all
or some of the manual or if you wish to download it to your PC for future offline access.

3-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Information Center Search

Copyright IBM Corporation 2005

Figure 3-18. Information Center Search AW185.0

Notes:

Overview
The Information Center has a search engine which examines the documents to find the
one with information you seek. Entering a search string in the Search field and clicking
Go generates a list of search results ordered by relevance. Clicking the item you think is
the best selection causes the Web page for that section to appear in the main window.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Lets Review

1. True or False? AIX Web-based documentation can be


used to reference information in different ways, such as
searching for a command, searching for a task or
viewing information in a book like manner.

2. True or False? The AIX V5L documentation may be


viewed using a Web browser.

3. True or False? The Information Center requires the


prior installation of Web Server software (such as
HTTPServer) in order to provide remote client access.

Copyright IBM Corporation 2005

Figure 3-19. Lets Review AW185.0

Notes:

3-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 3.3 Web-based System Manager (WebSM)

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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 2005

Figure 3-20. Topic 3 Objectives: Web-based System Manager AW185.0

Notes:

3-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Web-based System Manager

PC or Linux
Remote Client

AIX 5L V5.3 System AIX 5L V5.3 System


Stand-alone
AIX 5L V5.3 Web-based
System System Manager

Client-Server
# wsm -host <managed-host>
Copyright IBM Corporation 2005

Figure 3-21. Web-based System Manager AW185.0

Notes:

Introduction
The Web-based System Manager (WebSM) was 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.
The Web-based System Manager can be run in standalone 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 a 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 you are performing the administration
functions from is the client.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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
- Applet mode using a web browser on a platform that supports Java V1.4
- Remote client mode on either Windows or Linux clients
Note: Client-server mode administration is not compatible between Web-based System
Manager on AIX 5.1.0.30 and earlier and the Web-based System Manager on
AIX 5L V5.3.

Web-based System Manager objectives


The objectives of the Web-based System Manager are:
- Simplification of AIX administration by 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 5L V5.3
code
- Enable AIX systems to be administered remotely
- Provide a system administration environment that provides 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 will need to be
used in an ASCII environment.

Client requirements
Supported Microsoft Windows clients for AIX 5L V5.3 are:
- 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
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

3-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Accessing the Web-based System Manager
Standalone mode:
# wsm

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

Applet mode:
Point your browser to:
http://<managed-host>/wsm.html

Remote client mode:


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

Figure 3-22. Accessing the Web-based System Manager AW185.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
standalone application, client-server, applet, and remote client.

Standalone 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. Select the Application Manager icon in the CDE front panel
2. Select the System_Admin icon
3. Select the Management Console icon

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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, but uses the preferences
file of the remote host you specify.

Applet mode
In applet mode, point your browser to: http://<managed-host/>wsm.html. The
managed-host is the machine that contains the Web-based System Manager
application.
In applet mode, you can only manage a set of machines that have the same version of
Web-based System Manager installed.
Be aware that AIX 5L V5.1 is using Java 1.3.0, AIX 5L V5.2 is using Java 1.3.1, and
AIX 5L V5.3 is using Java 1.4.2. Your browser plug-in-version must be compatible to the
Java version on the AIX server.

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. Click the Start button in the Task bar, then select Programs -> Web-based
System Manager -> Web-based System Manager Remote Client
3. From an 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. Click the Gnome menu button in the Task Bar, then select Programs ->
Web-based System Manager Remote Client
2. From an xterm, run the wsm command from the Remote Client bin directory

3-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty On a Linux system running the KDE Desktop:


1. Click the KDE menu button in the Task Bar, then select Programs ->
Web-based System Manager Remote Client
2. From an xterm, run the wsm command from the Remote Client bin directory

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-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 (1 of 3)

Copyright IBM Corporation 2005

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

Notes:

Console window
The visual shows the Web-based System Manager Console window containing two
primary panels. The panel on the left displays the machines that you can manage from
the Console window. This panel is referred to as the Navigation Area. The panel 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,
select Console -> Session Log.

3-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corporation 2005

Figure 3-24. Using the Web-based System Manager (2 of 3) AW185.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. Above the Navigation
Area and Contents Area, 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), 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 select the Date/Time icon, this allows you to set the date and time on the system.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-43
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 (3 of 3)

Copyright IBM Corporation 2005

Figure 3-25. Using the Web-based System Manager (3 of 3) AW185.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 URL: http://www-1.ibm.com/servers/aix/wsm/ .

3-44 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 5L V5.3 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 2005

Figure 3-26. Installation for a Remote Client AW185.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 will see a message similar to the
following:
lslpp: Fileset sysmgt.websm.framework not installed.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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

------------------------------------------------------------------------
Path: /usr/lib/objrepos
sysmgt.websm.framework
5.3.0.0 COMMIT COMPLETE 05/18/05 13:39:50
5.3.0.10 COMMIT COMPLETE 05/18/05 13:45:00

Path: /etc/objrepos
sysmgt.websm.framework
5.3.0.0 COMMIT COMPLETE 05/18/05 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 Secure Socket Layer communication between client and server.
This fileset supports 40-bit encryption and is available on the Expansion Pack.
- sysmgt.websm.security-us
Adds support for Secure Socket Layer communication between client and server.
This fileset supports 128-bit encryption and is available on 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 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 IBM
HTTP Server is available on the AIX 5L V5.3 Expansion Pack.
The next visual will show the configuration of the HTTP server.

3-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 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.
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 will not
terminate existing Web-based System Manager server processes.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Configure the HTTP (Web) Server

Copyright IBM Corporation 2005

Figure 3-27. Configure the HTTP (Web) Server AW185.0

Notes:

Configuring the HTTP server


You can configure the HTTP server (Web server) for Web-based System Manager
remote management in two ways:
- In the Configuration Assistant (/usr/websm/bin/configassist command), select
Configure the Web server for Web-based System Manager remote
management. You will 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 button to have the start command placed in the inittab file.

3-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Remote Client Installation

Copyright IBM Corporation 2005

Figure 3-28. Remote Client Installation AW185.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, with the URL of:
http://<managed-host>/remote_client.html
The Web page provides two options for installation of remote client software:
- InstallShield
- Java Web Start (beginning with AIX 5L V5.2.3.0)
The InstallShield is pretty straightforward. It downloads the code and installs using the
InstallShield standard.
The advantage of Java Web Start 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.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Java Web Start security


If you are going to use Java Web Start, 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. The AIX 5L V5.3 Expansion Pack has the
server filesets:
- 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

3-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
HMC Management
Hardware Management Console (HMC)
Partition configuration and control
Dynamic partitioning for LPARs (AIX 5L V5.2 and later)
Capacity Upgrade on Demand (CUoD)
Diagnostics
Operational management
IBM
Remote HMC control

IBM

Copyright IBM Corporation 2005

Figure 3-29. HMC Management AW185.0

Notes:

Partition configuration and control


The HMC provides the external platform to configure partitions, in an LPAR
environment.

Capacity Upgrade on Demand


Capacity Upgrade on Demand (CUoD) allows you to use the HMC to non-disruptively
activate extra resources while the system is operating. If you ordered a CUoD-capable
system, additional resources were shipped with the system and can be enabled by
using special CUoD activation codes.
Note: CUoD is not supported on systems running Linux in the full system partition.
You can use the HMC to perform the following Capacity Upgrade on Demand functions:
- Display license agreements
- Display the extra resources preinstalled on your managed system

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

- Type a resource activation code


- Activate extra resources
- Display CUoD status messages

Diagnostics
A challenge faced with the pSeries system running LPARs is standard AIX error
handling. The HMC interacts with each active partition to handle problem determination
functions.

Operational management
Once your partitions are active, the HMC continues to function as a management
platform, handling operational tasks.

Remote HMC control


Remote access to HMC functions is provided via two paths:
- Remote the Web-based System Manager GUI:
From AIX 5L with the Web-based System Manager client installed
From a Microsoft Windows or Linux workstation with the Web-based System
Manager client installed
From another HMC
- High-level commands

3-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Remote Access to the HMC
3
SSH access
to HMC
HMC commands

Network

2
Windows, Linux,
or AIX client via
the Web-based
System Manager Alternate
1 HMC

Copyright IBM Corporation 2005

Figure 3-30. Remote Access to the HMC AW185.0

Notes:

Overview
It is often desirable to be able to access the HMC from a remote workstation. This is
especially true when the managed system is a Power4 platform where the HMC is
required to be physically close to the managed system.
Remote operation is possible using a Web-based System Manager graphic interface or
using line commands via a Secure Shell facility. The Web-based System Manager client
may be another HMC, an AIX system running the Web-based System Manager, or a
Linux/Windows platform with the Remote Client software installed.

Installing remote client


You may install the Web-based System Manager remote client software on a Windows
PC or on a Linux workstation. From the Web-based System Manager, you may connect
to any HMC and access its functions. You must login to the HMC (both to install the

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

remote client and to access the HMC each time). The Web-based System Manager
client can be loaded from the AIX standard distribution software or directly from the
HMC for Windows PCs and Linux (on Intel) workstations. To install the client on
Windows PCs and Linux workstations from the HMC, open a Web browser to the
following Web address where hmc-hostname is the actual hostname of the HMC:
http://hmc-hostname/remote_client.html

3-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
HMC Application Groups
Menus

Application
Groups and
Navigation Window Applications

Contents Window
Status

Copyright IBM Corporation 2005

Figure 3-31. HMC Application Groups AW185.0

Notes:

Default HMC console view


When you log in to the HMC, the HMC Graphical User Interface (GUI) management
window opens and selects the management environment automatically. Like some
other Web-based System Manager windows discussed previously, this window is
divided into two main areas: the Navigation area and the Contents area. However, the
objects displayed are different, since they are associated with an HMC rather than with
AIX.
The panel on the left (the Navigation Area) displays a hierarchy of icons that represent
collections of computers, individual computers, managed resources, and tasks. Each
Navigation area icon identifies a tool. At the highest point, or root of the tree, is the
Management Environment. The Management Environment tool contains one or more
host computer tools that are managed by the console. Each computer tool contains
multiple application tools that contain managed objects, tasks, and actions for a related
set of system entities or resources.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint
1. The S______ M__________ I_________ T____ provides a
menu-driven interface that can help in the administration of
AIX 5L systems.
2. Which of the statements are true regarding the Web-based
System Manager?
a) An AIX 5L system can be managed from a remote PC
with appropriate JAVA and Web-browser code installed.
b) In standalone mode, use the wsm command to access
the Web-based system manager.
c) It is possible to manage an AIX 5L system from a
remote AIX 5L system using an ASCII terminal.
____________________________________________
____________________________________________
____________________________________________
____________________________________________

Copyright IBM Corporation 2005

Figure 3-32. Checkpoint AW185.0

Notes:

3-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: System Administration Tools

Exercise 2

Copyright IBM Corporation 2005

Figure 3-33. Exercise: System Administration Tools AW185.0

Notes:

Introduction
The exercise can be found in your Student Exercise Guide.

Copyright IBM Corp. 2000, 2005 Unit 3. System Management Tools and Documentation 3-57
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 standalone 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 2005

Figure 3-34. Unit Summary AW185.0

Notes:

3-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 4. Software Installation and Maintenance

What This Unit Is About


This unit covers the process of installing and maintaining optional
software product 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
Info Center AIX 5L Version 5.3 Installation Guide
Info Center AIX 5L Version 5.3 Release Notes

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 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:
Define the package definitions and naming conventions
Identify how software products and updates are installed
and managed on the system

Copyright IBM Corporation 2005

Figure 4-1. Unit Objectives AW185.0

Notes:

4-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
AIX Product Offerings

AIX

LPPs

AIX documentation

Expansion Pack

Bonus Pack
Web Download Pack

AIX Toolbox for Linux


Copyright IBM Corporation 2005

Figure 4-2. AIX Product Offerings AW185.0

Notes:

Introduction
The AIX 5L operating systems are delivered on multiple CDs. During the ordering
process, it is necessary to indicate the system type.
Licensed Program Products (LPPs) are separately orderable products that will run on
the AIX operating system.
The contents of the Expansion and Bonus Packs vary over time. Their purpose is to
acquaint users with tools and products that may be valuable in their business
environment.
For more details on either the Expansion Pack or the Bonus/Web Download Pack go to:
http://www.ibm.com/servers/aix/expansionpack

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

Expansion Pack
An Expansion Pack is included with every new order of AIX at no additional charge
when media is selected, or can be ordered separately for existing AIX licenses. Typical
releases may include: database software, development tools, software supporting
e-business, interoperability support, browsers, Java and Internet application
development tools, network management utilities, and country-specific security
encryption.

Web Download Pack (formerly Bonus Pack)


The AIX Bonus Pack compliments AIX by adding tools, utilities, as-is software and
try-and-buy applications. Prior to AIX 5L V5.3, this was distributed in the same manner
as the expansion pack. Beginning with AIX 5L V5.3, this software is now available as a
Web Download Pack which is downloaded from the IBM Web site.

AIX Toolbox for Linux


The AIX Toolbox for Linux Applications CD that is shipped with your base operating
system software contains the most commonly used open source applications that you
can use with the AIX operating system.

AIX documentation
The AIX 5L V5.3 documentation comes in a 2 CD set. It contains the full AIX
documentation library in many different languages, in addition to the infocenter run time
environment.

4-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 4-3. Packaging Definitions AW185.0

Notes:

Licensed Program Product (LPP)


A Licensed Program Product (LPP) is a complete software product collection including
all packages and filesets required. For example, the Base Operating System (bos) itself
is a 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, 2005 Unit 4. Software Installation and Maintenance 4-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 5L V5.3 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 2005

Figure 4-4. Bundles AW185.0

Notes:

Overview
Since there are thousands of filesets, having to determine which individual fileset you
want on your machine could be a time-consuming task. AIX has bundles which offer a
collection of filesets that suit a particular purpose. For example, if you are developing
applications, the App-Dev bundle would be the logical choice to install.
Some filesets within a bundle will only be 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.

4-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Fileset Naming

LPP Package Fileset Suffix

bos.terminfo.print.data

Message convention:
LPP.msg[.lang].package.fileset

Copyright IBM Corporation 2005

Figure 4-5. Fileset Naming AW185.0

Notes:

Fileset naming convention


Filesets follow a standard naming convention. The Licensed Program Product name will
be 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 Licensed Program
Product
.com Common code between two like filesets
.compat Compatibility code that will be removed in a future release of the
Licensed Program Product
.data /usr/share portion of a fileset
.dev Device support for that Licensed Program Product
.diag Diagnostics for a fileset

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

.fnt Font portion of a fileset


.help[lang] Translated help files for that Licensed Program Product
.loc Locale for that Licensed Program Product
.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.

4-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Software Updates
# oslevel

5 . 3 . 0 . 0

Version Release Modification Fix

MIGRATION smit update_all

Copyright IBM Corporation 2005

Figure 4-6. Software Updates AW185.0

Notes:

Introduction
As new software is created for AIX, you 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, 2005 Unit 4. Software Installation and Maintenance 4-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]
where:
-l Level Lists file sets at levels earlier than maintenance level specified by the
Level parameter
-g Lists file sets 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
Examples are:
- To get the actual BOS level:
# oslevel
5.3.0.0
- To get actual AIX BOS maintenance level:
# oslevel -r
5300-01

Types of upgrades
When you want to upgrade the system, how you do it 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 5L V5.3 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 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 will be
discusses in more detail later in this unit.

4-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Software States

Applied:
FILESET 5.3.0.3
(New Version)
FILESET 5.3.0.1
Commit
Install or
5.3.0.3 (Old Version)
Reject
Applied FILESET 5.3.0.1
FILESET 5.3.0.3 (Old Version)

Committed:

Committed
Install FILESET 5.3.0.3
5.3.0.3

Copyright IBM Corporation 2005

Figure 4-7. Software States AW185.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 will automatically install 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, 2005 Unit 4. Software Installation and Maintenance 4-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
will remove 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.

4-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Network Installation Management
EZ NIM (Easy NIM Tool)
System Backup Manager
Alternate Disk Installation
EFIX Management

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2005

Figure 4-8. Software Installation and Maintenance AW185.0

Notes:

Overview
Use the SMIT fast path 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, 2005 Unit 4. Software Installation and Maintenance 4-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 2005

Figure 4-9. Install and Update Software AW185.0

Notes:

Introduction
Use the smit install_update fast path 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 you system.

4-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Update Installed Software to Latest Level


This option is the smit update_all fast path. It enables you to update all of your
currently installed software products. Only the existing installed products are updated;
no new optional software will be 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 website:
http://www.ibm.com/servers/eserver/support/pseries/aixfixes.html.

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 will show you the base function filesets plus all levels of fixes on the media.

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-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 2005

Figure 4-10. Install Software AW185.0

Notes:

Introduction
The SMIT Install Software dialog screen 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 will be identical except in the SOFTWARE
to install line you will 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.

4-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty SOFTWARE to install: _all_latest


If _all_latest if left in the SOFTWARE to install line, everything on the installation
media will be installed (except printers and devices). Usually, this line is used to indicate
the new software you want to install. Use list (F4) to display all filesets on the media.
From there, you can select the fileset, package or LPP that you want to install.
Access this menu using the SMIT fast path smit install_latest.

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

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-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 2005

Figure 4-11. Software Inventory AW185.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

4-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
List Installed Software
# lslpp -l "bos.*"

Fileset Level State Description


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

Figure 4-12. List Installed Software AW185.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 dependents 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, 2005 Unit 4. Software Installation and Maintenance 4-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 2005

Figure 4-13. Fix Repository AW185.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 will
appear 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 IBM website available software. Any two of these can be compared to obtain a
report.

4-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Fix Central Website

Copyright IBM Corporation 2005

Figure 4-14. Fix Central Website AW185.0

Notes:

Introduction
IBM Eserver support provides a website interface (Fix Central) to access fix
information. Two ways to navigate to this Web page are:
- Via Fix Central at www.ibm.com/eserver/support/fixes
Identify the Server as pSeries and Product or fix type as AIX operating system.
After clicking Continue, the screen shown in the visual is displayed.
- Go directly to the AIX Fix Central website:
www.ibm.com/servers/eserver/support/pseries/aixfixes.html.

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Maintenance packages
Maintenance packages are released every four to six months. These packages are
cumulative. You should review Critical fixes after applying a maintenance package.
Click on the AIX version you are running. Then, on the next screen, select the current
and desired levels for maintenance packages and click Go. Use the oslevel -r
command to determine your current level. To obtain a package for all systems, select
No level.
Another screen will be displayed giving you:
- A description of the maintenance package
- Download and install instructions

Specific fixes
These are generally available fixes that resolve specific problems.
Click on the AIX version you are running. Then, on the next screen, you can select the
fixes by:
- Fileset or PTF number
- APAR number or abstract
Then, give it a search string.
Another screen will be displayed listing the fixes that have matched your criteria. Select
the fixes from the search results that you want to add and click Add to the download list.
Then, click Continue to go to the packaging options screen.

Emergency fixes
When resolution to a problem cannot wait for a generally available fix, IBM may provide
a way around the problem in the form of an emergency fix.
IBM provides a common method for installing and uninstalling emergency fix packages
for the AIX operating system. This solution uses integrated tools to ensure a seamless
and safe application of fixes and reduces the risk associated with installation of
generally available fixes onto systems that have emergency fixes installed.
The emergency fix management solution allows you to track and manage emergency
fixes on systems running AIX. The solution consists of the efix manager, the efix
packager and associated System Management Interface Tool (SMIT) screens.

4-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Critical fixes


IBM periodically publishes information about generally available fixes that may apply to
your system.
Fixes identified as critical may also be classified as HIPER, PE, security or may warrant
special awareness.The information displayed can be helpful in determining if a fix
should be applied. However, parts or all of it may not be applicable to your environment.
Determine your system's AIX maintenance level by running the oslevel -r command,
then select the appropriate package. If your level is greater than what is seen in this list,
then IBM has not identified any critical fixes for your operating system level at this time.

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

More Fix Services Screen (from Fix Central)

Copyright IBM Corporation 2005

Figure 4-15. More Fix Services Screen (from Fix Central) AW185.0

Notes:

Introduction
Selecting More fix services on the previous visuals screen, gives you the screen in
this visual. There are two sections:
- Automating downloads
- Compare report

Automating downloads
AIX 5L V5.3 introduces the Service Update Management Assistant (SUMA). You can
configure your system to periodically check for updates from IBM. This tool can be used
to automatically download the latest fixes for the operating system and cluster products.
While the bos.suma package was released with AIX 5L V5.3, the AIX 5L V5.1 and AIX
5L V5.2 SUMA packages and related updates have been made available for download
from the IBM support web site. SUMA will be discussed later in this unit.

4-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Compare report


The Compare report option helps you to compare the operating system and cluster
software filesets installed on your system with the latest available fixes to determine
which components can be updated to the latest level.

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Compare Report Screen (from Fix Central)

Copyright IBM Corporation 2005

Figure 4-16. Compare Report Screen (from Fix Central) AW185.0

Notes:

Introduction
The Compare report screen shown in this visual is displayed after you click on the AIX
version youre interested in from the More fix services screen shown in the previous
visual.
This process to compare software versions consists of three steps:
1. Download the data file from IBMs Fix Central website
2. Run the compare_report command or smit compare_report on your AIX
system
3. Upload the file created by compare_report

4-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Download the latest fix data file


The latest fix data file from Fix Central is formatted for scripting. It contains a list of
available updates that are in the latest maintenance package as well as fixes released
after the latest maintenance package.
This file can be used as input to the compare_report command.
An example of a portion of this file for AIX 5L V5.3 is:
# 2005.05.12
#
# Platform: AIX 5.3
# Data file: LatestFixData53
# Origin: IBM Server Support Site
#
# Description:
# Colon separated file containing a list of what filesets are
available
# in the latest maintenance package and all fixes released after the
# latest maintenance package.
#
# Format:
# PTF number : base fileset name : version.release.modification.fix :
package indicator
#
# The package indicator is either the word LATEST_LEVEL or a word
# indicating that the fix is part of the latest maintenance package.
#
U497418:Java131.adt.debug:1.3.1.14:LATEST_LEVEL
U495676:Java131.adt.includes:1.3.1.5:LATEST_LEVEL
U489159:Java131.ext.commapi:1.3.1.2:LATEST_LEVEL
U497419:Java131.ext.jaas:1.3.1.6:LATEST_LEVEL
U482895:Java131.ext.java3d:1.3.1.1:LATEST_LEVEL
U497417:Java131.ext.plugin:1.3.1.16:LATEST_LEVEL
U482893:Java131.ext.xml4j:1.3.1.1:LATEST_LEVEL
U497416:Java131.rte.bin:1.3.1.17:LATEST_LEVEL
U497420:Java131.rte.lib:1.3.1.17:LATEST_LEVEL
U495673:Java131.samples.demos:1.3.1.4:LATEST_LEVEL
U497465:Java13_64.adt.debug:1.3.1.8:LATEST_LEVEL
U497458:Java13_64.adt.includes:1.3.1.5:LATEST_LEVEL
U487755:Java13_64.ext.commapi:1.3.1.2:LATEST_LEVEL
U497466:Java13_64.ext.jaas:1.3.1.5:LATEST_LEVEL

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Compare the reports


Use AIX compare_report command or smit compare_report to compare the filesets
installed on a system to the contents of a fileset image repository or to a list of available
updates that may be downloaded from Fix Central (as discussed above).
The compare_report command was introduced in AIX 5L V5.2 and maintenance level
5100-03 of AIX 5L V5.1 (APAR IY33992) in the bos.rte.install fileset. The
compare_report command in AIX 5L V5.1 is only available from the command line.
Beginning in AIX 5L V5.2, the command is also available through the SMIT menus
using the SMIT fast path smit compare_report.
Comparison reports will be discussed in more detail shortly.

Upload the comparison report file to Fix Central


The comparisons will produce reports that simplify the process of determining the fixes
to install to bring a system to the latest maintenance level or the latest level. Reports
that are created using the list of available updates can be uploaded directly to Fix
Central to request the exact fixes needed for the system.

4-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Comparison Reports
# smit compare_report

Comparison Reports

Move cursor to desired item and press Enter.

Compare Installed Software to Fix Repository


Compare Installed Software to List of Available Updates
Compare Fix Repository to List of Available Updates

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


F9=Shell F10=Exit Enter=Do

Copyright IBM Corporation 2005

Figure 4-17. Comparison Reports AW185.0

Notes:

Introduction
The SMIT Comparison Reports menu or the compare_report command allows you to
generate several comparison reports to verify that the filesets for a particular fix or
preventive maintenance package are installed by comparing filesets installed on a
system to another source. This source could be a fix repository, such as an lpp_source
or a directory of fixes, or a downloaded list from the IBM Fix Central website.
If you want to verify that your lpp_source is up to date, you can also compare a fix
repository to a downloaded list.
You can perform these actions in the smit compare_report fast path or using the
compare_report command.

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Compare Installed Software to Fix Repository


To compare installed software filesets to filesets contained in a fix directory, you can
use:
- The SMIT Compare Installed Software to Fix Repository menu which can be
accessed by the smit instofix_compare fast path
- The compare_report command with the following options:
compare_report -s -i FixDir {[-l ] [-h ] [-m ] [-n ]}-t ReportDir -Z |-v]

The following report lists are generated:


- Filesets on the system that are back-level (lowerlevel.rpt)
- Filesets on the system that are at a later level (higherlevel.rpt)
- Filesets in the fix repository that are not installed on the system (notinstalled.rpt)
- Filesets installed on the system that are not in the fix repository
(no_update_found.rpt)

Compare Installed Software to List of Available Updates


To compare filesets installed on a system to a downloaded list of available updates from
the IBM Fix Central website, you can use:
- The SMIT Compare Installed Software to List of Available Updates menu which
can be accessed by the smit instolist_compare fast path
- The compare_report command with the following options:
compare_report -s -r ServiceRp {[-l ] [-h ]} [ -t ReportDir -Z |-v]

The following report lists are generated:


- Filesets on the system that are back-level from the latest (lowerthanlatest1.rpt)
- Filesets on the system that are at a later level from the latest maintenance level
(higherthanmaint.rpt)
- Filesets on the system that are back-level from the latest maintenance level
(lowerthanmaint.rpt)

4-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Compare Fix Repository to List of Available Updates


To compare the filesets in a fix repository, such as a fix directory or lpp_source, to a
downloaded list of available updates from the Fix Central website, you can use:
- The SMIT Compare Fix Repository to List of Available Updates menu which can
be accessed by the smit fixtolist_compare fast path
- The compare_report command with the following options:
compare_report -i FixDir -r ServiceRp [ -t ReportDir -Z | -v]

The report that is generated contains information on filesets in the fix directory that are
back-level from latest (lowerthanlatest2.rpt).

Compare a List of Installed Software on a Base System to Another


System
You can also compare a list of installed software on a base system to another system.
This option allows you to compare the filesets installed on a system to another system.
The lslpp -Lc output from one system is saved to a file and compared with the
lslpp -Lc output from another system.
To compare a list of installed software on a base system to another system use the
compare_report command with the following options:
compare_report -b BaseRp -o OtherRp{[-l] [-h] [-m] [-n]} [[[-t ReportDir] [-Z]] |-v]

The following report lists are generated:


- A list of base system installed software that is at a lower level (baselower.rpt)
- Filesets not installed on the base system, but installed on the other system
(otheronly.rpt)
- A list of base system installed software that is at a higher level (basehigher.rpt)
- Filesets installed on the base system that are not installed on the other system
(baseonly.rpt)

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-31
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 2005

Figure 4-18. Software Service Management AW185.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 also allows generation of
reports to manage filesets installed on a system, filesets contained in a repository, and
filesets available from the IBM Fix Central website. It also provides a way to clean up
and rename software images in a repository.

Service Update Management Assistant (SUMA)


SUMA is fully integrated into the AIX 5L V5.3 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

4-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 will be 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 menu


This menu allows you to generate several comparison reports to verify that the filesets
for a particular fix or preventive maintenance package are installed by comparing
filesets installed on a system to another source. This source could be a fix repository,
such as an lpp_source or a directory of fixes, or a downloaded list from the IBM Fix
Central website.

Rename Software Images in Repository option


This option allows you to rename updates that 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 standalone 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, 2005 Unit 4. Software Installation and Maintenance 4-33
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 2005

Figure 4-19. Software Maintenance and Utilities AW185.0

Notes:

Overview
The fast path smit maintain_software allows you to commit, reject and remove
software. You will 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

4-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 will check and
verify the system by analyzing it to determine if there is 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, 2005 Unit 4. Software Installation and Maintenance 4-35
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
List which AIX BOS maintenance levels are partly or full
installed:
# instfix -i | grep ML
All filesets for 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found.
List which filesets are missing in a partly installed AIX BOS
maintenance level:
# instfix -ciqk 5300-01_AIX_ML | grep :-:
Copyright IBM Corporation 2005

Figure 4-20. instfix Command AW185.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 Displays entire table of contents.
-s Search for and display table of contents entries containing the string.
-k Install filesets for a keyword or fix.

4-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found.

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

Copyright IBM Corp. 2000, 2005 Unit 4. Software Installation and Maintenance 4-37
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 2005

Figure 4-21. Checkpoint AW185.0

Notes:

4-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: AIX Software Installation

Exercise 3

Copyright IBM Corporation 2005

Figure 4-22. Exercise: AIX Software Installation AW185.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, 2005 Unit 4. Software Installation and Maintenance 4-39
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 2005

Figure 4-23. Unit Summary AW185.0

Notes:

4-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 5. 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/delete devices

How You Will Check Your Progress


Accountability:
Checkpoint questions

References
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 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 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 2005

Figure 5-1. Unit Objectives AW185.0

Notes:

5-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
:
:
crw------- 1 root system 14,1 Oct 29 02:44 hdisk0
crw------- 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 2005

Figure 5-2. Listing of /dev Directory AW185.0

Notes:

The /dev directory


The /dev directory contains software interfaces (special files) that present a means of
accessing physical devices connected to the system to the users and application
programs. Data appended to these logical devices will be sent to the appropriate device
driver. Data read from such logical devices will be read from the appropriate device
driver.
The /dev directory contains all of the logical devices that can be directly accessed by
the user. (Some defined logical devices are only referenced in the Object Data Manager
(ODM) customized database and cannot be accessed by users. Well talk more about
the ODM in the material that follows.)

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-3


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

Block devices and character devices


As on other UNIX systems, an AIX device can be of one of two types:
- A 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.
- A 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.

ls -l /dev output
Recall that the ls -l command allows you to see the type of a file. A special file (in the
/dev directory) will be indicated by a b in the first column for a block device or a c for
a character device.
Normally, the fifth field in the output of ls -l contains a numeric value indicating the
number of bytes in the file. However, remember that, 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 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

5-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty tok0, ent0 Adapter


kmem, mem, null Memory
rfd0, rfd0l, rfd0h Diskette
rhd1, rlv00 Logical volume
rhdisk0 Physical volume

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-5


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

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 2005

Figure 5-3. Device Configuration Database AW185.0

Notes:

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

Predefined database
The predefined database contains configuration data for all devices supported by the
system, that is, all possible devices that could be attached to the system. The SMIT
menus have options to install additional device drivers. The content of the predefined
database is largely determined at installation time, ensuring that your system will at
least have support for all devices initially connected to your system.

5-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-7


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

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 2005

Figure 5-4. List All Supported Devices AW185.0

Notes:

Introduction
Information regarding devices supported by the system is stored in the ODM predefined
database.
Devices are classified by:
- 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.

5-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Listing supported devices


To find out what devices are listed in the predefined database, use the command
lsdev -P or 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.
Some options for the lsdev command are illustrated on the visual:
-H shows the headers for the output
-c specifies the class of device

Listing default attributes


To find out the default attributes of a predefined device, use the command lsattr -D or
SMIT -> Devices -> List Devices -> Show Characteristics of a Supported Device.
The following example illustrates use of the lsattr command to determine the default
attributes of a specified predefined device:
# lsattr -HD -c tape -s scsi -t 8mm
attribute deflt description user_settable

block_size 1024 BLOCK size (0=variable length) True


extfm no Use EXTENDED file marks True
mode yes Use DEVICE BUFFERS during writes True
ret_error no RETURN error on tape change or reset True
In this example, the -H flag is used to specify that headers be included in the output, the
-D flag specifies that default values of attributes should be shown, and the -c (class), -s
(subclass), and -t (type) flags are used to uniquely identify the device about which we
want information.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-9


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

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 2005

Figure 5-5. List All Defined Devices AW185.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 devices


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 will
contain:
- Available: The device is ready and can be used
- Defined: The device is unavailable

5-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Listing effective attributes


The lsattr -E -l [resource name] command provides detailed information on the
effective attributes currently configured for specified devices. In the example on the
visual, it provides configuration information on the system itself (sys0).

Useful lsdev and lsattr options


Some useful options (flags) for the lsdev and lsattr commands are briefly described
below:
- 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 used to specify the logical device name
- The -c option for both commands is used to specify the class of device
- The -a attribute option for the lsattr command displays information for a
specific attribute

The lscfg -v command


Another command that can be used to list information about devices found in the ODM
customized database is lscfg -v. The listing is sorted by parent, child, and device
location. Specific hardware information about devices - such as EC level, FRU number,
part number, and so forth - will be listed. The output also displays the architecture,
model implementation information, and bus type.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-11


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

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 2005

Figure 5-6. Device States AW185.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, and 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.
A device is configured and put into the Available state when the device is identified by
cfgmgr. However, we can add or identify a device manually using mkdev, and this
command allows us to add a device in the Defined state.

5-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty If a device that has been configured in the past is powered off and the machine is
rebooted, the device will appear 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. It also means that when cfgmgr was called during the boot, the device was
unable to respond, and therefore its device state cannot be Available.

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 use either:
SMIT -> Devices -> Configure/Unconfigure Devices -> Configure a Defined
Device
The command: mkdev -l rmt0
To move an available tape device to defined:
SMIT -> Devices -> Configure/Unconfigure Devices -> Unconfigure a Device
then set KEEP definition in database to yes
The command: rmdev -l rmt0
To permanently remove an available or defined tape device:
SMIT -> Devices -> Configure/Unconfigure Devices -> Unconfigure a Device
then set KEEP definition in database to no
The command: rmdev -dl rmt0
At times, a Defined device is the result of not powering on the device before booting.
At other times, it could be that the device was physically removed, but the system
administrator never ran the command rmdev -dl xxxx to remove the device from the
ODM. Its important to be aware that some devices (such as logical volumes) are
normally in the Defined state and that having a device or devices in the Defined state
is not always a bad thing.

cfgmgr
The command that is executed at boot time to discover and configure attached devices
is cfmgr. 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
cfgmgr. cfgmgr would discover any new devices or will re-assess the state of any
devices already defined in the ODM customized device database.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-13


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

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 2005

Figure 5-7. Self-Configuring Devices AW185.0

Notes:

Configuring devices
cfgmgr is a program that runs during boot that configures devices. It can also be run
safely from the command line on a system that is up and running. cfgmgr 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.
Note 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.

5-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corporation 2005

Figure 5-8. SMIT Devices Menu AW185.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 physical devices attached. 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.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-15


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

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

5-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 5-9. Device Addressing AW185.0

Notes:

Location code
Every 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 indicates a device attached to an adapter.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-17


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

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 2005

Figure 5-10. Location Code Format for PCI Devices AW185.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://publib16.boulder.ibm.com/pseries/en_US/infocenter/base/

5-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty PCI location code format (AB)


The location code format in the visual is an example of what you might find on a
particular model type. Location codes vary from model type to model type.
In older machines there was only a single PCI bus which used an AB value of 04. In
current machines, there 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, the
processor, memory and the 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 can not be determined.
- XY defines resources attached to the XY parent PCI bus, where XY is a two
character identify 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, identifies a slot or adapter number. Again, how this
position is used may vary from machine/model to machine/model.
The integrated devices on this model (43P Model 140) are on the primary PCI bus (start
with 10) or on the ISA bus (01). Their CD positions are fixed, unlike on some other
machines 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 will be attached to one of the two PCI buses. Slots 2 and 3 are on the
primary bus and will 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 appropriate Service Guide. To give one example, a
card in slot 1 will have an address of 1P-08.
When you are looking at the location codes on this model, you can use this chart taken
from the corresponding Service Guide to interpret their meaning:
- 1P-08 Slot 1
- 10-b0 Slot 2
- 10-90 Slot 3
- 1P-18 Slot 4
- 1P-10 Slot 5

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-19


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

For integrated devices, like the built-in keyboard port, the C position will be a letter A-Z
and the D position will be a 0. For example 01-F0 shows 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. One exception occurs when there are multiple
diskette drives. And, a 128-port async adapter will also give non-00 GH positions.

5-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Location Code Example: Non-SCSI
28-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 2005

Figure 5-11. Location Code Example: Non-SCSI AW185.0

Notes:

Non-SCSI example
The example in the visual illustrates non-SCSI device location codes for a pSeries
system.
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 give a total of eight RANs. Each RAN has 16
ports. That gives a total of 128 ports.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-21


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 must account for each piece of the puzzle.
AB-CD is the same as 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.

5-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 5-12. Location Code Format for SCSI Devices AW185.0

Notes:

SCSI device format


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

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

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-23


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

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
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 dials or
push buttons that are external that allow 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 will
recognize the ID that is set on the hardware and set the G position accordingly.
The H is usually a 0. If the SCSI device has multiple devices 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.

5-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 5-13. Location Code Example for SCSI Device AW185.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.
Question: What would the location code be for the disk with SCSI ID of 0?
Answer: ____-____-____-___,___

The SCSI ID of 7
The default ID for the SCSI adapter is 7. Therefore, this ID is not available to be used on
a connected device.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-25


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

Location Code Example: PCI and ISA


Standard I/O Standard
Keyboard
Diskette Serial
Adapter
Adapter Port 1
01-K1
01-D1 01-S1

ISA Bus, isa0


Diskette Drive Keyboard

Bridge
01-D1-00-00 01-K1-01-00

PCI Bus, pci0


Graphics PCI Ethernet Wide SCSI
Adapter Adapter I/O Controller
10-b0 10-60 10-80

SCSI Disk
Drive
10-80-00-4,0

Copyright IBM Corporation 2005

Figure 5-14. Location Code Example: PCI and ISA AW185.0

Notes:

PCI and ISA location codes


The example shown in the visual is a partial view of a 43P Model 150 system with an
attached ISA bus.
All devices attached to the ISA bus are identified with a prefix location code of 01 and
the PCI devices in this example are attached with a prefix location code of 10.

5-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
pSeries 690 Location Codes
U1.35-P1-X1 (unused)

U1.35-P1-F1
U1.35-P1-X2 Example of hardware location code format:
U1.35-P1-X3
U1.35-P1-X4
U1.35-P1-V1 U1.5-P1-I1/Z1
U1.35-P1-V2
U1.35-P1-V3
U1.18-P1-M1 U1.18-P1-M5

U1.18-P1-M2 U1.18-P1-M6

U1.18-P1-M3 U1.18-P1-M7
U1.18-P1-M4 U1.18-P1-M8
U1.18-F4
U1.18-X4
Unit number EIA Major Subassembly/
U1.18-F3
U1.18-X3

Rack # Position Assembly Connector

U1.18-F1 U1.18-F2
U1.18-X1 U1.18-X2
pSeries 690 Service Guide AIX and Physical Location
U1.17
Code Reference Tables (Example)
U1.15-P1-V1 or U1.13

U1.9 FRU Name Location Code AIX Location


Code
U1.5
SCSI DASD 1 hdisk U1.9-P2/Z2-A8 3s-08-00-8,0
U1.1
at ID 8 connected to
controller 2 on P2
Primary Rack (Front)
Copyright IBM Corporation 2005

Figure 5-15. pSeries 690 Location Codes AW185.0

Notes:

Introduction
Physical addressing has been in place throughout the history of the RS/6000 and
pSeries family of products. An important change with the pSeries 670 and 690 servers
is that the I/O drawers are installed at specific locations within the rack. We include the
visual above primarily as reference. Our focus is on I/O drawer addressing.
The example in the visual above shows location codes for the pSeries 690. The Service
Guide for each type of system contains charts to look up the location codes.

Physical location scheme


The format for the physical address of a component is described in the visual above.
These values are predetermined and cannot be changed or specified by the user.
These addresses are documented in the pSeries 690 Service Guide.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-27


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

Physical location code example


Rack positioning is a key component of device addressing in these machines, unlike
with previous pSeries and RS/6000 products.
An example of this addressing scheme is shown on the visual:
U1.5 The rack position is denoted here, with the 1 referring to the first rack, and the
5 referring to the EIA position in the rack
P1 Major Assembly here refers to Planar 1 in the I/O drawer in the given rack
position
I1/Z1 Either a PCI slot, or integrated SCSI controller in a I/O drawer

AIX location codes


The AIX location code is presented within AIX as before, as a four field entry. The AIX
location code is case sensitive as of AIX 5L V5.1, a departure from previous versions of
AIX.

Location code to AIX location code table


Service guides such as the pSeries 690 Service Guide contain AIX and Physical
Location Code Reference Tables that show location codes and AIX location codes for
system components. An example is shown on the visual.

Important AIX commands


The following commands can be used to show location code information:
- List all adapters and their AIX location codes: lsdev -Cc adapter
- List hot plug PCI slots and their characteristics: lsslot -c pci
- Show information about a device, including the physical location code: lscfg -vl
xyz where xyz is the name of a device such as ent0 or ssa0

5-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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


sys0 Available System Object
pci0 Available P1 PCI Bus
pci1 Available P1.1 10-b8 PCI Bus
isa0 Available P1 10-58 ISA Bus
sa0 Available P1/S1 01-S1 Standard I/O Serial Port
scsi0 Available P1/Z1 10-80 Wide/Fast-20 SCSI I/O Controller
cd0 Available P1/Z1-A3 10-80-00-3,0 SCSI Multimedia CD-ROM Drive
rmt0 Defined P1/Z1-A0 10-80-00-0,0 4.0 GB 4mm Tape Drive
hdisk0 Available P1/Z1-A4 10-80-00-4,0 16 Bit SCSI Disk Drive
hdisk1 Available P1/Z1-A5 10-80-00-5,0 16 Bit SCSI Disk Drive
mem0 Available Memory
ent0 Available P1/E1 10-60 IBM 10/100 Mbps Ethernet PCI
tok0 Available P1.1-I3/T1 10-90 IBM PCI Tokenring Adapter

Copyright IBM Corporation 2005

Figure 5-16. Listing Device Physical Locations AW185.0

Notes:

Using lsdev to list location codes


The use of physical location codes is becoming more common, especially in problem
determination involving the physical devices on recent pSeries systems.
By default the lsdev command only shows the traditional AIX locations codes, but it
does allow us to ask for additional information. In particular, you can use the -F Format
flag to display lsdev output in a format that you specify using the Format parameter.
The Format parameter is a quoted list of column names separated and possibly ended
by non-alphanumeric characters or white space.
In the example shown on the visual, the command lsdev -C -H -F "name status
physloc location description" uses the -F flag of the lsdev command to display
both the physical location code and the AIX location code for the devices listed. The
physloc format option provides the physical location of a device and the location
format option provides the logical location of a device.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-29


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 2005

Figure 5-17. Adding an ASCII Terminal AW185.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 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 smit tty. This screen is used to manage the
configuration of asynchronous devices.
To add the terminal, select Add a TTY.

5-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 5-18. Attachment AW185.0

Notes:

Introduction
Once you select Add a TTY, you will then be 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. rs232 is the most
common TTY type.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-31


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

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

Location code
The location code is also displayed. 01-S1 is, in fact, the location code of serial port 1.
sa2, sa3, and sa4 are remote asynchronous nodes used in conjunction with the
128-port async adapter.
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.

5-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 5-19. Device Nomenclature AW185.0

Notes:

Pictorial view
This visual shows a picture and the associated nomenclature for the Add a TTY
scenario that were discussing.

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-33


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 2005

Figure 5-20. Add a TTY AW185.0

Notes:

PORT number
There is only one mandatory field on this screen and that is the PORT number. The F4
key will provide a list of possible port numbers. For the first built-in serial port, 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

5-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Enable LOGIN


The Enable LOGIN attribute will be 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, 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, 2005 Unit 5. Devices 5-35


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 2005

Figure 5-21. Documenting Hardware Configuration AW185.0

Notes:

Commands to help document device configurations


Documentation is an important part of a 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 of devices in 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 machine. It includes
vital product data (VPD), which has information such as the manufacturer, type and
model, and part numbers. Not all devices have VPD.

5-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - lsattr -El sys0


Provides attributes for the device. In this example, it is providing the attributes for the
kernel. 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 a command such as
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 command examples


The following are examples illustrating use of the getconf command:
# getconf BOOT_DEVICE
hdisk0

# getconf MACHINE_ARCHITECTURE
chrp

# getconf KERNEL_BITMODE
32

# getconf HARDWARE_BITMODE
32

# getconf REAL_MEMORY
131072

# getconf DISK_PARTITION /dev/hdisk0


16

# getconf DISK_SIZE /dev/hdisk0


8678

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-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. 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 2005

Figure 5-22. Checkpoint (1 of 2) AW185.0

Notes:

5-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 5-23. Checkpoint (2 of 2) AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 5. Devices 5-39


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 into 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 2005

Figure 5-24. Unit Summary AW185.0

Notes:

5-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 6. 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
Info Center AIX 5L Version 5.3 Commands Reference
Info Center AIX 5L Version 5.3 General Programming Concepts:
Writing and Debugging Programs
Info Center AIX 5L Version 5.3 Technical Reference: Kernel and
Subsystems

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 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 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 2005

Figure 6-1. Unit Objectives AW185.0

Notes:

Importance of this unit


The ODM is a very important component of AIX and is one major feature that
distinguishes AIX from other UNIX systems. This unit describes the structure of the
ODM and explains how you can work with ODM files 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.

6-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 6.1 Introduction to the ODM

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 use of objects with associated
characteristics.

Copyright IBM Corporation 2005

Figure 6-2. What Is the ODM? AW185.0

Notes:

6-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 6-3. Data Managed by the ODM AW185.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
- NIM (Network Installation Manager) information
- SMIT menus and commands

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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.

6-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
ODM Components

uniquetype attribute deflt values

tape/scsi/4mm4gb block_size 1024 0-16777215,1

disk/scsi/1000mb pvid none

tty/rs232/tty login disable enable, disable,


...

Copyright IBM Corporation 2005

Figure 6-4. ODM Components AW185.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-5. ODM Database Files AW185.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.

6-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-6. Device Configuration Summary AW185.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.

6-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 6-7. Configuration Manager AW185.0

Notes:

Device management methods


Methods used in management of a device (adding, removing, changing, and so forth)
are referenced in the PdDv object for the device. The cfgmgr configures a device tree
of objects. The Config_Rules object class helps identify what are the top objects of the
tree and what methods to use to talk to them. As parent objects identify their children,
the appropriate method is called to talk to each child. Once the type of device is
determined, the PdDv helps identify what method should be used to define and
configure the device.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-8. Location and Contents of ODM Repositories AW185.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.

6-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 = "tty name = "tty0
class = "tty status = 1
subclass = "rs232 chgstatus = 1
mkdev -c tty -t tty -s rs232 location = "01-C0-00-00
prefix = "tty parent = "sa0
connwhere = "s1
Define ="/etc/methods/define
Configure = "/etc/methods/cfgtty PdDvLn = "tty/rs232/tty"

uniquetype = "tty/rs232/tty"

PdAt:
uniquetype = "tty/rs232/tty CuAt:
attribute = "login name = "tty0
deflt = "disable attribute = "login
values = "enable, disable, ..." value = "enable
type = "R"
chdev -l tty0 -a login=enable
PdAt:
uniquetype = "tty/rs232/tty CuAt:
attribute = "term chdev -l tty0 -a term=ibm3151 name = "tty0
deflt = "dumb attribute = "term
values = "" value = "ibm3151
type = "R"

Copyright IBM Corporation 2005

Figure 6-9. How ODM Classes Act Together AW185.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, for a terminal,
means you could not login (default is disable) and the terminal type is dumb. If you
change the attributes, for example, login to enable and term to ibm3151, you get
objects describing the nondefault values in CuAt.

6-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Data Not Managed by the ODM

Filesystem
information ?

User/Security
information ?

Queues and
Queue devices ?

Copyright IBM Corporation 2005

Figure 6-10. Data Not Managed by the ODM AW185.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-11. Lets Review: Device Configuration and the ODM AW185.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?

6-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
ODM Commands
Object class: odmcreate, odmdrop

Descriptors: odmshow

uniquetype attribute deflt values

tape/scsi/4mm4gb block_size 1024 0-16777215,1

disk/scsi/1000mb pvid none

tty/rs232/tty login disable enable, disable,


...

Objects: odmadd, odmchange, odmdelete, odmget


Copyright IBM Corporation 2005

Figure 6-12. ODM Commands AW185.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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.

6-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Changing Attribute Values
# odmget -q"uniquetype=tape/scsi/8mm and attribute=block_size" PdAt > file

# vi file

PdAt:
uniquetype = "tape/scsi/8mm"
attribute = "block_size"
deflt = "1024" Modify deflt to 512
values = "0-245760,1"
width = ""
type = "R"
generic = "DU"
rep = "nr"
nls_index = 6

# odmdelete -o PdAt -q"uniquetype=tape/scsi/8mm and attribute=block_size"

# odmadd file

Copyright IBM Corporation 2005

Figure 6-13. Changing Attribute Values AW185.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/8mm 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
has the block_size set to 1024) 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, 2005 Unit 6. The Object Data Manager (ODM) 6-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/8mm and attribute=block_size
In addition to the * wildcard, a ? can be used as a wildcard character.

6-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Using odmchange to Change Attribute Values

# odmget -q"uniquetype=tape/scsi/8mm and attribute=block_size" PdAt > file

# vi file

PdAt:
uniquetype = "tape/scsi/8mm"
attribute = "block_size"
deflt = "1024" Modify deflt to 512
values = "0-245760,1"
width = ""
type = "R"
generic = "DU"
rep = "nr"
nls_index = 6

# odmchange -o PdAt -q"uniquetype=tape/scsi/8mm and attribute=block_size" file

Copyright IBM Corporation 2005

Figure 6-14. Using odmchange to Change Attribute Values AW185.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, 2005 Unit 6. The Object Data Manager (ODM) 6-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

6-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 6.2 ODM Database Files

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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
state = 5 comp_id = "5765-C3403
ver = 5 state = 5
rel = 1 ver = 5
mod =0 rel = 1
fix = 0 mod =0
description = "Front End Printer fix = 0
Support ptf = "
lpp_id = 38 prereq = "*coreq bos.rte 5.1.0.0
description = "
supersedes = ""

inventory: history:
lpp_id = 38 lpp_id = 38
file_type = 0 ver = 5
format = 1 rel = 1
loc0 = "/etc/qconfig mod = 0
loc1 = " fix = 0
loc2 = " ptf = "
size = 0 state = 1
checksum = 0 time = 988820040
comment = ""
Copyright IBM Corporation 2005

Figure 6-15. Software Vital Product Data AW185.0

Notes:

Role of installp command


Whenever installing a product or update in AIX, the installp command uses the ODM
to maintain the Software Vital Product Database (SWVPD).

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 and modification level of the software product (for example,
5.2.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)

6-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-16. Software States You Should Know About AW185.0

Notes:

Introduction
The AIX software vital product database 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 doesnt 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.

6-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 = "8mm"
class = "tape"
subclass = "scsi"
prefix = "rmt"
...
base = 0
...
detectable = 1
...
led = 2418

setno = 54
msgno = 2
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/8mm"

Copyright IBM Corporation 2005

Figure 6-17. Predefined Devices (PdDv) AW185.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.

6-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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 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, 4.0 GB 8 mm Tape Drive) that is
shown when the device attributes are listed by the lsdev command. These two
descriptors are used to lookup the description in a message catalog.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 by rmdev -l.

Undefine
Names the undefine method associated with the device type. This program is called
when a device is undefined by rmdev -l -d.

Start, Stop
Few devices support a stopped state (only logical devices). A stopped state means that
the device driver is loaded, but no application can access the device. These two
attributes name the methods to start or stop a device.

6-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty uniquetype
This is a key that is referenced by other object classes. Objects use this descriptor as
pointer back to the device description in PdDv. The key is a concatenation of the class,
subclass and type values.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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/8mm"
attribute = "block_size"
deflt = "1024"
values = "0-245760,1"
...

PdAt:
uniquetype = "disk/scsi/1000mb"
attribute = "pvid"
deflt = "none"
values = ""
...

PdAt:
uniquetype = "tty/rs232/tty"
attribute = "term"
deflt = "dumb"
values = ""
...

Copyright IBM Corporation 2005

Figure 6-18. Predefined Attributes (PdAt) AW185.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.

6-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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. Nondefault 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 245760, with an
increment of 1.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 = "rmt0"
status = 1
chgstatus = 2
ddins = "tape"
location = "04-C0-00-1,0"
parent = "scsi0"
connwhere = "1,0"
PdDvLn = "tape/scsi/8mm"

CuDv:
name = "tty0"
status = 1
chgstatus = 1
ddins = ""
location = "01-C0-00-00"
parent = "sa0"
connwhere = "S1"
PdDvLn = "tty/rs232/tty"

Copyright IBM Corporation 2005

Figure 6-19. Customized Devices (CuDv) AW185.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 may be updated by cfrmgr during system bootup to define new devices (if the
device is detectable) or modify the information for a device that has changed or that has
been removed. We can also update the customized database through our use of
cfgmgr or mkdev during system runtime.
The key descriptors in CuDv are described in the next few paragraphs.

6-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, a tape device
rmt0 and a tty, tty0.

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 Predefined Devices (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 rmt0
is scsi0.

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 rmt0 uses the SCSI address 1,0.

PdDvLn
Provides a link to the device instance's predefined information through the uniquetype
descriptor in the PdDv object class.

6-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Customized Attributes (CuAt)

CuAt:
name = "tty0"
attribute = "login"
value = "enable"
...

CuAt:
name = "hdisk0"
attribute = "pvid"
value = "0016203392072a540000000000000000"
...

Copyright IBM Corporation 2005

Figure 6-20. Customized Attributes (CuAt) AW185.0

Notes:

The Customized Attribute (CuAt) object class


The Customized Attribute (CuAt) object class contains customized device-specific
attribute information.
Devices represented in the Customized Devices (CuDv) object class have attributes
found in the Predefined Attribute (PdAt) object class and the CuAt object class. There
is an entry in the CuAt object class for attributes that take customized values. Attributes
taking the default value are found in the PdAt object class. Each entry describes the
current value of the attribute.

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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 = "22
connwhere = "1,0" value2 = "0
value3 = "rmt0
PdCn:
uniquetype = "adapter/pci/sym875 CuDvDr:
connkey = "scsi resource = "devno"
connwhere = "2,0" value1 = "22"
value2 = "1"
value3 = "rmt0.1"

CuDep: CuVPD:
name = "rootvg name = "rmt0
dependency = "hd6" vpd = "*MFEXABYTE
PN21F8842"
CuDep:
name = "datavg
dependency = "lv01"

Copyright IBM Corporation 2005

Figure 6-21. Additional Device Object Classes AW185.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

6-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty logical devices, exclusively. Physical dependencies of one device on another device are
recorded in the Customized Devices (CuDev) object class.
The sample CuDep objects on the visual show the dependencies between logical
volumes and the volume groups they belong to.

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 tape rmt0. The
major number 22 specifies the driver in the kernel, the minor numbers 0 and 1 specify
two different operating modes. The operating mode 0 specifies a rewind on close for the
tape drive, the operating mode 1 specifies 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, 2005 Unit 6. The Object Data Manager (ODM) 6-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 the defined state and the


available state?
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________

Copyright IBM Corporation 2005

Figure 6-22. Checkpoint AW185.0

Notes:

6-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: The Object Data Manager (ODM)

Exercise 4

Copyright IBM Corporation 2005

Figure 6-23. Exercise: The Object Data Manager (ODM) AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 6. The Object Data Manager (ODM) 6-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 2005

Figure 6-24. Unit Summary AW185.0

Notes:

6-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 7. 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 its 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
Info Center System Management Concepts: Operating System
and Devices
Info Center System Management Guide: Operating System and
Devices
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, 2005 Unit 7. System Boot: Hardware 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 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 2005

Figure 7-1. Unit Objectives AW185.0

Notes:

7-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 5L 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 2005

Figure 7-2. AIX Startup Process AW185.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, 2005 Unit 7. System Boot: Hardware 7-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 2005

Figure 7-3. Loading the Boot Image AW185.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.

7-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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.

Boot logical volume


The boot logical volume (BLV) is a logical volume on the boot disk which contains the
boot image. The boot logical volume 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, 2005 Unit 7. System Boot: Hardware 7-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

7-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 7-4. Boot Disk AW185.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 boot logical volume.

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, 2005 Unit 7. System Boot: Hardware 7-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 boot logical volume, 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 boot logical volume 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 standalone
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).

7-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Base ODM


The boot logical volume 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 boot logical volume.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-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 Boot Logical Volume (BLV)

Updates boot record

Copyright IBM Corporation 2005

Figure 7-5. Creating the Boot Image AW185.0

Notes:

Introduction
Initially, the boot logical volume is created as part of software installation. The boot
logical volume 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 boot logical volume manually, for example:
- If the boot logical volume has become corrupted, the system will not boot.
- If a new kernel is needed. Since the system kernel is loaded from the boot logical
volume, you must update the boot logical volume if you wish to use a new kernel.
- If you want to enable kernel debug features or change certain performance related
variables.

7-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty bosboot command


The bosboot command creates the boot image on the specified boot device. bosboot
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 boot logical volume 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.) that the boot image is being created for.

Kernel
By default, bosboot uses /unix on the root file system for the kernel in the boot image.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-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
Create a complete boot image and write it to the boot logical
-a
volume.
Use -d device to specify the physical boot disk (normally
/dev/hdisk0) containing the boot logical volume which you want to
update. The bosboot command will identify the boot logical volume
-d device
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).

7-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
How to Fix a Corrupted BLV

Select volume group


that contains hd5
Boot from
5
CD, tape or
or NIM (F1 or #1
to set SMS Maintenance
F5 options)
1 Access a Root Volume Group

# bosboot -ad /dev/hdisk0

# shutdown -Fr

Copyright IBM Corporation 2005

Figure 7-6. How to Fix a Corrupted BLV AW185.0

Notes:

Introduction
If a boot logical volume has been corrupted (for example, bad blocks on a disk might
cause this), the system will not boot. To fix the problem, you must boot your machine
from an alternate media in maintenance mode.

Maintenance mode
You can boot in maintenance mode by setting the boot list to boot from CD-ROM, NIM
Server, or tape. The CD-ROM, or tape has a separate boot image, allowing you to boot
even though the boot logical volume on your system disk is corrupt.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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. This will be covered later in this unit. After
accessing the rootvg, you can repair the boot logical volume with the bosboot
command. You need to specify the corresponding disk device, for example hdisk0:
bosboot -ad /dev/hdisk0
It is important that you do a proper shutdown. All changes need to be written from
memory to disk.
The bosboot command requires that the boot logical volume (hd5) exists. If you ever
need to re-create the boot logical volume 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 (F5 or 5) or use (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 boot list.
# 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.

7-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty bosboot problems


If bosboot fails and issues the following warning:
0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.
This means that bosboot began to write the boot image and failed. The boot image on
the target device is now corrupted and you will not be able to boot using that device until
you run bosboot successfully to completion.
If you get this error when trying to re-create a corrupted boot image on the boot disk,
you may have to delete hd5 and then create a new hd5. Then, run bosboot again. Or,
you may have to run diagnostics on the hard disk.

bootinfo command
bootinfo is a low level command used by bosboot to gather information in order to
create a boot image. Although it is not considered a user level command, there are
several options which may be useful:
bootinfo Option Description
-b Displays the last boot device
-p Displays the hardware architecture type
Indicates which kernel is running (AIX 5L V5.1 and later)
-K 32 32 -bit kernel
64 64-bit kernel
Indicates the type of boot
1 Disk boot
-t 3 CD-ROM boot
4 Tape boot
5 Network boot
Indicates if the system is multi-processor (MP) capable
-z 0 Not MP capable
1 MP capable
-y Displays 64 if the machine can run the 64-bit kernel

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working with Boot Lists


Normal Mode:
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0
hdisk1

Service Mode:
# bootlist -m service -o
fd0
cd0
hdisk0
tok0

# diag
TASK SELECTION LIST
SCSI Bus Analyzer
Download Microcode
Display or Change Bootlist
Periodic Diagnostics
Copyright IBM Corporation 2005

Figure 7-7. Working with Boot Lists AW185.0

Notes:

Introduction
You can use the command bootlist or diag from the command line to change or
display the boot lists. You can also use the System Management Services (SMS)
programs. SMS is covered on the next visual.

bootlist command
The bootlist command is the easiest way to change the boot list. The first example
shows how to change the boot list for a normal boot. In this example, the system was
booted either from hdisk0 or hdisk1. To query the boot list, the option -o option can be
used.
The second example shows how to display the service mode boot list.

7-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 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 boot lists. Working
with the diag command is covered later in the course.

Types of boot lists


The custom boot list is the normal boot list set via the bootlist command, the diag
command or the SMS programs. The normal boot list is used during a normal boot. The
default boot list is called when F5 or F6 is pressed during the boot sequence. Other
machines, in addition to the default boot list and the custom boot list, allow for a
customized service boot list. This is set using mode service with the bootlist
command. The default boot list is called when F5 is pressed during boot. The service
boot list is called when F6 is pressed during boot. (For POWER5 systems, the numeric 5
or 6 key is used).
You may find variations on the different models of AIX systems. Refer to the Users
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, 2005 Unit 7. System Boot: Hardware 7-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Starting System Management Services


Reboot or power on the system
Press F1 or numeric 1

...
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000

memory keyboard network scsi speaker


RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 STARTING SOFTWARE RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 PLEASE WAIT... RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000 RS/6000
...

Copyright IBM Corporation 2005

Figure 7-8. Starting System Management Services AW185.0

Notes:

SMS ASCII and graphic modes


You can also change the boot list with the System Management Services (SMS). The
SMS programs are integrated into the hardware (they reside in NVRAM).
The visual shows how to start the System Management Services in ASCII mode 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 usually will 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 boot list to find the boot image and it is too late to change it. One of the

7-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty keyboard actions you may do during this brief period of time is to press the F1 (or
numeric 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 box when activating.
To start SMS using the Advanced Option for Power On under a POWER5 HMC:
Activate the partition using the SMS boot mode. Do this by clicking on the
Advanced button when activating the partition. In the Boot Mode drop down, select
SMS. Dont forget to choose to open a terminal window. The partition will stop at the
SMS menu.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Working with Boot Lists in SMS


System Management Services

1 Display Configuration
2 Multiboot Multiboot
3 Utilities
4 Select Language 1 Select Software
2 Software Default
3 Select Install Device Select Boot Devices
===> 2 4 Select Boot Devices
5 OK Prompt 1 Display Current Settings
6 Multiboot Startup <OFF> 2 Restore Default Settings
3 Configure 1st Boot Device
===> 4 4 Configure 2nd Boot Device
5 Configure 3rd Boot Device
Configure 1st Boot Device 6 Configure 4th Boot Device
7 Configure 5th Boot Device
Device Current Device
Number Position Name ===> 3
1 - Diskette
2 - SCSI Tape id=@2,0 ( Integrated )
3 - SCSI CD-ROM id=@1,0 ( Integrated )
4 1 SCSI 9100 MB Harddisk id=@8,0 ( Integrated )
5 - IBM 100/10 Ethernet Adapter ( Integrated )
6 None
.------.
|X=Exit|
===> `------'
Copyright IBM Corporation 2005

Figure 7-9. Working with Boot Lists in SMS AW185.0

Notes:

Working with the boot list


In the System Management Service menu, select Boot or Multiboot or Select Boot
Options (model-dependent) to work with the boot list. The look of the menu differs on
the various models and firmware levels.
The following keys are used, depending on your system model:
- F1 (graphic) or 1 (ASCII) terminal: Start System Management Services
- F5 (graphic) or 5 (ASCII) terminal: Start a service boot from disk using the default
service boot list (which searches the removable media first)
- F6 (graphic) or 6 (ASCII) terminal: Start a service boot from disk, use custom service
boot list

7-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Boot device sequence


RS/6000s and pSeries systems support up to five boot devices. Some models only
support four. A default boot list is stored with the following sequence:
1. Diskette drive
2. CD-ROM
3. Internal disk
4. Communication adapter (like Ethernet or token-ring)

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Service Processors and Boot Failures


Boot failure!

553

Modem
S1 S2
Automatic transmittal of
boot failure information
Service Processor
Modem IBM Support
553, ... Center

Copyright IBM Corporation 2005

Figure 7-10. Service Processors and Boot Failures AW185.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.

7-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty A valid service contract is a prerequisite for this dial-out feature of the service
processor.

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.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Accessing a System That Will Not Boot


Boot the system from
the BOS CD-ROM, tape (F1 or 1)
or
network device (NIM) (F1 or 1)
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 2005

Figure 7-11. Accessing a System That Will Not Boot AW185.0

Notes:

Introduction
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 on a NIM master. The devices that
contain the boot media must be stored in the boot lists.

Boot into maintenance mode


To boot into maintenance mode:
- AIX 5L V5.3 systems support the bootlist command and booting from a mksysb
tape, but the tape device is, by default, not part of the boot sequence.
- Verify your boot list, but do not forget that some machines do not have a service
boot list. Check that your boot device is part of the boot list:
# bootlist -m normal -o

7-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - If you want to boot from your internal tape device you need to change the boot list
because the tape device by default is not part of the boot list. 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 POWER4 and POWER5 partitioned systems with an HMC, use the HMC to access
SMS and then select the bootable device.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Booting in Maintenance Mode


Welcome to Base Operating System
Installation and Maintenance
Define the System >>> 1 Start Install Now with Default Settings
Console
2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

Choice [1]: 3

Maintenance
>>> 1 Access a Root Volume Group

2 Copy a System Dump to Removable Media

3 Access Advanced Maintenance Functions

4 Install from a System Backup

Choice [1]: 1
Copyright IBM Corporation 2005

Figure 7-12. Booting in Maintenance Mode AW185.0

Notes:

First steps
When booting in maintenance mode, you first have to identify the system console that
will be used, for example your lft terminal or a tty that is attached to the S1 port.
After selecting the console, the Installation and Maintenance menu is shown.
To work in maintenance mode, use selection 3 to start up the Maintenance menu.
From this point, access rootvg to execute any system recovery steps that may be
necessary.

7-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Working in Maintenance Mode
Access a Root Volume Group
1. Volume Group 001620336e1bc8a3 contains these disks:
hdisk0 2063 04-C0-00-4,0

2. Volume Group 001620333C9b1b8e contains these disks:


hdisk1 2063 04-C0-00-5,0

Choice: 1

Volume Group Information


Volume Group ID 001620336e1bc8a3 includes the following logical volumes:

hd6 hd5 hd8 hd4 hd2 hd9var hd3

1. Access this Volume Group and start a shell

2. Access this Volume Group and start a shell before mounting file systems

99) Previous Menu

Choice [99]:
Copyright IBM Corporation 2005

Figure 7-13. Working in Maintenance Mode AW185.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 and not the names of the volume groups.
Check with your system documentation that you select the correct disk. Do not rely to
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

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Access this Volume Group and start a shell


When you choose this selection, the rootvg will be activated (by the 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 are:
- Changing a forgotten root password
- Re-creating the boot logical volume
- Changing a corrupted boot list

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

7-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Progress and Error Indicators
Progress and error codes
Operator panel
Front panel
HMC (for LPARs)
Online hardware documentation available at:
http://publib16.boulder.ibm.com/pseries/index.htm
Click on your geography
Click the AIX version (AIX53, AIX52, or AIX51)
For IBM Sserver p5 models:
Click Sserver Hardware Information Center
For pSeries and RS/6000 models:
Click Hardware documentation
For AIX message codes, click Message Center
RS/6000 Eserver pSeries Diagnostic Information for Multiple
Bus Systems (SA38-0509)
Copyright IBM Corporation 2005

Figure 7-14. Progress and Error Indicators AW185.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/or the operator
panel.
Beginning with AIX 5L V5.2, the operator panel will also display some text messages,
such as AIX is starting, during the boot process.

Operator panel
For non-LPAR systems, the operator panel is an LED display on the front panel.
POWER4- and POWER5-based systems can be divided into multiple logical partitions
(LPARs). In this case, a system-wide LED display still exists on the front panel.
However, the operator panel for each LPAR is displayed on the screen of the Hardware

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Management Console (HMC). The HMC is a separate system which is required when
running multiple LPARs.
Early PCI-based RS/6000 systems do not have an LED display. Status and error
messages are sent using the system speaker (beeps), the hard disk status light, or the
console. Refer to the RS/6000 Service Manual for your model for interpretation of these
signals.
The primary progress and error indicator for MicroChannel RS/6000 systems is the LED
display. Both system firmware and AIX send display codes to these LEDs during
system boot.

Display codes
During the boot process, several types of codes may be displayed:
- Hardware initialization:
System firmware sends boot status codes (called firmware checkpoints) to the
operator panel. Once the console is initialized, the firmware will 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.

Documentation
Online hardware documentation and AIX message codes are available at:
http://publib16.boulder.ibm.com/pseries/index.htm
At the first screen, click on your geography:
- North America
- South America
- Europe
- Africa
- Asia, Middle East
- Australia, Oceania
At the next screen, click on the AIX version for the documentation youre interested in.
Depending on your geography, for each version multiple languages are available.
Available versions are:
- AIX53 (AIX 5L V5.3)
- AIX52 (AIX 5L V5.2)
- AIX51 (AIX 5L V5.1)

7-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty At this point, one of two different information center formats is shown:
- For AIX 5L V5.1 and V5.2, the documentation remains in the older Documentation
Library Services format
- For AIX 5L V5.3, the documentation is in the new information center format
There are two different portals for hardware documentation:
- For POWER4 and earlier RS/6000 and pSeries models, click on:
Hardware documentation. A library of documents will be displayed containing the
installation, user's, and service guides for the selected IBM pSeries and IBM
RS/6000 server hardware systems. You can browse or download the IBM pSeries
and IBM RS/6000 system and related device documentation.
- For IBM Sserver p5 models, click on:
Sserver Hardware Information Center. The information is task-based designed
for interactivity. Task-based information is organized by user tasks rather than by
individual server models. The interactive design allows the information center to
offer interactive information, such as interviews that provide customized checklists,
demos that clarify complex concepts, and video clips that show intricate installation
tasks.
In addition to hardware documentation, there is a link to the AIX Message Center. The
Message Center is a repository of available message information for AIX and pSeries
systems. With the message database, you can search on and obtain information on
error messages and display codes. Cause and recovery information is available for
many of these messages.
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.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Firmware Checkpoints and Error Codes

LED/LCD
Monitor display
20EE000B F22

"Boot record "No memory found"


Error"

Copyright IBM Corporation 2005

Figure 7-15. Firmware Checkpoints and Error Codes AW185.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.

7-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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
Concurrent (Requires an HMC interface)
Firmware Maintenance can be done:
Using the HMC
Through the operating system
Systems with an HMC should normally use the HMC
Firmware maintenance through the operating system is
always disruptive
Copyright IBM Corporation 2005

Figure 7-16. Firmware Fixes AW185.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 Licensed Internal Code 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

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

interfaces and methods, 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 Licensed Internal Code that enables the
power subsystem hardware in the model 57x or 59x 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 Licensed Internal Code 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 update or upgrade, a complete system shutdown and restart is
required before the LIC update 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 the HMC or
through the operating system. For managed systems that use an HMC, the default is to
install fixes through the HMC.

7-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Getting Firmware Updates from the Internet
Get firmware updates from IBM at:
http://techsupport.services.ibm.com/server/mdownload

Update firmware via:


System Management Services
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 courses
Select Performing Licensed Internal Code
Maintenance

Copyright IBM Corporation 2005

Figure 7-17. Getting Firmware Updates from the Internet AW185.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


To install the new firmware level using SMS with the ASCII interface, start the System
Management Services and select Utilities. From there, select Update System
Firmware. If you are using the graphical interface, you would select Utilities followed
by Update.
If your system has an HMC, you can use the Web-based System Manager from your
HMC to install the firmware fixes.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

For more information


An online course available called Performing Licensed Internal Code Maintenance.
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 courses
3. Select Performing Licensed Internal Code Maintenance

7-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 7-18. Checkpoint (1 of 2) AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 an CHRP system). ______________________
________________________________________________
9. How do you boot an AIX machine in maintenance mode?
________________________________________________
________________________________________________
10. Your machine keeps rebooting and repeating the POST.
What can be the reason for this?
________________________________________________
________________________________________________
Copyright IBM Corporation 2005

Figure 7-19. Checkpoint (2 of 2) AW185.0

Notes:

7-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: System Boot: Hardware

Exercise 5

Copyright IBM Corporation 2005

Figure 7-20. Exercise: System Boot: Hardware AW185.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

Copyright IBM Corp. 2000, 2005 Unit 7. System Boot: Hardware 7-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

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 2005

Figure 7-21. Unit Summary AW185.0

Notes:

7-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Unit 8. System Boot: Software

What This Unit Is About


This is the second of two units that deal with the AIX 5L 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
Info Center System Management Concepts: Operating System
and Devices
Info Center System Management Guide: Operating System and
Devices
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, 2005 Unit 8. System Boot: Software 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:
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 2005

Figure 8-1. Unit Objectives AW185.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 5L initialization and
provides practice 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.

8-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
AIX 5L 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) Yes
config tool? y Hardware configuration
y Bootlist configuration
Load boot image into memory
Yes
No

AIX 5L Initialization
Normal mode Normal Locate boot device using
(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 2005

Figure 8-2. AIX 5L Startup Process AW185.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, 2005 Unit 8. System Boot: Software 8-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

AIX 5L 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 2005

Figure 8-3. AIX 5L Initialization Overview AW185.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. rc.boot 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.)

8-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 /etc/inittab, starting the remaining processes to complete the
transition to multiuser mode.

Type of boot
AIX 5L 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, 2005 Unit 8. System Boot: Software 8-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

Display End rc.boot 1 Devices to activate


code rootvg are configured !
Copyright IBM Corporation 2005

Figure 8-4. rc.boot 1 . AW185.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).

8-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 LED 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, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-5. rc.boot 2 (Part 1) AW185.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.

8-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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.
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 of the RAM file system. Ordinarily
this would prevent access to the contents of the RAM file system. However, AIX 5L 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
copycore 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, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-6. RAM File System and rootvg (Part 1) AW185.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

8-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-7. rc.boot (Part 2) AW185.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, 2005 Unit 8. System Boot: Software 8-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

8. Copy /dev
mergedev 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. newroot() forces
the unmount of the RAM file system and the memory is returned to the free pool.
The kernel then restarts init, but now its using the disk-based version of init.

8-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-8. RAM File System and rootvg (Part 2) AW185.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, 2005 Unit 8. System Boot: Software 8-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

Display 5. Update the ODM in the boot


savebase
code logical volume
Copyright IBM Corporation 2005

Figure 8-9. rc.boot 3 (Part 1) AW185.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 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.

8-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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).
cfgmgr 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. cfgcon 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
savebase is run to synchronize the ODM in the boot logical volume with the ODM from
the root file system.

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-10. rc.boot 3 (Part 2) AW185.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


errdemon is started. This process 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.

8-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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


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


rc.boot 3 is finished. The last message,
System initialization completed,
is displayed (and sent to the boot log) and rc.boot exits.

12. init continues


init continues starting processes from /etc/inittab, completing the transition to
multiuser mode.

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-11. rc.boot Summary AW185.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)

8-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-12. Boot Problem Management AW185.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 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.

8-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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 boot logical volume.
To fix a corrupted boot logical volume, 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 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, 2005 Unit 8. System Boot: Software 8-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.

8-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-13. Configuration Manager AW185.0

Notes:

When the configuration manager is invoked


During system boot, the configuration manager is invoked to configure all devices
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
configuration manager uses the methods from PdDv to manage the device state, for
example, to bring a device into the defined or available state.

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Installing new device support


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

8-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-14. Config_Rules Object Class AW185.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, 2005 Unit 8. System Boot: Software 8-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.

8-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-15. Device Names and CD-ROM Example AW185.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 cannot 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, there are two systems (HOST1 and HOST2). Both systems are
shutdown 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, 2005 Unit 8. System Boot: Software 8-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 now did 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.

8-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-16. The alog Facility AW185.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, 2005 Unit 8. System Boot: Software 8-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.
alog is used by the rc.boot script and the configuration manager during the boot
process to log important events. If the machine will 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.

8-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 alogs standard input. For example:
# echo Test Message | alog -t console
will append Test Message to /var/adm/ras/conslog.

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-17. System Hang Detection AW185.0

Notes:

Types of system hangs


shdaemon 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 the kernel in tight loop. In these cases, no (or very
little) meaningful work will get done. shdaemon may help with some of these
problems.

8-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 monitors to see if lower priority processes are being
scheduled.
shdaemon 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 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 system

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-18. Configuring shdaemon . AW185.0

Notes:

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

8-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, shdaemon is enabled to monitor process priority (sh_pp=enable), and
the following actions are enabled:
- Log Error in the Error Logging (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, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-19. System Resource Controller AW185.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 subsystem or groups of
subsystems with a few commands.
The relationship between the group and subsystem is easily seen from the output of
lssrc -a. The visual shows the relationship between the spooler subsystem group and
its subsystems qdaemon, writesrv, and lpd. Some subsystem have subservers. For
example, the TCP/IP group contains a subsystem, inetd, that has several subservers,
for example ftp and telnet.

8-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 8-20. Using the System Resource Controller AW185.0

Notes:

SRC Status
The lssrc command is used to show the status of SRC. In the example, we are
checking the status of the spooler group using -g. 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, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-21. Checkpoint (1 of 2) AW185.0

Notes:

8-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Checkpoint (2 of 2)
3. Which ODM file is used by the 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 the shdaemon?


_________________________________________________
_________________________________________________
_________________________________________________

6. Which AIX feature can be used to start and stop groups of


daemons or programs? ______________________________

Copyright IBM Corporation 2005

Figure 8-22. Checkpoint (2 of 2) AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-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 2005

Figure 8-23. Exercise: System Boot: Software AW185.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

8-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 varyon 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 can help recover from certain types of
system hangs
The System Resource Controller (SRC) provides
commands to make it easier to control subsystems

Copyright IBM Corporation 2005

Figure 8-24. Unit Summary AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 8. System Boot: Software 8-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

8-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Info Center AIX 5L Version 5.3 System Management Concepts:
Operating System and Devices
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices
Info Center AIX 5L Version 5.3 Commands Reference
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, 2005 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 2005

Figure 9-1. Unit Objectives AW185.0

Notes:

Importance of this unit


The AIX logical volume manager (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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 9.1 LVM Terminology and Concepts

Copyright IBM Corp. 2000, 2005 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

Logical Volume Manager Components


Volume group
Volume group (VG) logical
logical
volumes
logical
Physical volume (PV) volumes
Logical
volumes
volumes
Physical partition (PP)
physical
physical
Logical volume (LV) physical
disks
physical
disks
Physical
disks
disks
volumes
Logical partition (LP)

Logical volume

LP0 LP1 LP2

PP20 PP42 PP52


Physical volume Physical volume

Copyright IBM Corporation 2005

Figure 9-2. Logical Volume Manager Components AW185.0

Notes:

Introduction
The AIX Logical Volume Manager 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Volume group (VG)


A volume group (VG) is the largest unit of storage allocation. A VG consists of a group
of one or more physical volumes (disks) all of which are accessed under one VG name.
The combined storage of all the physical volumes 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
system. All disks in the VG must move together.

Physical volume (PV)


A physical volume (PV) is the name for an actual disk or hard 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 volume group (VG).

Physical partition (PP)


All of the physical volumes in a volume group are divided into physical partitions (PPs).
All the physical partitions within a volume group are the same size, although different
volume groups can have different PP sizes.
The physical partition size is the smallest allocation unit for the LVM. The partition size
is specified in units of megabytes from 1 (1 MB) through 131072 (128 GB). The physical
partition size must be equal to a power of 2 (example 1, 2, 4, 8). The default physical
partition size values for normal and big volume groups (more on these later) will be the
lowest value that can be used to remain within a limitation of 1016 physical partitions
per PV. The default value for scalable volume groups (introduced in AIX 5L V5.3) will be
the lowest value that can be used to accommodate 2040 physical partitions per PV.
(There is no actual limit on the number of physical partitions per physical volume for
scalable volume groups, although there is currently a limit of 2097152 (2 M or 2048 K)
physical partitions for the entire volume group.)

Logical volume (LV)


Within each volume group, one or more logical volumes (LVs) are defined. Logical
volumes are collections of information located on physical volumes. Data on logical
volumes appears to be contiguous to the user but can be non-contiguous on the
physical volume or can even be located on several physical volumes (as long as the
physical volumes are in the same volume group).
Logical volumes contain the JFS and JFS2 file systems, paging spaces, journal logs,
the boot logical volumes, or nothing (when used as a raw logical volume).

Copyright IBM Corp. 2000, 2005 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

Logical partition (LP)


Each logical volume consists of one or more logical partitions (LPs). Logical partitions
are the same size as the physical partitions within a volume group. Each logical partition
is mapped to at least one physical partition. Although the logical partitions are
numbered consecutively, the underlying physical partitions are not necessarily
consecutive or contiguous.
This allows file systems, paging space, and other logical volumes to be resized or
relocated, to span multiple physical volumes, and to have their contents replicated for
greater flexibility and availability in the storage of data.

9-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Normal and Big 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 2005

Figure 9-3. Normal and Big Volume Group Limits AW185.0

Notes:

Volume group types prior to AIX 5L V5.3


On systems running versions of AIX 5L prior to AIX 5L V5.3, two different volume group
types are available:
- Normal volume groups: When creating a volume group with the mkvg command,
without specifying either the -B flag or the -S flag, a normal volume group is created.
The maximum number of logical volumes in a normal volume group is 256. This
volume group type is sometimes referred to as the standard volume group, original
volume group (in SMIT), small volume group, or default volume group type.
- Big volume groups: This volume group type was introduced with AIX V4.3.2. A big
volume group can be created using the -B flag of mkvg or by choosing the
appropriate selection in SMIT.
A big volume group cannot be imported into AIX V4.3.1 or prior versions.
The maximum number of logical volumes in a big volume group is 512.

Copyright IBM Corp. 2000, 2005 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

The mkvg command


The mkvg command can be used to create volume groups. Here are some examples
illustrating 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. It is important to
realize that the maximum number of physical volumes in the normal volume group
decreases in proportion to the specified -t argument. As indicated by the first table
on the visual, that means that the volume group can have up to 16 disks. The size of
each disk must be less than or equal to 32512 megabytes (2032 * 16 MB).
- The option -y specifies the name of the volume group (datavg).
2. Create a big volume group bigvg with three disks:
# mkvg -B -t 16 -y bigvg hdisk2 hdisk3 hdisk4
- The option -B specifies that we are creating a big volume group.
- 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 volume
group can have up to 8 disks.
- The option -y specifies the name of the volume group.

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

9-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Scalable Volume Groups - AIX 5L V5.3
Support 1024 disks per volume group.
Support 4096 logical volumes per volume group.
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.

New!

Copyright IBM Corporation 2005

Figure 9-4. Scalable Volume Groups - AIX 5L V5.3 AW185.0

Notes:

Scalable volume group description


AIX 5L V5.3 takes LVM scalability to the next higher level and offers a new scalable
volume group (scalable VG) type. 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 above the 1024 (1 GB) maximum for AIX 5L V5.2.
(The new maximum PP size provides an architectural support for 256 PB disks.)

Copyright IBM Corp. 2000, 2005 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

Logical volume control block (LVCB)


The logical volume control block (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 -T option of the
mklv command to request that the LVCB not be stored in the beginning of the LV.) With
scalable VGs, logical volume control information is no longer stored on the first user
block of any LV. All relevant logical volume 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 logical volumes, because there is no longer a need to preserve
the information held by the first 512 bytes of the logical device.

9-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 9-5. Configuration Limits for Volume Groups AW185.0

Notes:

Comparing volume group types


The table on the visual provides a comparison of key characteristics of the three volume
group 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

Copyright IBM Corp. 2000, 2005 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

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 volume group can be converted to a scalable VG using the chvg -G <vg_name>
command, but the volume group must be varied off.

9-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Mirroring

Physical Logical
Partitions Partitions

write(data);

Mirrored
Logical
Volume Application

Copyright IBM Corporation 2005

Figure 9-6. Mirroring AW185.0

Notes:

General description of mirroring


Logical volumes 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 logical
partition has three associated physical partitions.

Discussion of example on visual


The picture on the visual shows a two-disk mirroring of a logical volume. 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.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-7. Striping AW185.0

Notes:

General description of striping


Striping is an LVM feature where the partitions of the logical volume 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. Strip 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
by tricky 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.

9-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - The disks contain striped logical volumes 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)


AIX 5L V5.3 further enhances the LVM striping implementation and provides striped
columns support for logical volumes. This new feature allows you to extend a striped
logical volume even if one of the physical volumes in the group of disks used for the
logical volume has become full.
In previous AIX releases, you could enlarge the size of a striped logical volume with the
extendlv command, but only as long as enough physical partitions were available
within the group of disks used for the striped logical volume. Rebuilding the entire LV
was the only way to expand a striped logical volume 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, the upper bound (the maximum number of disks that can be allocated to
the logical volume) 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 logical volume 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 logical partitions. If you further expand the LV, more
striped columns may get added as required and as long as you stay within the upper
bound limit. The -u flag of the chlv, extendlv, and mklvcopy commands will now allow
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.

Copyright IBM Corp. 2000, 2005 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

Mirroring and Striping with RAID


RAID = Redundant Array of Independent Disks

RAID
Adapter

RAID Array
Controller
Group of
disks

Copyright IBM Corporation 2005

Figure 9-8. Mirroring and Striping with RAID AW185.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)


Redundant Array of Independent Disks (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.

9-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corp. 2000, 2005 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

Common RAID Levels


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 2005

Figure 9-9. Common RAID Levels AW185.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.

9-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 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 more usually, 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'll 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 sort of mirroring. That means
that data is split into blocks that are striped across the disks, but additionally 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)

Copyright IBM Corp. 2000, 2005 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

9-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 9.2 LVM Data Representation

Copyright IBM Corp. 2000, 2005 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 Identifiers
Goal: Unique worldwide identifiers for
Volume groups
Hard disks
Logical volumes

# lsvg rootvg
... VG IDENTIFIER: 00008371c98a229d4c0000000000000e

# lspv 32 bytes long


hdisk0 00008371b5969c35 rootvg active
... 32 bytes long
# lslv hd4 (16 are shown)
LOGICAL VOLUME: hd4 VOLUME GROUP: rootvg
LV IDENTIFIER: 00008371c98a229d4c0000000000000e.4 ...
...
VGID.minor number
# uname -m
000083714C00

Copyright IBM Corporation 2005

Figure 9-10. LVM Identifiers AW185.0

Notes:

Use of identifiers
The LVM uses identifiers for disks, volume groups, and logical volumes. As volume
groups 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 volume groups identifiers (VGID) have a length of 32 bytes.

9-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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.
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 logical volume identifiers consist of the volume group identifier, a period and the
minor number of the logical volume.

Copyright IBM Corp. 2000, 2005 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 on Disk Control Blocks


Volume Group Descriptor Area (VGDA)
Most important data structure of LVM
Global to the volume group (same on each disk)
One or two copies per disk

Volume Group Status Area (VGSA)


Tracks the state of mirrored copies
One or two copies per disk

Logical Volume Control Block (LVCB)


Has historically occupied first 512 bytes of each
logical volume
Contains LV attributes (policies, number of copies)
Should not be overwritten by applications using raw
devices!
Copyright IBM Corporation 2005

Figure 9-11. LVM Data on Disk Control Blocks AW185.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 volume group.
Each disk contains the complete allocation information of the entire volume group.
2. The Volume Group Status Area (VGSA) tracks the status of all physical volumes in
the volume group (active or missing) and the state of all allocated physical
partitions in the volume group (active or stale). Each disk in a volume group
contains a VGSA.
3. The Logical Volume Control Block (LVCB) generally resides in the first 512 bytes of
each logical volume. However, no LVCB information is kept at this location in
scalable volume groups. 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.

9-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty If raw devices are used (for example, many database systems use raw logical
volumes), 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).
- PV missing area: The PVMA tracks if any of the disks are missing
- MWC dirty bit area: The MWC_DBA holds the status for each LV if passive mirror
write consistency is used
- PP status area: The PPSA logs any stale PPs
The overall size 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, logical volume control information is no longer
stored on the first user block of any LV. All relevant logical volume 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 logical volumes, 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, 2005 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

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 2005

Figure 9-12. LVM Data in the Operating System AW185.0

Notes:

LVM information stored in the ODM


Physical volumes, volume groups, and logical volumes are handled as devices in AIX.
Every physical volume, volume group, and logical volume is defined in the customized
object classes in the ODM.

LVM information 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. The
technique used is a memory-mapped file. The handle is always a file in the /etc/vg
directory. This filename always reflects the volume group identifier.

9-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-13. Contents of the VGDA AW185.0

Notes:

Introduction
The table on the visual indicates the type of information contained in the VGDA. The
individual items listed are discussed in the paragraphs that follow.

Time stamps
The 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 volume group is
varied on, this VGDA is marked as invalid. The latest intact VGDA will then be used to
overwrite the other VGDAs in the volume group.

Copyright IBM Corp. 2000, 2005 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

Physical volume list


The VGDA contains the physical volume 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 physical volume state is stored. Well talk about physical volume states later in
this unit.

Logical volume list


The VGDA contains a record of the logical volumes that are part of the volume group. It
stores the LV identifiers and the corresponding logical volume names. Additionally, the
number of copies is stored for each LV.

Physical partition map


The most important data structure is the physical partition map. It maps each logical
partition to a physical partition. The size of the physical partition map is determined at
volume group creation time.

VGDA for scalable volume groups


The content of the VGDA area for scalable volume groups differs somewhat from that
described in the preceding material, but the basic function of this structure is the same.
In particular, the VGDA still includes physical volume, logical volume, and physical
partition information for the volume group. Recall that, as previously noted, scalable
volume groups store all LVCB information in the VGDA. For further details regarding the
layout of the VGDA for scalable volume groups, refer to the header file
/usr/include/lvmrec.h.

9-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
VGDA Example
# lqueryvg -p hdisk1 -At
Max LVs: 256
PP Size: 24 1: ____________
Free PPs: 56
LV count: 3 2: ____________
PV count: 2 3: ____________
Total VGDAs: 3 4: ____________
MAX PPs per PV: 1016
MAX PVs: 32

Logical:
5: ____________
00008371387fa8bb0000ce0001390000.1 lv_01 1
00008371387fa8bb0000ce0001390000.2 lv_02 1
00008371387fa8bb0000ce0001390000.3 lv_03 1

Physical: 00008371b5969c35 2 0
00008371b7866c77 1 0

6: ____________ 7: ____________
Copyright IBM Corporation 2005

Figure 9-14. VGDA Example AW185.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.

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
b. 3 VGDAs in VG
c. 3 LVs in VG

Copyright IBM Corp. 2000, 2005 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

d. PP size = 224 (2 to the 24th power) bytes, or 16 MB (for this volume group)
e. LVIDs (VGID.minor_number)
f. 2 PVs in VG
g. PVIDs

Output of lqueryvg on AIX 5L V5.3


The output of lqueryvg on recent AIX versions gives more information than shown in
the example on the visual. An example of lqueryvg output from an AIX 5L V5.3 system
is given below:
Max LVs: 256
PP Size: 26
Free PPs: 464
LV count: 11
PV count: 1
Total VGDAs: 2
Conc Allowed: 0
MAX PPs per PV 1016
MAX PVs: 32
Conc Autovaryo 0
Varied on Conc 0
Logical: 00096baa00004c00000000ffdb801c14.1 hd5 1
00096baa00004c00000000ffdb801c14.2 hd6 1
00096baa00004c00000000ffdb801c14.3 hd8 1
00096baa00004c00000000ffdb801c14.4 hd4 1
00096baa00004c00000000ffdb801c14.5 hd2 1
00096baa00004c00000000ffdb801c14.6 hd9var 1
00096baa00004c00000000ffdb801c14.7 hd3 1
00096baa00004c00000000ffdb801c14.8 hd1 1
00096baa00004c00000000ffdb801c14.9 hd10opt 1
00096baa00004c00000000ffdb801c14.10 loglv00 1
00096baa00004c00000000ffdb801c14.11 fslv00 1
Physical: 00096baa1ec9fa18 2 0
Total PPs: 542
LTG size: 128
HOT SPARE: 0
AUTO SYNC: 0
VG PERMISSION: 0
SNAPSHOT VG: 0
IS_PRIMARY VG: 0
PSNFSTPP: 4352
VARYON MODE: 0

9-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty VG Type: 0
Max PPs: 32512

Copyright IBM Corp. 2000, 2005 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

The Logical Volume Control Block (LVCB)


# getlvcb -AT hd2
AIX LVCB
intrapolicy = c
copies = 1
interpolicy = m
lvid = 0009301300004c00000000e63a42b585.5
lvname = hd2
label = /usr
machine id = 010193100
number lps = 103
relocatable = y
strict = y
stripe width = 0
stripe size in exponent = 0
type = jfs
upperbound = 32
fs = log=/dev/hd8:mount=automatic:type=bootfs:vol=/usr:free=false
time created = Mon Jan 19 14:20:27 2003
time modified = Fri Feb 14 10:18:46 2003

Copyright IBM Corporation 2005

Figure 9-15. The Logical Volume Control Block (LVCB) AW185.0

Notes:

The LVCB and the getlvcb command


The LVCB stores attributes of a logical volume. 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 logical volume hd2. The information displayed includes the following:
- Intrapolicy, which specifies what strategy should be used for choosing physical
partitions on a physical volume. 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).

9-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - Interpolicy, which specifies the number of physical volumes to extend across (m =
Minimum).
- LVID
- LV name (hd2)
- Number of logical partitions (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
- Logical volume type (type = jfs)
- JFS file system information
- Creation and last update time

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-16. How LVM Interacts with ODM and VGDA AW185.0

Notes:

High-level commands
Most of the LVM commands that are used when working with volume groups, physical
or logical volumes are high-level commands. These high-level commands (like mkvg,
extendvg, mklv, and others 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 logical volume. The high-level commands contain
signal handlers to clean up the configuration if the program is stopped abnormally. If a
system crashes, or if high-level commands are stopped by kill -9, the system can

9-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty end up in a 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 volume group based on a VGDA and
LVCB on a disk. The command exportvg removes a complete volume group from the
ODM.

Copyright IBM Corp. 2000, 2005 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 (1 of 3)


# odmget -q "name like hdisk?" CuDv
CuDv:
name = "hdisk0"
status = 1
chgstatus = 2
ddins = "scdisk"
location = "04-C0-00-2,0"
parent = "scsi0"
connwhere = "2,0"
PdDvLn = "disk/scsi/scsd"
CuDv:
name = "hdisk1"
status = 1
chgstatus = 2
ddins = "scdisk"
location = "04-C0-00-3,0"
parent = "scsi0"
connwhere = "3,0"
PdDvLn = "disk/scsi/scsd"

Copyright IBM Corporation 2005

Figure 9-17. ODM Entries for Physical Volumes (1 of 3) AW185.0

Notes:

CuDV entries for physical volumes


The CuDv object class contains information about each physical volume.

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-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
ODM Entries for Physical Volumes (2 of 3)
# odmget -q "name=hdisk0 and attribute=pvid" CuAt
CuAt:
name = "hdisk0"
attribute = "pvid"
value = "0009330f2d01c69f0000000000000000"
type = "R"
generic = "D"
rep = "s"
nls_index = 2

Copyright IBM Corporation 2005

Figure 9-18. ODM Entries for Physical Volumes (2 of 3) AW185.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 physical volumes (for example, the size of the disk) may be stored in
CuAt.

Copyright IBM Corp. 2000, 2005 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 Physical Volumes (3 of 3)


# odmget -q "value3 like hdisk?" CuDvDr
CuDvDr:
resource = "devno"
value1 = "22"
value2 = "1"
value3 = "hdisk0"
CuDvDr:
resource = "devno"
value1 = "22"
value2 = "2"
value3 = "hdisk1"

# ls -l /dev/hdisk*
brw------- 1 root system 22,1 08 Jan 06:56 /dev/hdisk0
brw------- 1 root system 22,2 08 Jan 07:12 /dev/hdisk1

Copyright IBM Corporation 2005

Figure 9-19. ODM Entries for Physical Volumes (3 of 3) AW185.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 22 (value1) and the minor number 1 (value2) for hdisk0.

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

9-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 = "0009301300004c00000000e63a42b585"
type = "R"
generic = "D"
rep = "n"
nls_index = 637
(output continues on next page)

Copyright IBM Corporation 2005

Figure 9-20. ODM Entries for Volume Groups (1 of 2) AW185.0

Notes:

CuDv entries for volume groups


Information indicating the existence of a volume group is stored in CuDv, which means
all volume groups must have an object in this class. The visual shows an example of a
CuDv entry for rootvg.

VGID
One of the most important pieces of information about a volume group 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 volume group is stored in CuAt. Thats shown
on the next page.

Copyright IBM Corp. 2000, 2005 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 Volume Groups (2 of 2)


# odmget -q "name=rootvg" CuAt
...

CuAt:
name = "rootvg"
attribute = "timestamp"
value = "3ec3cb943749cbc3"
type = "R"
generic = "DU"
rep = "s"
nls_index = 0
CuAt:
name = "rootvg"
attribute = "pv"
value = "0009330f2d01c69f0000000000000000"
type = "R"
generic = ""
rep = "sl"
nls_index = 0

Copyright IBM Corporation 2005

Figure 9-21. ODM Entries for Volume Groups (2 of 2)) AW185.0

Notes:

Disks belonging to a volume group


The CuAt object class contains an object for each disk that belongs to a volume group.
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.

9-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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, and type.
name = "hd2"
attribute = "lvserial_id"
value = "0009301300004c00000000e63a42b585.5"
type = "R"
generic = "D"
rep = "n"
nls_index = 648

Copyright IBM Corporation 2005

Figure 9-22. ODM Entries for Logical Volumes (1 of 2) AW185.0

Notes:

CuDv entries for logical volumes


The CuDv object class contains an entry for each logical volume.

Attributes of a logical volume


Attributes of a logical volume, for example, its LVID (lvserial_id), are stored in the
object class CuAt. Other attributes that belong to a logical volume are the intra-physical
policy (intra), stripe_width, or type.

Copyright IBM Corp. 2000, 2005 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 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 2005

Figure 9-23. ODM Entries for Logical Volumes (2 of 2) AW185.0

Notes:
CuDvDr logical volume objects
Each logical volume has an object in CuDvDr that is used to create the special file entry
for that logical volume 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
logical volume hd2 is contained in the rootvg volume group.

9-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 9-24. ODM-Related LVM Problems AW185.0

Notes:

Normal functioning of high-level commands


As already mentioned, most of the time administrators use high-level commands to
create or update volume groups or logical volumes. These commands use signal
handlers to set up a proper cleanup in case of an interruption. Additionally, LVM
commands use a locking mechanism to block other commands while a change is in
progress.

Causes of problems
The signal handlers 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.

Copyright IBM Corp. 2000, 2005 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

Another common problem is ODM corruption when performing LVM operations when
the root file system (which contains /etc/objrepos) is full. Always check the root file
system free space before attempting LVM recovery operations.

9-44 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Fixing ODM Problems (1 of 2)
If the ODM problem is not in the rootvg, for example in volume
group homevg, do the following:

# varyoffvg homevg

# exportvg homevg Remove complete volume


group from the ODM
# importvg -y homevg hdiskX

Import volume group and


create new ODM objects

Copyright IBM Corporation 2005

Figure 9-25. Fixing ODM Problems (1 of 2) AW185.0

Notes:

Determining which volume group has the problem


If you detect ODM problems, you must determine whether the volume group with the
problem is the rootvg or not. Because the rootvg cannot be varied off, the procedure
given here applies only to non-rootvg volume groups.

Steps in ODM repair procedure (for problem not in rootvg)


1. In the first step, you vary off the volume group, which requires that all file systems
must be unmounted first. To vary off a volume group, use the varyoffvg command.
2. In the next step, you export the volume group by using the exportvg command. This
command removes the complete volume group from the ODM. The VGDA and
LVCB are not touched by exportvg.

Copyright IBM Corp. 2000, 2005 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

3. In the last step, you import the volume group by using the importvg command.
Specify the volume group name with the -y option. (If you dont use this option, AIX
creates a new volume group name using the naming convention "vgXX" where XX
is the lowest unused number available, as in vg00, vg01, and so on.)
You need to specify only one intact physical volume of the volume group that you
import. The importvg command reads the VGDA and LVCB on that disk and
creates completely new ODM objects.
Note: We will return to the export and import functions later in this course.

9-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 9-26. Fixing ODM Problems (2 of 2) AW185.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 executable.
The script rvgrecover removes all ODM entries that belong to your rootvg by using
odmdelete. That's the same way exportvg works.

Copyright IBM Corp. 2000, 2005 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

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 physical volumes
of the given volume group in the device configuration database. If inconsistencies occur
between the physical volume information in the ODM and the on-disk meta-data, the
redefinevg command determines which physical volumes belong to the specified
volume group and re-enters this information in the ODM. The redefinevg command
checks for inconsistencies by reading the reserved areas of all the configured physical
volumes 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
meta-data, the synclvodm command can be used to re-synchronize the database. It
synchronizes or rebuilds the LVCB, the ODM, and the VGDAs. The volume group must
be active for the re-synchronization to occur. If logical volume names are specified, only
the information related to those logical volumes is updated.

RAM Disk Maintenance Mode


If use of the preceding techniques doesnt 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 volume group after booting to maintenance
mode and file system mounting.
Step Action
Delete all of the ODM information about logical volumes.
Get the list of logical volumes from the VGDA of the physical volume.
# lqueryvg -p hdisk0 -L | awk '{print $2}' \
| while read LVname; do
1
> odmdelete -q name=$LVname -o CuAt
> odmdelete -q name=$LVname -o CuDv
> odmdelete -q value3=$LVname -o CuDvDr
> done

9-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Step Action


Delete the volume group information from ODM.
# odmdelete -q name=rootvg -o CuAt
# odmdelete -q parent=rootvg -o CuDv
# odmdelete -q name=rootvg -o CuDv
2
# odmdelete -q name=rootvg -o CuDep
# odmdelete -q dependency=rootvg -o CuDep
# odmdelete -q value1=10 -o CuDvDr
# odmdelete -q value3=rootvg -o CuDvDr
Add the volume group associated with the physical volume back to the
3 ODM.
# importvg -y rootvg hdisk0
Recreate the device configuration database in the ODM from the
4 information on the physical volume.
# varyonvg -f rootvg
This assumes that hdisk0 is part of rootvg.
In CuDvDr:
value1 = major number
value2 = minor number
value3 = object name for major/minor number
rootvg always has value1 = 10.
The steps can also be used to recover other volume groups by substituting the
appropriate physical volume and volume group information. It is suggested that this
example be made a script.

Copyright IBM Corp. 2000, 2005 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

9-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 9.3 Working with Volume Groups

Copyright IBM Corp. 2000, 2005 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 LVM Menu


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

Figure 9-27. SMIT LVM Menu AW185.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 volume groups in
the system.

9-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Logical volumes


The SMIT Logical Volumes menu provides facilities to manipulate the logical volumes
in the system. Logical volumes which contain journaled file systems, paging space or
dump volumes can also be manipulated from their respective menus. However, the
facilities on this menu give a much lower level of control over the characteristics of the
logical volume. For example, features such as partition allocation policy and mirroring
for a logical volume, can only be set using this menu. This menu is also used when a
logical volume, which does not contain an AIX file system, is being manipulated.

Physical volumes
The SMIT Physical Volumes menu allows the user to configure the physical volumes
(fixed disks) in the system. This menu duplicates options on the Fixed Disks menu of
Devices.

Paging space
The SMIT Page Space menu allows a user to add, delete, activate and list the paging
spaces available.

Copyright IBM Corp. 2000, 2005 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

SMIT Volume Groups (VG) 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 2005

Figure 9-28. SMIT Volume Groups (VG) Menu AW185.0

Notes:

Volume group configuration


The visual shows the SMIT screen that allows for the configuration of volume groups.
To get to this menu, use the SMIT fastpath, smit vg.
We describe the items on this menu throughout the course.

9-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
List All Volume Groups

# lsvg
rootvg
payrollvg

# lsvg -o
rootvg

Copyright IBM Corporation 2005

Figure 9-29. List All Volume Groups AW185.0

Notes:

The lsvg command


The lsvg command can be used to list the volume groups in the system.
It can be used to list the names of all volume groups (default) or only those that are
varied on/active (-o).

Copyright IBM Corp. 2000, 2005 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

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

Figure 9-30. List Volume Group Information AW185.0

Notes:

List volume group information


The lsvg command can be used to list information about the status and content of a
particular volume group, for example lsvg Volumegroup.
The output provides status information about the volume group. The most useful
information here is:
- Volume group state (VG STATE - active or inactive/complete if all physical volumes
are active)
- Physical partition size (PP SIZE - 4 MB by default)
- Total number of physical partitions (TOTAL PPs)
- Number of free physical partitions (FREE PPs)

9-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
List VG 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 2005

Figure 9-31. List VG Information (Physical Volumes) AW185.0

Notes:

The lsvg -p command


The lsvg -p Volumegroup command gives information about all of the physical
volumes within the volume group. The information given is:
- Physical volume name (PV_NAME)
- Physical volume state (PV STATE - active or inactive)
- Total number of physical partitions (TOTAL PPs)
- Number of free physical partitions (FREE PPs)
- How the free space is distributed across the disk (FREE DISTRIBUTION)
Free distribution is the number of physical partitions allocated within each section of the
physical volume: outer edge, outer middle, center, inner middle, inner edge.

Copyright IBM Corp. 2000, 2005 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

List VG Information (Logical Volumes)

# lsvg -l rootvg

rootvg:
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd6 paging 8 8 1 open/syncd N/A


hd5 boot 1 1 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs 1 1 1 open/syncd /var
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 77 77 1 open/syncd /usr
hd3 jfs 3 3 1 open/syncd /tmp
hd1 jfs 11 11 1 open/syncd /home
hd10opt jfs 2 2 1 open/syncd /opt
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred

Copyright IBM Corporation 2005

Figure 9-32. List VG Information (Logical Volumes) AW185.0

Notes:

The lsvg -l command


The lsvg -l Volumegroup command gives information about all of the logical volumes
within the volume group. The details given are:
- Logical volume name (LVNAME)
- Type of logical volume (TYPE, for example, file system, paging)
- Number of LPs (LPs)
- Number of physical partitions (PPs)
- Number of physical volumes (PVs)
- Logical volume state (LV STATE)
- Mount point (MOUNT POINT), if the logical volume contains a journaled file system

9-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-33. Add a Volume Group AW185.0

Notes:

The mkvg command


The mkvg command is used to create a volume group. A new volume group must
contain at least one physical volume. The -y option is used to indicate the name for the
new volume group. If this is not specified, a system generated name is used. The -s
option is used to specify the physical partition size in MB which must be a power of 2.
The default is the smallest physical partition size consistent with the maximum PP/PV
and the largest physical volume in the volume group.
The -n option means that the volume group 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 volume group named newvg created with
a physical partition size of 2 MB is:
# mkvg -s 2 -y newvg hdisk1

Copyright IBM Corp. 2000, 2005 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

Using SMIT
The volume group MAJOR NUMBER on the SMIT dialog screen is used by the kernel
to access that volume group. This field is most often used for High Availability Network
File Systems (HANFS) and High Availability Cluster Multi-Processing (HACMP)
applications.
The item on the SMIT dialog screen referring to Concurrent mode operation has no
meaning on systems without HACMP installed. This item is valid on AIX V4.2 and later.
There is a separate SMIT panel for adding a big volume group which is identical to this
panel.

9-60 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 kilobytes 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 2005

Figure 9-34. Add a Scalable Volume Group AW185.0

Notes:

Additional options for scalable volume groups


There is a separate SMIT panel for adding scalable volume groups. Besides creating a
different format VGDA, the administrator has the option to set the Maximum PPs per
VG and the Max Logical Volumes for the volume group.
With non-scalable volume groups, LVM allows tuning of the number of physical
partitions for each physical volume via the -t factor. In scalable volume groups, the
physical partitions are managed on a volume group wide basis.
The maximum number of logical volumes was previously fixed, depending upon the
type of volume group. Now, in scalable volume groups, the maximum is tunable.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-35. Set Characteristics of a Volume Group AW185.0

Notes:

Volume group operations


Once the volume group has been created you can do four operations on the volume
group:
- Modify the attributes of the volume group
- Increase the size of the volume group by adding physical volumes
- Decrease the size of the volume group by removing physical volumes
- Reorganize the volume group

9-62 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 kilobytes 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 2005

Figure 9-36. Change a Volume Group AW185.0

Notes:

Activate volume group automatically


The SMIT option Activate volume group AUTOMATICALLY at system restart calls
the chvg command to change the startup characteristics of a volume group. The -a y
option sets the volume group to be used at startup. The -a n option resets this
characteristic to no.

Quorum of disks
The SMIT option A QUORUM of disks required to keep the volume group on-line?
determines if the volume group is automatically varied off (deactivated) after losing its
quorum of physical volumes. Selecting no means that the volume group stays active
until it loses all of its physical volumes. However, if this option is set to no then you are
in danger of having backdated VGDAs. To activate a non-quorum user-defined volume
group, all of the physical volumes within the volume group must be accessible or the
activation fails.

Copyright IBM Corp. 2000, 2005 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

Scalable volume group options


If the volume group is a scalable volume group, 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 text. The value is simply a count in units of 1024 physical partitions.
For example, a value of 2 would indicate 2048 physical partitions per volume group.
The default is 32 (32,768 physical partitions). Allowable values are powers of 2 up to
2048 (2,097,152 physical partitions).

9-64 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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: 128 KB
LTG size could be set or changed by the L flag of the chvg
command or the mkvg command
AIX 5L V5.3:
AIX 5L V5.3 dynamically sets the LTG size (calculated at each
volume group activation)
LTG size can be specified at varyonvg time using command:
varyonvg -M <LTGsize>
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 2005

Figure 9-37. Logical Track Group (LTG) Size AW185.0

Notes:

What is a logical track group (LTG)?


When LVM receives an I/O request, it breaks the I/O down into logical track group (LTG)
size units before it passes the request down to the device driver of the underlying disks.
The LTG is the maximum transfer size of a logical volume. The LTG size is common to
all the logical volumes in the volume group. (In other words, it is a volume group
attribute.)

LTG sizes
Prior to AIX 5L V5.1, the only supported LTG size 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 5L V5.3 accepts values of
128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, and 16 MB for the LTG size.

Copyright IBM Corp. 2000, 2005 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

Setting the LTG size prior to AIX 5L V5.3


The default LTG size prior to AIX 5L V5.3 is 128 KB. Prior to AIX 5L V5.3, the LTG size
is set to a different static value other than the default size by the -L flag on the chvg or
mkvg command.

Dynamic setting of LTG size (AIX 5L V5.3)


In AIX 5L V5.3, LVM dynamically discovers the optimal LTG size each time the volume
group is varied on.In AIX 5L V5.3, if you want to specify the LTG size (rather than have
the optimal LTG size selected automatically), you can use the varyonvg -M flag to
specify the LTG when the volume group is varied on. The following command sets the
LTG size of the myvg volume group at 512 KB at the time this volume group is varied
on:
# varyonvg -M512K myvg

Enabling variable LTG on old volume groups


The following command will enable variable LTG (rather than the previous static LTG
value) for a tmpvg volume group created prior to AIX 5L V5.3 at the next varyonvg.
The logical track group size will be set 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 volume group created prior to AIX 5L V5.3 will have
the old LTG size in AIX 5L V5.3 and this LTG size will behave the same way it did in the
prior release.

Importing AIX 5L V5.3 volume groups to prior versions


The -I flag of the mkvg command can be used on AIX 5L V5.3 systems to create
volume groups that can be imported by AIX 5L V5.1 and AIX 5L V5.2 systems. When
the -I flag is used, the -L flag can also be used to specify an appropriate static LTG
size. (The -L flag of mkvg is ignored by AIX 5L V5.3 when the -I flag is not used.) The
corresponding flags of the chvg command can be used in a similar way. Consult the
entries for mkvg and chvg in the AIX 5L Version 5.3 Commands Reference (or the man
pages for these commands) for more information regarding use of these flags.

Displaying the LTG size with lquerypv


To determine the maximum supported LTG size of your hard disk, 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

9-66 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Displaying the LTG size with lspv


On AIX 5L V5.3 systems, the lspv command (which will be discussed later) will display
the same value as lquerypv -M, but the value will be labeled as MAX REQUEST.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-38. Hot Spare AW185.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
physical volume 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 volume group.
- Logical volumes must be mirrored.
- All logical partitions on hot spare disks must be unallocated.

9-68 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - Hot spare disks must have at least equal capacity to the smallest disk already in the
volume group. 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 volume group. 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 will be 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 will take place. (Default)
Removes all disks from the pool of hot spare disks for this volume
r
group.
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 volume group,
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.
n Will not automatically attempt to synchronize stale partitions. (Default)
For example, to automatically synchronize stale partitions for the datavg volume group,
use the command: chvg -sy datavg

Copyright IBM Corp. 2000, 2005 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

How to set up hot sparing


The following table summarizes the steps required to set up hot sparing:
Step Command Action
Decide which volume groups with mirrored logical
1 -
volumes require high 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 volume group
Add the hot spares to the volume groups which they are to
3 extendvg
protect
Decide which hot spare policy will be most effective for
4 -
your volume groups
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.

9-70 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Extending and Reducing Volume Groups

Will not retain current disk contents


hdisk6

# extendvg myvg hdisk6


myvg

hdisk4 hdisk5

# reducevg myvg hdisk5

Copyright IBM Corporation 2005

Figure 9-39. Extending and Reducing Volume Groups AW185.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 will format the disk into physical partitions and then add these to the physical
partition mapping maintained in the VGDA for the volume group. The space on the new
disk will now be 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

Copyright IBM Corp. 2000, 2005 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

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.

9-72 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 9-40. Remove a Volume Group AW185.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

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-41. Activate/Deactivate a Volume Group AW185.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 will be 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.

9-74 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty The -M flag of varyonvg


In AIX 5L V5.3, a new varyonvg option (-M ) was added to allow the specification of a
logical track group size for the volume group, instead of allowing LVM to determine it
dynamically. Refer to the man page for varyonvg (or the corresponding entry in the AIX
5L Version 5.3 Commands Reference) for details.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-42. Import/Export a Volume Group AW185.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.

9-76 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Advanced RAID Support
Checks all disks in a volume group to see 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 2005

Figure 9-43. Advanced RAID Support AW185.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.

Copyright IBM Corp. 2000, 2005 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

Bad block relocation policy should be turned off for RAID devices and storage
subsystems unless the manufacturer tells you otherwise.

9-78 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 9.4 Logical Volumes

Copyright IBM Corp. 2000, 2005 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

Logical Volume Policies


Intra-physical volume allocation policy:

E M C M E

Inner Edge
Inner Middle
Center
Outer Middle (Middle)
Outer Edge (Edge)

Inter-physical volume allocation policy:


Maximum number of physical volumes to use
Range of physical volumes to use
Copyright IBM Corporation 2005

Figure 9-44. Logical Volume Policies AW185.0

Notes:

Introduction
When creating or changing a logical volume you can specify the way the Logical
Volume Manager 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 will be 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-80 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 9-45. SMIT Logical Volumes Menu AW185.0

Notes:

SMIT Logical Volumes screen


This is the top-level SMIT menu for logical volumes. The next few pages discuss the
menu items shown on this screen.

9-82 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
0001 0134 hdisk0
0002 0135 hdisk0
0003 0136 hdisk0

Copyright IBM Corporation 2005

Figure 9-46. Show Logical Volume Characteristics AW185.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, 2005 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

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 will 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 of the 10
physical partitions, 7 physical partitions are located in the center area and 3 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-84 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-47. Add a Logical Volume AW185.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 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 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, 2005 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

Remove a Logical Volume


# smit rmlv

Add 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 2005

Figure 9-48. Remove a Logical Volume AW185.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 the /etc/filesystems file. This information is not removed by the rmlv
command. You should use the appropriate command for that type of data structure.

9-86 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-49. Set Characteristics of a Logical Volume AW185.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 permission, 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 number of partitions. You can set

Copyright IBM Corp. 2000, 2005 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

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.

Mirroring and striping


Copies (mirrors) of an existing logical volume can be added or removed. (Well discuss
these capabilities in detail later.) However, once a logical volume has been created,
striping cannot be imposed or removed.

9-88 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 8 8 1 open/syncd N/A


hd5 boot 1 1 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs 1 1 1 open/syncd /var
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 77 77 1 open/syncd /usr
hd3 jfs 3 3 1 open/syncd /tmp
hd1 jfs2 11 11 1 open/syncd /home
hd10opt jfs 2 2 1 open/syncd /opt
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred

Copyright IBM Corporation 2005

Figure 9-50. List All Logical Volumes By Volume Group AW185.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, 2005 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

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 2005

Figure 9-51. Show Logical Volume Characteristics AW185.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-90 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-52. Reorganize a Volume Group AW185.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 will not relocate automatically.
The reorgvg command is used to redistribute the physical partitions of the logical
volumes of a volume group according to their preferred allocation policies. This should
improve disk performance. Preference is given in the order 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, 2005 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

9-92 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 9.5 Physical Volumes

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 9-53. SMIT Physical Volumes Menu AW185.0

Notes:

SMIT Physical Volumes menu


This is the top-level menu for physical volume. Each of these items will be discussed in
the following pages.

9-94 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 9-54. List Physical Volume Information AW185.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 (are 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, 2005 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

List Logical Volumes on a Physical Volume

# lspv -l hdisk0

hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd1 12 12 00..00..00..12..00 /home
hd3 3 3 00..03..00..00..00 /tmp
hd2 29 29 00..00..17..12..00 /usr
hd4 13 13 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 1 1 01..00..00..00..00 N/A
hd9var 2 2 00..00..02..00..00 /var
hd10opt 2 2 00..00..02..00..00 /opt

Copyright IBM Corporation 2005

Figure 9-55. List Logical Volumes on a Physical Volume AW185.0

Notes:

Listing logical volumes


The lspv -l pvname command lists all the logical volumes on a physical volume
including number of logical partitions, physical partitions and distributions on the disk.

9-96 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
List a Physical Volume Partition Map

# lspv -p hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-31 used outer edge hd2 jfs /usr
32-32 free outer edge
33-40 used outer middle hd6 paging N/A
41-64 free outer middle
65-65 used center hd8 jfslog N/A
66-66 used center hd4 jfs /
67-73 used center hd2 jfs /usr
74-74 used center hd9var jfs /var
75-76 used center hd3 jfs /tmp
77-77 used center hd1 jfs2 /home
78-84 used center hd2 jfs /usr
85-92 used center paging00 paging N/A
93-95 used center hd10opt jfs /opt
96-159 used inner middle hd2 jfs /usr

Copyright IBM Corporation 2005

Figure 9-56. List a Physical Volume Partition Map AW185.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 physical partition order
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, 2005 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

Add or Move Contents of Physical Volumes


A disk can be either added:
Through SMIT
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 2005

Figure 9-57. Add or Move Contents of Physical Volumes AW185.0

Notes:

Adding a physical device


To add a physical volume to the system using SMIT, the path is 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

9-98 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty partitions per physical volume for this volume group changes to factor multiplied by
1016.

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, 2005 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

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 2005

Figure 9-58. Checkpoint AW185.0

Notes:

9-100 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: The Logical Volume Manager (LVM)

Exercise 7

Copyright IBM Corporation 2005

Figure 9-59. Exercise: The Logical Volume Manager (LVM) AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 Unit 9. The Logical Volume Manager (LVM) 9-101
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 2005

Figure 9-60. Unit Summary AW185.0

Notes:

9-102 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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
Info Center AIX 5L Version 5.3 System Management Concepts:
Operating System and Devices
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices
Info Center AIX 5L Version 5.3 Commands Reference
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, 2005 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 2005

Figure 10-1. Unit Objectives AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 10.1 Mirroring and Quorum

Copyright IBM Corp. 2000, 2005 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

Tracking Information about Mirrors


Logical
hdisk0 Partitions

hdisk1

Mirrored
hdisk2 Logical
Volume

LP: PP1: PP2: PP3:


VGSA
5 hdisk0, 5 hdisk1, 8 hdisk2, 9

Copyright IBM Corporation 2005

Figure 10-2. Tracking Information about Mirrors AW185.0

Notes:

Mirroring and 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 10-3. Stale Partitions AW185.0

Notes:

How data becomes stale


If a disk that contains a mirrored logical volume (such as hdisk2 on the visual) fails, the
data on the failed disk becomes stale (not current, not up-to-date).

How state information is kept


State information (active or stale) is kept for each physical partition. A physical
volume is shown as stale (lsvg VGName), as long as it has one stale partition.

10-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Updating stale partitions


If a disk with stale partitions has been repaired (for example, after a power failure), you
should issue 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 syncvg. The term reservation means that a
disk is reserved for one system. The disk driver puts the disk in a state where you can
work with the disk (at the same time the control LED of the disk turns on).
The varyonvg command works if the volume group is already varied on or if the volume
group is the rootvg.

Copyright IBM Corp. 2000, 2005 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 2005

Figure 10-4. Creating Mirrored LVs (smit mklv) AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 5. Do not change the default entry for Allocate each logical partition copy on
a SEPARATE physical volume?, which is yes. 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, 2005 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 2005

Figure 10-5. Scheduling Policies: Sequential AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 10-6. Scheduling Policies: Parallel AW185.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 8 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's 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 10-7. Mirror Write Consistency (MWC) AW185.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 mirror write consistency (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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Active mirror write consistency


Active mirror write consistency 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 new passive option to the mirror write consistency (MWC)
algorithm for mirrored logical volumes. This option cannot be used with logical volumes
in normal (default) volume groups.
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 propagating the blocks
being read to the other mirrors in the logical volume.

Copyright IBM Corp. 2000, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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 2005

Figure 10-8. Adding Mirrors to Existing LVs (mklvcopy) AW185.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's 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.) Synchronization can be done later using the syncvg
command.

Copyright IBM Corp. 2000, 2005 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 via mirrorvg


and place copies on the second disk
Execute bosboot and change your bootlist
Copyright IBM Corporation 2005

Figure 10-9. Mirroring rootvg AW185.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. You increase 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, 2005 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
(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 boot list. 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-10. Mirroring Volume Groups (mirrorvg) AW185.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
boot list.
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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-11. VGDA Count AW185.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 percent of VGDAs available, that means we have less than 50 percent of
VGDAs. In this case the quorum, which means that more than 50 percent of VGDAs
must be available, is not fulfilled.

Copyright IBM Corp. 2000, 2005 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

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 percent (or more) of the VGDAs available and the quorum is
fulfilled.

10-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 10-12. Quorum Not Available AW185.0

Notes:

Introduction
What happens if quorum checking is enabled for a volume group and a quorum is not
available?
Consider the following example (illustrated on the visual and discussed in the following
paragraphs): In a two-disk volume group datavg, the disk hdisk1 is not available due to
a hardware defect. hdisk1 is the disk that contains the two VGDAs; that means the
volume group does not have a quorum of VGDAs.

Result if volume group not varied on


If the volume group is not varied on and the administrator tries to vary on datavg, the
varyonvg command will fail.

Copyright IBM Corp. 2000, 2005 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

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.

10-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 10-13. Nonquorum Volume Groups AW185.0

Notes:

Loss of quorum in a nonquorum volume group


When a nonquorum volume group loses its quorum it will not be deactivated, 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.

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

Copyright IBM Corp. 2000, 2005 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

Varying on a nonquorum volume group


It's 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.

10-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 10-14. Forced Varyon (varyonvg -f) AW185.0

Notes:

When normal vary on may fail


If the quorum of VGDAs is not available during vary on, the varyonvg command fails,
even when quorum is disabled. In fact, when quorum is disabled, the varyonvg
command requires that 100% of the VGDAs be available instead of 51%.

Doing a force vary on


Before doing a forced vary on (varyonvg -f) always check the reason of the failure. If
the physical volume appears to be permanently damaged, use a forced varyonvg.
All physical volumes that are missing during this forced vary on will be changed to
physical volume state removed. This means that all the VGDA and VGSA copies will be
removed from these physical volumes. Once this is done, these physical volumes will
no longer take part in quorum checking, nor will they be allowed to become active within
the volume group until you return them to the volume group.

Copyright IBM Corp. 2000, 2005 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

Change in VGDA distribution


In the example on the visual, the active disk hdisk2 becomes the disk with the two
VGDAs. This does not change, even if the failed disk can be brought back.

Quorum checking on
With Quorum Checking On, you always need > 50% of the VGDAs available (except to
vary on rootvg).

Quorum checking off


With Quorum Checking Off, you have to make a distinction between an already active
volume group and between 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 using MISSINGPV_VARYON=true, you take full responsibility
for the volume group integrity.

10-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 10-15. Physical Volume States AW185.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 missing. If the disk can be repaired, for example, after a power
failure, you just have to issue a varyonvg VGName to bring the disk into the active state
again. Any stale partitions will be synchronized.

Copyright IBM Corp. 2000, 2005 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

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, 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. 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 will be lost in the
volume group after removing the disk.

10-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 10.2 Disk Replacement Techniques

Copyright IBM Corp. 2000, 2005 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 2005

Figure 10-16. Disk Replacement: Starting Point AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 10-17. Procedure 1: Disk Mirrored AW185.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. 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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
Volume group
2. Add new disk to volume group:
# extendvg vg_name hdiskY

3. Migrate old disk to new disk: (*)


hdiskY
# migratepv hdiskX hdiskY

4. Remove old disk from volume group:


# reducevg vg_name hdiskX

5. Remove old disk from ODM:


# rmdev -l hdiskX -d

(*) : Is the disk in rootvg?


See next visual for further considerations!
Copyright IBM Corporation 2005

Figure 10-18. Procedure 2: Disk Still Working AW185.0

Notes:

When to use this procedure


Procedure 2 applies to a disk replacement where the disk is unmirrored but could be
accessed. If the disk that must be replaced is in rootvg, follow the instructions on the
next visual.

The goal and how to do it


The goal is the same as always. Before we can replace a disk we must remove
everything from the disk.
1. Shut down your system if you need to physically attach a new disk to the system.
Boot the system so that cfgmgr will configure the new disk.
2. Add the new disk to the volume group. Use either the SMIT fastpath
smit extendvg or the extendvg command.

10-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 10-19. Procedure 2: Special Steps for rootvg AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 boot list:
# 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, 2005 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: PV STATE: missing
# extendvg vg_name hdiskZ

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 2005

Figure 10-20. Procedure 3: Disk in Missing or Removed State AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Procedure steps


If the failing disk is in a missing or removed state, start the procedure:
1. Identify all logical volumes and file systems on the failing disk. Use commands
like lspv, lslv or lsfs to provide this information. These commands will work on
a failing disk.
2. If 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, 2005 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

3. Restore from a mksysb tape


rootvg
4. Import each volume group into
the new ODM (importvg) if needed hdiskX hdiskY

datavg Contains OS
logical
volumes

hdiskZ
mksysb

Copyright IBM Corporation 2005

Figure 10-21. Procedure 4: Total rootvg Failure AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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:


Recreate ... hdiskY
- Volume group (mkvg)
- Logical volumes and file systems (mklv, crfs)

Restore data from a backup:


# restore -rqvf /dev/rmt0

Copyright IBM Corporation 2005

Figure 10-22. Procedure 5: Total non-rootvg Failure AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Refer to the entries for savevg and restvg in the AIX 5L Version 5.3 Commands
Reference (or the corresponding man pages) for more information about the
restvg and savevg commands.
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, for example with the restore
command or any other tool you use to restore data in your environment.

Copyright IBM Corp. 2000, 2005 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

Fix:
Check bootlist (SMS menu)
Check bootlist (bootlist)
Re-create boot logical volume (bosboot)
Copyright IBM Corporation 2005

Figure 10-23. Frequent Disk Replacement Errors (1 of 4) AW185.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 cycle. This loop indicates that the firmware is not able to find
bootstrap code to boot from.
This problem is usually easy to fix:
- Check your bootlist by either:
Booting in SMS (F1) and check your bootlist
Booting in maintenance mode and check your bootlist using the bootlist
command
- If the boot list is correct, update the boot logical volume using the bosboot command

10-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-24. Frequent Disk Replacement Errors (2 of 4) AW185.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, 2005 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 2005

Figure 10-25. Frequent Disk Replacement Errors (3 of 4) AW185.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 (Use any disk from the volume group)
If you are sure that you found the missing PVID, pass this PVID to the reducevg
command.

10-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 10-26. Frequent Disk Replacement Errors (4 of 4) AW185.0

Notes:

ODM failure
After an incorrect disk replacement, you might detect ODM failures. For example, when
issuing the command lsvg -p datavg, 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.

Copyright IBM Corp. 2000, 2005 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

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 import
it again. Export and import will be explained in more detail in the next topic.

10-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 10.3 Export and Import

Copyright IBM Corp. 2000, 2005 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

Exporting a Volume Group


moon
hdisk9
To export a volume group:
lv10
lv1 1. Unmount all file systems
loglv1 from the volume group:
01
# 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 2005

Figure 10-27. Exporting a Volume Group AW185.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-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 10-28. Importing a Volume Group AW185.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 option -y, the command will generate a new volume
group name.
The importvg command generates completely new ODM entries.

10-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 10-29. importvg and Existing Logical Volumes AW185.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-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-30. importvg and Existing File Systems (1 of 2) AW185.0

Notes:

Using umount and mount


If a file system (for example /home/michael) already exists on a system, you run into
problems when you mount the file system that was imported.
One method to get around this problem is to:
1. Unmount the file system that exists on the system. For example, /home/michael
from datavg.
2. Mount the imported file system. Note that you have to specify the:
- Log device (-o log=/dev/lvlog01)
- Logical volume name (/dev/lv24)
- Mount point (/home/michael)

Copyright IBM Corp. 2000, 2005 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

If the file system type is jfs2, you have to specify this as well
(-V jfs2). 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-60 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-31. importvg and Existing File Systems (2 of 2) AW185.0

Notes:

Create a new stanza in /etc/filesystems


If you need both file systems (the imported and the one that already exists) mounted at
the same time, you must create a new stanza in /etc/filesystems. 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, 2005 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

- 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-62 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
v0
lv99 1

hdisk3

myvg
Copyright IBM Corporation 2005

Figure 10-32. importvg -L (1 of 2) AW185.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, 2005 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

- 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-64 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 10-33. importvg -L (2 of 2) AW185.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 from a normal importvg.
The importvg -L command will fail if a logical volume name clash is detected.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 10-34. Checkpoint AW185.0

Notes:

10-66 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: Storage Management with LVM

Exercise 8

Copyright IBM Corporation 2005

Figure 10-35. Exercise: Storage Management with LVM AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

Unit Summary

A number of options can be specified for mirrored logical


volumes
More than 50 percent 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 2005

Figure 10-36. Unit Summary AW185.0

Notes:

10-68 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Info Center AIX 5L Version 5.3 System Management Concepts:
Operating System and Devices
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices
Info Center AIX 5L Version 5.3 Commands Reference

Copyright IBM Corp. 2000, 2005 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 2005

Figure 11-1. Unit Objectives AW185.0

Notes:

11-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Logical Volumes and File Systems
A logical volume may contain a journaled file system (JFS) or
enhanced journaled file system (JFS2)
A logical volume may contain (instead) a journal log
A logical volume may also be used for:
Paging space (/dev/hd6)
Boot logical volume (/dev/hd5)
Dump device
Nothing (raw logical volume)

Copyright IBM Corporation 2005

Figure 11-2. Logical Volumes and File Systems AW185.0

Notes:

Introduction
When you install AIX 5L, you automatically create one volume group (rootvg) which
consists of a base set of logical volumes required to start the system. rootvg contains
such things as paging space, a journal log, and boot data, each usually in its own
separate logical volume.
As previously noted, 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.
Logical volumes are used to contain file systems or other items, as described in the
material that follows.

Copyright IBM Corp. 2000, 2005 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 systems on AIX 5L systems are the journaled file system (JFS) and the
enhanced journaled file system (JFS2). These file systems 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
A journal log is a logical volume where (by default) changes made to a JFS or JFS2 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 AIX 5L, 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.

Raw logical volume


A raw logical volume is simply an empty logical volume. Sometimes an application, for
example a database package, may require a raw logical volume.

11-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Supported File System Types
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)

Copyright IBM Corporation 2005

Figure 11-3. Supported File System Types AW185.0

Notes:

Introduction
As you know, a file system is a directory hierarchy for storing files. It has a root directory
and subdirectories. On an AIX 5L system (as on other UNIX and UNIX-like systems),
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 from 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, 2005 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 several 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 Disk
- 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 users and applications.

11-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-4. Standard File Systems in AIX AW185.0

Notes:

Initial file systems


When AIX is first installed on a standalone system, there are only six JFS or JFS2 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, 2005 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

- /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 journaled file system.

11-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
/etc/filesystems
/:
dev = /dev/hd4
vol = root
mount = automatic
check = false
vfs = jfs
log = /dev/hd8
type = bootfs
/home:
dev = /dev/hd1
vol = /home
mount = true
check = true
vfs = jfs
log = /dev/hd8
/home/team01:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = true
options = rw
account = false
Copyright IBM Corporation 2005

Figure 11-5. /etc/filesystems AW185.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, 2005 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

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 will not be automatically mounted.
check Used by the fsck command to determine the default file systems to be
checked. 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.

11-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-6. Structure of a Journaled File System AW185.0

Notes:

File systems and logical volumes


As previously mentioned, 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 will, by default, have units allocated to it in blocks
of 4096 bytes. (This may change if you have implemented fragmentation or large files -
both of which will be 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, 2005 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

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-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Structure of an Inode
permissions
Contents of an inode
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 2005

Figure 11-7. Structure of an Inode AW185.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, 2005 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

File System Fragmentation


No fragmentation 4096 bytes
File size = 2000 bytes 2000 bytes

This free space cannot


be used by another file

4096 bytes
Fragmentation enabled 1024 1024
2000 bytes
File size = 2000 bytes 1024 1024
Fragment size = 1024 bytes
These free fragments can
be used by other files

Copyright IBM Corporation 2005

Figure 11-8. File System Fragmentation AW185.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-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

Variable Number of Inodes


With the default nbpi = 4096 an inode will be 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 will be 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 2005

Figure 11-9. Variable Number of Inodes AW185.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-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 11-10. Allocation Group Size AW185.0

Notes:

Importance of allocation groups


The ability to specify allocation group size 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 (AGS or agsize) value is a JFS configuration parameter which
along with the NBPI and fragment size determine the overall characteristics of the file
system.

11-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Relationship between allowable NBPI values and allocation group size
The allowable NBPI values are dependent on the allocation group size (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, 2005 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

Compressed File Systems


compression = LZ (yes)
fragment size = 1024

4096 4096 4096 4096

Copyright IBM Corporation 2005

Figure 11-11. Compressed File Systems AW185.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 2. JFS2 does not support file system compression.

11-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, will
be 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, 2005 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

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 2005

Figure 11-12. Large File Enabled File Systems AW185.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.
When using JFS, 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-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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. JFS2 currently (November 2005) supports a
maximum file size of 16 Terabytes.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 11-13. Journal Log AW185.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 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-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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, 2005 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

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

JFS2 uses extent based allocation for high performance and large file size.
.

Copyright IBM Corporation 2005

Figure 11-14. JFS versus JFS2 File Systems AW185.0

Notes:

Introduction to JFS2
Enhanced Journaled File System (JFS2) is a 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-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Extent-based allocation


JFS2 uses extent-based allocation. An extent is an address-length pair, which identifies
the starting address and the length of the extent. Both the starting address and the
length of the extent are expressed in units of the aggregate block size specified for the
file system. (Legal aggregate block sizes are 512 bytes, 1024 bytes, 2048 bytes, and
4096 bytes.) 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 directories 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 will issue a warning to the user when a particular quota is exceeded, but
allow some extra space for current work. Remaining over quota beyond a specified
grace period will result in further allocation attempts being denied until the total usage is
reduced below the user's or group's quota.

Copyright IBM Corp. 2000, 2005 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

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 5L V5.3
has added one new 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 will be necessary:
- Backup JFS file system data
- Create new JFS2 file systems
- Restore JFS file system data to new JFS2 file systems

11-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 supports 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 2005

Figure 11-15. Extended Attributes (EA) AW185.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 attribute: 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, 2005 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

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 the support for the NFS V4 ACL capability. The
discussion of NFS V4 ACLs is outside the scope of this class.

Managing attributes
AIX 5L V5.3 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 5L V5.3 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
attempting to mount results in an EFORMAT error.

11-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-16. File Systems AW185.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, 2005 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

Listing File Systems

# lsfs

Name Nodename Mount Pt VFS Size Options Auto

/dev/hd4 __ / jfs 16384 __ yes


/dev/hd1 __ /home jfs2 90112 __ yes
/dev/hd2 __ /usr jfs 1277952 __ yes
/dev/hd9var __ /var jfs 8192 __ yes
/dev/hd3 __ /tmp jfs 24576 __ yes
/proc __ /proc procfs __ ro yes
/dev/hd10opt __ /opt jfs __ __ yes
/budget sys4 /reports nfs __ bg,hard,intr
/dev/cd0 __ /cdrom cdrfs __ ro no

Copyright IBM Corporation 2005

Figure 11-17. Listing File Systems AW185.0

Notes:

Function of lsfs command


You can list the various file systems that are defined using the lsfs command. This
command will display information from /etc/filesystems and from the logical volumes in
a more readable format.
The lsfs command will also display 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-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 a dialog panel; it just runs
the lsfs command.

Copyright IBM Corp. 2000, 2005 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

List All Mounted File Systems

# mount

node mounted mounted over vfs date options


/dev/hd4 / jfs Jul 11 20:14 rw,log=/dev/hd8
/dev/hd2 /usr jfs Jul 11 20:15 rw,log=/dev/hd8
/dev/hd9var /var jfs Jul 11 20:15 rw,log=/dev/hd8
/dev/hd3 /tmp jfs 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 jfs 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 2005

Figure 11-18. List All Mounted File Systems AW185.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 to be accessed, that is, 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-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 the system and by 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

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, 2005 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

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 2005

Figure 11-19. Add/Change/Show/Delete File Systems AW185.0

Notes:

Selecting the file system type


In AIX 5L, when you use the command smit manfs, SMIT will present a menu which
prompts you for the type of file system, be it JFS, Enhanced JFS, CDROM 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-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-20. Working with Journaled Files Systems in SMIT AW185.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 to add a JFS file system, there are two options:
- If you choose to Add a Journaled File System, SMIT will use 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 will be 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, 2005 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 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 2005

Figure 11-21. Add a Standard Journaled File System on a Previously Defined Logical Volume AW185.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 will reside on disk.

SMIT fastpath for reaching this screen


The SMIT fastpath for this screen is smit crjfslvstd.

11-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Specifying which logical volume to use for the JFS log
AIX 5L V5.3 has added a new line to 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, 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, 2005 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


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 2005

Figure 11-22. Add a Standard Journaled File System AW185.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 purely 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-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 these 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 will normally be 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 for some type 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 will place the mount=true line in
the /etc/filesystems file and will cause 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
being 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 being 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, 2005 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

algorithm Lempel-Ziv. If you do not want data compression, set this attribute value to
no, which is 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-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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

F1=Help F2=Refresh F3=Cancel Esc+8=Image


Esc+9=Shell Esc+0=Exit Enter=Do

Copyright IBM Corporation 2005

Figure 11-23. Working with Enhanced Journaled File Systems (JFS2) in SMIT AW185.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 JFS file system


When choosing to add a JFS2 file system, there are two options:
- If you choose to Add an Enhanced Journaled File System, SMIT uses defaults to
create the logical volume in which the file system resides.
- If you choose to 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, 2005 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

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 +

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 2005

Figure 11-24. Add an Enhanced Journaled File System (JFS2) on a Previously Defined Logical Volume AW185.0

Notes:

SMIT fastpath for reaching this screen


The SMIT fastpath for reaching this screen is 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


Logical Volume for Log provides a choice between using either an existing jfs2log
logical volume (the first jfs2log for this volume group is the default) or an inline log. If
you use the inline log, then you have the option to override the default log size.

11-44 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty AIX 5L V5.3 enhancements


With AIX 5L V5.3, there are two additional 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.

Copyright IBM Corp. 2000, 2005 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)
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 +

Copyright IBM Corporation 2005

Figure 11-25. Add an Enhanced Journaled File System (JFS2) AW185.0

Notes:

SMIT fastpath for reaching this screen


Use the SMIT fastpath smit crjfs2std to access this panel.

11-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-26. Mount a File System AW185.0

Notes:

Mounting a file system makes it accessible


As on systems running other UNIX and UNIX-like operating systems, the files within an
AIX 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 will be mounted automatically during system startup.

Copyright IBM Corp. 2000, 2005 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

Use of the mount and unmount commands


The mount command is used to mount a file system, that is, make it available for use.
We will illustrate 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 5L Version 5.3 Commands Reference
(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 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 will check
/etc/filesystems to determine the device containing the associated file system and
mount 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 will mount 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 5L Version 5.3 Commands Reference
(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 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-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 11-27. Change/Show Characteristics of a Journaled File System AW185.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 in use. 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-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Changing file system size


The file system size can be specified in Megabytes, Gigabytes or 512-byte blocks. The
size of a Journaled File System 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 will be
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 will use 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 will be effective at the next
startup.

Changing permissions
The permissions associated with the file system may be changed (-p ro|rw), and the
change will be effective the next time the file system is mounted.

Copyright IBM Corp. 2000, 2005 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 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 Version 1 +
Enable Quota Management no +

Copyright IBM Corporation 2005

Figure 11-28. Change/Show Characteristics of an Enhanced Journaled File System AW185.0

Notes:

Changing JFS2 file system characteristics


An Enhanced Journaled File System (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-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Dynamically Shrinking a JFS2 File System
Before: LP1 LP2

After:
LP1

# chfs -a size="-16M" /myfs

Copyright IBM Corporation 2005

Figure 11-29. Dynamically Shrinking a JFS2 File System AW185.0

Notes:

New 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 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, dynamic file
system shrink is now available with Enhanced Journaled File System (JFS2).

Changes in chfs and SMIT


The chfs command (and corresponding SMIT panel) support for the size attribute has
been changed in AIX 5L V5.3 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 being ignored. Thus, asking to decrease by 1 MB would have no effect
(minimum PPsize for JFS2 is 16 MB).

Copyright IBM Corp. 2000, 2005 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

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-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-30. Remove a Journaled File System AW185.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, 2005 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

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-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 11-31. Add a RAM File System AW185.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 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, 2005 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

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 2005

Figure 11-32. Add a UDF File System on a DVD-RAM AW185.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 just treat it 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-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty The Universal Disk Format Specification (UDFS)


The Universal Disk Format Specification (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, 2005 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

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 2005

Figure 11-33. System Storage Review AW185.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. The section of disk 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-60 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

Listing Free Disk Space


The df command displays information about total
space and available space on a file system

# df

Filesystem 512-blocks Free %Used Iused %lused Mounted on


/dev/hd4 16384 7600 53% 1243 30% /
/dev/hd2 1630208 101648 93% 22217 10% /usr
/dev/hd9var 24576 22360 9% 257 8% /var
/dev/hd3 24576 21520 12% 144 3% /tmp
/dev/hd1 24576 5160 79% 518 16% /home
/proc - - - - - /proc
/dev/hd10opt 65536 48728 26% 374 5% /opt
/dev/lv00 24576 3172 86% 620 22% /home/john
/dev/ramdisk0 8192 7848 5% 17 2% /ramdisk

Copyright IBM Corporation 2005

Figure 11-34. Listing Free Disk Space AW185.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 and to use frequently. If you run out of
space in a file system (especially / or /tmp), system corruption could occur.

11-62 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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 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 first two columns are given in units of 1 GB blocks

The -m and -g flags were introduced in AIX 5L V5.2.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 11-35. Control Growing Files AW185.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-64 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure 11-36. The skulker Command AW185.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 a day old

11-66 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 - just in case!
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, 2005 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

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 2005

Figure 11-37. Listing Disk Usage AW185.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-68 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 an ls -l, you can
determine the file/directory's owner.

The -x flag
The -x flag/option is also very useful. When you use du -ax, 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, 2005 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

Fragmentation Considerations
4096 bytes

Without fragmentation 2000 bytes

File size = 2000 bytes This free space cannot


be used by another file

4096 bytes
With fragmentation
2000 bytes

File size = 2000 bytes 1024 1024 1024 1024


Fragment size = 1024 bytes 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 2005

Figure 11-38. Fragmentation Considerations AW185.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 will be 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-70 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 will be 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, 2005 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

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 2005

Figure 11-39. Defragmenting a File System AW185.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-72 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 5L Version
5.3 Commands Reference for additional information regarding this topic.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 11-40. Verify a File System AW185.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:
- Check the journal log for errors
- Check the blocks to ensure that each block is either allocated to a single file or is in
the free list
- Check file sizes
- Check 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-74 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 ask by fsck. The yes
option is typically used to recover a badly damaged file system. Using the -y option will
allow 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 will refuse make
corrections to a mounted file system.

Copyright IBM Corp. 2000, 2005 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

Checkpoint

1. Will the size of the file system change when the size of
the logical volume it is on is increased? _________

2. If a file system is the same size as the logical volume


on which it sits, will the size of the logical volume
increase when the size of the file system that is
residing on it increases? ___________

3. If you remove a logical volume, is the file system that


is residing on it removed as well?
___________________________________________
___________________________________________

Copyright IBM Corporation 2005

Figure 11-41. Checkpoint AW185.0

Notes:

11-76 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: Working with File Systems

Exercise 9

Copyright IBM Corporation 2005

Figure 11-42. Exercise: Working with File Systems AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 11-43. Unit Summary AW185.0

Notes:

11-78 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Info Center AIX 5L Version 5.3 System Management Concepts:
Operating System and Devices
Info Center AIX 5L Version 5.3 System Management Guide:
Operating System and Devices
Info Center AIX 5L version 5.3 Performance Management Guide
Info Center AIX 5L Differences Guide Version 5.3 Edition

Copyright IBM Corp. 2000, 2005 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 2005

Figure 12-1. Unit Objectives AW185.0

Notes:

12-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-2. What Is Paging Space? AW185.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, memory may become full. Not everything that
resides in memory is active. When memory is full, memory 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 disk is called paging space.
The paging space is a reserved area on 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, 2005 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 Virtual Memory
Manager (VMM).

12-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-3. Paging Space AW185.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 will require 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, 2005 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 result of not enough real memory.

12-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-4. Sizing Paging Space AW185.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, paging space is 512 MB
- If RAM is less than 256 MB, paging space is twice the size of RAM

Copyright IBM Corp. 2000, 2005 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 will dictate 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 will be 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 are terminated 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-5. Paging Space Placement AW185.0

Notes:

Introduction
Placement and size of your paging space will impact its performance. The following
material contains tips regarding 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, 2005 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 disk, 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 controller. If the disks are attached to different controllers you get
better throughput when reading and writing to the disk. That improves your
performance.

12-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Checking Paging Space
Check paging activity:
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 64MB 43 yes yes lv
paging00 hdisk2 rootvg 64MB 20 yes yes lv

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 2005

Figure 12-6. Checking Paging Space AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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? yes +
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 2005

Figure 12-7. Adding Paging Space AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-8. Change Paging Space AW185.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, 2005 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 goes through 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, fastpath pgsp. 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 1 logical partition from the paging00 paging space
# chps -d 1 paging00
- Example 2: Add 1 logical partition to the paging00 paging space
# chps -s 1 paging00
Refer to the entry for chps in the AIX 5L Version 5.3 Commands Reference (or the
corresponding man page) for more information regarding the chps command.

12-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-9. Remove Paging Space AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-10. Problems with Paging Space AW185.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, 2005 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 2005

Figure 12-11. Documenting Paging Space Setup AW185.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
started at boot.

12-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Space Volume Group

hd6 hdisk0 rootvg 64 MB 43% yes yes lv


paging00 hdisk1 rootvg 64 MB 7% yes yes lv
paging01 hdisk1 rootvg 16 MB 89% yes yes lv

______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________

2. True or False? The size of paging00 (in the above example) can
be dynamically decreased.
Copyright IBM Corporation 2005

Figure 12-12. Checkpoint AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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: Paging Space

Exercise 10

Copyright IBM Corporation 2005

Figure 12-13. Exercise: Paging Space AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 12-14. Unit Summary AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Info Center AIX System Management Concepts: Operating
System and Devices
Info Center AIX System Management Guide: Operating System
and Devices
SG24-5765 AIX 5L Differences Guide Version 5.2 Edition
SG24-5766 AIX 5L Differences Guide Version 5.3 Edition

Copyright IBM Corp. 2000, 2005 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 2005

Figure 13-1. Unit Objectives AW185.0

Notes:

13-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 13-2. Backup Devices - Diskette AW185.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 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, 2005 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 options 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 13-3. Backup Devices - Tape AW185.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 DAT (Digital Audio Tape)
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, 2005 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 the 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 13-4. Backup Device - Read/Write Optical Drive AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 and 12 cm media
SCSI attachable

Copyright IBM Corporation 2005

Figure 13-5. Backup Device - 7210 External DVD-RAM Drive AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 13-6. SMIT Backup Menus AW185.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, 2005 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 2005

Figure 13-7. rootvg Backup Process - mksysb . AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 machines
does not install correctly on a multiprocessor machine because they use different AIX
filesets. However, this is an easy problem to resolve. In additional 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, 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. mksysb
saves the data used by the installation through 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
in 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, 2005 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 2002
UNAME_INFO= AIX ibm150 2 5 00428DFB4C00
PRODUCT_TAPE= no
USERVG_LIST=
PLATFORM= chrp
OSLEVEL= 5.2.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 2005

Figure 13-8. /image.data File for rootvg AW185.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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 13-9. /bosinst.data File for rootvg AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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_FILE 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
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, 2005 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 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, PHYSICAL_LOCATION, SAN_DISKID,
then CONNECTION, then LOCATION, then SIZE_MB, and then 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 Base Operating System (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, 2005 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 <Enter> when you see
the startup symbols \ | / on the display.

13-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 13-10. rootvg - Back up the System AW185.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, 2005 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 the System to Tape or 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)
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 2005

Figure 13-11. rootvg - Back up the System to Tape or File AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 report 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, 2005 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 2005

Figure 13-12. mksysb Image AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 is used to make mksysb tapes 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, 2005 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 2005

Figure 13-13. Back Up a Volume Group AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 +
Back up Volume Group information files only? 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 2005

Figure 13-14. Back Up a Volume Group to Tape/File AW185.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, 2005 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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

Maintenance
1 Access A Root Volume Group
2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
>> 4 Install from a System Backup

Choose Tape Drive


Tape Drive Path Name
>> 1 tape/scsi/4mm/2GB /dev/rmt0

Copyright IBM Corporation 2005

Figure 13-15. Restoring a mksysb (1 of 2) AW185.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, 2005 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

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 2005

Figure 13-16. Restoring a mksysb (2 of 2) AW185.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 option Use Maps lets you use the map file created (if you created one) during
the backup process of the mksysb tape. The default is no.

13-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - 3 Shrink Filesystems


The option Shrink Filesystems installs the file systems using the minimum required
space. The default is no. If yes, all file systems in rootvg are shrunk. So remember
after the restore, evaluate the current file system sizes. You might need to increase
their sizes.
- 0 Install with the settings listed above
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 twice
the amount of time it took to create the mksysb.

Copyright IBM Corp. 2000, 2005 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 2005

Figure 13-17. Remake/Restore a non-rootvg Volume Group AW185.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 don't want to
use them, set this selection to no.

13-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 13-18. mksysb - ISO9660 Burn Image AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 that 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, 2005 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 2005

Figure 13-19. mksysb - UDF DVD AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
rootvg - Back Up the 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 [] /

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 2005

Figure 13-20. rootvg - Back Up the System to CD (ISO9660) AW185.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 backup image
- Create CD file system and copy backup to it
- Create 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, 2005 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 the 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 [] /

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 2005

Figure 13-21. rootvg - Back Up the System to ISO9660 DVD AW185.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 media and the 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
rootvg - Back Up the 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 [] /

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 2005

Figure 13-22. rootvg - Back Up the System to UDF DVD AW185.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 (Universal Disk Format) format on DVD-RAM requires
only the space for the backup image:
1. Create backup image
2. Burn to media
This allows modification of files such as bosinst.data, image.data, and vgname.data.

Copyright IBM Corp. 2000, 2005 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 +
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 2005

Figure 13-23. Back Up a Volume Group to CD AW185.0

Notes:

Overview
You dont 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 Volume Group information files only? 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 2005

Figure 13-24. Back Up a Volume Group to ISO9660 DVD AW185.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, 2005 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 +

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 2005

Figure 13-25. Back Up a Volume Group to UDF DVD AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Back Up by Filename
backup -i [-q] [-p] [-v] [-f device]

-q Media is ready
-p Pack files which are less than 2 GB
-v Verbose - display filenames during backup

Filenames are read from standard input

Copyright IBM Corporation 2005

Figure 13-26. Back Up by Filename AW185.0

Notes:

The backup command


The backup command is the preferred command for making backups of AIX files and
directories. backup supports two different methods:
- Backup by filename
- Backup by inode (also call a file system backup)
When performing a backup by filename, the files must be in a mounted file system to be
backed up. Backups by inode backup file systems when they are unmounted.

Copyright IBM Corp. 2000, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 vs. full filenames will impact location of files on recovery!

Copyright IBM Corporation 2005

Figure 13-27. Back Up by Filename Examples AW185.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, 2005 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 provided flexibility.

13-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Back Up a File or a 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 +

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 2005

Figure 13-28. Back Up a File or a Directory AW185.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 directory, you can
put the name of the directory here.

Backup LOCAL files only?


Ignores any network file systems. Files backed up are from the local system only.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure 13-29. Back Up a File System by Inode AW185.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.

13-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

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

Copyright IBM Corp. 2000, 2005 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

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 +

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 2005

Figure 13-30. Back Up a File System by Inode Using SMIT AW185.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.

13-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 13-31. restore Command (1 of 2) AW185.0

Notes:

Listing files on the backup


The restore command is used to restore data backed up with the backup command.
restore -T shows the contents of the media and display the list of files.

Restoring individual files


restore -x can be used to 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. restore -x can be used to restore selected files from a backup by
name and a file system backup.

Copyright IBM Corp. 2000, 2005 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

Restoring a complete file system


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 are told 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. Be
careful!
restore -i is another option available when working with an inode backup. This allows
for an interactive restore.

13-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 13-32. restore Command (2 of 2) AW185.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.

Copyright IBM Corp. 2000, 2005 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 a File or a 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 2005

Figure 13-33. Restore a File or a Directory AW185.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.

13-54 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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? smit mksysb backs up all file systems, provided


they are mounted. _____________________________________
_____________________________________________________
Copyright IBM Corporation 2005

Figure 13-34. Checkpoint AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

Exercise: Using backup and restore

Exercise 11

Copyright IBM Corporation 2005

Figure 13-35. Exercise: Using backup and restore . AW185.0

Notes:

Introduction
This exercise can be found in your Student Exercise Guide.

13-56 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure 13-36. Unit Summary AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

13-58 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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, 2005 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 2005

Figure 14-1. Unit Objectives AW185.0

Notes:

14-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-2. TCP/IP Pseudo Device AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-3. Network Adapters and Interfaces AW185.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, 2005 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 2005

Figure 14-4. Interface Device Drivers AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-5. Adapter Device Drivers AW185.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, 2005 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
rc.boot phase 2
network interfaces
cfgrcnet checks the bootup_option attribute of inet0
kernel restarts init
bootup_option=no (default)
cfgrcnet runs /etc/rc.net
(network configuration read from ODM)
init runs
rc.boot phase 3
bootup_option=yes
From /etc/inittab
cfgrcnet runs /etc/rc.bsdnet
(network configuration in rc.bsdnet)
init runs
/etc/rc.tcpip rc.tcpip starts selected network daemons:
from /etc/inittab dhcp
syslogd
lpd
init continues
sendmail
processing portmap
/etc/inittab inetd
...
Copyright IBM Corporation 2005

Figure 14-6. TCP/IP Startup AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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. rc.net 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). dhcpcd will
reconfigure the network devices, overriding any configuration that may have been
performed by rc.net or rc.bsdnet.

Copyright IBM Corp. 2000, 2005 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 2005

Figure 14-7. # smit tcpip . AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 either:
- 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, 2005 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- IP version 6 (IPv6) daemons.
host,
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 2005

Figure 14-8. /etc/rc.tcpip AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 status of network daemons using these
SRC commands:
- startsrc
- stopsrc
- refresh
- lssrc

Copyright IBM Corp. 2000, 2005 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 2005

Figure 14-9. Network Super Daemon (inetd) AW185.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 3 or 4 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. inetd solves this problem by dynamically
starting network daemons only when needed.

14-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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, 2005 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 2005

Figure 14-10. /etc/inetd.conf AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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, 2005 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 2005

Figure 14-11. /etc/services AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-12. Name Resolution AW185.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, 2005 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 be only 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 a 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, 2005 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 to begin working 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1
Student Notebook

Uempty NIS client problems


If 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, 2005 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 2005

Figure 14-13. Address Resolution Protocol AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 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, 2005 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 2005

Figure 14-14. Routing AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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, 2005 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 2005

Figure 14-15. Static Routing AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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, 2005 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 route.
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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-16. Dynamic Routing AW185.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, 2005 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-17. Checkpoint AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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 2005

Figure 14-18. Exercise: TCP/IP Configuration AW185.0

Notes:

14-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.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 2005

Figure 14-19. Unit Summary AW185.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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)
Info Center Commands Reference

Copyright IBM Corp. 2000, 2005 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 2005

Figure 15-1. Unit Objectives AW185.0

Notes:

15-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 15.1 Working with the Error Log

Copyright IBM Corp. 2000, 2005 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 2005

Figure 15-2. Error Logging Components AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 exactly while 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, 2005 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 via 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 2005

Figure 15-3. Generating an Error Report via SMIT AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 interval of time specified. The default time interval is 100 milliseconds. This
value can be changed with the errdemon -t command. The default for the Show only
Duplicated Errors option is no.

Consolidate Duplicated Errors


Yes 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 15-4. The errpt Command AW185.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, 2005 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 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
A Summary Report (errpt)
# errpt

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION

94537C2E 0430033899 P H tok0 WIRE FAULT


35BFC499 0429090399 P H hdisk1 DISK OPERATION ERROR
...
1581762B 0428202699 T H hdisk0 DISK OPERATION ERROR
...
E85C5C4C 0428043199 P S LFTDD SOFTWARE PROGRAMM ERROR
2BFA76F6 0427091499 T S SYSPROC SYSTEM SHUTDOWN BY USER
B188909A 0427090899 U L VDD PHYSICAL PARTITION MARKED STALE
...
9DBCFDEE 0427090699 T O errdemon ERROR LOGGING TURNED ON
...
2BFA76F6 0426112799 T S SYSPROC SYSTEM SHUTDOWN BY USER

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 2005

Figure 15-5. A Summary Report (errpt) AW185.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, 2005 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: TAPE_ERR4
IDENTIFIER: 5537AC5F
Date/Time: Thu 27 Feb 13:41:51
Sequence Number: 40
Machine Id: 000031994100
Node Id: dw6
Class: H
Type: PERM
Resource Name: rmt0
Resource Class: tape
Resource Type: 8mm
Location: 00-00-0S-3,0
VPD:
Manufacturer EXABYTE
Machine Type and Model EXB-8200
Part Number 21F8842
Device Specific (Z0) 0180010133000000
Device Specific (Z1) 2680
Description
TAPE DRIVE FAILURE
Probable Causes
ADAPTER
TAPE DRIVE
Failure Causes
ADAPTER
TAPE DRIVE
Recommended Actions
PERFORM PROBLEM DETERMINATION PROCEDURES
Detail Data
SENSE DATA
0603 0000 1700 0000 0000 0000 0000 0000 0200 0800 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Copyright IBM Corporation 2005

Figure 15-6. A Detailed Error Report (errpt -a) AW185.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 shows clearly which part causes the error
entry. The next few fields explain probable reasons for the problem, and actions that
you can take to correct the problem.
The last field, SENSE DATA, is a detailed report about which part of the device is failing.
For example, with disks, it 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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


Starting with AIX 5L V5.1, 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, 2005 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 2005

Figure 15-7. Types of Disk Errors AW185.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've 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 15-8. LVM Error Log Entries AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 [8192] #
...

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

Figure 15-9. Maintaining the Error Log AW185.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 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, 2005 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.

15-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 15.2 Error Notification and syslogd

Copyright IBM Corp. 2000, 2005 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: Periodic Diagnostics:

/etc/objrepos/errnotify Check the error log


(hardware errors)

Error Notification

Concurrent Error Logging: Self-made Error


errpt -c > /dev/console Notification

Copyright IBM Corporation 2005

Figure 15-10. Error Notification Methods AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty 3. Periodic Diagnostics: The diagnostics package (diag command) contains a periodic
diagnostic procedure (diagela). Whenever a hardware error is posted to the log, all
members of the system group get a mail message. Additionally, a message is sent
to the system console. The diagela program has two disadvantages:
Since it executes many times a day, the program might slow down your system
Only hardware errors are analyzed
4. 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, 2005 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 2005

Figure 15-11. Self-made Error Notification AW185.0

Notes:

Implementing self-made error notification


It's 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty - The two files are compared using the command cmp -s (silent compare, that 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 has been 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, 2005 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 2005

Figure 15-12. ODM-based Error Notification: errnotify AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 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, 2005 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

15-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 15-13. syslogd Daemon AW185.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, 2005 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 facility
daemon 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 15-14. syslogd Configuration Examples AW185.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, 2005 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 are sent as directed.

15-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure 15-15. Redirecting syslog Messages to Error Log AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure 15-16. Directing Error Log Messages to syslog . AW185.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, this last entry can be passed to the logger command.

Command substitution
Youll 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, 2005 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 2005

Figure 15-17. Checkpoint AW185.0

Notes:

15-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Exercise: Error Logging and syslogd

Exercise 13

Copyright IBM Corporation 2005

Figure 15-18. Exercise: Error Logging and syslogd . AW185.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, 2005 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 2005

Figure 15-19. Unit Summary AW185.0

Notes:

15-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP Appendix A. Checkpoint Answers


UNIT 1 System Hardware Overview

Checkpoint Solutions
1. There are a large number of current an 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 system?
The HMC.

Copyright IBM Corporation 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-1


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

UNIT 2 AIX 5L v5.3 Installation

Checkpoint Solution
1. AIX 5L 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 2005

A-2 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 3 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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-3


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

UNIT 3 System Management Tools and Documentation

Lets Review Solutions

1. True or False? AIX Web-based documentation can be


used to reference information in different ways, such as
searching for a command, searching for a task or
viewing information in a book like manner.

2. True or False? The AIX V5L documentation may be


viewed using a Web browser.

3. True or False? The Information Center requires the


prior installation of Web Server software (such as
HTTPServer) in order to provide remote client access.
The Information Center has its own built-in Eclipse-
based Web server function.

Copyright IBM Corporation 2005

A-4 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 3 System Management Tools and Documentation

Checkpoint Solutions
1. The System Management Interface Tool provides a menu-
driven interface that can help in the administration of AIX 5L
systems.
2. Which of the statements are true regarding the Web-based
System Manager?
a) An AIX 5L system can be managed from a remote PC
with appropriate JAVA and Web-browser code installed.
b) In standalone mode, use the wsm command to access
the Web-based system manager.
c) It is possible to manage an AIX 5L system from a
remote AIX 5L system using an ASCII terminal.
C is false. However, with a graphics terminal it is
possible to manage different systems simultaneously by
adding the remote systems in the Navigation window of
Web-based System Manager.

Copyright IBM Corporation 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-5


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

UNIT 4 Software Installation and Maintenance

Checkpoint Solution
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 2005

A-6 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 5 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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-7


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

UNIT 6 The Object Data Manager (ODM)

Lets Review Solution:


Device Configuration and the ODM
1. cfgmgr

Undefined Defined Available

2. 3.
AIX Kernel Applications
PdDv CuDv

Device Driver 4. /dev/rmt1 5.

Copyright IBM Corporation 2005

A-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 6 The Object Data Manager (ODM)

Checkpoint Solution
1. In which ODM class do you find the physical volume IDs of your
disks?
CuAt

2. What is the difference between the defined state and the


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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers 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: Hardware

Checkpoint Solution (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 2005

A-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 7 System Boot: Hardware

Checkpoint Solution (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 an 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 can be the reason for this?
Invalid boot list, corrupted boot logical volume, or hardware
failures of boot device.
Copyright IBM Corporation 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-11


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

UNIT 8 System Boot: Software

Checkpoint Solution (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 2005

A-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 8 System Boot: Software

Checkpoint Solution (2 of 2)

3. Which ODM file is used by the 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 the 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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-13


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

UNIT 9 The Logical Volume Manager (LVM)

Checkpoint Solution
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 2005

A-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 10 Storage Management with LVM

Checkpoint Solution
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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-15


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

UNIT 11 Working with File Systems

Checkpoint Solution
1. Will the size of the file system change when the size of
the logical volume it is on is increased? No

2. If a file system is the same size as the logical volume


on which it sits, will the size of the logical volume
increase when the size of the file system that is
residing on it increases? Yes

3. If you remove a logical volume, is the file system that is


residing 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 2005

A-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP UNIT 12 Paging Space

Checkpoint Solution
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page Physical Volume Size %Used Active Auto Type
Space Volume Group

hd6 hdisk0 rootvg 64 MB 43% yes yes lv


paging00 hdisk1 rootvg 64 MB 7% yes yes lv
paging01 hdisk1 rootvg 16 MB 89% yes yes lv

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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-17


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

UNIT 13 Backup and Restore

Checkpoint Solution
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? smit mksysb 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 2005

A-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

AP 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 2005

Copyright IBM Corp. 2000, 2005 Appendix A. Checkpoint Answers A-19


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

UNIT 15 Errorlog and syslogd .

Checkpoint Solution
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 2005

A-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 2005

Figure B-1. Unit Objectives AW185.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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-2. Basic Performance Analysis AW185.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's I/O-related, then is it paging or normal disk I/O?
- If it's paging, then increasing memory might help. You may also want to try to isolate
the program and/or user causing the problem.
- If it's 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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Performance Analysis Tools
CPU Memory I/O Network

vmstat, iostat vmstat iostat lsattr


ps lsps vmstat netstat

sar svmon lsps nfsstat

tprof, gprof, prof filemon lsattr netpmon


time, timex lsdev ifconfig

netpmon lspv, lslv, lsvg iptrace, ipreport


fileplace tcpdump

locktrace filemon

emstat, alstat lvmstat

topas, topas, topas, topas,


performance toolbox performance toolbox performance toolbox performance toolbox

trace, trcrpt, curt, trace, trcrpt, trace, trcrpt, trace, trcrpt,


splat, truss truss truss truss
Copyright IBM Corporation 2005

Figure B-3. Performance Analysis Tools AW185.0

Notes:

CPU analysis tools


CPU metrics analysis tools include:
- vmstat, iostat, and sar which are packaged with bos.acct
- ps which is in bos.rte.control
- 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 - emulation and alignment tools from bos.perf.tools
- netpmon, tprof, locktrace, curt, splat, and topas 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

Copyright IBM Corp. 2000, 2005 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

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

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 in bos.rte.lvm
- lsattr and lsdev in bos.rte.methods
- filemon, fileplace 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
- netpmon is 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure B-4. Identify CPU-Intensive Programs: ps aux . AW185.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"

Copyright IBM Corp. 2000, 2005 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

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.

B-8 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure B-5. Identify High Priority Processes: ps -elf . AW185.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.

Copyright IBM Corp. 2000, 2005 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

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.

B-10 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure B-6. Monitoring CPU Usage: sar -u . AW185.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.

Copyright IBM Corp. 2000, 2005 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

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

B-12 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 2005

Figure B-7. AIX Tools: tprof . AW185.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).

Copyright IBM Corp. 2000, 2005 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

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.

B-14 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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 nonzero, 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 2005

Figure B-8. Monitoring Memory Usage: vmstat . AW185.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. Beginning with AIX 5L V5.3, 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.
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.

Copyright IBM Corp. 2000, 2005 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

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.

B-16 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
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
4K frames
Top 3 users of
# 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 2005

Figure B-9. AIX Tools: svmon . AW185.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.

Copyright IBM Corp. 2000, 2005 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

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

B-18 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty
Monitoring Disk I/O: iostat
# iostat 10 2

System configuration: lcpu=2 drives=3

tty: tin tout avg-cpu: %user %sys %idle %iowait


0.0 4.3 0.2 0.6 98.8 0.4

Disks: %tm_act Kbps tps Kb_read Kb_wrtn

hdisk0 0.0 0.2 0.0 7993 4408


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


0.1 110.7 7.0 59.4 0.0 33.7

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

A system may be I/O bound, if:


%iowait > 25%, %tm_act > 70%
Copyright IBM Corporation 2005

Figure B-10. Monitoring Disk I/O: iostat . AW185.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.

Copyright IBM Corp. 2000, 2005 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

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 should
take place.
The %iowait displays the same information as %wio shown when using sar -u and wa
in vmstat. High %iowait values does not mean that there is definitely an I/O bottleneck.
An idle CPU is marked as waiting on I/O if an I/O was started on that CPU and is still in
progress. The %iowait value given in iostat is the average I/O wait for all CPUs. If
your system always shows that it is waiting for outstanding disk requests, you need to
investigate in this particular area.

B-20 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 jfslog
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 N/A
0.02 56 8418 52.8 /dev/hdisk1 N/A

Copyright IBM Corporation 2005

Figure B-11. AIX Tools: filemon . AW185.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, 2005 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

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.

B-22 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Runqueue 0.0 Dirblk 0
Network KBPS I-Pack O-Pack KB-In KB-Out Waitqueue 0.0
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
Disk Busy% KBPS TPS KB-Read KB-Writ Steals 0 % Comp 15.4
iostat hdisk0 0.0 0.0 0.0 0.0 0.0 PgspIn 0 % Noncomp 9.3
info 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 NFS (calls/sec) % Free 99.3
rmcd 10594 0.0 2.0 root ServerV2 0
nfsd 15238 0.0 0.0 root ClientV2 0 Press:
syncd 3482 0.0 1.3 root ServerV3 0 "h" for help
gil 2580 0.0 0.0 root ClientV3 0 "q" to quit
vmstat
info

Copyright IBM Corporation 2005

Figure B-12. topas . AW185.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, 2005 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

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 2005

Figure B-13. There Is Always a Next Bottleneck! AW185.0

Notes:

Youre 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-24 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-14. Workload Management Techniques (1 of 3) AW185.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, 2005 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

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
Queue is up:
# qadm -U ksh
Jobs will be executed
sequentially
Copyright IBM Corporation 2005

Figure B-15. Workload Management Techniques (2 of 3) AW185.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-26 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 (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 2005

Figure B-16. Workload Management Techniques (3 of 3) AW185.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-28 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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

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 2005

Figure B-17. Simultaneous Multi-Threading (SMT) AW185.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-30 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1
Student Notebook

Uempty Simultaneous multi-threading (SMT)


AIX 5L V5.3 introduces simultaneous multi-threading (SMT) to handle multiple threads
of a POWER5 processor. If SMT is enabled, the POWER5 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 image in AIX 5L V5.3 has been extended to include an indicator that controls
the default simultaneous multi-threading mode.

Copyright IBM Corp. 2000, 2005 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

Tool Enhancements for Micro-Partitioning


(AIX 5L V5.3)
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 2005

Figure B-18. Tool Enhancements for Micro-Partitioning (AIX 5L V5.3) AW185.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-32 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
Beginning with AIX 5L V5.3, 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


Beginning with AIX 5L V5.3, there is additional information in the output of all of the
performance commands. If the POWER5 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, 2005 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

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-34 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-19. Performance Diagnostic Tool (PDT) AW185.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, 2005 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

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-36 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-20. Enabling PDT AW185.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, 2005 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

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-38 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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

Cleanup old data, each Saturday at 9:00 P.M.

Copyright IBM Corporation 2005

Figure B-21. cron Control of PDT Components AW185.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
three different parameters, each representing a collection profile, at three different
collection times.

Copyright IBM Corp. 2000, 2005 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

# 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-40 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-22. PDT Files AW185.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, 2005 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

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-42 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-23. Customizing PDT: Changing Thresholds AW185.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, 2005 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

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-44 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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
percent full is estimated. The default value is 30, and it can be any integer value
between zero (0) and 100000.

Copyright IBM Corp. 2000, 2005 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

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 2005

Figure B-24. Customizing PDT: Specific Monitors AW185.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-46 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-25. PDT Report Example (Part 1) AW185.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, 2005 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

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-48 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-26. PDT Report Example (Part 2) AW185.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, 2005 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

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-50 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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 2005

Figure B-27. Unit Summary AW185.0

Notes:

Copyright IBM Corp. 2000, 2005 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

B-52 AIX 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.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, 2005 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 5L for UNIX Professionals Copyright IBM Corp. 2000, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.1.0.1

backpg
Back page


You might also like