Professional Documents
Culture Documents
cover
Front cover
AIX 5L
System Administration I:
Implementation
(Course Code AU14)
Instructor Guide
ERC 11.0
Instructor Guide
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
CICS/6000
HACMP
iSeries
Magstar
Network Station
POWER2
PS/2
Requisite
SecureWay
Tivoli
AIX 5L
DB2
Hummingbird
Language Environment
Micro Channel
OS/2
POWER GTO
pSeries
RISC System/6000
SP
AS/400
Domino
Infoprint
Lotus
MVS
POWER
PowerPC
Redbooks
RS/6000
System/370
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo 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 trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product and service names may be trademarks or service marks of others.
V3.1.0.1
Instructor Guide
TOC
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Instructor Course Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Course Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Unit 1. Introduction to IBM Sserver pSeries Systems and AIX System
Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
What Is RISC Technology? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
pSeries System Bus Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Workstation Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Server Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
PC Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Uniprocessor (Uni) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
SMP and Cluster 1600 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Logical Partitioning (LPAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Role of the System Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Who Can Perform Administration Tasks? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
Exercise 1: root Login Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
Unit 2. AIX 5L V5.3 Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Installation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Installation Process (From CD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Console and Language Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Installation and Maintenance Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Installation and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Method of Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Installation Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Erasure Options for Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Primary Language Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Install Options for 32-bit Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
Install Options for 64-bit Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Install More Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33
Begin Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
Installation Flowchart - All Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37
Configuration Assistant Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
Exercise 2: Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44
Contents
iii
Instructor Guide
V3.1.0.1
Instructor Guide
TOC
5-12
5-15
5-17
5-19
5-21
5-23
Contents
Instructor Guide
V3.1.0.1
Instructor Guide
TOC
Contents
vii
Instructor Guide
V3.1.0.1
Instructor Guide
TOC
12-25
12-28
12-30
12-32
12-34
Contents
ix
Instructor Guide
V3.1.0.1
Instructor Guide
TOC
Contents
xi
Instructor Guide
qdaemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-22
The /etc/qconfig File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-25
Printer Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-29
AIX Printer Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-31
Configuring a Printer with a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-34
Selecting a Printer Type (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-36
Selecting a Printer Type (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-38
Printer Attachment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-40
Add the Print Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-42
Remote Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-44
Client Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-46
Start lpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-48
Add a Remote Print Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-50
Define the Print Server on the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-52
Let's Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-54
Submitting Print Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-56
Listing Jobs in a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-59
Change Characteristics of a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-62
Removing a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-65
Managing Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-67
Understanding Queue Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-69
Bringing Queues Up and Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-72
Managing Print Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-74
Cancelling Print Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-76
Job Priority Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-79
Holding a Job in a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-82
Moving a Job between Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-84
Printing-related Directories to Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-86
Printing Problem Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-88
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-91
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-93
Exercise 19: Printers and Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-95
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-97
Unit 18. Networking Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-2
What Is TCP/IP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-4
An Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-7
Names and Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-10
TCP/IP Network Facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-13
Information Needed to Configure TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-16
Configuring TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-19
Flat Name Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-22
Identifying the Hostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-24
Basic TCP/IP User Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-26
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-31
Exercise 20: Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-33
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18-35
xii
V3.1.0.1
Instructor Guide
TOC
Contents
xiii
Instructor Guide
xiv
V3.1.0.1
Instructor Guide
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM 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
CICS/6000
HACMP
iSeries
Magstar
Network Station
POWER2
PS/2
Requisite
SecureWay
Tivoli
AIX 5L
DB2
Hummingbird
Language Environment
Micro Channel
OS/2
POWER GTO
pSeries
RISC System/6000
SP
AS/400
Domino
Infoprint
Lotus
MVS
POWER
PowerPC
Redbooks
RS/6000
System/370
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo 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 trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product and service names may be trademarks or service marks of others.
Trademarks
xv
Instructor Guide
xvi
V2.0
Instructor Guide
pref
xvii
Instructor Guide
V2.0
Instructor Guide
pref
Course Description
AIX 5L System Administration I: Implementation
Duration: 5 days
Purpose
The purpose of this course is to enable students to install, customize,
and administer the AIX 5L V5.3 operating system in a multiuser
environment using pSeries systems.
Audience
Anyone responsible for the system administrative duties implementing
and managing AIX 5L V5.3 operating system on an IBM pSeries
system.
Prerequisites
The students attending this course should be able to:
Log in to an AIX system and set a user password
Execute basic AIX commands
Manage files and directories
Use the vi editor
Use redirection, pipes, and tees
Use the utilities find and grep
Use the command and variable substitution
Set and change Korn shell variables
Write simple shell scripts
These skills can be acquired by taking the AIX 5L Basics course or
through equivalent AIX/UNIX knowledge.
Objectives
On completion of this course, students should be able to:
Install the AIX 5L V5.3 operating system, software bundles, and
filesets
Perform system startup and shutdown
Copyright IBM Corp. 1997, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Course Description
xix
Instructor Guide
Contents
Introduction (Overview of pSeries)
System Management Tools - SMIT and the Web-based System
Manager
Software Installation and Management
System Startup and Shutdown Devices
Printers and Queues
Managing Queues
System Storage Overview
Working with the Logical Volume Manager
Working with File Systems
Managing File Systems
Paging Space
Backup and Restore
Security
User Administration
Scheduling
Networking Overview
Curriculum relationship
This course should follow the AIX 5L Basics course. A basic
understanding of AIX environment and simple commands is
recommended before taking this course.
xx
V2.0
Instructor Guide
pref
Agenda
Day 1
(00:30) Welcome
(00:25) Unit 1 - Introduction to pSeries/AIX System Administration
(00:10) Activity: su
(00:40) Unit 2 - AIX V5.3 Installation
(00:15) Activity: Configuration Assistant
(00:20) Unit 3 - System Management Interface Tool (SMIT)
(00:20) Exercise: Using SMIT
(00:30) Unit 4 - AIX Software Installation and Maintenance
(00:25) Exercise: AIX Software Installation
(00:10) Unit 5 - Configuring AIX Documentation
(00:10) Exercise - Information Center
(00:10) Unit 6 - WebSM
(00:20) Exercise: Configuring WebSM server
(00:30) Unit 7 - System Startup and Shutdown
(00:30) Exercise: System Startup and Shutdown
Day 2
(00:40) Unit 8 - Devices
(00:30) Exercise: Devices
(00:50) Unit 9 - System Storage Overview
(00:10) Let's Review: LVM Terminology
(00:30) Unit 9 (Cont)
(00:15) Activity: LVM Commands
(00:25) Unit 10 - Working With the Logical Volume Manager
(00:20) Activity: Volume Groups
(00:45) Unit 10 (Cont)
(00:40) Exercise: Logical Volume Manager
(00:35) Unit 11 - Working with File Systems
(00:20) Activity: Inodes and NBPI
Day 3
(00:35) Unit 11 (Cont)
(00:40) Exercise: Working with File Systems
(00:25) Unit 12 - Managing File Systems
(00:25) Exercise: Managing File Systems
(00:25) Unit 13 - Paging Space
(00:20) Exercise: Paging Space
(00:40) Unit 14 - Backup and Restore
Copyright IBM Corp. 1997, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Agenda
xxi
Instructor Guide
Day 4
(00:20) Unit 14 (Cont)
(00:30) Exercise (optional) - Using tar and cpio
(02:45) Unit 15 - Security and User Administration
(00:35) 15.1 - Security Concepts
(00:25) Exercise: Security Files
(00:30) 15.2 - User Administration
(00:40) Exercise: User Administration
(00:25) 15.3 - Security Files
(00:10) Activity: Examine the Security Files
(00:25) Unit 16 - Scheduling
(00:30) Exercise: Scheduling
Day 5
(00:40) Unit 17 - Printers and Queues
(00:10) Let's Review
(00:25) Unit 17 (Cont)
(00:40) Exercise: Printers and Queues
(00:30) Unit 18 - Networking Overview
(00:40) Exercise: Networking
V2.0
Instructor Guide
pref
Text highlighting
The following text highlighting conventions are used throughout this book:
Bold
Italics
Monospace
Monospace bold
<text>
The text between the < and > symbols identifies information the
user must supply. The text may be normal highlighting, bold or
monospace, or monospace bold depending on the context.
Agenda
xxiii
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
GA23-2674
SG24-4690
SG24-2581
SG24-5120
www.ibm.com/eserver/pseries
1-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Define terminology and concepts of IBM Sserver pSeries
systems
List common configurations available for IBM Sserver
pSeries systems
Describe the roles of the system administrator
Obtain root access with the su command
AU1411.0
Notes:
1-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets look at the relationship between the internal hardware
architecture and RISC concepts.
1-3
Instructor Guide
Number of
Instructions
Depends on:
Architecture
Compiler
Clock cycles
per instruction
taken for
x Time
a clock cycle
Depends on:
Architecture
Compiler
Implementation
Depends on:
Technology
Implementation
Optimized on
pSeries machines
Copyright IBM Corporation 2005
AU1411.0
Notes:
RISC history
The IBM Sserver pSeries systems use RISC processors and were formally called
RS/6000 systems, where the RS stood for RISC System.
Reduced Instruction Set Computing (RISC) architecture was originally developed by
IBM in the 1970s. Its basic objective was to provide a reduced instruction set that would
execute very fast with maximum efficiency in the hardware. More complex instructions
would be implemented in the software.
POWER architecture
The simple RISC-based instruction is typically executed in one system clock cycle (or
less using superscalar techniques). IBM has enhanced the standard RISC technology
by introducing the newer Performance Optimized With Enhanced Risc (POWER)
1-4
V3.1.0.1
Instructor Guide
Uempty
architecture. The original POWER architecture has also evolved into the PowerPC,
POWER4, and POWER5 architectures.
The POWER architectures are designed with the newest in circuitry engineering and
multiprocessor technologies and yield very fast performance.
The instructions are handled in a superscalar (parallel) fashion by the processor which
further increases the performance offered by a RISC system.
64-bit architecture
Support for 64-bit architecture has been provided since AIX V4.3. This support provides
improved performance for specialized applications with:
- Large address spaces (up to 16,384,000 terabytes)
- Access to large datasets for data warehousing, scientific and multimedia
applications
- Long integers in computations
A major enhancement to AIX since AIX 5L V5.1 was the introduction of the 64-bit
kernel. Server consolidation and workload scalability will continue to require higher
capacity hardware systems that support more memory and additional I/O devices. The
64-bit AIX 5L kernel is designed to support these requirements.
The 32-bit and the 64-bit kernel are available. Only 64-bit CHRP-compliant PowerPC
machines are supported for the 64-bit kernel on the POWER platform. The primary
advantage of a 64-bit kernel is the increased kernel address space allowing systems to
support increased workloads. This ability is important for a number of reasons:
- Data sharing and I/O device sharing are simplified if multiple applications can be run
on the same system
- More powerful systems will reduce the number of systems needed by an
organization, thereby reducing the cost and complexity of system administration
1-5
Instructor Guide
Instructor Notes:
Purpose Explain the relationship between the internal hardware architecture and RISC
concepts.
Details This page is meant as an introduction. Do not go into too much detail on
hardware. Other courses, such as Q1316/AU16 discuss hardware in more detail.
The first RISC system was developed in 1975 at the IBM T.J. Watson Research Center as
a spin-off of telephone switching research. In 1986, IBM introduced the first system to use
RISC technology - the PC RT. AIX was announced at this time as well as the operating
system for the PC RT. The PC RT is often thought of as the first generation of RISC
systems.
The RS/6000 systems, introduced in 1990, are often thought of as the second generation
of RISC systems. AIX V3 was introduced as this time. The latest update of this course
reflects AIX 5L V5.3.
Since October 2000, new servers with UNIX operating systems have been introduced by
the name of IBM Sserver pSeries systems.
Of course, IBM offers many systems, from smaller personal systems and workstations up
to the Scalable PowerParallel (SP) systems.
The added information on superscalar is for interest purposes only. Systems that are
designed to handle multiple instructions simultaneously are called superscalar.
The student notes also mention AIX V4.3 64-bit support. The greatest potential
performance benefit of 64-bit addressing is the ability to handle very large address spaces.
In order to use the 64-bit capability, the RS/6000 processor must be capable of supporting
this enhancement. The IBM S70 was announced in October of 1997 to provide 64-bit
support. Since AIX V4.3 the operating system allows users to write their own 64-bit enabled
applications. Note also, that since AIX 5L V5.1, the full 64-bit kernel was made available for
POWER systems.
Additional Information It should be noted that the advantages of 64-bit addressing
capability come with a cost. Extra addressability must be accompanied by very large
amounts of system memory to work effectively and memory is not inexpensive.
Applications compiled in 64-bit mode also consume more disk space than their 32-bit
equivalents.
Also, AIX 5L V5.3 supports two hardware architectures:
32-bit POWER architecture
64-bit POWER architecture
The 64-bit kernel is available for 64-bit POWER. Older 32-bit architecture is supported by
the 32-bit kernel. The 64-bit POWER hardware gives you the choice of running a 32-bit or
64-bit kernels.
Transition Statement The next page talks about the IBM Sserver pSeries system bus
types.
1-6
V3.1.0.1
Instructor Guide
Uempty
Processor
Base I/O
Functions
PCI Bus
LAN
Graphics
SCSI
AU1411.0
Notes:
Introduction
The job of the bus is to provide the highway for information to flow between the IBM
Sserver pSeries system elements and the optional I/O feature cards (for example,
SCSI adapters, token-ring cards) that are plugged into the adapter slots.
1-7
Instructor Guide
1-8
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain what a bus is and what type is currently used.
Details Explain that all models sold today are based on the PCI bus. Because there are
a large number of MCA machines installed, students may have MCA machines in their
workplace. Point out to the students that the administration is almost the same.
Additional Information
Transition Statement We'll next take a look at components of a typical workstation
configuration.
1-9
Instructor Guide
Workstation Configuration
Single-User Graphical Workstation
Personal
Computer
Display or
PowerDisplay
15, 17, 20, or 23
inches
Graphics Adapter
pSeries
Built-in Adapters
Up to 16 M colors
Two serial ports
SCSI
Keyboard
Mouse
Diskette
Ethernet
Tablet
AU1411.0
Notes:
Overview
One common configuration for the IBM Sserver pSeries systems is as a single-user
graphical workstation suitable for graphics applications, such as CAD/CAM.
In this configuration, the IBM Sserver pSeries system has a graphical display (referred
to as an LFT - Low Function Terminal) which is attached to a graphics adapter inside the
system unit. A keyboard, mouse, and optional graphics tablet are plugged into special
ports on the system board.
There are a number of graphics cards available for the different IBM Sserver pSeries
models which differ in speed, resolution, number of colors supported, 2D or 3D support,
and so forth. There are corresponding displays that can be used from personal
computer displays through to the 23-inch PowerDisplay.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the use and components of a typical graphics workstation
configuration.
Details This is representative of a simple workstation configuration. This is most likely
what the students will see in the classroom.
Point out that every system comes with built-in ports - serial ports, SCSI, keyboard, mouse,
Ethernet and tablet (for graphical drawing).
There are a variety of graphics adapters available that provide a range of graphics
capability. The capabilities are the number of colors that can be display, speed of the card
and 2D or 3D. The added capabilities come with added cost.
Additional Information Typical high-end graphics configurations support up to 16
million colors and a resolution of 1280 by 1024.
Is this type of configuration likely to be easier or more difficult than a multiuser fully
networked system to administer?
Often this type of configuration will be relatively simple to administer as there is likely to be
only one user at a time, limited I/O attached, and the user may tolerate limited unavailability
for maintenance, and so forth. However, in some installations many of these systems are
connected, and this can be a large administrative problem.
Transition Statement Another common configuration is a workstation with many users.
Let's briefly discuss this configuration next.
1-11
Instructor Guide
Server Configurations
Multiuser System
ASCII Terminals
pSeries
System Unit
Async Adapter
Networked System
Server
Clients
Network
Management
Disk storage
Printers
Programs
Login Sessions
File Transfer
PCs
Network
Documentation
pSeries
pSeries
Other systems
Copyright IBM Corporation 2005
AU1411.0
Notes:
Overview
Some multiuser systems consist only of ASCII terminals connected locally or over a
telephone line by modem. Two ASCII devices can be connected to the serial ports
provided on IBM Sserver pSeries systems. All further ASCII devices will require an
asynchronous adapter card.
More complex systems consist of many IBM Sserver pSeries systems and other
devices such as PCs connected over a local area network (LAN) like Ethernet or token
ring. In this case, the IBM Sserver pSeries system requires the appropriate
communications adapter card.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the components required for a typical multiuser ASCII system and a
more complex networked system. Also, give a few examples of how these systems are
used.
Details Good examples might include:
Multiuser ASCII - word processing such as using Word Perfect for AIX.
Networked - database such as Oracle or DB2 for AIX.
These systems are usually more difficult to administer than a configuration with ASCII
terminals only due to the following:
Many simultaneous users
Many I/O devices
Mission critical applications
Transition Statement A recent trend is towards giving commercial multiuser
applications a graphical user interface (GUI). In this context, X terminals are often used as
terminals.
1-13
Instructor Guide
PC Connectivity
pSeries
PC
Network
X Window
Server
Software
X Window
Client
Programs
Copyright IBM Corporation 2005
AU1411.0
Notes:
Overview
Very commonly, IBM Sserver pSeries systems are accessed via a network using PCs.
One way to connect is using telnet. Another method, which is growing in popularity, is
to install software on the PC to give the PC the capability to function as an X-Window
Server. This allows the PC to function as a graphics display station for the IBM
Sserver pSeries system. There are many commercially available software packages
for several different operating systems that provide this functionality.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain common methods for accessing an IBM Sserver pSeries system.
Details Since most users have PCs on their desk, connecting a PC to an IBM Sserver
pSeries system is very common. telnet provides a simple text-based login to the IBM
system.
If software is installed on the PC, then the PC can function as an X-Window display for the
IBM Sserver pSeries system giving the user access to graphical applications running
from the server.
Additional Information Be careful not to endorse any particular X product, but
Hummingbird's Exceed product is commonly used in the IBM Sserver pSeries
environment.
IBM is marketing the IBM Network Station as another mean to connect to the BM Sserver
pSeries system. These are about the size of a Thinkpad. They must be booted from a host
machines but have Windows and Java support.
Transition Statement Let's looks at a couple of terms that are used in the computing
world.
1-15
Instructor Guide
Uniprocessor (Uni)
SSA
Adapter
Cache
Processor
SCSI
Adapter
I/O Bus
Processor Bus
Memory
Controller
Graphics
Adapter
Memory
Bus
Memory Cards
Copyright IBM Corporation 2005
AU1411.0
Notes:
Overview
The term uniprocessor refers to a machine with only one processor. The processor is
connected to the memory and other adapters via the bus. Today, the I/O buses are
based on the Peripheral Component Interconnect (PCI) architecture.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the basic uniprocessor architecture.
Details The various parts of a computer are connected to each other by buses. A bus is
a transmission path along which signals are transferred to and from attached devices. Only
devices addressed by the signals pay attention to them; the others discard the signals.
The I/O bus is the data path on the planar (motherboard) that interconnects the
microprocessor with attachments to the planar in expansion slots (such as SSA, SCSI and
graphics adapters). In the past, I/O buses were based on the Micro Channel Architecture
(MCA). Today, I/O buses are based on the industry-standard Peripheral Component
Interface (PCI) Architecture.
Additional Information
Transition Statement Utilizing multiple processors is a good way of improving the
performance of a computer system. Symmetric Multi-Processing systems have multiple
processors which share the same memory.
1-17
Instructor Guide
Shared Nothing
Shared Memory
CPU
CPU
...
Interconnect
CPU
CPU
Interconnect
Mem
Global Memory
CPU
Mem
...
CPU
...
Mem
...
...
Multiple processors accessing
the same memory and all disk
SMP
Loosely-coupled processors
linked by high-speed interconnect
Cluster 1600
AU1411.0
Notes:
Introduction
The Symmetric MultiProcessor (SMP) architecture supports a single copy of the
operating system which is shared by all processors. Memory and disk are also shared.
IBM Sserver pSeries SMP models support both PCI and MCA buses and can support
up to 24 processors. Beginning with AIX 5L V5.2, MCA architectures are no longer
supported.
V3.1.0.1
Instructor Guide
Uempty
1600 can incorporate the regular IBM Sserver pSeries models up to and including
p690 machines.
Each Cluster 1600 node has its own memory, operating system, expansion slots, and
disk. A high-speed network called the SP Switch (up to 480 MB/sec.) is available to
connect the nodes together. The Cluster 1600 uses the Parallel System Support
Programs (PSSP) to control its environment.
The Cluster 1600 system is ideal for any parallel computing, high CPU-usage (such as
modeling and numerical analysis) and I/O-intensive applications (such as Data Mining,
OLTP, DB2/PE and Oracle Parallel Query/Server).
Cluster 1600 is also commonly used in an HACMP (High Availability Cluster
Multi-Processing) situation where better physical isolation is desired than can be
provided with an LPAR solution.
1-19
Instructor Guide
Instructor Notes:
Purpose Introduce the concepts of SMP and SP (cluster 1600).
Details Don't spend a lot of time on this as SMP and SP are covered in other courses.
However, many of the students attending this class may be using one of these systems.
Note that SMP nodes are also available on the SP.
Examples of IBM RS/6000 systems supporting the SMP environment are the 43P-240 (1-2
way), M80 (2-8 way), F50 (1-4 way), H50 (1-4 way), the S70 (4, 8 or 12 way), and the S80
(6-24 way). Most servers support 64-bit applications (64-bit capability has been supported
since AIX V4.3).
Additional Information The student notes mention the speed of the SP Switch. It has a
rated hardware speed of up to 480 MB/sec. However, when using TCP/IP for
communications, the limitations of this protocol will produce a top speed of about 75
MB/sec. To take advantage of the rated speed of the SP Switch, some customers forego
TCP/IP and instead use Message Passing Interface (MPI) programming.
Transition Statement Lets look at one more very common configuration: an LPAR
machine.
V3.1.0.1
Instructor Guide
Uempty
Operating
System
Operating
System
Operating
System
Operating
System
PPPPP
PPPPP
MMM
AAAAAA
PP
MM
AAAA
PPP
MM
AAAA
PPPPPPP
PPPPPPP
MMMMMMM
AAAAAAAAAAAAA
LPAR
LPAR
LPAR
LPAR
A = Adapter
M = Memory
P = Processor
= Disk
AU1411.0
Notes:
Introduction
This visual illustrates that LPARs can have resources allocated based on the needs of
the workload rather than the amount contained in a physical building block. In the
diagram above, there are four partitions, each with various amounts of resources.
1-21
Instructor Guide
means the partitions must be reactivated (that is, rebooted) to change the resource
configuration.
When memory is moved from one partition to another with dynamic LPAR, memory is
written to all zeroes by the system firmware. Likewise, I/O adapters are fully reset when
moved.
Allocating disks
Disks are not allocated to partitions individually. Instead, the I/O slot containing the
adapter controlling one or more disks is allocated to a partition.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Illustrate how resources can be allocated to logical partitions.
Details This page illustrates the concepts discussed on the previous visual. The
example shows four partitions on one system. Describe how resources can be reallocated
to other partitions based on business need.
In this picture, the interconnect is shown encompassing the entire system. This is a
simplification. The exact implementation of this interconnect will depend on the type of
system.
Mention that disks are shown here as separate resources, but in fact disks themselves are
not allocated to partitions at all. What is allocated to a partition is the I/O slot where the
SCSI (or other) adapter for the disk is located.
Additional Information
Transition Statement Now that weve looked at some common configurations, let us
look at what tasks a system administrator needs to do to manage these configurations.
1-23
Instructor Guide
AU1411.0
Notes:
Overview
There are a number of distinct tasks which the system administrator on a UNIX or AIX
system must perform. Often there will be more than one system administrator in a large
organization, and the tasks can be divided between the different administrators.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Ensure students have a common understanding of what the system
administrator does.
Details Consider starting without the visual and ask the students what they think a
system administrator does. Build up a list on the board and then compare to the visual.
As UNIX systems get larger, the roles change and become more and more like mainframe
roles; for example, operator.
Additional Information
Transition Statement We don't want to let just anyone do these tasks, so AIX provides
classes of privileged users.
1-25
Instructor Guide
su root
or
su
root
Copyright IBM Corporation 2005
AU1411.0
Notes:
Limiting access to administrative tasks
AIX security permissions restrict the performance of administrative tasks to the root
user (and sometimes other users in special groups; for example, system for general
tasks, security for user administration, printq for AIX Print Subsystem printer
management, and lp for System V Print Subsystem printer management.) This means
that the root user's password must be kept secure and only divulged to the few users
who are responsible for the system.
A certain amount of discipline is also required when using the root ID, because typing
errors made as root could do catastrophic system damage. For normal use of the
system, a non-administrative user ID should be used, and only when superuser
privilege is required should the root user ID be used.
V3.1.0.1
Instructor Guide
Uempty
1-27
Instructor Guide
Instructor Notes:
Purpose Explain the importance of the root ID and keeping it secure.
Details
Additional Information Students will have an opportunity to experiment with su in the
first activity.
Transition Statement Time for a checkpoint.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
1. What type of adapter are you likely to require for a singleuser graphics workstation?
a. Asynchronous
b. Communications
c. Graphics
2. What is the difference between UP and SMP machines?
_____________________________________________
_____________________________________________
_____________________________________________
3. True or False? The su command allows you to get root
authority even if you signed on using another user ID.
AU1411.0
Notes:
1-29
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. What type of adapter are you likely to require for a singleuser graphics workstation?
a. Asynchronous
b. Communications
c. Graphics
2. What is the difference between UP and SMP machines?
Uniprocessors only have one microprocessor. SMP
machines are symmetric multiprocessing machines that
have multiple microprocessors.
3. True or False? The su command allows you to get root
authority even if you signed on using another user ID.
But, you must also know the root password.
Additional Information
Transition Statement Now, lets do an exercise using the su command.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
1-31
Instructor Guide
Instructor Notes:
Purpose Do the su exercise.
Details
Additional Information
Transition Statement Now, lets summarize the unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
Common Configurations
Single-user graphics workstation
Multiuser ASCII
Networked system
X Window-enabled PC
SMP
SP
System Administrator's Role:
Pre-installation planning
Install hardware, software, network
Manage user accounts, system resources, licenses
Backup/recovery
Define subsystems
Performance monitoring, capacity planning
Copyright IBM Corporation 2005
AU1411.0
Notes:
1-33
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4374
SC23-4389
SC23-4887
GI10-0729
GI10-0739
GI10-0756
2-1
Instructor Guide
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
AU1411.0
Notes:
2-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by discussing the installation methods.
2-3
Instructor Guide
Installation Methods
CD-ROM
Tape (Not available for AIX 5L installation)
4 mm
8 mm
AU1411.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 check, 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.
2-4
V3.1.0.1
Instructor Guide
Uempty
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.
2-5
Instructor Guide
Instructor Notes:
Purpose Define the BOS install source devices.
Details You do not have to explain all the following details to the students, however it is
useful for the instructor. Cover as much of the following as you feel necessary.
CD-ROM:
Requires only 8 MB of RAM with AIX V4.1 and V4.2; 32 MB of RAM with AIX V4.3.
Packaged in a file system format
Mounted over a directory /SPOT
AIX 5L V5.3 requires 128 MB of RAM
Tape:
Requires 16 MB of RAM with AIX V4.1 and V4.2; 32 MB of RAM with AIX V4.3; 64 MB
of RAM with AIX 5L V5.1 and 128 MB of RAM with AIX 5L V5.2 or V5.3.
Data blocks:
- File 1 - Boot image
- File 2 - BOS install programs
- File 3 - Table of contents (TOC)
- File 4 - backup-format file images for products
You could also mention at this point that with AIX V4 and later booting from diskettes is not
supported.
This unit will focus on installation of AIX on a standalone system, that is, a system that can
boot/start up by itself. For students interested in how to perform a NIM installation, refer
them to the Network Installation Management Guide and Reference.
For those students with preinstalled systems, instructions for completing the installation
can be found in the Startup Instructions for Preinstalled Systems, which is shipped with the
pSeries hardware.
Additional Information The AIX 5L is only delivered on CD. Prior to AIX 5L V5.1 with
tape, each different software order is created separately. This process is referred to as
stacked tape because there are multiple installation images stacked one after another on
the tape.
The stacked tapes are bootable and provide all of the menus necessary to install the BOS
either from the distributed tape or from an installation server machine across a network.
Once the BOS is installed, the same tape can be used to install the various optional
software products.
A complete system image backup tape can be created which is in a similar format to a
stacked tape; that is, it is bootable and can be used to install the system.
In AIX 5L V5.1, the memory requirements have been increased to 64 MB of RAM for
installation from CD and in AIX 5L V5.2 or V5.3 up to 128 MB.
Transition Statement Let's next look at the steps necessary to install AIX 5L V5.3.
2-6
V3.1.0.1
Instructor Guide
Uempty
Power on system
Press <F5>
Copyright IBM Corporation 2005
AU1411.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.
2-7
Instructor Guide
2-8
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To describe the actions that need to be initially taken to install AIX.
Details Ensure that students understand how to force the machine to boot from their
installation media. The CD will most likely not be on the normal boot list, so they must press
the <F5> key to use the default service boot list.
If they are attempting an install from tape, the tape device will not be on the boot list. They
will need to change the boot list by using the SMS programs.
Point out that not all consoles will use function keys, such as <F5>, for controlling the boot
mode. On serial attached tty consoles (which do not have function keys) and on many
newer pSeries machines (even with graphics terminals), the equivalent numeric keys are
used for this purpose. Thus, for a service boot using the default bootlist, you might need to
press the numeric <5> key rather than the <F5> key."
Additional Information
Transition Statement The next steps in the boot process are to define the console and
the installation language.
2-9
Instructor Guide
Terminal on serial
NEXT:
Select the language
for installation
AU1411.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 2 and then <Enter>.
V3.1.0.1
Instructor Guide
Uempty
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 2 and press <Enter> to
continue, once you have corrected the problem.
2-11
Instructor Guide
Instructor Notes:
Purpose Define the console and the installation language.
Details After a few minutes into the boot process, the console message will be
displayed on the screen attached to port S1 (serial port 1) and also to all native graphics
screens. Point out that the message will be subtly different depending on the type of
screens that you have connected (that is, ASCII or graphics). On a graphics terminal, you
will need to press <F1> and then <Enter> to make it the system console. If you wish to
have an ASCII terminal as the system console, press 2 and then <Enter>.
Explain that the console can be thought of as a bucket which the system uses and sends
messages to every time it has something to say. Also, if the system is in single-user mode,
this will be the only terminal (by default) that will be available.
The settings that have been highlighted must be set through the setup menus (for example,
on an ibm3151 to obtain the setup menus, you must press the <Ctrl><Setup> keys and
follow directions).
To set the installation language, select one of the eight choices. Note that this message
only appears on the console (which you have just defined). The language that you select
will be used only during the installation process.
There are separate options which have to be set to establish the language for the
environment after the installation process has completed.
Note: Only single-byte character set locales can be chosen as an installation language.
Additional Information
Transition Statement After the definition of the console and the language, the
Welcome to the Base Operating System Installation and Maintenance menu will be
displayed. Let's see what values can be set from this screen.
V3.1.0.1
Instructor Guide
Uempty
88 Help ?
99 Previous Menu
>>> Choice [1]: 2
AU1411.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.
2-13
Instructor Guide
Instructor Notes:
Purpose Consider the options from the Installation and Maintenance menu.
Details The first option will start the installation using the default settings. If, however,
you wish to view and possibly alter the current settings, then you need to select the second
option, which will be discussed in this unit.
The third option allows for maintenance tasks such as going into a maintenance shell,
copying the system dump, carrying out an image backup, and so forth.
Additional Information
Transition Statement For an initial installation, it is recommended to chose option 2, to
verify that the settings are what you want. Let's choose this option.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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-15
Instructor Guide
Instructor Notes:
Purpose View the installation settings menu.
Details Use this visual as a spring-board to the following four visuals which show how
the system settings (option 1) and the primary language environment (option 2) can be
changed. The third option includes the desktop type, Trusted Computing Base, and other
optional software.
The Installation and Settings screen displays the default installation settings for your
system. The default settings are determined by the state of your system.
Additional Information
Transition Statement Let's first consider option 1, the different methods of installation.
V3.1.0.1
Instructor Guide
Uempty
Method of Installation
Option 1 of the Installation and Settings menu:
Change Method of Installation
Type the number of your choice and press Enter.
1 New and Complete Overwrite
Overwrites EVERYTHING on the disk selected for installation.
Warning: Only use this method if the disk is totally empty or there is nothing
on the disk you want to preserve.
2 Preservation Install
Preserves SOME of the existing data on the disk selected for installation.
Warning: This method overwrites the user (/usr), variable (/var), temporary
(/tmp), and root (/) file systems. Other product (application) files and
configuration data will be destroyed.
3 Migration Install
Upgrades the Base Operating System to current release. Other product
(application) files and configuration data are saved.
88 Help ?
99 Previous Menu
>>> Choice [2]: 1
Copyright IBM Corporation 2005
AU1411.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.
2-17
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the different installation methods.
Details Explain each type of installation methods. For this course, we will choose New
and Complete Overwrite.
Additional Information Migration prior to AIX V4.2.1 is not supported since the CHRP
platform was not yet available. During a Migration installation, the installation process
determines which optional software products must be installed on AIX 5L. If migrating from
AIX V4.2, software support for non-device drivers must be reinstalled. In most cases, user
configuration files from the previous version of a product are saved when the new version
is installed during a Migration installation.
Transition Statement The next setting which has to be considered is on which disks
the operating system is going to be installed.
2-19
Instructor Guide
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 >>>.
Name
>>>1 hdisk0
2 hdisk1
Location Code
10-80-00-4,0
10-80-00-5,0
Size
(MB)
2063
2063
VG
Status
rootvg
rootvg
Bootable
yes
no
AU1411.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>.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define how disks can be selected for installation.
Details After booting from an external media or over the network, BOS install will
announce its intentions to install the AIX BOS onto the default disk(s) and will ask the user
if it is acceptable. The default disk(s) is where the operating system was previously located.
If the user does not want to use the default disk(s) then they are given the option to select a
target disk. All disks that are available will be displayed along with a single option to use a
supplemental target device (third party). If the supplemental device option is selected, BOS
install will prompt the user to insert the device configuration support diskette.
Option 77 on this menu will display the Physical Volume ID, which is what is found in the
ODM. This information is provided in case a student asks what this option will display.
Additional Information
Transition Statement AIX 5L V5.3 has a new option, 55, that allows us to erase the
contents of the drives selected for an overwrite install.
2-21
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
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).
2-23
Instructor Guide
Instructor Notes:
Purpose Explain the use of the new disk erasure option.
Details The purpose of multiple overwrites and the use of different patterns is to further
obscure any residual magnetic pattern from which the original data might be reconstructed.
Additional Information
Transition Statement After completing the System Settings, we then have an
opportunity to set the Primary Language Environment.
V3.1.0.1
Instructor Guide
Uempty
Language
C (POSIX)
English (United States)
Arabic (Bahrain)
Keyboard
C (POSIX)
Albanian
Arabic (Bahrain)
AU1411.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-25
Instructor Guide
Instructor Notes:
Purpose Define how the primary language environment after the installation is set.
Details The visual shows the list of language environments that can be selected. The
environment will be governed by three settings:
Cultural Conventions which will govern such things as the date format, the monetary
symbol, the sorting collation order, and so forth
Language which will set the language for the messages
Keyboard which will govern the character set that is available
In reality, this screen will display many language options. Users can also create their own
specific combinations by typing 67.
If English (United States) is chosen, a second menu is displayed. On this menu,
choose the type of keyboard being used: 1 for the default keyboard and 2 for the 122-key
keyboard.
Point out that "C(POSIX)" is an English based POSIX standard compliant language
environment. This is often sufficient for many systems.
Additional Information The language in which the system will be run should be
selected at this point, if at all possible. If a different language is needed after installation is
complete, the install media needs to be available in order to install the appropriate new
language filesets. If the language filesets are not found, an error message is generated but
the change looks like it occurred successfully. However, when the system is rebooted the
console will not be able to come up because the system can't find the language information
it needs to send messages to the console. The system appears to boot correctly but there
is no terminal access. To recover from this condition, the system will have to be booted in
service mode from external bootable media and the language set back to a supported
language environment.
Transition Statement Now, lets look at the advanced options that can be set.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
2-27
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the installation options.
Details The Trusted Computing Base is not discussed in this class. But, to use TCB, it
must be installed at this point. TCB cannot be installed afterwards. The operating system
would need to be reinstalled from scratch to load TCB.
TCB is a security package that helps prevent trojan horse programs. It sets up a database
that can audit changes to security related files. If it is installed, it will take a slightly larger
amount of disk space, not a significant amount. TCB doesn't have to be used if it is
installed.
You might suggest installing it unless the students are sure they will not want it.
Additional Information
Transition Statement If installing on a 64-bit platform the options screen will have some
additional items. Lets look at them.
2-29
Instructor Guide
AU1411.0
Notes:
Introduction
If you are installing on a 64-bit hardware platform, the installation software detects that
and presents some additional installation options.
V3.1.0.1
Instructor Guide
Uempty
For more information on this option refer to the AIX 5L V5.3 Security Guide.
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
2-31
Instructor Guide
Instructor Notes:
Purpose Provide additional information on the 64-bit installation options.
Details Focus on the additional options provided on the 64-bit machines.
Additional Information
Transition Statement Lets look at what additional software we can install at this point.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
2-33
Instructor Guide
Instructor Notes:
Purpose Explain the options on the Install More Software screen.
Details The software bundles available are:
Mozilla - Mozilla Web browser
Kerberos_5 - Kerberos
Server - Server filesets
While we select the default desktop environment on the previous panel, here we have
the choice to install the software for alternate desktop environments.
Kerberos is a popular method for authenticating a client to a service it wishes to use. It
avoids transmitting passwords in clear text by using private keys to encrypt tickets which
are passed between the principals that participate in the security domain.
Additional Information
Transition Statement Now that all the selections have been made, the installation
process begins. Lets look at the status indicator.
V3.1.0.1
Instructor Guide
Uempty
Begin Installation
Installing Base Operating System
Please wait . . . . . .
Approximate
% tasks completed
16
Elapsed Time
(in minutes)
1
AU1411.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-35
Instructor Guide
Instructor Notes:
Purpose Discuss the status indicator screen.
Details A number of tasks are performed to complete the installation including creating
a new boot logical volume, and customizing the locale and console information into the
newly installed operating system.
While the BOS is installing, the status indicator screen (as seen on the visual) is displayed.
The screen reports what percentage of the tasks are complete. Note that the percentage
indicator and the elapsed time are not linear; (that is, if it reports that 50% has completed in
four minutes, this does not indicate that the total installation time will be eight minutes).
All logical volumes and file systems are set to minimal standard sizes, but may be
increased later.
During the installation phase, only the software for the devices that are connected and
powered on will be installed. All other device software will be installed on demand.
Additional Information
Transition Statement Let's take a look at the 'big picture' of what occurs during the
installation of AIX.
V3.1.0.1
Instructor Guide
Uempty
Installation Method
Destination Disks
Language
Select language
Begin
with default
settings?
no
Verify default install
method and settings
Install Options:
Desktop
TCB
64-bit/JFS2 (64-bit platform)
Graphics Software
Import User Volume Groups
Enable System Backups
yes
yes
Default
settings need to be
changed?
no
Install from media
Perform customization
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
The flowchart in this visual summarizes the installation steps we have discussed.
2-37
Instructor Guide
Instructor Notes:
Purpose Consider the complete flow of events for the installation process.
Details This visual should be used as a summary for all the points that have been
discussed so far.
It can be used as a reference chart by the students.
Additional Information
Transition Statement Having installed the operating system, the system needs to be
customized. Let's view the options that can be set from this screen.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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
Copyright IBM Corp. 1997, 2005
2-39
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the Configuration Assistant menu options.
Details The Configuration Assistant is a graphics-based application that assists the
system administrator with final tasks that need to be performed after the installation of the
operating system. Just point and click and then click Next to perform the various tasks.
When the tasks are complete, click Exit the Configuration Manager. A second screen
appears where you can choose if you want the Configuration Assistant to be initiated the
next time the root user logs in. Usually, once you have completed the tasks of the
Configuration Assistant, you will choose not to have the Configuration Assistant execute
upon root login.
If an ASCII terminal is being used instead of a graphics terminal, the application that starts
is the Installation Assistant. Use it by moving cursor to an item and pressing <Enter>. The
Installation Assistant is also used in graphics mode with AIX V4.1.
To access the Configuration Assistant / Installation Assistant at a later time, type
install_assist. If using AIXWindows, the command configassist can also be used.
When exiting the Configuration Assistant, if the option to Finish now, and Restart
Configuration Assistant when Restarting AIX is selected, an entry in placed in
/etc/inittab that starts Configuration Assistant. The line identifier is fbcheck.
When running install_assit from an ASCII prompt in a graphics capable environment,
the command will start Xwindows and then launch in graphics mode.
Additional Information If youre working remotely, the DISPLAY environment variable
has to be exported for the configassist and install_assist commands to work.
Transition Statement Time for a checkpoint.
2-41
Instructor Guide
Checkpoint
1. AIX 5L can be installed from which of the following:
(select all that are correct)
a. 8 mm tape
b. CD-ROM
c. Diskette
d. 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?
_____________________________________________
_____________________________________________
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. AIX 5L can be installed from which of the following:
(select all that are correct)
a. 8 mm tape
b. CD-ROM
c. Diskette
d. 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 user (/usr),
variable (/var), temporary (/tmp), and root (/) file systems. Other
product (application) files and configuration data are destroyed.
Additional Information
Transition Statement Now, lets do an exercise with the Configuration Assistant.
2-43
Instructor Guide
Configuration
Assistant
AU1411.0
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review the exercise.
Details
Additional Information
Transition Statement Summarize the unit.
2-45
Instructor Guide
Unit Summary
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
2-47
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4908
3-1
Instructor Guide
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
AU1411.0
Notes:
3-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the objectives for this unit.
Details
Additional Information
Transition Statement What was system administration like before the development of
tools like SMIT?
3-3
Instructor Guide
Flat files
/etc/profile
/etc/qconfig
/etc/filesystems
/etc/rc
/etc/passwd
System
Management
adduser
minidisks
AU1411.0
Notes:
Problems with early system administration
The key problems with system administration on UNIX and AIX systems before AIX V3
were the following:
- There was not a consistent common interface for performing system administration
tasks
- Use of the available methods required the administrator to be very knowledgeable
about how the system worked and about the format of various configuration files
3-4
V3.1.0.1
Instructor Guide
Uempty
3-5
Instructor Guide
Instructor Notes:
Purpose Describe how system management tasks were carried out before
management tools were available.
Details This visual should be used to illustrate the difficulties that would exist if tools
were not available to aid system administrators.
The goal in AIX V4 and AIX 5L has been to overcome many of the problems with the
traditional approach to system administration by providing a single consistent easy-to-use
interface for system management, while still providing administrators who are familiar with
and feel comfortable with the traditional methods the flexibility to continue using these
traditional methods, at least for most tasks.
Additional Information
Transition Statement What are the goals of todays system management tools?
3-6
V3.1.0.1
Instructor Guide
Uempty
AIX
AU1411.0
Notes:
Minimize time and resources spent managing systems
Organizations seek to minimize the time and resources spent managing systems, that
is, to manage computer systems efficiently. AIX helps with tools such as SMIT and the
Web-based System Manager.
3-7
Instructor Guide
3-8
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss what we are trying to achieve when we manage a system.
Details
Additional Information
Transition Statement SMIT and the Web-based System Manager are two tools that
can help in management of AIX 5L systems.
3-9
Instructor Guide
AIX Administration
SMIT
Web-based
System
Manager
High-level commands
Low-level
commands
System Kernel
calls
services
Intermediate-level
commands
System
Object Data
Resource
Manager
Controller
ASCII
files
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.)
3-11
Instructor Guide
Instructor Notes:
Purpose Introduce the tools available for system management.
Details Were introducing two tools now, but only one of them (SMIT) will be covered in
detail in this unit. The Web-based System Manager will be discussed in more detail later in
the course.
The basic idea behind both tools is that they present the system administrator with a
menu-driven front end, with built-in help information and lists. These can be used to carry
out most system administrative tasks.
Depending on the menus selected and the options entered, the tools will build the
high-level command with all the correct options and will then execute the command when
the user specifies this action.
High-level commands in turn call on lower-level commands which interact directly with the
system, that is, the ODM, kernel, and so forth.
While SMIT has been around for a while, the Web-based System Manager was new with
AIX V4.3 and has been enhanced in AIX 5L. Traditionally, SMIT is used to administer the
system it is running on. The advantage of Web-based System Manager is that you can sit
at a PC or remote AIX system and perform system administration tasks on another AIX
system. While SMIT can be run in graphics or ASCII mode, the Web-based System
Manager can only be run in graphics mode. The Web-based System Manager will be
covered in more detail later in the course.
Additional Information
Transition Statement Well discuss the Web-based System Manager in more detail
later in the course. In this unit, however, well focus on SMIT. Let's start by looking at the
components that make up the SMIT user interface.
V3.1.0.1
Instructor Guide
Uempty
help
submenu
help
submenu
help
name selector
list
help
dialog panel
pop-ups
list
output panel
Copyright IBM Corporation 2005
AU1411.0
Notes:
Available interfaces
SMIT provides a flexible user environment. The user can use an ASCII or an
AIXWindows-based interface. These interfaces provide the same facilities, but the
interaction is slightly different.
3-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the different types of SMIT screens.
Details Make sure the students are familiar with the different types of screens.
Menus - A screen with a predefined list of items which can be selected by the user by
moving the cursor keys up or down, and by pressing the Enter key. The user cannot enter
any text on this screen.
Selector - This is a screen which presents the user with one option which the user has to
enter a value for, either by typing in a value or by selecting a value from a predefined list.
Dialog - This is like a selector screen but has many options, not just one. This is the final
screen that a user gets placed in before the command is executed. It is this screen that
holds the command that is executed.
Lists - There are two types of lists:
Rings, which are a fixed set of predefined values (for example, months of the year).
Lists, which are a set of predefined values which can be extended (that is, more items such as user names - can be added to the list).
Output - While the command is running, a screen will be displayed which will give the
status of the command (whether it is running or has completed, and whether it ran
successfully), and also any output/error messages that are produced as a result of the
command.
Additional Information
Transition Statement Let's now consider each of these types of screens in turn.
3-15
Instructor Guide
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
3-17
Instructor Guide
Instructor Notes:
Purpose Illustrate the SMIT ASCII version of a menu screen.
Details The visual shows the very first menu which will be seen if the command smit is
entered with no options.
Point out that there are function keys with each type of screen. However, we are not
showing the complete set here. You could consider the ones listed on this visual now, or
leave them to be considered until later when a complete list is provided in the student
notes.
Additional Information Many times, when using SMIT in the ASCII mode, the menus
and dialog panels 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 export TERM=vt320 might solve the problem. See documentation for the tic
command (in the AIX 5L Version 5.3 Commands Reference) and the terminfo directory (in
the AIX 5L Version 5.3 Files Reference) for details on terminal types and the terminfo
database which is used by curses-based user interfaces.
Transition Statement Let's look at the AIXWindows version of the same menu.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
3-19
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Illustrate the Motif version of a SMIT menu.
Details This screen is identical to the previous one as far as functionality goes. All the
tasks that are supported in the ASCII version are also supported here.
Notice that the function keys have been removed and these have been replaced with
function icons. 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).
Also, point out that, as you navigate from the top level menu down to lower level menus,
the Return To: field will build a stack of icons, one for each parent menu. You can return to
any previous menu in your navigation path by clicking on the matching icon in this field.
Additional Information
Transition Statement Let's now look at a dialog screen.
3-21
Instructor Guide
Dialog Screen
Schedule a Job
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
YEAR
MONTH
DAY (1-31)
* HOUR (0-23)
* MINUTES (0-59)
SHELL to use for job execution
* COMMAND or SHELL SCRIPT (full pathname)
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
[Entry Fields]
[05]
[Jun]
[22]
[]
[]
Korn (ksh)
[]
F3=Cancel
F7=Edit
Enter=Do
#
+
#
#
#
+
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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:
*
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.
F2 (or ESC-2)
F3 (or ESC-3)
F4 (or ESC-4)
F5 (or ESC-5)
F6 (or ESC-6)
F7 (or ESC-7)
3-23
Instructor Guide
F8 (or ESC-8)
Image - save the current screen to a file (A) and show the
current fastpath
F9 (or ESC-9)
F9
F10
F12
Ctrl-l
Enter
/text
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define all the features of a dialog screen.
Details This is a dialog screen and not a selector screen, as there is more than one
option listed on the screen.
Go through each symbol, as documented in the student notes, and ensure that all students
are clear about the symbols such as *, #, and so forth.
Also go through all the function keys one at a time, explaining the uses of each.
Other helpful hints that should be mentioned are that items of a list can sometimes be
obtained with the Tab key. Also, in a screen which holds more than one page of
information, the <Ctrl-v> and <Esc-v> key sequences can be used to move up and down
a page.
Make sure that all the key points in the student notes are covered.
Note that the year entered on the dialog screen is 05, meaning the year 2005.
Additional Information
Transition Statement Now, let's look at an output screen.
3-25
Instructor Guide
Output Screen
Command: OK
stdout: yes
stderr: no
[TOP]
UID
root
root
root
root
ray
root
ray
root
root
ray
PID
1
1719
2003
2233
3525
3806
4162
5355
6649
7303
PPID
0
1
1
1
1
2003
3525
1
2003
4162
C
4
0
0
0
0
0
6
0
0
8
STIME
20:15:04
20:16:14
20:16:19
17:16:14
20:01:28
19:16:23
20:53:22
20:16:27
20:16:32
20:09:45
TTY
0
0
0
TIME
1:49
0:10
0:00
0:00
0:00
0:00
0:04
0:12
0:00
0:00
CMD
/etc/init
/etc/syncd 60
/etc/srcmstr
/usr/lib/errdemon
-ksh
/etc/syslogd
smit
/etc/cron
qdaemon
ps -ef
[MORE...6]
F1=Help
F8=Image
n=Find Next
F2=Refresh
F9=Shell
F3=Cancel
F10=Exit
F6=Command
/=Find
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Illustrate an output screen.
Details Be sure to cover the following items:
Note that this output screen example has nothing to do with the previous dialog screen
example.
The fastpath for this output would be smit process or smit ps. (Remember to focus on
the smit mechanisms and not on the topic of process monitoring.)
Cover the information given in the student notes regarding the three fields on the first
line shown on the visual.
Mention that the body of the screen holds the output/error messages of the command.
(In this example, there is only output.)
Explain the [TOP] and [MORE...6] notation shown on the visual.
Additional Information You could ask the question: If we were to press the F6 key,
what command would be listed?
Answer: ps -ef
Transition Statement Any operation that is carried out through SMIT will be logged in
two separate files. These can be very useful when trying to track down the activities on a
system. Let's identify these files.
3-27
Instructor Guide
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
AU1411.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 installations, so the user must maintain them and truncate them
when appropriate.
V3.1.0.1
Instructor Guide
Uempty
3-29
Instructor Guide
Instructor Notes:
Purpose Describe the log files associated with SMIT.
Details Since SMIT is a tool that can be executed by all users, all users that execute the
smit command will have these files created in their $HOME directory. Users must regularly
monitor and truncate these files so that disk space is not wasted.
The consideration mentioned above applies even more so for the system administrator
user accounts and for the root user, as these users will be frequently carrying out
operations through the tool.
The files can be used in a number of situations:
Since all entries in the files are time stamped, these files are helpful in determining
when certain activities occurred on the system.
The smit.script file contains the commands that have been executed, so these can be
used as the basis of creating shell scripts
We will see in the next visual how you can specify different files to be used for logging.
Additional Information All users can use SMIT. However, since SMIT just builds
commands, whether someone can successful run something through SMIT depends on
whether they could run the same task from the command line. For example, any user can
display all of the processes running on the system because they can run the ps command
from the command line. But, a regular user cannot add a user account through SMIT, just
as they cannot successfully run the mkuser command from the command line.
In AIX 5L V5.3, smit now creates an additional output file: $HOME/smit.transaction. This
new file is always created in the home directory. It is created to provide some consistency
with the Web-based System Manager which creates a $HOME/websm.transaction file.
While basically the same in format and usage as the smit.script file, smit.transaction is
supposed to only include the final cmd_to_exec and none of the cmd_to_discover,
cmd_to_list, and so forth, output which might be included in smit.script. As of this writing,
the smit.transaction file is an undocumented feature of the smit command, though a
discussion of it can be found under APAR IY40249. This feature is included in
AIX 5L V5.2.0.0 ML02 and later.
Transition Statement Let's consider some different options that can be used when
running SMIT.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
3-31
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the most commonly used options available with the smit command.
Details Make sure you go through each option explained in the student notes. Be sure
to show the benefit of each.
Don't forget to mention fastpaths as well.
Additional Information
Transition Statement Its time for a checkpoint.
3-33
Instructor Guide
Checkpoint
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:
________________
________________
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the checkpoint for this unit.
Details A checkpoint solution is given below:
Checkpoint 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
Additional Information
Transition Statement Now, its time for an exercise.
3-35
Instructor Guide
AU1411.0
Notes:
Introduction
This exercise allows you to get familiar with SMIT.
The exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise for this unit.
Details Typically, the exercises are found in a separate document.
Additional Information
Transition Statement Lets recall some of the key points from this unit.
3-37
Instructor Guide
Unit Summary
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review some of the key points from the unit.
Details
Additional Information
Transition Statement Weve reached the end of this unit.
3-39
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4374
SC23-4389
SC23-4887
GI10-0729
GI10-0739
GI10-0756
4-1
Instructor Guide
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
AU1411.0
Notes:
4-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by looking at the AIX product offerings.
4-3
Instructor Guide
AU1411.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
4-4
V3.1.0.1
Instructor Guide
Uempty
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.
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-5
Instructor Guide
Instructor Notes:
Purpose Introduce the AIX product offerings.
Details AIX is delivered on multiple CDs. For example, AIX 5L V5.3 is delivered on 8
CDs. The Expansion Pack is delivered at no charge and includes products that may be
valuable in the customer's business environment.
Licensed Program Products (LPPs) are separately orderable products that the customer
may need such as DB2/6000, CICS/6000 and ADSM.
Additional Information
Transition Statement Let's take a look at the terminology that goes with the packaging.
4-6
V3.1.0.1
Instructor Guide
Uempty
Packaging Definitions
LPP:
bos
package:
bos.INed
fileset:
bos.INed
Collection of packages
Complete product
package:
bos.adt
fileset:
bos.adt.lib
Collection of filesets
fileset:
bos.adt.prof
Smallest unit
Specific function
AU1411.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.
4-7
Instructor Guide
Instructor Notes:
Purpose Explain the packaging terminology that the students may encounter.
Details Make sure everyone understands the association of each of the definitions.
Fileset - Smallest individual installable unit
Package - Collection of filesets built to form one installable image; for example, bos.net
LPP - One or more packages bundled together; for example, bos, SNA
Additional Information
Transition Statement One other item is used when discussing software, the term
bundle.
4-8
V3.1.0.1
Instructor Guide
Uempty
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
AU1411.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-9
Instructor Guide
Instructor Notes:
Purpose Define the default system bundles.
Details The standard bundle definitions that control what selections appear in SMIT or
the Web-based System Manager are stored in /usr/sys/inst.data/sys_bundles.
The following are examples of predefined bundles in AIX 5L V5.3:
Application Development Bundle (App-Dev)
A collection of software packages used for developing application programs.
Media-Defined Bundle (Media-Defined)
Filesets from the installation media.
Other predefined system bundles are:
- CDE
- GNOME
- KDE
- devices
- wsm_remote
Additional Information It is important to note that bundles do not themselves contain
any software packages or filesets, but are only a list of fileset names with references to the
appropriate media that will contain the software. When using a bundle definition to drive the
software installation process, you will be prompted to mount the correct installation media if
it is not already found in the drive.
Transition Statement Let's see how filesets are named.
V3.1.0.1
Instructor Guide
Uempty
Fileset Naming
LPP
Package
Fileset
Suffix
bos.terminfo.print.data
Message convention:
LPP.msg[.lang].package.fileset
Copyright IBM Corporation 2005
AU1411.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
.com
.compat
.data
.dev
.diag
4-11
Instructor Guide
.fnt
.help[lang]
.loc
.mp
.msg[lang]
Translated messages
.rte
.smit
.ucode
.up
With message libraries associated with LPPs, the language is also part of the naming
convention.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the naming conventions for LPP files.
Details Filesets have been designed to be more meaningful and should help describe
the contents of the fileset. The LPP will be the first part of every fileset name. For example,
all filesets within the BOS program product will have bos at the beginning of their name.
If a package has only one installable fileset, then the fileset name may be the same as the
package name. For example, bos.INed.
Every fileset name must be unique.
With message libraries associated with LPPs, the language is also part of the naming
convention.
Additional Information Another variation on the fileset naming standard, are the
names for device filesets. For devices, the format is:
devices.<bustypeid>.<cardid>.extension (where extension might be rte or diag).
Note that while these filesets are an important part of the Base Operating System, they do
not start with the "bos" LPP name.
Transition Statement Each software component can have up to four separate parts.
Let's identify them.
4-13
Instructor Guide
Software Updates
# oslevel
5 . 3 .
0 .
Release
Version
MIGRATION
Modification
Fix
smit update_all
Copyright IBM Corporation 2005
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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
-r
-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-15
Instructor Guide
Instructor Notes:
Purpose Define the four parts of software components and use that information to
determine what type of software upgrade is needed.
Details Explain that the oslevel command shows the current operating system level.
Explain the four parts of the numbering system:
Version
Release
Modification
Fix
Upgrades made to the version or release level come on bootable media and must be
purchased and installed using migration. You may want to take a minute to review the
procedures for performing a migration (This would be good place to generate interaction by
asking the student how to do this.)
Upgrades to the modification or fix levels are done using smit update_all.
The AIX documentation uses several terms referring to the same software upgrades.
Maintenance level, service update and software update all refer to the same thing. These
can be obtained via the Web.
Changes to the modification or fix levels are referred to as maintenance level updates or
service updates. They provide fixes to defects or additional functions to the BOS or optional
software products. Optional software products are any software product that do not install
with the BOS. Optional software products might be included with AIX or they might be
purchased separately.
Additional Information This should provide some clarification for you. It doesn't need
to be discussed unless someone asks a question about this:
Following is an example of a fileset and a fileset update:
bos.net.tcp.client 4.1.0.0 is a fileset. bos.net.tcp.client 4.1.0.1 is an update to that
fileset. If another fileset update, bos.net.tcp.client 4.1.0.2, is generated, this update
will contain all the fixes that were in the bos.net.tcp.client 4.1.0.1.
If a cumulative AIX update is generated, the modification level of the fileset will
increment, resulting in bos.net.tcp.client 4.1.1.0, which would contain all previous
fixes.
The old FixDist known from AIX V4.3 has been replaced by a Web interface.
Transition Statement Once you are ready to begin your update or installation, there are
different software states that are used. Let's look at those.
V3.1.0.1
Instructor Guide
Uempty
Software States
Applied:
5.3.0.3
FILESET 5.3.0.1
(Old Version)
Install
Applied
FILESET 5.3.0.3
Commit
or
Reject
FILESET 5.3.0.3
(New Version)
FILESET 5.3.0.1
(Old Version)
Committed:
5.3.0.3
Committed
FILESET 5.3.0.3
Install
AU1411.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.
4-17
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the applied and committed states.
Details Mention that it is possible to use SMIT to remove a committed package, but
there may be some additional editing required to set the system back to its original state.
Those changes would depend upon which package was committed.
Also, discuss the difference between rejecting a software product which can only be done
on software that is in the applied state, and removing a product which can be done on
software either in the commit or applied state. If a product is removed, then it cannot be
retrieved.
Discussion Items:
- Question: When do you think it would be useful to install an update in the applied
state?
Answer: In a testing environment (possibly before the product is committed) or
when disk space is not a constraint.
- Question: When can you not install using applied?
Answer: When you don't have enough disk space to hold both versions or when the
current version is in an applied state.
Additional Information
Transition Statement Let's turn our attention to SMIT screens and look at the Software
and Maintenance menus.
4-19
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show students the SMIT screen that supports software and maintenance
installation.
Details The SMIT screen shown is from AIX 5L V5.3.
We will look at the first four options on the screen. Network Installation Management is
discussed in other courses. System Backup Manager will be discussed later in this
course. This option can also be accessed via the SMIT System Storage Management
menus.
Additional Information
Transition Statement Let's first choose the option Install and Update Software.
4-21
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
4-23
Instructor Guide
Instructor Notes:
Purpose Introduce the Install and Update Software SMIT menu.
Details Briefly mention each of the options. This menu is the starting point when
installing software or applying maintenance to the system.
We will not go into detail on each option. Mention the option Update Software by Fix
(APAR). This is one method of applying an APAR fix. Later in the unit, we will discuss the
instfix command which is another method of applying an APAR fix.
The option Install Software is often the only option that will work if installing specific
language and message sets.
Additional Information
Transition Statement From this SMIT menu, let's choose the first option, Install
Software. Before seeing the next screen, SMIT will ask that you to choose an input device,
such as the CD-ROM or tape. (The resulting menu is the same as would be shown if the
second option was chosen, Update Installed Software to Latest Level except the
software to install line will show with [update_all] instead of [_all_latest].
V3.1.0.1
Instructor Guide
Uempty
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
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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-25
Instructor Guide
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.
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the SMIT screen used to install and update software.
Details Discuss the items listed on this SMIT screen. The SOFTWARE to install option
defaults to all_latest, which installs all software on the media except for devices and
printers. For a selective install, press F4 and then choose which products should be
installed.
When selecting the items to install, the list is presented in a hierarchical map. The LPP is
listed followed by its packages, followed by the package's filesets. Select the specific item
you want. If you select an LPP, all of the packages and filesets associated with the LPP will
be installed. If you select only a fileset, only the fileset will be installed. If you select the LPP
and one of its filesets, the entire LPP will install. Be careful!
Each CD contains the table of contents listing all the products on the installation CDs. If the
TOC is read and the product is located on another CD, the system will prompt you to load
that CD during the installation process.
If you are installing a maintenance level, choose yes for COMMIT software updates?.
If disk space is limited, choose no for SAVE replaced files?.
Since we don't show the smit update_all screen, be sure to point out that this screen is
identical to the smit update_all screen except that update_all will appear on the
SOFTWARE to install line.
Additional Information
Transition Statement Returning to the SMIT Software Installation and Maintenance
menu, let's choose the second option, List Software and Related Information. This takes
us to a second menu where we will choose List installed Software and Related
Information. The resulting menu is what we will discuss next.
4-27
Instructor Guide
Software Inventory
# smit list_installed
List Installed Software and Related Information
Move cursor to desired item and press Enter.
List
List
List
Show
Show
List
List
List
List
Show
Installed Software
Installed Software by Bundle
Applied but Not Committed Software Updates
Software Installation History
Fix (APAR) Installation Status
Fileset Requisites
Fileset Dependents
Files Included in a Fileset
Fileset Containing File
Installed License Agreements
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
lslpp command:
-L Lists the installed software
-h Shows the history of a software product
Copyright IBM Corporation 2005
AU1411.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:
Displays the name, level, state and description of the fileset
Displays the installation and update history for the fileset
Displays requisite information for the fileset
Displays dependent information for the fileset
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
-l
-h
-p
-d
-f
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the students how to list information about the software and fixes on their
system.
Details Mention that most items on this menu execute the lslpp command. The
associated flags for this command are detailed in the student notes. Show Fix (APAR)
Installation Status executes the instfix command, which will be discussed later in this
unit
Additional Information There is a command called which_fileset. This tool is useful
when trying to locate which command is contained in which fileset. For example, you might
want to install support for the performance tool filemon but you don't know which fileset to
install. You can type:
# which_fileset filemon
The result will be:
/usr/bin/filemon
bos.perf.tools 5.3.0.0
4-29
Instructor Guide
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose View the output of the lslpp -l command.
Details Encourage the students to have a hard copy of the output from the above
command for all the software products that they have installed. This documentation could
be vital if problems are encountered.
Additional Information
Transition Statement Our next topic is the Fix Repository and the methods for
obtaining and applying fixes. Lets start with an overview.
4-31
Instructor Guide
Fix Repository
Available updates
(from IBM Web site)
Fix repository
(locally stored
filesets)
Installed fixes
AU1411.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 Web site available software. Any two of these can be compared to obtain a
report.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Provide a big picture for applying software modifications to the system.
Details When accessing a repository in a SMIT dialogue panel, the administrator will
need to type in the full path of the directory into the Input Device/Directory field, if using a
directory other than /usr/sys/inst/images.
Additional Information The common location for filesets stored on the hard drive is
/usr/sys/inst/images. Beginning with AIX 5L, this location can hold various software
formats:
installp compatible formats are stored under the subdirectory installp/ppc
RPM compatible formats are stored under the subdirectory RPMS/ppc
ISMP compatible formats are stored under the subdirectory ismp/ppc
RPM stands for Red-Hat Package Manager. ISMP stands for Install Shield Multi-Platform.
The geninstall generic installer, which is used by smit install, understands these
different paths when installing from the repository and uses the appropriate utility that
matches the format to do the installation.
The gencopy utility used to copy software from media to the hard drive for later installation,
also understands these paths and automatically copies the software images to the correct
subdirectory.
Our focus here is on the installp format software images.
Transition Statement Let's look at how we can access information about the software
updates available from the IBM Web site.
4-33
Instructor Guide
AU1411.0
Notes:
Introduction
IBM Eserver support provides a Web site 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 Web site:
www.ibm.com/servers/eserver/support/pseries/aixfixes.html.
V3.1.0.1
Instructor Guide
Uempty
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-35
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the Fix Central Web site and the types of fixes that are available.
Details
Additional Information HIPER/PE fixes are HIgh Impact PERvasive APARs.
Transition Statement Lets look at the details of the More fix services option.
4-37
Instructor Guide
AU1411.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-38 AIX System Administration I
V3.1.0.1
Instructor Guide
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.
4-39
Instructor Guide
Instructor Notes:
Purpose Introduce the two options available on the More fix services screen.
Details Automated downloads (using SUMA) will be discussed later in this unit, just
introduce it here.
Additional Information
Transition Statement When you select the AIX version youre interested in under
Compare report, you will see the screen shown on the next visual.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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 Web site
2. Run the compare_report command or smit compare_report on your AIX
system
3. Upload the file created by compare_report
4-41
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
4-43
Instructor Guide
Instructor Notes:
Purpose Discuss the Compare report screen.
Details Identify the steps to compare software versions. This Compare report screen
will do the first and last steps. The next few visuals discuss the comparison reports.
Additional Information
Transition Statement Lets look at how we can create reports for comparison of
software versions.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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 Web site. It also provides a way to clean up
and rename software images in a repository.
4-45
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the actions available on the SMIT Software Service Management
menu.
Details Go over the menu options:
Service Update Management Assistant (SUMA)
Rename Software Images in Repository
Clean Up Software Images in Repository
The Comparison Reports menu option will be discussed next.
Additional Information The bffcreate and gencopy utilities understand that there
need to be an up-to-date table of contents (.toc) file in the installp/ppc software repository
directory. If you copy filesets into the software repository using some other means (ex. ftp)
and do not update the .toc file, then the installation utility will not know that they are there.
To fix this situation always run the inutoc command against the updated directory before
trying to install from there. Many of the software listing and installation utilities have been
updated to automatically update the .toc at the start of their tasks.
Transition Statement Let's look at the SMIT screen and compare_report command for
running the comparison reports we have been discussing.
4-47
Instructor Guide
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
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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 Web site.
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.
V3.1.0.1
Instructor Guide
Uempty
4-49
Instructor Guide
The report that is generated contains information on filesets in the fix directory that are
back-level from latest (lowerthanlatest2.rpt).
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the different comparison reports that are available and how to
generate them.
Details The compare report facility we cover here is actually described as being a first
step in IBMs Autonomic Computing Strategy.
Additional Information The flags for the compare_report command are:
Flag
-s
-i FixDir
-l
-h
-m
-n
-t ReportDir
-Z
Description
Specifies that the comparison should involve a list of the fileset
levels that are installed on this system.
Specifies the name of the fix repository directory. The fileset levels
of the images contained in this directory will be used in the
comparison.
Specifies that the comparison should involve a list of the fileset
levels that are installed on this system.
Indicates that the higher level fileset reports should be generated.
This will generate one or all of the reports higherlevel.rpt,
higherthanmaint.rpt, or basehigher.rpt, depending on which
comparisons are performed. This flag is only valid when used
either with the -s or with both the -b and the -o flags.
Indicates that a fileset report should be generated that lists either
the filesets installed on the system that are not in the image
repository, or the filesets installed on the base system that are not
installed on the other system. This will generate either the
no_update_found.rpt or the baseonly.rpt report file. This flag is
only valid when both the -s and -i flags are specified or when
both the -b and -o flags are specified.
Indicates that a fileset report should be generated that lists either
the filesets in the image repository that are not installed on the
system or the filesets installed on the other system that are not
installed on the base system. This will generate either the
notinstalled.rpt or the otheronly.rpt report file. This flag is only
valid when both the -s and -i flags are specified or when both the
-b and -o flags are specified.
Specifies the target directory where the comparison reports will be
stored. If the -t flag is not specified, the reports will be stored in
the /tmp directory. If report files already exist in the specified
directory, they will be removed and recreated. This flag is not valid
with the -v flag.
Suppresses displaying the report output to stdout. This flag is not
valid with the -v flag.
4-51
Instructor Guide
Flag
-v
-b BaseRp
-o OtherRp
-r ServiceRp
Description
Specifies that no report files should be saved to disk. This flag is
not valid with the -t or -Z flags.
The name of the file containing the software installed on the base
system (generated with lslpp -Lc).
The name of the file containing the software installed on another
system that will be compared to a base system (generated with the
command lslpp -Lc).
Specifies a file that contains the list of available updates. This file
can be obtained from the Fix Central Web site.
Transition Statement Lets look at the Software Maintenance and Utilities SMIT
menu.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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-53
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the Software Maintenance and Utilities menu.
Details Most of the items on this menu are self-explanatory.
Committing software frees up disk space that was used to store the older versions of that
software. It also eliminates the possibility of being able to reject the updated and go back to
the previous version.
When an update is rejected, that update is deleted from the system and the version of the
software product immediately previous to the update being rejected becomes the currently
active version of the product.
When you remove a product, the product and all of its updates (whether applied or
committed) are deleted from the system.
It is also possible to copy software to disk for future installation. The default directory for
doing this is /usr/sys/inst.images. Mention that students will install software from a
directory during the machine exercises.
The option to verify software installation and requisites is most important in the diskless
environment when the usr, root and share portions of the software may be located on
different systems.
If you use SMIT to perform your installation, the system automatically performs cleanup
when an installation cannot be completed because of failure or interruption. Normally, the
only condition under which you may have to perform a manual cleanup is if the system
shuts down or loses power during an installation.
Additional Information
Transition Statement Let's now look at the command instfix.
4-55
Instructor Guide
instfix Command
Installs a fix:
# instfix -k
IY58143 -d /dev/cd0
AU1411.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.
-s
Search for and display table of contents entries containing the string.
-k
V3.1.0.1
Instructor Guide
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
-a
Use only with -i to optionally display the symptom text associated with a fix.
-d
-c
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 :-:
4-57
Instructor Guide
Instructor Notes:
Purpose Discuss the instfix command.
Details This is a very useful command which can be used to extract update specific
information as well as installing fixes.
Additional Information Fix information is organized in a Table of Contents on the fix
installation media. After a fix is installed the fix information is kept on the system in a fix
database.
The explanation of the last example is not obvious. The instfix report output in this case
is colon delimited, as requested by the -c flag. The fifth field of the output contains a single
code to indicate the status of the maintenance level. The character interpretations are as
follows:
!
Not installed
Superseded
Downlevel
Correct
Thus, by greping for the :-: value, we are looking for filesets which are downlevel on our
system.
Transition Statement Time for a checkpoint.
V3.1.0.1
Instructor Guide
Uempty
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
AU1411.0
Notes:
4-59
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1.
2.
3.
4.
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
What command is used to list all installed software on your system?
lslpp -l
Which of the following can you install as an entity?
(select all
that apply)
a. Fileset
b. LPP
c. Package
d. Bundle
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
Additional Information
Transition Statement Now, lets do an exercise to install filesets.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
4-61
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Now, lets summarize this unit.
V3.1.0.1
Instructor Guide
Uempty
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
AU1411.0
Notes:
4-63
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4887
5-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Use the Information Center to browse and search AIX
documentation
Install the Information Center
Install documentation
AU1411.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 unit covers the installation and configuration of the information center.
5-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by looking at the big picture of how AIX 5L V5.3
documentation works.
5-3
Instructor Guide
Documentation Client
Web browser software
Documentation Client
Web browser software
AU1411.0
Notes:
Overview
In addition to providing SMIT to make system administration tasks easy, beginning with
AIX V4.3, 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.
5-4
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To provide the big picture of how AIX 5L V5.3 documentation works.
Details Be sure to point out that AIX 5L V5.2 documentation services have different
components and are setup differently. The information on AIX 5L V5.2 has been retained
as an appendix in this version of the course.
When AIX 5L V5.3 is installed, the system administrator will most likely set up AIX 5L V5.3
softcopy documentation.
The system administrator will first set up the documentation server. It has the following
installed:
The AIX 5L V5.3 documentation, which consists of most of the manuals that are found
in the traditional InfoExplorer product.
Web server software: The AIX 5L V5.3 Information Center run time environment
includes an internal eclipse-based Web services component. To ensure that
documentation service requests are handled by this eclipse server rather than some
other Web server (such as HTTPServer) which may be installed on the platform, the
Information Center eclipse server listens on port 64111, rather than the standard http
port of 8080.
Web browser software: This is necessary if users on the server wish to access
documents. The Mozilla Web browser is included with AIX 5L V5.3 on a separate
installation CD. Actually, any browser can be used, assuming it is HTML 3.2-enabled
and supports frames.
In AIX 5L V5.3, the Information Center can be installed as an option during the post
installation configuration assistant execution, or installed later using SMIT, the
Web-based System Manager, or the command line.
The client system will include a Web browser (such as the Netscape Navigator).
Users at the client system will issue requests to view AIX documentation. These requests
will be sent to the documentation server and the results will then be sent back to the user at
the client.
If you have a standalone computer, both the server and client software are installed on the
same standalone computer. Instead of going to a remote computer, requests from users on
the standalone computer go to the Web server software on their own computer.
Be sure not to go into too much detail on the software that needs to be installed. In this
class, the purpose here is for students to understand the big picture.
Additional Information This unit walks through the steps necessary to configure the
documentation Web server. If students have the computer in front of them, you may want to
have them perform the step as you talk about them.
Transition Statement Next, we will take look at how to install the AIX 5L V5.3
documentation support.
5-5
Instructor Guide
AU1411.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.
5-6
V3.1.0.1
Instructor Guide
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.
5-7
Instructor Guide
Instructor Notes:
Purpose Discuss the steps necessary to install the AIX 5L V5.3 online documentation.
Details Remind the students that TCP/IP configuration will be covered in a later unit.
Additional Information
Transition Statement Let's assume that all the steps have been completed except for
the configuration of the Documentation Services. We will use SMIT to complete this step
next.
5-8
V3.1.0.1
Instructor Guide
Uempty
DEFAULT_BROWSER
IC_DOCUMENT_SERVER_MACHINE_NAME
IC_DOCUMENT_SERVER_PORT
IC_DOCUMENT_SERVER_TYPE
IC_DOCUMENT_DIRECTORY
F1=Help
Esc+5=Reset
Esc+9=Shell
F2=Refresh
Esc+6=Command
Esc+0=Exit
[Entry Fields]
[mozilla]
[sys103]
[64111]
DOCSERVER
/opt
=
=
=
=
=
F3=Cancel
Esc+7=Edit
Enter=Do
#
+
F4=List
Esc+8=Image
AU1411.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.
5-9
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the SMIT screen necessary to configure a documentation server.
Details What this screen does, under the covers, is update /etc/environment with the
values for the environment variables of the same name as these fields. Obviously, these do
not become effective in the environment until the next login. If the administrator runs the
SMIT screen and then immediately tries to test by running the infocenter command, it will
not work correctly. The administrator, in that case, just needs to log off and log back in
again to pick up the environment variables.
Running this screen will also place a line in /etc/inittab that executes:
/opt/ibm-help/IC_start.sh. This will start the facility at the next reboot. If you configure
it and want to start it immediately, you can signal the init process with the telinit q
command.
Additional Information The SMIT menu item Web-based System Manager will be
used to configure Web-based SMIT for remote administration. This will be covered in
another unit.
Transition Statement Lets see what the user interface for Information Center looks
like.
5-11
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
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).
5-13
Instructor Guide
Instructor Notes:
Purpose Familiarize the students with how to invoke and use the Information Center.
Details
Additional Information
Transition Statement Let us look at how to access the documents installed on the
Information Center server.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
5-15
Instructor Guide
Instructor Notes:
Purpose Explain how to access the documentation.
Details
Additional Information
Transition Statement Next, we will take a look at the search facility in the Information
Center.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
5-17
Instructor Guide
Instructor Notes:
Purpose Explain how to search the documentation.
Details The Advanced search button identifies how to form a complex search string
and also allows you to restrict what categories of documents you wish to search.
The complex search string is a Boolean combination of strings including wild cards.
The categories of documents are:
- Information center home
- Information center Assistance
- Hardware documentation
- AIX information
- AIX Message Center
- AIX compiler information
- Cluster information
Additional Information To speed searches, the search facility uses an index based on
the contents of the documents. The first time someone uses the search facility, it builds the
index. This can take a long time.
Transition Statement Let's review with some checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
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.
AU1411.0
Notes:
5-19
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. 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 Eclipsebased Web server function.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Now, lets do an exercise with the AIX Information Center
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
5-21
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Now, lets summarize the unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
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
AU1411.0
Notes:
5-23
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4920
6-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Use the Web-based System Manager to manage AIX
Install and configure the Web-based System Manager
AU1411.0
Notes:
6-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start with an overview of the Web-based System Manager.
6-3
Instructor Guide
PC or Linux
Remote Client
Client-Server
# wsm -host <managed-host>
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
AIX V4.3 introduced the Web-based System Manager, which is the next step in the
evolution of AIX system administration tools. There have been many enhancements to
the Web-based System Manager since AIX 5L V5.1. It is considered the default system
administration tool for AIX 5L.
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.
6-4
V3.1.0.1
Instructor Guide
Uempty
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
6-5
Instructor Guide
Instructor Notes:
Purpose Introduce the AIX 5L V5.3 Web-based System Manager.
Details The visual shows three of the environments in which the Web-based System
Manager can be run: standalone, remote client, and client-server.
Use the standalone environment if you wish to administer the AIX system from the system
itself, that is, not across the network. Use the remote-client or client-server environment if
you wish to administer the AIX system from across the network. In this environment, the
AIX system being administered is the server and the system doing the administration work
is the client. The server does not require a graphics terminal. However, the client will need
graphical support.
Because the Web-based System Manager is written in Java, the client can be any machine
with a browser that supports Java V1.4.2 (for AIX 5L V5.3). Thus, the client can be another
AIX system with a graphics terminal or a PC running Windows 2000/2003/XP Professional
or one of the supported distributions of Linux.
Building on the client-server model, it is now possible to manage an AIX system from
anywhere on the Internet or intranet.
The Web-based System Manager code and Java are both installed with the base AIX
operating system. There is no additional charge for either of these software packages. It is
also necessary to configure TCP/IP to run the Web-based System Manager, even when
running in standalone mode. More information on TCP/IP will be covered later in the
course.
Additional Information Web-based System Manager security is an optional feature
that provides for the secure operation of the Web-based System Manager servers and
clients. It is based on public key cryptography, the Secure Socket Layer (SSL), and the
standard AIX login security.
The Web-based System Manager security fileset, sysmgt.websm.security, is available on
the AIX 5L V5.3 Expansion Pack.
The icon for the security application is available in the System container when:
The security software has been installed from the Expansion Pack
You are running Web-based System Manager in local mode
You are logged in as the root user
Please refer to the AIX 5L Version 5.3 System Management Guide for information or
installing and configuring Web-based System Manager security.
Transition Statement Let's take a look at how we access the Web-based System
Manager.
6-6
V3.1.0.1
Instructor Guide
Uempty
AU1411.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. 1997, 2005
6-7
Instructor Guide
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.
6-8
V3.1.0.1
Instructor Guide
Uempty
6-9
Instructor Guide
Instructor Notes:
Purpose Discuss the various methods to invoke the Web-based System Manager.
Details The visual shows how to access the Web-based System Manager from both the
standalone and remote management environments.
Accessing the Web-based System Manager from standalone mode implies that you are
performing the system administration tasks directly on the AIX system. Access the
Web-based System Manager from either the command line or from the CDE Application
Manager.
Accessing the Web-based System Manager from a client system allows for AIX to be
remotely administered through a graphical interface. There are two ways this can be done.
If the client is an AIX system, you can use the command
wsm -host <managed-host>, or you can use your Web browser. If the client machine is a
non-AIX machine, you will need to use a browser. The URL to access the Web-based
System Manager is http://<managed-host>/wsm.htm.
The managed-host used in the URL or the Web-based System Manager application prompt
must be resolvable.
Additional Information Some set up is needed on the server before remote access to
the Web-based System Manager can be made. This is discussed shortly.
In applet mode, you can only manage a set of machines that have the same version of
Web-based System Manager installed. The reason for this is that applets in general are
restricted for security reasons to loading Java classes only from the HTTP server running
the applet. While the Java classes needed to operate the Web-based System Manager
console come from the managed machine, another set of Java classes is used to operate
tasks on the managed machines. These classes must be loaded from the machine being
managed (this is different from the managed machine) in order for these classes to match
the operating system being managed. In applet mode, this situation is not possible.
Transition Statement Let's assume you use one of the listed methods to access the
Web-based System Manager. Let's take a look at what you will see.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
6-11
Instructor Guide
Instructor Notes:
Purpose Introduce the Web-based System Manager console.
Details The visual shows the Web-based System Manager console.
Point out that this application is intuitive, object-oriented and easy-to-use.
Also, point out the different icons (also referred to as plug-ins) displayed on the screen.
These icons provide support for most of the functions that are currently supported by SMIT.
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. Entries in the log include:
-
Short message
Also, note that the Web-based System Manager will create a log in the home directory of
the user with the generated commands (analogous to smit.script):
$HOME/websm#.transaction.
Transition Statement Suppose you want to change the system date and time. In the
Content area, double-click the System Environment icon, then the Settings icon. Or, in
the Navigation area you can expand the System Environment label, then double-click the
Settings label. We will use this as an example of how to use the Web-based System
Manager.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
6-13
Instructor Guide
Instructor Notes:
Purpose In our example, we have chosen System Environment, then Settings. This is
the window that will be displayed.
Details Explain some of the options in the tool bar and in the menu bar as outlined in the
student notes. These options will vary depending on the window being used.
In our example, double-click Date/Time.
Transition Statement The next page shows what you will see if you double-click the
Date/ Time icon.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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/ .
6-15
Instructor Guide
Instructor Notes:
Purpose Show the window used to change the system date and time.
Details Be sure to point out that most of the Web-based System Manager applications
are similar to this, providing point-and-click support to perform various system
management functions.
Note that in this application there is a second option, Time Zone. Click this option to
change the system's time zone.
Daylight Savings Time Dates can vary from country to country. Click this button to
change the dates from the U.S. defaults of the first Sunday in April and the last Sunday in
October.
Transition Statement Now, we will look at how to configure the Web-based System
Manager.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
6-17
Instructor Guide
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
V3.1.0.1
Instructor Guide
Uempty
6-19
Instructor Guide
Instructor Notes:
Purpose To show the complete steps to configure the Web-based System Manager for
client machine access.
Details Walk through the steps using the student notes as a guide. They are very
detailed.
The Web-based System Manager will install as part of the BOS if there is a graphics
adapter in the machine at the time of installation. No additional configuration is needed
after the installation to allow it to work locally.
The installation and configuration of the HTTP Server is only needed to support the
download and configuration of the remote client application. Once this application is
installed on the PC client, the actual Web-based System Manager connection does not
depend on the managed machine having the HTTP Server installed. After using the IBM
HTTP Server to download the remote client software for your PC or Linux platforms, you
may wish to disable the HTTP Server by executing:
# /usr/HTTPServer/bin/apachectl stop.
In client-server mode, the Web-based System Manager client requests server services
from a managed machine through inetd port 9090. To enable a machine to be a
Web-based System Manager server, type the command:
/usr/websm/bin/wsmserver -enable. This will update the TCP/IP services so that inetd
daemon will listen for Web-based System Manager-client requests on port 9090. By
default, Web-based System Manager is configured during installation not to accept client
requests.
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 remove port
9090 from those ports that are responded to by the inetd daemon. This disables the
machine from responding to new Web-based System Manager client requests. It does not
terminate existing Web-based System Manager server processes.
Additional Information The package name for the IBM HTTP Server on the
AIX 5L V5.3 Expansion Pack CD is IHS2.
Transition Statement In the lab, you will have a chance to experiment with the
Web-based System Manager. You will also have the opportunity to set up the Web-based
System Manager server and connect from a client browser. If we are using a PC as the
client we will need to provide that client with additional software.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
Copyright IBM Corp. 1997, 2005
6-21
Instructor Guide
Instructor Notes:
Purpose Explain how to configure the HTTP (Web) server to allow remote clients to
manage this platform using the Web-based System Manager.
Details
Additional Information
Transition Statement Next, we will take look at the Web-based System Manager
Remote Client Installation.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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. 1997, 2005
6-23
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to install the remote client software.
Details You may wish to note that Java Web Start can also be a problem when using a
slow connection such as a dial-up for your remote management sessions. In that case, we
would suggest using the InstallShield method.
Additional Information When using the Mozilla browser on Linux to download the
remote client files, make sure you are using Mozilla V1.6 or later.
Transition Statement Next, we will take look at how the Web-based System Manager
relates to managing an LPAR capable pSeries via the management console.
6-25
Instructor Guide
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
IBM
AU1411.0
Notes:
Partition configuration and control
The HMC provides the external platform to configure partitions, in an LPAR
environment.
V3.1.0.1
Instructor Guide
Uempty
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.
6-27
Instructor Guide
Instructor Notes:
Purpose Introduce the role of HMC in an LPAR environment.
Details The main focus here is to explain the importance of the HMC when working with
an LPAR managed system. It is needed for resource allocations, service boot operations,
and LED value display. It also provides access to the LPAR system consoles via a virtual
console window.
Do not try to teach LPAR management here. That is a topic in other courses. Here we want
to build a basis for wanting to have remote access to the HMC platforms.
Additional Information
Transition Statement Let us see how we can access the HMC.
V3.1.0.1
Instructor Guide
Uempty
SSH access
to HMC
commands
Network
2
Windows, Linux,
or AIX client via
the Web-based
System Manager
Alternate
HMC
Copyright IBM Corporation 2005
AU1411.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.
6-29
Instructor Guide
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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Identify remote capabilities of the HMC, with a focus on the Web-based
System Manager interface.
Details System administrators often will want to perform tasks from a remote location.
This visual discusses the avenues to accomplish this.
The Web-based System Manager client is an application that will have to be downloaded
and installed on any PC, Linux, and AIX workstations where you wish to do remote HMC
operations using the GUI. One of the things you cannot do remotely is configure the
System Manager Security for certificate authority or view its Overview and Status
information. You also cannot configure Service Agent remotely.
SSH (Secure SHell) is used for secure connections for command line access and must be
installed separately.
Prior to the HMC software Release 3 Version 2.5 (released in October 2003), there was
also the ability to use the rexec UNIX command to run HMC commands. This command
does not use encryption and could be a security issue. For this reason, SSH is the
recommended tool for remote command line access.
The students will install the Web-based System Manager client as part of the hands-on
exercise for this unit.
Additional Information
Transition Statement Let's look at an example of a Web-based System Manager
console on the HMC.
6-31
Instructor Guide
Application
Groups and
Applications
Navigation Window
Status
Contents Window
Copyright IBM Corporation 2005
AU1411.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. This window is
divided into two main areas: the Navigation area and the Contents area.
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss overall GUI environment of HMC.
Details The visual shows the default graphic interface the students will see when
bringing up the HMC.
Point out each of the areas on the screen: the two windows, the menu bar, the icons, the
status bar. Explain that by double-clicking a directory type item or click the + sign you will
expand the contents. Double-clicking an application will run it.
The menu bar and a right mouse click do the same thing. Each allows you to access the
menu options.
Additional Information
Transition Statement Its time for a checkpoint.
6-33
Instructor Guide
Checkpoint
1. True or False? The Web-based System Manager is available
for client access automatically after the BOS is installed.
_____________________________________________
_____________________________________________
2. Which of the 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
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. True or False? The Web-based System Manager is available
for client access automatically after the BOS is installed.
False. The Web-based System Manager server must be
configured and enabled for client access.
2. Which of the statements are true regarding the Web-based
System Manager?
a) An AIX 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 Webbased System Manager.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Now, lets do an exercise on installing, configuring, and using the
Web-based System Manager.
6-35
Instructor Guide
AU1411.0
Notes:
Introduction
This lab allows you to set up the Web-based System Manager and learn how to use this
interface. If you have other machines in your classroom that are networked together,
you can also try to perform remote administration using the Web-based System
Manager.
The exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Lets summarize the unit.
6-37
Instructor Guide
Unit Summary
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
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
6-39
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4910
7-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Describe the system startup process
Explain how to shut down the system
Describe the contents of the /etc/inittab file
Manage the system environment
AU1411.0
Notes:
7-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for the unit.
Details This unit will provide an overview of the AIX boot process. There are a number
of files and tools that will be discussed, including the System Resource Controller, init,
and /etc/inittab.
We will also discuss how to properly and safely shut down an AIX system.
Additional Information
Transition Statement Let's begin with the boot process.
7-3
Instructor Guide
Startup Modes
Normal mode
Login prompt
All processes running
Multi-user mode
System Management Services
Not AIX
Runs from FIRMWARE
Sets boot list
Maintenance mode
Maintenance menu
Recover root password
Fix machine that won't boot
Diagnostics
AIXDiagnostics
Diagnostics
AIX
Copyright IBM Corporation 2005
AU1411.0
Notes:
Normal mode
When you power on your system, one of the first things it does is determine which
device it should use to boot the machine. By default, the machine uses the normal boot
list, which usually contains one or more hard drives. When the machine does a normal
boot, it will complete the full AIX boot sequence and start processes, enable terminals
and generate a login prompt to make it available for multi-user access. It also activates
the disks, sets up access to the files and directories, starts networking and completes
other machine specific configurations.
7-4
V3.1.0.1
Instructor Guide
Uempty
Maintenance mode
If your system does not boot or you have lost the root password, you need to boot your
machine using bootable media other than the hard drive (like an installation CD or
bootable backup - mksysb tape). This boots you into maintenance mode. To do this, you
need to ensure that the device that contains your alternate boot media (CD or tape) is in
the boot list. When you boot from the new media, you are given backdoor access to
your system.
Typically, by pressing the F5 key, you use the default firmware bootlist, which always
contains the CD as boot media. Pressing F5 causes the machine to use the default
bootlist on some of the smaller older machines. On some other machines, this action
causes use of the service bootlist. The following example illustrates building of the
service bootlist:
# bootlist -m service cd0 hdisk0 hdisk1
Diagnostics
There is one other boot option - to boot into diagnostics. This can be accomplished by
using bootable media specifically designed for diagnostics or by invoking the diagnostic
mode when the hard drive is the boot device during a service boot. The System
Administration II class (Q1316/AU16) includes a discussion of diagnostics.
Boot lists
All machines have a normal boot list and one or more service boot lists. By default, the
normal boot list is used. The service boot list is invoked (like SMS) during the initial
stages of the boot sequence using function key F6.
7-5
Instructor Guide
7-6
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how the machine determines where to look for the operating system.
Details Cover all the information in the student notes. Since the System Administration I
class Q1314 (AU14) does not discuss boot problems, keep the discussion about the
service boot list at an overview level. Students will need to know this information in order to
recover a lost root password. This is discussed much later in the course.
Make sure the students understand use of the F1 key to load SMS. This facility is
discussed further on the next visual.
Additional Information Please keep in mind that AIX 5L V5.2 and V5.3 do not run on
43P Model 140s and other older non-CHRP systems. The 43P Model 140 supports only
one default boot list. Using the F5 key will invoke the default boot list. This boot list cannot
be changed. It contains the following: diskette, CD-ROM, hard drive, and network. If a 43P
Model 140 boots from the hard drive during a default boot, it will boot the diagnostic
programs - not run a normal boot sequence.
The 43P Model 150's support two boot lists - the one, like the one on the 140, that cannot
be changed (invoked using F5) and a customizable service boot list that can be changed
with the bootlist command (invoked using F6).
For details on any model of machine, the administrator needs to reference the hardware
documentation.
You may also want to discuss the bootlist command. To view the normal boot list, at an
AIX command prompt, type: bootlist -om normal. The boot list can be changed using
the same command: bootlist -m normal hdiskX 2nd device.
Transition Statement Let's discuss starting of the SMS programs in more detail.
7-7
Instructor Guide
System
Management
Services
Boot
AU1411.0
Notes:
Introduction
If you want to set the boot lists or view the system hardware configurations without the
aid of AIX, you can use the System Management Services (SMS) programs.
Invoking SMS
To invoke SMS, power on (or reboot) the system. You hear one beep when the machine
first powers on. About 30 to 45 seconds later, when POST discovers the keyboard, you
hear a different tone. This is what you are listening for. Also, you probably hear the
monitor activate. You have about a 15 second time frame to press F1. If you hear the
music play, you've waited too long. As the monitor warms up, you might see hardware
icons appear on the screen. You want to press the F1 key before it reaches the last
hardware device (speaker). Don't wait for the screen to warm up however, because
many times as the icons are beginning to appear, the music is sounding, and it is too
late. If you are in a noisy room, and you do see the keywords or icons for the discovered
7-8
V3.1.0.1
Instructor Guide
Uempty
devices on the screen (for example, on an LED display), wait for the keyword or icon for
the keyboard to be displayed before pressing F1. Timing is everything!
7-9
Instructor Guide
Instructor Notes:
Purpose Explain how to load the SMS programs.
Details Cover the information using the student notes.
Additional Information If the machine doesn't have a graphical monitor and is using a
ASCII terminal, instead of graphical icons, text will appear as the hardware checks are
completed. This will be the indication to press the appropriate key. If the keyboard doesn't
have function keys, or if you see an ASCII (non-graphical) prompt to use the numeric keys,
use the 1 key instead.
The term firmware can be related to the System Management Services programs. These
programs are considered part of System ROS. System ROS is specific to each system
type. There is a piece of software called Software ROS. The systems are designed for the
System ROS to pass control to an intermediary software whose purpose is to provide the
complex environment initialization required by AIX. System ROS is necessary for AIX to
boot, but it does not build the data structures required by AIX to boot. This is done by
Software ROS. Software ROS forms an IPL control block which is compatible with AIX.
Both System ROS and Software ROS are considered firmware. For further reading about
firmware, System ROS, and Software ROS, refer to the Redbook 'Managing AIX on
PCI-Based RISC System/6000 Workstations (40P/43P)' - SG24-2581.
This is the graphical version of the System Management Services programs that are found
on the 43P models 140 and 150 (as found in many of our classrooms). The exact
configuration of this menu will vary depending on the model of PCI RS/6000 system being
used. For example, on some systems, the SMS ASCII menu will display:
1. Display Configuration
2. Select Boot Devices
3. Utilities
4. Select Language
Cover the student notes for an explanation of the related tasks under the four main tasks.
The students will hear more about some of these tasks in following units.
Transition Statement Let's now see what happens when a PCI RS/6000 boots up.
Let's assume that the system is booting in normal mode from the hard disk.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
During the boot process, a number of steps must be completed. The LED panel will
provide information on the boot progress. Some LED values displayed are model
specific. These values can be found in the Service Guide for that specific model. Other
codes, particularly those displayed in later stages of the boot process, are generic AIX
codes, which are the same on all AIX systems.
7-11
Instructor Guide
Bootstrap code
Once the POST is completed, the system locates and loads bootstrap code. This stage
is completed by System Read Only Storage (System ROS) stored in the firmware. The
bootstrap code, sometimes referred to as Software ROS or level 2 firmware, takes
control and builds AIX specific boot information, then locates, loads and turns control
over to the AIX boot logical volume (BLV). Because these machines can run different
operating systems, the System ROS is generic boot information for the machine and is
operating system independent. The Software ROS is AIX information created based on
the machine type and is responsible for completing machine preparation to enable it to
start an AIX kernel.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Provide an overview on the startup process for RS/6000.
Details The current models of RS/6000 are capable of supporting multiple operating
systems. The System ROS stored on firmware is very simple and provides the initial
preparation of the machine. The Software ROS (also called level 2 firmware) specifically
prepares the machines for AIX.
Additional Information Some LED codes displayed during the boot process are model
specific. The initial phases during the POST and loading the AIX kernel will have the model
specific codes. This is because this phase provides hardware checks and initializations and
is unique to each model. Once the kernel is loaded, the LED codes are AIX codes. These
will be the same across all AIX systems.
Don't spend a great deal of time on the LEDs. These are used more for problem
determination and are discussed in detail in System Administration II.
Transition Statement Lets look at the architectures supported by different versions of
AIX 5L.
7-13
Instructor Guide
MCA model
PCI model (POWER Reference Platform)
PCI model (Common Hardware Reference)
32-bit
64-bit
Copyright IBM Corporation 2005
AU1411.0
Notes:
Supported architecture types
AIX 5L V5.1 supports the rs6k, rspc and chrp architecture types. However, AIX 5L V5.2
and AIX 5L V5.3 support only chrp. These architecture types are described briefly in the
table below:
Architecture
Processor
rs6k
POWER
rspc
POWER
chrp
POWER
Description
This is the original or classic RS/6000
workstation based on the microchannel
bus
POWER Reference Platform, based on
the PCI bus
Common Hardware Reference Platform,
based on the PCI bus
Copyright IBM Corp. 1997, 2005
V3.1.0.1
Instructor Guide
Uempty
7-15
Instructor Guide
Instructor Notes:
Purpose List architectures supported by different versions of AIX 5L and explain how to
determine the architecture type.
Details
Additional Information Mention bootinfo -p as the way to determine architecture
type.
Mention bootinfo -y as the way to determine bit addressing.
Transition Statement All the system messages that are produced during a boot
process are logged in a file. Let's see how to view that file.
V3.1.0.1
Instructor Guide
Uempty
Boot
Process
Install
Process
NIM
alog program
/var/adm/ras/bootlog
/var/adm/ras/BosMenus.log
/var/adm/ras/bosinst.log
/var/adm/ras/nimlog
/var/adm/ras/conslog
/var/adm/ras/errlog
Use the
alog
command
to view
logs
AU1411.0
Notes:
Overview
The alog command is a BOS feature that provides a general-purpose logging facility
that can be used by any application or user to manage a log. The alog command reads
standard input, and writes the output to standard out and copies it to a fixed size file at
the same time.
7-17
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the function of the alog facility.
Details The alog is required to be a fixed-size log. (Size can be configured by the user
through SMIT.) A mechanism must also be provided for viewing the log files. The alog
program will maintain a header containing the size of the log file and input and output
pointers. However, the log file data will consist exclusively of data piped to the program's
stdin. The program will not write time stamps to the log file. In addition, the alog program
will not provide concurrency control; that is, if multiple processes try to write to the same log
at the same time, the contents of the log file will be unpredictable. By the way, the a in alog
stands for AIX.
To record the current date and time in a log file named /tmp/mylog enter:
# date | alog -f /tmp/mylog
Additional Information alog -L can be used to see the list of alogs available on the
system.
Transition Statement As we have seen, boot messages are placed in the boot log file.
The reason for this is that, when the boot scripts are executed, they are told explicitly to
make entries in the boot log. This is all controlled from the /etc/inittab file. Let's see how
this is done.
7-19
Instructor Guide
/etc/inittab
Format of the line: id:runlevel:action:command
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console ...
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 ...
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console ...
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1 # pb cleanup
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
. . .
AU1411.0
Notes:
Introduction
The /etc/inittab file lists the processes that init will start, and it also specifies when to
start them.
If this file gets corrupted, the system will not boot properly. Because of this, it is a good
idea to keep a backup of this file.
Format of entries
The individual line entries in /etc/inittab contain the following fields:
- id - Up to 14 characters that identify the process. Terminals use their logical device
name as an identifier.
V3.1.0.1
Instructor Guide
Uempty
- runlevel - Defines what run levels the process is valid for. AIX uses run levels of
0-9. If the telinit command is used to change the runlevel, a SIGTERM signal will
be sent to all processes that are not defined for the new run level. If, after 20
seconds, a process hasn't terminated, a SIGKILL signal is sent. The default run level
for the system is 2, which is AIX multiuser mode.
- action - How to treat the process. Valid actions are:
respawn: If the process does not exist, start it
wait: Start the process and wait for it to finish before reading the next line
once: Start the process and do not restart it if it stops
sysinit: Commands to be run before trying to access the console
off: Do not run the command
- command - The AIX command to run to start the process.
Run levels
AIX uses a default run level of 2. This is the normal multi-user mode. You may want to
perform maintenance on your system without having other users logged in. The
command shutdown -m places your machine into a single user mode terminating all
logins. Once the machine reaches the single user mode, you will be prompted to enter
root password. When you are ready to return to normal mode, type telinit 2.
7-21
Instructor Guide
Instructor Notes:
Purpose Describe the content of the /etc/inittab.
Details Go through the format of the file, explaining each of the four fields.
AIX does not follow the System V R4 run level specification with special meanings for run
levels 0,3,5 and 6. In AIX, run levels of 0-1 are reserved, 2 is the default and 3-9 can be
defined according to the system administrator's preference. The telinit command can be
used to change the run level for the system. This can also be accomplished using the
fastpath smit telinit. When the telinit command is used to change the run level, the
system will respond by telling you which processes are terminating or starting as a result of
the change in the run level and by displaying the message:
INIT: New run level: n (where n is the new run level)
Use the command shutdown -m to enter maintenance mode. When the system enters
maintenance mode from another run level, only the system console is used as the terminal.
Students will execute this command in the machine exercise.
To add records into the inittab file you should use the mkitab command. For example to
add an entry for tty4 enter:
# mkitab tty4:2:respawn:/usr/sbin/getty /dev/tty4
You can use the -i option to add records after a particular entry.
To change currently existing entries in this file, use the chitab command. For example, to
change tty4's runlevel enter:
# chitab tty4:23:respawn:/usr/sbin/getty /dev/tty4
Point out all instances where the alog command is used in this file.
Also explain some of the commands that are started from this file - mention what getty
does, also qdaemon, cron, srcmstr (which will be discussed in this and later units) and
perhaps some other programs that are started up.
Additional Information The inittab file is reread by the init daemon every 60
seconds. The telinit q command is only needed if you can't wait for the next 60 second
check.
Be sure to stress this file is read top to bottom. This is why the wait action is important.
There are dependencies in this file like rcnfs and rctcpip. NFS is network file system
which allows sharing of file systems across the network. NFS cannot work if the line above
it, rctcpip, which starts networking, is not started and completed. Notice that rctcpip's
start action is wait.
The student notes discuss using shutdown -m to reach maintenance mode. The
documentation indicates that telinit S will do the same thing. However, telinit doesn't
seem to kick everyone off the system. Using shutdown is the better choice.
V3.1.0.1
Instructor Guide
Uempty
Some new entries in the inittab were added with AIX 5L V5.1. Look for ctrmc (Resource
Monitoring and Control subsystem) and shdaemon (System hang detection daemon) in the
inittab listing on the visual.
While not shown on the visual, the students may notice some new AIX 5L V5.3 items
further down in the inittab. The naudio entry is for support of the /dev/paud0 sound card
device. Some programs (such as Java) are hard coded to use this device for audio. If the
only audio device or devices are named /dev/aud1 and/or /dev/aud2 instead, then this
script will rename a device as required. The perstat entry is to collect boot time Volume
Group information that will be used in the reporting of certain system performance metrics.
Transition Statement (A good lead into the next page is to point out the lines in inittab
that are started by the System Resource Controller (SRC) - qdaemon and writesrv. Also,
point out the SRC master line - srcmstr. Then, say something like the sentence given
outside the parentheses.) Now, let's explain what SRC is.
7-23
Instructor Guide
Subsystem group
spooler
Subsystem
qdaemon
writesrv
lpd
Subserver
qdaemon
writesrv
lpd
AU1411.0
Notes:
Purpose of the System Resource Controller
The System Resource Controller (SRC) provides a set of commands to make it easier
for the administrator to control subsystems. A subsystem is a program (or a set of
related programs) designed to perform a function. Subsystems can be further divided
into subservers. Subservers are similar to daemons. SRC was designed to minimize the
need for user intervention, since it provides control of individual subsystems or groups
of subsystems with a few commands.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain what the System Resource Controller (SRC) is.
Details The information below may be helpful if some students ask for further discussion
of the differences between subsystem groups, subsystems, and subservers.
Subsystem groups - A subsystem group is a group of any specified subsystems. Grouping
systems together allows the control of several subsystems at one time. Examples are:
TCP/IP, SNA Services, NIS and NFS.
Subserver - A subserver is a program or process that belongs to a subsystem. A
subsystem can have multiple subservers and is responsible for starting, stopping, and
providing status of subservers.
Subservers are started when their parent subsystems are started. If you try to start a
subserver and its parent subsystem is not active, the startsrc command starts the
subsystem as well.
Additional Information Ensure the students understand the big picture. If the students
have terminals available to them, you might want to have them type in
lssrc -a to show them the grouping. These groupings are established in the ODM.
You shouldn't try to explain in great depth but make sure they understand how the entries in
/etc/inittab relate to this discussion. This will give them a concrete example of how the
SRC is used.
Transition Statement Let's identify some of the commands that the SRC uses to
control the subsystems.
7-25
Instructor Guide
PID
8022
9558
Status
active
active
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.
AU1411.0
Notes:
Introduction
In this section, we will discuss some examples of SRC commands.
V3.1.0.1
Instructor Guide
Uempty
7-27
Instructor Guide
Instructor Notes:
Purpose List the commands used by the SRC.
Details Go through each example on the visual. The lpd subsystem is used to show
how to list the status, start a subsystem, refresh a subsystem and shutdown a subsystem.
Additional Information There are other options that can be used with each of these
commands, such as those used to specify different methods to stop a subsystem. For more
information, refer to the man pages.
As you cover the examples, explain that these commands can also work with the -g option.
But, be aware that using the -g option will effect all subsystems in the group. If you ask to
start a group, every subsystem in the group will be started.
SRC subsystems should always be started using startsrc if you want to be able to use
SRC facilities to monitor and stop them. When they are started using the daemon
executable, the SRC is not the parent and is thus unable to manage them.
Transition Statement Let's next look at how to stop processes.
V3.1.0.1
Instructor Guide
Uempty
Stopping Processes
# ps -ef
UID
root
root
root
root
root
root
root
root
PID
1
2626
4136
4964
6734
8022
9036
9345
PPID
0
1
1
4136
1
4136
1
1
C
0
0
0
0
0
0
0
0
STIME
May 04
May 04
May 04
May 04
May 04
May 04
May 04
May 04
TTY
-
TIME
0:11
1:17
0:00
0:00
0:02
0:00
0:00
0:02
CMD
/etc/init
/usr/sbin/syncd 60
/usr/sbin/srcmstr
/usr/sbin/inetd
/usr/sbin/cron
/usr/sbin/qdaemon
/usr/sbin/uprintfd
/usr/bin/program
AU1411.0
Notes:
Deciding how to stop a process
Because some processes are started using SRC, they should be stopped using SRC.
If you are not sure how a process was started, you can run lssrc to view what is
controlled by SRC. As an alternative, you can determine the same information by
viewing the output from ps -ef.
7-29
Instructor Guide
Instructor Notes:
Purpose Show students how to properly shutdown a process.
Details The kill command and the stopsrc command are used to stop processes.
Processes started by SRC should be stopped by SRC. Other processes can be terminated
with kill.
Make sure the students understand how to read the ps output.
Additional Information There are some selective subsystems which are defined to the
SRC with a respawn attribute which causes the SRC to restart them if they die for any
reason, such as being killed. An example is the qdaemon. In that circumstance, the only
way to avoid the respawn is to use the stopsrc command to shut them down.
Transition Statement Now that we know the proper way to shut down processes, let's
look at how to properly shutdown a machine.
V3.1.0.1
Instructor Guide
Uempty
System Shutdown
The shutdown command:
Gracefully stops all activity on the system and advises all
logged on users
Warns users of an impending shutdown
# shutdown +2 The system will be down until 3AM
Broadcast message from root@localhost (tty) at
1:30:20...
The system will be down until 3AM
shutdown: PLEASE LOG OFF NOW!!!
All processes will be killed in 2 minutes
AU1411.0
Notes:
Introduction
The SMIT shutdown fastpath or the shutdown command is used to shut the system
down cleanly.
If used with no options, shutdown displays a message on all enabled terminals (using
the wall command), then (after one minute) disables all terminals, kills all processes on
the system, syncs the disks, unmounts all file systems, and then halts the system.
7-31
Instructor Guide
Flags
The following flags can be used with the shutdown command:
-d
-F
-h
-i
-k
-m
-r
Restarts the system after being shutdown with the reboot command.
-t
-l
Since AIX 5L V5.1, this option creates a new file (/etc/shutdown.log) and
appends log output to it. This may be helpful in resolving problems with the
shutdown procedure. While the output is generally not extensive, if the root
file system is full, the log output will not be captured.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the syntax and use of the shutdown command.
Details The time delay can be specified and an alternative message can also be
specified.
If you are bringing the system down to maintenance mode, you must run the shutdown
command from the / (root) directory to ensure that it can cleanly unmount the file systems.
The shutdown command is the correct command to use except in unusual circumstances,
when either the halt command or the reboot command could be used. Remind the
students that these commands should not be used when users are logged into the system.
The halt command writes data to the disk and then stops the processor with no warning to
users. The machine will not attempt to restart. Use the halt command when you are not
going to restart the machine and no users are logged in. The fasthalt command is the
BSD equivalent. The error log is updated.
The reboot command can be used to perform a reboot operation. When the system
restarts the disks are checked and synchronized. Use the reboot command when you
want the system to restart immediately. The fastboot command is the BSD equivalent.
The error log is updated.
Additional Information Go through the syntax for each command. Point out the
information on /etc/rc.shutdown. Note that the -l option was introduced with AIX 5L V5.1.
Transition Statement Let's see how other system functions as well as shutting down
the system can be achieved through SMIT.
7-33
Instructor Guide
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Introduction
The System Environments selection in SMIT controls many different aspects of the
system.
V3.1.0.1
Instructor Guide
Uempty
7-35
Instructor Guide
Instructor Notes:
Purpose Show that a shutdown can be performed using SMIT.
Details The first item will shut down the system. However, there many good things to
discuss on this screen. This screen seems to have a number of odds and ends related to
system management. You should take a few minutes to walk through each item, giving a
brief description of each. See the student notes for information.
Not all of these items are covered in this class. Many of the details are covered in System
Administration II.
The Change System User Interface item is generally of interest to the students. This
determines the default interface at boot up. It is either CDE (with the graphic login prompt)
or the standard ASCII command-line login. A reboot will be needed for a change specified
here to take effect.
Additional Information The time on AIX machines is kept using CUT (GMT).
Everything is converted from that time based on your time zone. AIX uses daylight saving
from the last Sunday in March through the last Sunday of October. You now have the
flexibility to provide different parameters if necessary.
Transition Statement If you need to change the language environment on your system,
you can do so. Lets discuss this process now.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Language environment management with SMIT
As shown on the visual, the fastpath smit mlang can be used to access a number of
language environment management functions.
7-37
Instructor Guide
Code sets
Industry-standard code sets are provided by means of the ISO8859 family of code sets,
which provide a range of single-byte code set support. The Personal Computer (PC)
based code sets IBM-850 and IBM-932 are also supported. IBM-850 is a single-byte
code set while IBM-932 is a multibyte code set used to support the Japanese locale.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to manage the language environment.
Details The SMIT menu illustrates how the language environment can be modified.
Ask the class if anyone has to deal with alternate language environments. If not, then avoid
spending much time on this topic.
The menu items that you should discuss are as follows:
Option 1: This will allow you to view or change the primary language environment, which
determines the collation order, monetary symbol, time of day representation, language
used in menus, and message text for the entire system.
Option 2: This will allow you to add additional language conventions. The primary language
is used for the entire system, whereas you can use the chlang command to set individual
users to this new language environment.
Option 3: Remove a language will run the installp command to deinstall the product.
Make sure that this language is not the one used as the primary one.
Option 4: This lists a preference hierarchy, and the system can use one of the alternative
languages for displaying the menus and message text, if your primary language is not
supported.
Option 5: Use this option to change the language environment of an individual user.
Option 6: Allows you to work with a list of applications for which a language translation is
installed.
Option 7: Converts system messages or flat files to the specified code set.
Additional Information Because code pages are, in a sense, translation tables which
map character set descriptions for printing to various devices it becomes imperative that
the correct files are installed to support the corresponding locale. The files come in the form
of National Language Support (NLS) filesets. In most cases, these are not installed by
default.
Graphic terminals are referred to as Low Function Terminals (LFTs). If you have an LFT
display and keyboard, you can change the keyboard mapping using the chkbd command or
SMIT. LFTs only have support for single-byte code-set languages. The chkbd command
changes the default software keyboard map loaded at system IPL. The pathname
parameter provides the location of the software keymap file. This pathname can be
absolute or simply the file name. If only the file name is specified then the command will
look for it in the default directory /usr/lib/nls/loc. For a list of all available keyboard maps,
use the lskbd command. The change is picked up at next reboot.
Transition Statement Its time for a checkpoint.
7-39
Instructor Guide
Checkpoint
1. What is the first process that is created on the system
and which file does it reference to initiate all the other
processes that have to be started?
____________________________________________
____________________________________________
2. Which AIX feature can be used to stop and start groups
of daemons or programs?
____________________________________________
3. True or False? You can only execute the shutdown
command from the console.
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the checkpoint for this unit.
Details When going over question 3 in the checkpoint, you might want to point out that
who you are (rather than where you are, that is, on what terminal) is what matters. Ordinary
users cannot run the shutdown command. However, the root user can run this command
from any terminal.
A full checkpoint solution is given below:
Checkpoint Solutions
1. What is the first process that is created on the system
and which file does it reference to initiate all the other
processes that have to be started?
The initial process is init, which checks /etc/inittab
for information regarding other processes that have to
be started.
2. Which AIX feature can be used to stop and start groups
of daemons or programs?
The System Resource Controller (SRC)
3. True or False? You can only execute the shutdown
command from the console.
Additional Information
Transition Statement Now, its time for an exercise.
7-41
Instructor Guide
Multi-user mode
Boot using System Management Services
System Resource Controller (SRC)
Resetting the run level (INIT)
AU1411.0
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise for this unit.
Details
Additional Information
Transition Statement Lets summarize some of the key points from this unit.
7-43
Instructor Guide
Unit Summary
When the system boots up, it first runs through a number
of hardware checks before starting the processes defined
in the /etc/inittab file.
The LED codes produced during the boot process can be
used to identify problems. Alternatively, the boot log file
can be accessed to obtain the system messages
produced during the boot phase.
Once the system is up, it can be shut down by an
authorized user from any terminal.
SMIT can be used to change common system settings
such as the language used, and the date and time used
by the system.
Copyright IBM Corporation 2005
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review some of the key points from this unit.
Details
Additional Information
Transition Statement Thats the end of this unit.
7-45
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Unit 8. Devices
What This Unit Is About
This unit introduces the concepts of devices, their different states, and
their location codes.
References
Online
Unit 8. Devices
8-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Describe the difference between logical and physical
devices
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
AU1411.0
Notes:
8-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by defining some device terminology.
Unit 8. Devices
8-3
Instructor Guide
Device Terminology
Physical Devices
Ports
Device Drivers
Logical Devices
/dev Directory
AU1411.0
Notes:
Device terminology
In order to attach peripherals such as terminals and printers to an AIX system, you must
tell AIX the characteristics of these devices so that the operating system can send the
correct signals to the adapter where the device is connected. A number of pieces of
hardware and software must interact correctly for the device to function correctly.
- Physical Devices - Actual hardware that is connected in some way to the system.
- Ports - The physical connectors/adapters in the system where physical devices are
attached. Most ports are programmable by the system software to allow attachment
of many different types of devices.
- Device Drivers - Software in the kernel that controls the activity on a port and the
format of the data that is sent to the device.
- Logical Devices - Software interfaces (special files) that present a means of
accessing a physical device to the users and application programs. Data appended
8-4
V3.1.0.1
Instructor Guide
Uempty
to logical devices will be sent to the appropriate device driver. Data read from logical
devices will be read from the appropriate device driver.
- /dev - The directory which contains all of the logical devices that can be directly
accessed by the user. (Some of the logical devices defined are only referenced in
the ODM customized database and cannot be accessed by users.)
Unit 8. Devices
8-5
Instructor Guide
Instructor Notes:
Purpose Explain the terminology used when dealing with devices.
Details Suggestion: Try to get the students to define these for you. In most cases, you
will have some pretty good definitions coming from the class.
Additional Information Question: What is your definition of a physical device?
Answer: Something you can touch.
Transition Statement We shall now look at the different types of devices that are
present on the system.
8-6
V3.1.0.1
Instructor Guide
Uempty
1
1
1
1
root
root
root
root
system
system
system
system
20,0
20,64
20,0
20,64
Oct
Oct
Oct
Oct
29
29
29
29
02:25
02:26
02:25
02:26
fd0
fd1
rfd0
rfd1
1
1
root
root
system
system
22,0
22,1
Oct 29 02:25
Oct 29 02:25
rmt0
rmt0.1
1
1
2
1
root
root
root
root
system
system
system
system
14,1
14,2
14,1
14,2
Oct 29 02:44
Nov 1 05:31
Oct 29 02:44
Nov 1 05:31
hdisk0
hdisk1
rhdisk0
rhdisk1
rmt0
fd0
rmt1
Copyright IBM Corporation 2005
AU1411.0
Notes:
Types of devices
There are a large number of devices that can be configured in the system. Devices can
be one of two types:
- Block device is a structured random access device. Buffering is used to provide a
block-at-a-time method of access. This is usually only used for disk file systems.
- Character (raw) device is a sequential, stream-oriented device which provides no
buffering.
Most block devices also have an equivalent character device. For example, /dev/hd1
provides buffered access to a logical volume whereas /dev/rhd1 provides raw access
to the same logical volume.
Unit 8. Devices
8-7
Instructor Guide
ls -l /dev output
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 contains a numeric value indicating the number of bytes in the
file. For devices, it shows the major and minor device numbers. The device rmt0 shown
in the listing has a major device number of 22 and a minor device number of 1. This
indicates that the code to handle major device 22 must already be in the kernel, and it
must handle device number 1 correctly. While not shown here, there would be files for
rmt0 with minor numbers of 0 through 7, each of which must be handled correctly by
the device driver. More precisely, the major number refers to the software section of
code in the kernel which handles that type of device, and the minor number to the
particular device of that type or the operation mode of a device of that type.
CD-ROM
Diskette
hd1, lv00
Logical volume
hdisk0
Physical volume
8-8
Terminal
lp0
Printer
rmt0
Tape drive
tok0, ent0
Adapter
Memory
Diskette
rhd1, rlv00
Logical volume
rhdisk0
Physical volume
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the difference between the various types of device files.
Details Often a physical device will have a number of logical device drivers.
An example would be:
fd0
fd0h
fd0l
fd0.9
fd0.18
fd0.36
rfd0
rfd0h
rfd0l
rfd0.9
rfd0.18
rfd0.36
All these refer to the physical device fd0 (the first floppy diskette drive) but they work with
the physical device in different ways.
How these are created and which are created is dependant on the device type.
Students may try the ls -l /dev command on their systems. If they do, they may notice
that the major and minor numbers for a device may differ from system to system. The major
and minor numbers are most important to those who are going to write device drivers or for
high availability environments using HACMP.
Additional Information Students might ask why rhdisk0 has a link count of 2. The
special device /dev/ipldevice is a hard link to the same inode as hdisk0 because hdisk0
is where we boot from.
Transition Statement All device information is stored in a database.
Unit 8. Devices
8-9
Instructor Guide
Type
totmem
4mm4gb
osdisk
23100020
14101800
chrp_ecp
keyboard
Subclass
sys
scsi
scsi
pci
pci
isa_sio
kma_chrp
Description
Memory
4.0 GB 4mm Tape Drive
Other SCSI Disk Drive
IBM 10/100Mbps Ethernet PCI Adapter (23100020)
IBM PCI Tokenring Adapter (14101800)
CHRP IEEE1284 (ECP) Parallel Port Adapter
Keyboard Adapter
Status
Available
Available
Available
Available
Available
Available
Available
Location
01-S1
01-K1-00
10-80-00-0.0
10-80-00-4,0
10-80-00-5,0
10-60
Description
Standard I/O Serial Port
Keyboard Adapter
SCSI 4mm Tape Drive
16 Bit SCSI Disk Drive
16 Bit SCSI Disk Drive
Memory
IBM 10/100 Mbps Ethernet PC Adapter (23100020)
lft
diskette
printer
lft
fd
ibm4019
node
siofd
parallel
AU1411.0
Notes:
Introduction
The predefined and customized databases store information about all of the logical
devices in the system and their attributes. It is managed by the Object Data Manager
(ODM).
Predefined database
The predefined database contains configuration data for all possible devices supported
by the system. The SMIT menus have options to install non-supported drivers. The
contents of the predefined database is largely defined at installation time, ensuring that
you always have support for devices in your system.
V3.1.0.1
Instructor Guide
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.
Unit 8. Devices
8-11
Instructor Guide
Instructor Notes:
Purpose Show how the device information and support are held in AIX.
Details The Object Data Manager (ODM) is a repository for information about this
system. The ODM enables up to 1000 device configurations.
It contains device support, device vital product data, software support for these devices,
and so forth.
The ODM is divided into two areas:
Predefined contains the supported devices
Customized contains the configured devices
There is a small terminology mismatch between SMIT and the ODM menu interfaces that
look after devices in AIX:
SMIT
supported
defined
configured
ODM
predefined
customized
customized
The World
(unknown, not installed yet)
defined
available
Entries in the predefined configuration database are initially created at software installation
time. Under AIX 5L V5.1 and AIX V4, the installation programs install device software for
every type of device detected on the system and a default set of common device types. An
entry in the predefined configuration database is created for each type of device software
installed.
Beginning with AIX 5L V5.2, all known device drivers are installed, unless the default
installation value is changed. This enables a backup of a system to be easily loaded on
another system.
Additional Information
Transition Statement We will now take a look at these classifications of devices and
see the differences between the ODM databases.
V3.1.0.1
Instructor Guide
Uempty
type
totmem
4mm4gb
osdisk
22100020
14101800
ppa
isa_keyboard
subclass
sys
scsi
scsi
pci
pci
isa_sio
isa_sio
description
Memory
4.0 GB 4mm Tape Drive
Other SCSI Disk Drive
IBM PCI Ethernet Adapter (22100020)
IBM PCI Tokenring Adapter (14101800)
Standard I/O Parallel Port Adapter
Keyboard Adapter
scsi
scsi
scsi
scsi
..
..
1200mb-c
150mb
3490e
4mm2gb
. .
. .
AU1411.0
Notes:
Introduction
Default characteristics for known device types are 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.
Unit 8. Devices
8-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show a sample of the supported devices and the information that is available
from the list.
Details Prior to AIX 5L V5.2, if a SCSI disk was detected at installation time, then there
will be a number of types of SCSI disks in the list. If, on the other hand, there is no tape
drive on the system then, there will be none in this list. (More on installing device support
later). Beginning in AIX 5L V5.2, all supported devices (whether they are there at
installation time or not) will have their device information in the ODM.
Additional Information
Transition Statement We shall now look at the configured devices on our systems.
Unit 8. Devices
8-15
Instructor Guide
status
Available
Available
Available
Available
Available
Available
Defined
Available
Available
Available
Available
Available
location
System
PCI Bus
10-58
01-S1
10-80
10-80-00-3,0
10-80-00-6,0
10-80-00-4,0
10-80-00-5,0
10-60
10-90
description
Object
ISA Bus
Standard I/O Serial Port
Wide/Fast-20 SCSI I/O Controller
SCSI Multimedia CD-ROM Drive
4.0 GB 4mm Tape Drive
16 Bit SCSI Disk Drive
16 Bit SCSI Disk Drive
Memory
IBM 10/100 Mbps Ethernet PCI
IBM PCI Tokenring Adapter
value
normal
131072
true
description
user_settable
State of system keylock at boot time False
Amount of usable physical memory Kbytes
False
Continuously maintain DISK I/O history
True
131072
False
AU1411.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.
V3.1.0.1
Instructor Guide
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.
The lsattr -E -l [resource name] command provides detailed information on the
effective attributes currently configured for specified devices. In the example, it provides
configuration information on the system itself.
- The -C option for lsdev pulls the customized information from the ODM
- The -E option for lsattr shows the effective attributes
- The -l option for both commands is the logical device name
- The -c option for both commands is the class of device
- The -a attribute option for the lsattr command displays information for a
specific attribute
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 will be listed such as EC level,
FRU number, part number, and so forth. The output also displays the model
architecture and bus type.
Unit 8. Devices
8-17
Instructor Guide
Instructor Notes:
Purpose Show how to view the configured devices on the system.
Details Spend some time discussing the lsattr example as students will be working
with sys0 during the exercise. Under the column titled user_settable, will be the values of
True or False. This indicates whether or not the associated value can be changed. In most
cases, these values will not be changed unless performing more advanced functions such
as performance and tuning.
The administrator can also use SMIT to change a device state from available to defined, or
from defined to available.
One command that almost everyone wants to know is how to determine how much memory
is on the system. You can also view memory size using smit chgsys. The resulting SMIT
menu will display the amount of memory on the system. The command
lsattr -El sys0 -a realmem will show the total amount of memory. To see the size of an
individual memory card, you can use the same command to see the characteristic of that
card: lsattr -El mem0.
The student notes also mention the lscfg -v command. Be sure to explain this command
as it is mentioned again in the checkpoint questions. If students are at terminals, you may
want them to execute this command to display the output.
Additional Information
Transition Statement As we have seen, devices may exist in one of several states. We
shall now look at these in some more detail.
V3.1.0.1
Instructor Guide
Uempty
Device States
Predefined Database
Supported
Device
Undefined
rmdev -dl
Customized Database
rmdev -dl
Defined
Not Usable
mkdev -l
or
cfgmgr
rmdev -l
Ready for
Use
Available
AU1411.0
Notes:
Device states
The most common device states are:
- Undefined - The device is a supported device but is not configured. It does not
reside in the customized database.
- Defined - The device has been added to the customized database. It has been
allocated a logical device name, a location code and attributes have been assigned
to it. But, it is still unavailable for use.
- Available - The device resides in the customized database. The device is fully
configured and is ready for use.
When a device is first identified, it is configured and put into the Available state.
If a device that has been configured in the past is powered off and the machine is
rebooted, the device 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.
Copyright IBM Corp. 1997, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Unit 8. Devices
8-19
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To explain the different device states and to show how to manipulate the
device states.
Details It is important to make sure that students make the connection between the
customized database and the defined and available states. Whenever a device is in the
customized database, it will be Defined or Available. The undefined state really just
means the device has not been configured and therefore is not in the customized
database. But, it is a supported device (information about the device resides in the
predefined database).
The examples in the student notes using the rmdev and mkdev commands show how to
manipulate the device states. The mkdev command either creates an entry in the
customized database when configuring a device or moves a device from defined to
available. When defined, there is an entry in the customized database already. To move to
the available state means the device driver is loaded into the kernel.
The rmdev command changes device states going in the opposite direction.Using the
rmdev command without the -d option is used to take a device from the Available to the
Defined state (leaving the entry in the customized database but unloading the device
driver). When using the -d option, the rmdev command removes the device from the
customized database.
Discussion Items - Ask the following questions to confirm understanding of the various
device states.
Q: If a configured and available tape drive on the system is powered off before a reboot
of the system, what state will the tape drive be in once the system is rebooted?
A: In a Defined state.
Q: How do you make it available for use?
A: Power on the device and make the device available by one of several methods:
cfgmgr, mkdev, or SMIT -> Devices -> Configure/Unconfigure Devices -> Configure
a Defined Device
Q: If an available tape device is powered off while the system is up, what state will the
system assign to the tape device?
A: It will remain available.
Additional Information There is one additional device state: Stopped. This is very
rarely seen. Few devices support this state. In this case, the device resides in the
customized database and the device driver is loaded but the application cannot use the
device.
Transition Statement We have look at the commands that configure devices. But, most
devices are self-configuring. Let's see how that works.
Unit 8. Devices
8-21
Instructor Guide
Self-Configuring Devices
2. Answer:
- CD-ROM
- 10-80-00-3,0
Device
Driver
cfgmgr
ODM:
3. cd0 defined
cd0
defined
10-80-00-3,0
ODM:
cd0
available
10-80-00-3,0
Device
Driver
Kernel
/unix
# ls -l /dev/cd0
br--r--r-- root
system 39,
39
/dev/cd0
5. Device available
AU1411.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 power it on before booting the machine. Since cfgmgr runs during the boot
process, no more intervention is required by the administrator.
You see that for SCSI devices, you need to set a unique SCSI ID on the device before
attaching it. Once that is done, configuration of the device is handled by AIX.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how devices are detected and configured by the system.
Details Review how cfgmgr detects and configures devices. Explain that parallel and
serial devices will not self configure and they do require manual intervention. Configuring
printers is covered in a separate topic. We will provide an example of adding an ASCII
terminal in this unit.
Be careful telling students that they can just attach a device and run cfgmgr. Attaching
SCSI devices to a system that is powered on can damage components. Unless the device
is designed to be hot-swappable, the system should be powered off prior to attaching the
SCSI device.
cfgmgr is usually the easiest way to configure a device. It is safe to run on an active
system. However, on larger machines with many devices, cfgmgr may take a while to run.
In which case, it might be more desirable to use SMIT or the mkdev command to configure
just the device you want. There is a cfgmgr option which may help in this situation.
cfgmgr -l <parent-adapter> will only examine the specified device and any children
under that device.
Additional Information Older model PCI machines supported ISA cards. These ISA
cards were not self configuring. In fact, they required several manual steps to configure
them successfully. New models no longer support attachable ISA cards. Performance on
these cards was not nearly as good as PCI cards and coupled with the complex
configuration process, the use of ISA cards wasn't very popular. This should not be
confused with the ISA bus that is present in all currently produced models. On the new
models, the ISA bus supports only the integrated devices. No slots are available to install
additional ISA cards.
Transition Statement If you want to configure a single device or you need to configure
a serial device, then SMIT is one way to do that. Let's take a look at that screen.
Unit 8. Devices
8-23
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
- Printer/Plotter
This submenu allows you to configure printer devices and also queues for local
printers and remote printers.
- TTY
Used for any non-printer device attached to a serial port. (For example: terminal,
modem, and direct connection.)
- PTY
Used for a pseudo-terminal device. It provides the appearance of a real ASCII
terminal to the application, but does not have any physical port attachment. It is
used for applications such as AIXWindows and TCP/IP communications.
- Communications
Used for adapters for various types of communications. (For example: Token Ring,
Ethernet, MultiProtocol, X.25, 3270, and Fiber Optic.)
Unit 8. Devices
8-25
Instructor Guide
Instructor Notes:
Purpose Show the options available in the SMIT Devices menu.
Details Most of the device-related actions in SMIT can take place while the system is
operational and users are accessing it.
Additional Information
Transition Statement We will show an example of how to use this screen to configure
an ASCII terminal in just a few minutes. But, first we need to look at location codes in order
to understand how to fill in the SMIT screens.
V3.1.0.1
Instructor Guide
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
AU1411.0
Notes:
Location code
Every logical device is assigned a location code when it is attached to the system.
Location codes depend on the type of device and the adapter to which it connects.
The location code is another way of identifying the physical device.
The location codes exist to provide the system with a method of locating the device and
establishing relationships between devices and their adapters. If a hardware failure
occurs, the location code is often displayed or referred to in the LED.
Unit 8. Devices
8-27
Instructor Guide
Instructor Notes:
Purpose Overview of AIX location codes.
Details This visual is intended as an introduction. It is just a starting point. The following
visuals cover this with specific examples and will help clarify the concept.
Different machine models will have specific values. Make sure students understand this.
The visual shows examples of the 43P Model 150. Location code values for all other model
types can be found in the service guides for that model.
Explain the format of the location codes, AB-CD-EF-GH.
AB-CD is an adapter.
Additional Information As you go through the following visuals, emphasize to the
students that they are not expected to totally analyze the structure of the AIX location
codes. Many aspects vary from machine to machine. What is important is that they keep a
copy of a current lsdev listing in their log book. Using that listing, they should be able to:
Look up the logical name of a device given the location code
Identify the parent adapter from the first two pairs of the location code of a device
Recognize how the device is connected to the parent adapter given the last two pairs in
the location code (for example, SCSI address, or port # in a RAN)
Transition Statement Let's look at what the letters mean.
V3.1.0.1
Instructor Guide
Uempty
AB
00
01
04
XY
CD
01-99
A-Z,0
EF
The connector ID
GH
AU1411.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/
Unit 8. Devices
8-29
Instructor Guide
1P-08 Slot 1
10-b0 Slot 2
10-90 Slot 3
1P-18 Slot 4
1P-10 Slot 5
V3.1.0.1
Instructor Guide
Uempty
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.
Unit 8. Devices
8-31
Instructor Guide
Instructor Notes:
Purpose To provide an example of location codes for the Model 150.
Details Explain the visual contents.
EF - Connector ID is easier to explain with the discussion of the 128-port async adapter.
Be sure to stress that specific location code values can be found in the Service Guides for
that model.
Additional Information In the student notes, there is information about the Model 150.
Since some student might be using other models in the classroom, they will see differences
from what is covered in the lecture material.
The Service Guides use the AB-CD-EF-GH formatting. Other AIX documentation may use
the AA-BB-CC-DD formatting. Since the Service Guides are the source of specific location
code values, we are using that formatting in this unit.
Transition Statement Let's look at a picture that show the addressing for serial devices.
V3.1.0.1
Instructor Guide
Uempty
0 1 2 3 4 5 6 7
128-Port
Adapter
2
1P-10-11-07
8 9 10 11 12 13 14 15 Remote
0 1 2 3 4 5 6 7
1P-10
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
8 9 10 11 12 13 14 15
1P-10-21-10
AU1411.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.
Unit 8. Devices
8-33
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To illustrate the location codes for a 128-port asynchronous adapter. It
provides a more complex example to help explain location codes.
Details Explain the student notes clearly identifying where each number is coming from.
It is helpful to draw another RAN and complete a few more examples.
The reason this example is important is because serial devices do not self configure. If a
student wants to set this up, it will require an understanding of location codes. They will
need to complete the addressing scheme manually.
It might be helpful once you have completed the explanation, to remind the students that
the built-in serial port is a lot simpler to handle. It will have an address like 01-S1. If you
attach a terminal to it, since you can only attach 1 terminal, it will always end with 00-00
(01-S1-00-00).
Additional Information
Transition Statement Let's now look at how SCSI devices are addressed.
Unit 8. Devices
8-35
Instructor Guide
EF
G,H
AU1411.0
Notes:
SCSI device example
The visual shows an example of location codes for SCSI devices.
The location code format is slightly different. You notice in this format 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.
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
V3.1.0.1
Instructor Guide
Uempty
be identified by a unique address. With dual SCSI, the card's internal bus is identified
with 00 and the card's external bus is identified with 01.
G,H position
The G,H position provides two pieces of information. The G position is the SCSI
address or SCSI ID of the device. The SCSI ID is set on the device itself. It is usually
accomplished by setting jumpers or switches on the device. Some devices have 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 devices 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.
Unit 8. Devices
8-37
Instructor Guide
Instructor Notes:
Purpose To provide an explanation of SCSI addressing on a pSeries system.
Details Explain positions AB-CD are the same as before. It identifies the location of the
adapter.
The EF position will be 00 or 01. Single SCSI is always 00. Dual SCSI has two buses, the
internal 00 and the external 01.
G,H is the SCSI ID, LUN. Reference the student notes for an explanation. When
configuring a SCSI ID, stress ensuring that the number selected does not duplicate an
existing ID on the that bus.
To help identify existing SCSI IDs, use lsdev -Cs scsi.
Additional Information
Transition Statement Let's take a look at an example.
V3.1.0.1
Instructor Guide
Uempty
10-80-00-4,0
10-80-00-6,0
4
SCSI Bus
10-80
0
6
SCSI ID
AU1411.0
Notes:
What is the location code?
This example shows several SCSI devices attached to a single SCSI bus on a 43P
Model 150. This is not a dual SCSI. This is a single bus that has devices that are
housed inside and outside the cabinet.
From the device addressing, the adapter is integrated on the PCI bus. The external disk
has a SCSI ID of 6 and the tape device has a SCSI ID of 4.
What would the location code be for the disk with SCSI ID of 0?
____-____-____-___,___
The SCSI adapter uses a SCSI ID of 7 by default. Normally, you should not set a device
to a SCSI ID of 7 for that reason.
Unit 8. Devices
8-39
Instructor Guide
Instructor Notes:
Purpose Discuss an example of a location code for a SCSI device.
Details Cover the example using the student notes.
Ask the student to determine the internal disk's location code. It is 10-80-00-0,0.
Additional Information SCSI adapters default to ID's of 7. That ID is changeable but
should not be changed without good reason. In a high availability (HA) environment, disks
can be connected to two systems at once via one SCSI bus. If the SCSI adapter on both
machines default to 7, there will be SCSI conflict. In an HA environment, it is necessary to
assign new ID's to SCSI card for that reason.
This information is here for the instructor. It is not suggested that you cover HA-related
topics.
Transition Statement Let's look at a representation of a typical 43P Model 150.
V3.1.0.1
Instructor Guide
Standard
Serial
Port 1
01-S1
Keyboard
Adapter
01-K1
Keyboard
01-K1-01-00
Bridge
Uempty
PCI Ethernet
Adapter
10-60
Wide SCSI
I/O Controller
10-80
SCSI Disk
Drive
10-80-00-4,0
AU1411.0
Notes:
PCI location code
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.
Unit 8. Devices
8-41
Instructor Guide
Instructor Notes:
Purpose Explain the relationship between the PCI and ISA buses on the PCI pSeries
systems.
Details The visual shows a partial view of devices attached to a PCI-based pSeries
system. This example was based on a 43P Model 150, so be sure to point out that this is
just an example and location codes and device locations will vary by system and model.
Our example shows both the PCI bus (pci0) and the ISA bus (isa0). A bridge exists
between the two buses. In our example, the two standard serial ports, as well as the
keyboard (and mouse - not shown) are attached to the ISA bus.
Note that all devices attached to the PCI bus will have a location code beginning with 10.
The ISA bus itself will also have a location code beginning with 10. Any devices attached to
the ISA bus will begin with location code 01.
Additional Information
Transition Statement In addition to the AIX locations codes we also have physical
location codes. This may seem redundant, but it is necessary to handle situations where
multiple AIX operating systems are running on one pSeries machine. Since each AIX
instance could be using the same AIX location code for different devices, we need to have
a way to uniquely identifying devices on the machine. Let us, take a look at layout of one of
these machines that can be logically partitioned.
V3.1.0.1
Instructor Guide
U1.35-P2-X1
Unused
U1.35-P1-X2
U1.35-P1-X3
U1.35-P1-X4
U1.35-P1-V1
U1.35-P1-V2
U1.35-P1-V3
U1.18-P1-M4
U1.18-P1-M7
U1.18-P1-M8
U1.18-F3
U1.18-P1-M3
U1.18-P1-M5
U1.18-P1-M6
U1.18-X2
U1.18-P1-M2
U1.18-X1
U1.18-P1-M1
Uempty
U1.18-F4
U1.17
U1.15-P1-V1 or U1.13
U1.9
U1.5
U1.1
FRU Name
Location Code
U1.17-P1-I10/Z1-A1
AIX
Location Code
3A-08-00-5,0
U1.9-P1/Z1
2s-08-00-8,0
Physical
Connection
Logical
Connection
AU1411.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 670 and 690.
The Service Guide for each type of system contains charts to look up the location
codes.
Unit 8. Devices
8-43
Instructor Guide
Major Assembly here refers to Planar 1 in the I/O drawer in the given rack
position
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain location code diagram.
Details Device location codes is a dramatic difference between the pSeries 670 and 690
and earlier pSeries models. The system administrator has no say over placement of
components in the system rack. When the system is installed, the rack location will play
into the AIX address of the component.
The location codes are listed for each system in their Service Guides so each
LPAR-capable systems location codes are not included in this course. Refer to the Service
Guides for the most accurate information for each type of system.
Additional Information On the POWER5 pSeries systems, the location codes are,
again, very different than what we are showing for the p670/p690 machines. The scheme
here is just one example of how a pSeries developer might design the physical location
code scheme. Remember to always check the documentation on the particular
machine/model for the physical location code scheme.
Transition Statement Let's look at how we can display these physical location codes.
Unit 8. Devices
8-45
Instructor Guide
status
Available
Available
Available
Available
Available
Available
Available
Defined
Available
Available
Available
Available
Available
physloc
location
P1
P1.1
P1
P1/S1
P1/Z1
P1/Z1-A3
P1/Z1-A0
P1/Z1-A4
P1/Z1-A5
10-b8
10-58
01-S1
10-80
10-80-00-3,0
10-80-00-0,0
10-80-00-4,0
10-80-00-5,0
P1/E1
P1.1-I3/T1
10-60
10-90
description
System Object
PCI Bus
PCI Bus
ISA Bus
Standard I/O Serial Port
Wide/Fast-20 SCSI I/O Controller
SCSI Multimedia CD-ROM Drive
4.0 GB 4mm Tape Drive
16 Bit SCSI Disk Drive
16 Bit SCSI Disk Drive
Memory
IBM 10/100 Mbps Ethernet PCI
IBM PCI Tokenring Adapter
AU1411.0
Notes:
Using lsdev to list location codes
The use of physical location codes is becoming more common, especially in working on
problem determination involving the physical devices in a pSeries system.
By default the lsdev command only shows the traditional AIX locations codes, but it
does allow us to ask for additional information.
The lsdev -C -H -F "name status physloc location description" displays the
output in a user-specified format. The physloc format option provides the physical
location of a device and the location format option provides the logical location of a
device.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show students how to display the physical location of a device.
Details Note that all the SCSI devices on the same bus have the same first part (P1/Z1)
of the physical location code and that the last part reflects the SCSI address of the device.
The integrated devices have location codes that are identified in the Service Guide for that
machine.
Additional Information
Transition Statement Let's move on to the definition of devices which are not
dynamically discovered by the cfgmgr command, specifically a tty attachment.
Unit 8. Devices
8-47
Instructor Guide
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
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To give a specific example of manually configuring a device.
Details Explain that cfgmgr works fine for most devices, but manual intervention is
needed on serial devices. This is just one example. Students need to realize that different
devices will have different settings. Printers have different characteristics than ASCII
terminals for example.
The examples are using SMIT but this can also be configured with the mkdev command.
Additional Information You might want to take a few minutes to point out the List,
Move, Change and Remove items on the menu. This is pretty consistent with all devices.
Transition Statement This visual showed how to specify what we what to add. Now, we
need to specify where to add it.
Unit 8. Devices
8-49
Instructor Guide
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
sa1
sa2
sa3
sa4
Available
Available
Available
Available
Available
AU1411.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.
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.
V3.1.0.1
Instructor Guide
Uempty
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.
Unit 8. Devices
8-51
Instructor Guide
Instructor Notes:
Purpose To show the how to determine the correct selection from the SMIT screens.
Details You will need to select the TTY Type, then select the port where the device is
attached. Point out that the location code clearly defines the physical port. Adapter names
sometime get confusing because they are numbered starting with 0. Port numbers and
adapter names do not match.
Additional Information Since we just talked about the 128-port async adapter, be sure
to point out the other adapters on the list.
Transition Statement Lets take a look at the device nomenclature for the example
were talking about before we continue with the Add a TTY screen.
V3.1.0.1
Instructor Guide
Uempty
Device Nomenclature
For the built-in serial connection, the nomenclature looks like this:
sa0
sa1
s1
s2
Built-in adapters
on system planar
Serial ports
sa2
sa3
sa4
16-Port
RAN
16-Port
RAN
16-Port
RAN
AU1411.0
Notes:
Pictorial view
This visual shows a picture and the associated nomenclature for the scenario were
discussing on adding a TTY.
Unit 8. Devices
8-53
Instructor Guide
Instructor Notes:
Purpose Show a picture of the scenario for the TTY were adding.
Details Point out the naming conventions.
Additional Information
Transition Statement Now that we know where it is attached, it is time to define the
terminal's characteristics. Let's take a look at that screen.
V3.1.0.1
Instructor Guide
Uempty
Add a TTY
Add a TTY
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP]
TTY type
TTY interface
Description
Parent adapter
* PORT number
Enable LOGIN
BAUD rate
PARITY
BITS per character
Number of STOP BITS
TIME before advancing to next port setting
TERMINAL type
FLOW CONTROL to be used
[MORE...31]
F1=Help
Esc+5=Reset
Esc+9=Shell
F2=Refresh
Esc+6=Command
Esc+0=Exit
[Entry Fields]
tty
rs232
Asynchronous Terminal
sa0
[]
+
disable
+
[]
+
[none]
+
[8]
+
[1]
+
[0]
+#
[dumb]
[xon]
+
F3=Cancel
Esc+7=Edit
Enter=Do
F4=List
Esc+8=Image
AU1411.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
Built-in serial port S2
8-Port Adapter
16-Port Adapter
Each 16-PORT RAN
s1
s2
0-7
0-15
0-15
Unit 8. Devices
8-55
Instructor Guide
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.
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the options for adding a serial terminal.
Details There are many settings that can be used for a serial terminal. There is only one
mandatory setting and that is the port number for the device.
The combination of parent adapter and port number provide the system with the
information to build the correct location code. In the case of the 128 port adapter, if the
device is attached to port 5 of the first RAN, the parent adapter would have been sa2
(based on our example) selected on the Parent Adapter screen and PORT number 05
selected on the Add a TTY screen. Thus, from this information, the location code
1P-03-11-05 would be derived.
Other settings that should be changed are:
Enable LOGIN - enable
TERMINAL type - the default terminal type is dumb, which has a very limited set of
available features and is not fully functional with IBM3151s and VT100s
BAUD rate - if the BAUD rate desired is not listed, such as 14400, it can be entered
directly into the field
Additional Information We are just giving a brief example of how to manually configure
a device. This shouldn't be a full discussion of ASCII terminals and TERMINFO databases.
Point out the Enable LOGIN, TERMINAL type, and BAUD rate lines. Explain briefly why
these lines are important and what are typical values for them. There is more information
on ASCII terminals in an Appendix.
Transition Statement This gives you an example of the steps required to manually
configure devices. Once all of your devices are configured, it is very important to document
your system. Let's look at the commands that do just that.
Unit 8. Devices
8-57
Instructor Guide
AU1411.0
Notes:
Commands to help document device configurations
Documentation is an important part of the system administrators job. Be sure to
document all device configurations for your machines.
The following commands are useful to help document your device configuration:
- lsdev -CH
Provides a listing all from the customized database. The -H option supplies headers
to the output for easier interpretation.
- lscfg -v
Provides a verbose detailed output of all of the devices on the machines. It includes
vital product data (VPD) which has information such as the manufacturer, type and
model, and part numbers. Not all devices have VPD.
V3.1.0.1
Instructor Guide
Uempty
Unit 8. Devices
8-59
Instructor Guide
Instructor Notes:
Purpose To show how to document the device configurations.
Details You should stress the importance of good documentation. Device configuration
is one area that must be documented. You should suggest that administrators create a
book for each system and keep track of all changes that are made to the system.
Cover the commands shown in the visual and student notes.
Additional Information
Transition Statement Let's take a look at some checkpoint questions to see how much
you remember.
V3.1.0.1
Instructor Guide
Uempty
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?
_______________________________________________
_______________________________________________
AU1411.0
Notes:
Unit 8. Devices
8-61
Instructor Guide
Checkpoint (2 of 2)
# lsdev
name
sys0
pci0
isa0
ppa0
lp0
sa0
tty0
mem0
scsi0
rmt0
hdisk0
ent0
-C H
status
Available
Available
Available
Available
Available
Available
Available
Available
Available
Defined
Available
Available
location
description
System Object
PCI Bus
10-58
ISA Bus
01-R1
Standard I/O Parallel Port Adapter
01-R1-00-00 IBM 4039 LaserPrinter
01-S1
Standard I/O Serial Port 1
01-S1-00-00 Asynchronous Terminal
Memory
10-80
Wide SCSI I/O Controller
10-80-00-3,0 5.0 GB 8 mm Tape Drive
10-80-00-4,0 SCSI Disk Drive
10-60
IBM PCI 10/100 Ethernet Adapter
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
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
Additional Information
Transition Statement Now, its time for an exercise on devices.
Unit 8. Devices
8-63
Instructor Guide
Exercise 8: Devices
List device configuration
List and change system parameters
Configure a tape device
Configure a CD-ROM device
AU1411.0
Notes:
Introduction
This lab gives you an opportunity to examine the device configuration of the classroom
system.
The exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Now, lets summarize what weve learned about devices.
Unit 8. Devices
8-65
Instructor Guide
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
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
Unit 8. Devices
8-67
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
Online
9-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Describe the terminology and concepts associated with:
Physical volumes
Volume groups
Logical volumes
Physical partitions
Logical partitions
Describe how file systems and logical volumes are
related
AU1411.0
Notes:
9-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for the unit.
Details
Additional Information
Transition Statement Lets start by defining the components of AIX storage.
9-3
Instructor Guide
AU1411.0
Notes:
Components
The basic components or building blocks of AIX storage are:
- Files
- Directories
- File systems
- Logical storage
- Physical storage
- Logical Volume Manager (LVM)
As a user, you work with files and directories. As a system administrator, you work with
the others as well.
9-4
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To provide a framework of discussion for the next three units.
Details This is meant to provide a road map of what will be covered in depth over the
next three units.
Additional Information
Transition Statement Before we discuss AIX storage, let's look at how UNIX systems
in general have traditionally handled disk storage.
9-5
Instructor Guide
Partition 1
Partition 2
Partition 5
Partition 3
PROBLEMS:
Fixed partitions
Expanding size of the partition
Limitation on size of a file system and a file
Contiguous data requirement
Time and effort required in planning ahead
Copyright IBM Corporation 2005
AU1411.0
Notes:
Issues with traditional UNIX disk storage
Traditionally, disk partitioning has been implemented via partitions. Customers had to
select the correct size for each partition before the system could be installed.
Each file system was on a partition on the hard disk.
Changing the size of the partition and thus the file system was no easy task. It involved
backing up the file system, removing the partition, creating new ones and restoring the
file system.
A major limitation to partitions was that each partition had to consist of contiguous disk
space. This characteristic limited the partition to reside on a single physical drive. It
could not span multiple hard disks. Since file systems were always contained within a
partition, no file system could be defined larger than the largest physical drive. This
meant that no single file could exist larger than the largest physical drive.
9-6
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the problems of managing the storage space without the LVM.
Details The visual highlights all the difficulties that can be incurred with other operating
systems. We will discuss how the LVM handles these problems in this unit.
A previous version of the course showed Free Space that was not part of a partition. This
was not accurate. The disk would be fully partitioned and some partition may not be
assigned to a use or the excess space would just be part of a largely under utilized
partition.
Additional Information
Transition Statement AIX has implemented the Logical Volume Manager designed to
address the limitations of traditional UNIX storage. Let's see what the benefits are before
delving into how it provides those benefits.
9-7
Instructor Guide
AU1411.0
Notes:
Constraints virtually eliminated
The constraints with traditional UNIX disk storage have been virtually eliminated in AIX
with the addition of the Logical Volume Manager.
Note that the tasks listed in the visual can be performed while users are on the system.
9-8
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the benefits of the Logical Volume Manager so students understand
the important role it plays in AIX.
Details Tell the students what the benefits are of the Logical Volume Manager (LVM)
and how it makes the life of the system administrator so much easier. If you have any
stories you can share with students on the difference in time it takes to reorganize
partitions and disk space in a traditional UNIX environment versus an AIX environment, do
so. Real life experiences can really bring home the benefits the facility brings to UNIX.
Be sure to mention that the benefits listed on the visual can all be accomplished while
users are on the system!
Additional Information
Transition Statement Lets begin our discussion of the LVM by defining the LVM
components.
9-9
Instructor Guide
Volume group
logical
logical
volumes
logical
volumes
Logical
volumes
volumes
physical
physical
physical
disks
physical
disks
Physical
disks
disks
volumes
Logical volume
LP0
PP20
LP1
PP42
Physical volume
LP2
PP52
Physical volume
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
9-11
Instructor Guide
Instructor Notes:
Purpose Give a brief overview of the LVM terms.
Details
Additional Information
Transition Statement Let's begin our look at the Logical Volume Manager by seeing
how physical disks are viewed by the operating system.
V3.1.0.1
Instructor Guide
Uempty
Physical Storage
Volume
group A
PV1
Volume
group B
PV2
PP1
PP2
PP3
PP4
PP5
PP6
PV3
PV4
Physical
volume
/dev/hdiskn
PV5
PPn
AU1411.0
Notes:
Introduction
Disk space on a physical volume (PV) is allocated to logical volumes (LVs) in chunks
called physical partitions (PPs). Each physical partition size is the same across all the
disks in a volume group (VG). The PP size is set at the time the VG is created. The size
is set in megabytes on power of two boundaries (for example: 4 MB, 8 MB, 16 MB, and
so forth). The default is 4 MB.
In AIX 5L V5.2 and later, LVM will default the PP size of a new VG to the smallest PP
size (equal or greater than 4 MB) which will allow full addressing of the largest disk in
the VG given the selected maximum number of PPs per PV (defaults to 1016). The
smallest PP size is 1 MB, which is supported by using a larger number of PPs per PV.
When a PV is added to a system, a file called hdiskn is added to the /dev directory. n is
a number allocated by the operating system. It is usually the next available number.
This file may be used to access the device directly but this is not often done.
9-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss physical storage and the limits of physical partitions (PPs) per
physical volume (PV) for normal and big volume groups.
Details Make sure the students understand that increasing the -t factor will decrease the
number of PVs in the volume group.
You might want to explain why this is important. Since many older installations already exist
with volume groups using disks that are 4 GB in size or less, these were most likely set up
with 4 MB PPs. Most disks sold today are greater than 4 GB in size. If a customer wants to
add one of these larger disks to an existing volume group with 4 MB PPs, they will
encounter the limitation of 1016 PPs per PV. So, the choice is to backup and restore the
volume group and change the PP size or change the -t factor dynamically. Increasing the
-t factor will allow the larger disk to be introduced to the VG.
The exception to the 128 PVs per VG limit is rootvg. If one disk is used at install time for
rootvg, then the maximum PVs for rootvg is 7. This maximum is incremented by one for
each additional disk used at install time (that is, 2 PVs for rootvg at install means a
maximum of 8 PVs in rootvg, 3 used means a maximum of 9 and so on). This maximum is
actually referred to as a reference number because it may be possible to add even more
disks to rootvg, depending on the size and number of disks already defined for rootvg.
Additional Information
Transition Statement We can group together a number of physical volumes into a
volume group. Let's take a closer look at volume groups.
9-15
Instructor Guide
Volume Groups
Volume group
types:
Normal
Big
Scalable
Volume Group
Type
Max
PVs
Max LVs
Max PP
Size
Normal
32
256
32512
(1016 * 32)
1 GB
Big
128
512
130048
(1016 * 128)
1 GB
Scalable
1024
4096
2097152
128 GB
Limits
rootvg
datavg
PV1
PV2
PV3
PV4
AU1411.0
Notes:
Volume group types
With successive versions of AIX, new type of volume groups have been introduced
which allow for greater capacities and greater flexibility:
- Normal volume groups
When creating a volume group with SMIT or using the mkvg command, normal
volume groups are the default.
- Big volume groups
Big volume groups were introduced with AIX V4.3.2. A big volume group must be
created using the command line command mkvg -B. Besides increasing the number
of PVs per VG, the big volume group also doubled the maximum number of LVs per
VG from 255 to 512. Support for creating big volume groups via SMIT was
introduced in AIX 5L V5.3.
V3.1.0.1
Instructor Guide
Uempty
9-17
Instructor Guide
Instructor Notes:
Purpose Expand on the different types of volume groups and their limits. Also, define
the advantages of separate VGs.
Details We haven't discussed how to create a volume group yet. The command mkvg is
new to the students. However, since we discussed the concept of a volume group and the
maximums for volume groups, it is important to introduce the concept of big VGs, scalable
VGs and factors.
Existing volume groups can be converted to scalable or big volume groups and the -t factor
can be changed as well. Both of these can be done dynamically. To modify an existing VG,
the command is chvg instead of mkvg.
Discuss the main reasons for having external VGs as opposed to internal, and what
considerations have to be made when adding a new disk to the system.
The rootvg includes paging space, the journal log, boot data and dump storage usually
each in its own logical volume. The rootvg has attributes that differ from the user-created
VGs. For example, it cannot be imported or exported (moved) like other VGs can.
Point out that VGs can contain disks of different sizes. Only the physical partitions within a
VG must be the same size.
Additional Information Once a volume group is converted to big or scalable, it cannot
be converted back dynamically. It also cannot be used on earlier versions of AIX that don't
support big volume groups.
Transition Statement There is a portion of the disk which holds all the administrative
information related to the VG in terms of the PVs and the LVs. It is called the Volume Group
Descriptor Area (VGDA).
V3.1.0.1
Instructor Guide
Uempty
Two disk VG
VGDA
VGDA
VGDA
VGDA
VGDA
VGDA
VGDA
VGDA
VGDA
AU1411.0
Notes:
Volume Group Descriptor Area (VGDA)
The Volume Group Descriptor Area (VGDA) is an area of disk, at least one per PV,
containing information for the entire VG. It contains administrative information about the
volume group (for example, a list of all logical volume entries, a list of all the physical
volume entries and so forth). There is usually one VGDA per physical volume. The
exceptions are when there is a volume group with either one or two disks (as shown in
the visual).
Quorum
There must be a quorum of VGDAs available to activate the volume group and make it
available for use (with the varyonvg command). A quorum of VGDA copies is needed
to ensure the data integrity of management data that describes the logical and physical
volumes in the volume group. A quorum is equal to 51% or more of the VGDAs
available.
Copyright IBM Corp. 1997, 2005
9-19
Instructor Guide
A system administrator can force a volume group to varyon without a quorum. This is
not recommended and should only be done in an emergency.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the purpose of the VGDA.
Details The way the system determines if an entire VG is going to be activated or not is
by checking the quorum for a particular VG. If more than 51% of the VGDAs are good, then
it will bring the VG online. If it also notices any backdated VGDAs, the LVM will update
these too.
Make sure the students are clear that all VGDAs within a VG should be the same.
Out of the different configurations shown, the most dangerous one out of the three is the
second one - having two disks in a volume group, because if the disk that contains the two
VGDAs goes down, the quorum will be lost and the VG will be taken off line. However,
remember that many students probably have a two disk setup, so try not to alarm them too
much, and tell them that when/if they bring in another disk into their two disk VG, the
environment will be far more stable.
Point out the maximum PVs allowed per VG.
Additional Information In general, the VGDA can expand and take up as much space
on the disk as is needed. This is true for all VGs except for the rootvg, whose VGDA size is
set at installation time and cannot be changed. The VGDA is fixed at install time to allow it
to fit into memory when booting. This is the reason why the rootvg can only be extended
by a few disks after installation and the reason that rootvg should only contain the
operating system.
It is also possible to have a non-quorum volume group. The purpose of these types of
volume groups is to have data continuously available even when there is no quorum. This
may be desirable in a two or three disk volume group where logical volumes are mirrored.
Thus, if a disk failure occurs, the VG remains active as long as there is one logical volume
copy intact on a disk. To initially activate a non-quorum volume group, all of the volume
group's physical volumes must be accessible or the activation fails. Because non-quorum
volume groups stay online until the last disk becomes inaccessible, it is necessary to have
each disk accessible at activation time. This information is being placed in the Additional
Information section since we have not yet introduced the concept of logical volumes and
mirroring.
Transition Statement Now that we know the physical storage information, let's take a
look at the logical entities.
9-21
Instructor Guide
Logical Storage
Physical volumes
1
7
13
19
25
31
35
41
47
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
1
7
13
19
25
31
35
41
47
4
10
16
22
28
34
38
44
50
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
4
10
16
22
28
34
38
44
50
Logical
volume
Logical
Partitions
Logical
volume
Copyright IBM Corporation 2005
AU1411.0
Notes:
Logical partition
A physical partition is the smallest unit of allocation of disk. Each logical partition maps
to a physical partition which physically stores the data.
Obviously, the logical partitions within a volume group are the same size as the physical
partitions within that volume group.
Logical volume
A logical volume consists of one or more logical partitions within a volume group.
Logical volumes may span physical volumes if the volume group consists of more than
one physical volume. Logical volumes do not need to be contiguous within a physical
volume because the logical partitions within the logical volume are maintained to be
contiguous. The view the system sees is the logical one. Thus, the physical partitions
they point to can reside anywhere on the physical volumes in the volume group.
9-22 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Logical volumes may be increased in size at any time, assuming that there are sufficient
free physical partitions within the volume group. This can be done dynamically through
SMIT even when users are doing work in that logical volume. However, logical volumes
cannot easily be decreased and require a file system backup and restore to a
re-created smaller logical volume.
The mapping of which logical partition corresponds to which physical partition is
maintained in the VGDA for the volume group. It is both a physical view and a logical
view.
LVM mapping
The Logical Volume Manager (LVM) consists of the logical volume device driver (LVDD)
and the LVM subroutine interface library. The LVM controls disk resources by mapping
data between a more simple and flexible logical view of storage space and the actual
physical disks. The LVM does this using a layer of device driver code that runs above
traditional disk device drivers.
9-23
Instructor Guide
Instructor Notes:
Purpose Define the terms LV and LP.
Details Define the terms in connection with the physical side of things. Also point out:
Data can be placed on any disk/partition within the VG. This will obviously cause
fragmentation, as there are no restrictions as to where the data should be placed. The
operating system needs to have a contiguous view of all the data and so it creates LVs.
The naming convention used for system defined LVs is /dev/hdx and for user created
LVs (if a name is not specified) is /dev/lvxx.
An LV can only contain one file system. Although we have not defined file systems yet,
it is important to mention this here and warn the students that there will be more on file
systems coming up. It is very important to establish a clear relationship between an LV
and a file system and to stress that these go hand in hand.
A LP is always the same size as a PP.
More details on the AIX physical partition enhancements will be covered in the next unit.
Additional Information
Transition Statement Now that you know what a logical volume is, how are they used?
V3.1.0.1
Instructor Guide
Uempty
/home
/usr
/tmp
/
/var
/opt
/myfilesystem)
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
When you install the system, you automatically create one volume group (rootvg)
which consists of a base set of logical volumes required to start the system. rootvg
contains such things as paging space, the journal log, and boot data, each usually in its
own separate logical volume.
You can create additional logical volumes with the mklv command or go through the
SMIT menus. This command allows you to specify the name of the logical volume and
to define its characteristics.
9-25
Instructor Guide
Journal log
The journal log is the logical volume where changes made to the file system structure
are written until such time as the structures are updated on disk. Journaled file systems
and enhanced journaled file systems is 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.
Dump device
When you install the operating system, the dump device is automatically configured for
you. By default, the primary device is /dev/hd6, which is the paging logical volume, and
the secondary device is /dev/sysdumpnull. For systems migrated from versions of AIX
earlier than V4.1, the primary dump device is what it formerly was, /dev/hd7.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the uses of LVs.
Details LVs can contain a number of different types of entities, the most common being
the journaled file system (JFS) or enhanced journaled file system (JFS2).
Encourage the students to recognize standard system-defined LV names. For example,
/dev/hd6 will always contain one of the paging spaces.
Do not explain in detail each of the named LVs.
This visual is meant to be a transition to an overview of the file system. What you are trying
to accomplish is to show the connection between a logical volume and a file system early in
the storage discussion. Once students see this connection, the rest of the concepts should
make more sense to them.
Discussion Items - Ask if anyone has set up raw LVs and if so for what?
Raw LVs are usually used by databases which require empty devices for them to place and
manage the data on. Databases usually use their own data structures and do not use an
AIX file system.
Additional Information
Transition Statement The most common use for a logical volume is as a file system.
Let's see what that is.
9-27
Instructor Guide
AU1411.0
Notes:
Introduction
A file system is a directory hierarchy for storing files. It has a root directory and
subdirectories. In an AIX system, the various file systems are joined together so that
they appear as a single file tree with one root. Many file systems of each type can be
created.
Because the available storage is divided into multiple file systems, data in one file
system could be on a different area of the disk than data of another file system.
Because file systems are of a fixed size, file system full errors can occur when that file
system has become full. Free space in one file system cannot automatically be used by
an alternate file system that resides on the same physical volume.
V3.1.0.1
Instructor Guide
Uempty
9-29
Instructor Guide
Instructor Notes:
Purpose Define what a file system is.
Details You can have many different file systems connected under the hierarchical tree.
However, from an end user's point of view, everything looks the same.
The student should be familiar with the concept of files and directories.
Typically, the students will be using JFS or JFS2 file systems, the default types of file
systems for AIX. We will consider journaling a little later on. But, these are files that exist on
your local disks. However, there is a feature where remote file systems can also be made
to appear as if they belong and reside on your local disks, this being network file systems.
We will not be discussing NFS in this course. There are also cache file systems that are
related to NFS. Students may discover this when creating file systems.
Additional Information JFS and JFS2 use journaling techniques to maintain their
structural integrity. This will be discussed in more detail later in this unit. The network file
system (NFS) is a distributed file system that allows users to access files and directories
located on remote computers and use them as if they were on the local system. Further
discussion of this type of file system is beyond the scope of this course. CD-ROM file
system is a type that allows access to the contents of a CD-ROM through normal file
system interfaces.
Discussion Items - Ask the students if they know what the CD-ROM file system is
commonly used for?
Answer: In AIX V4.2 and earlier, the CD-ROM file system was often used for InfoExplorer.
In AIX V4.3 and later, the CD-ROM file system may be used for the Web-based
documentation.
There is a another file system, PROCFS, it is not actually on any disk but is mapped to
memory for used by the operating system in recording stats.
Transition Statement Why do we use file systems in AIX?
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Benefits
A file system is a structure that allows you to organize your data. It is one level in the
hierarchy of you data. By placing data in separate file systems, it allows for ease of
control and management of the data.
File systems can be placed on the disk in areas that provide the best performance.
Many times, backups and recoveries are done at a file system level.
9-31
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the benefits of file systems.
Details A file system is an entity that you can control for performance reasons by
moving it to a specific place on the disk. This is possible because a file system resides on a
LV, which in turn can be placed anywhere on the disk. Also, for security reasons you can
unmount (make inaccessible) the data at specific times.
Limits can also be set on a per file system basis, limiting users on the amount of disk space
available to them.
Integrity checks can be carried out on a per file system basis.
Additional Information
Transition Statement Let's look at the standard file systems in AIX.
9-33
Instructor Guide
home
hd1
opt
sbin
lpp
proc
usr
mnt
etc tmp
hd10opt
hd2
hd9var
hd3
csm freeware
bin
lib
sbin
AU1411.0
Notes:
Initial file systems
When AIX is first installed on a standalone system there are only six journaled file
systems and one pseudo file system (/proc) in existence:
- / (root) = /dev/hd4
At the top of the hierarchical file tree. It contains the files and directories critical for
system operations including the device directory and programs that complete the
boot process.
- /usr = /dev/hd2
Operating system commands, libraries and application programs. Can be shared
across the network.
V3.1.0.1
Instructor Guide
Uempty
- /var = /dev/hd9var
Variable spool and log files. The files in this file system vary considerably depending
on system activity.
- /home = /dev/hd1
Users' home directories (was /u in earlier versions of AIX). This is traditionally where
user data files are stored.
- /tmp = /dev/hd3
Space accessible to all users for temporary files and work space. Should be cleared
out frequently.
- /opt = /hd10opt
Special file system to store freeware files.
- /proc = /proc
Special pseudo file system kept in memory to support threads, or light weight
processes. This file system is not designed to store user files. It is a type of file
system which is different from a journal file system.
9-35
Instructor Guide
Instructor Notes:
Purpose Define the standard AIX file systems.
Details The picture shows all the default AIX file systems connected to their default
mount points. Explain that each file system connects to the tree by an empty directory
which is commonly known as the mount point.
Also, highlight that every file system must reside on a logical volume. Remind the students
of the default AIX file systems and their logical volumes which have all been labeled on the
diagram.
Have a discussion as to how big the file systems are, pointing out that /usr is the largest.
As the system is customized, these file systems can be extended to hold new applications
and user data, or new file systems can be created. The choice as to when and how to do
this depends upon the users and applications on the system. The usual recommendations
are not to add user applications or data to /, /usr or /var because these will be removed if
the system is ever reinstalled, and only use /tmp as a scratch area. Create new file
systems as needed for applications and data.
Additional Information On a networked system, diskless/dataless or in a code serving
environment, some (or all) of these may be remotely accessed via the Network File System
(NFS).
/lib is actually a symbolic link to /usr/lib. /bin is actually a symbolic link to /usr/bin.
Transition Statement Let's take a moment to review the terms we have just learned.
V3.1.0.1
Instructor Guide
Uempty
Lets Review
5. V______ G______
1. V______ G______
D ______ A______
VGDA
6. P______ V______
2. P______ P ______
3. L_____ P______
4. L______ V_______
Copyright IBM Corporation 2005
AU1411.0
Notes:
Instructions
Label the items shown in the picture above.
9-37
Instructor Guide
Instructor Notes:
Purpose Give the students a chance to review the different terms.
Details This is a usually a good place for a break. During the break have the students
label the items on the visual to review the terminology.
1. Volume Group___
Descriptor Area__
VGDA
6. Physical Volume
2. Physical Partition
3. Logical Partition
4. Logical Volume
Copyright IBM Corporation 2005
Additional Information As you are going over the answers, also review these points
with the students.
PVs have a naming convention of /dev/hdiskx where x is a number allocated by the
operating system. It is usually the next available number.
A PV can only belong to one VG.
There can be many VGs defined on one system. These can be used to separate out the
operating system from the application code, from the application data, and so forth.
There can be up to 255 VGs per system.
The default VG that contains the operating system is rootvg which is created by
default.
V3.1.0.1
Instructor Guide
Uempty
Since most disks are larger than 4 GB, the PP size will normally need to be changed.
PP size can be changed in increments of the power of 2 up to 1024 MB, unless the
-t factor is changed or a scalable VG is used.
The default limit for the number of physical partitions per physical volume is 1016. AIX
provides support for multiples of 1016 PPs per PV, up to a maximum of 130,048 PPs
per PV. Be aware that if you choose to have more than 1016 PPs per PV, you will
decrease the maximum number of physical volumes supported in the volume group.
Again this is for non-scalable VGs. Scalable VGs do not use the -t factor and do not
have this trade off for a given PV; With scalable VGs, the maximum PPs are managed
as a pool for the entire VG.
Transition Statement Lets continue by discussing the /etc/filesystems file.
9-39
Instructor Guide
/etc/filesystems
/:
dev
vol
mount
check
vfs
log
type
=
=
=
=
=
=
=
/dev/hd4
root
automatic
false
jfs
/dev/hd8
bootfs
/home:
dev
vol
mount
check
vfs
log
=
=
=
=
=
=
/dev/hd1
/home
true
true
jfs
/dev/hd8
/home/team01:
dev
=
vfs
=
log
=
mount
=
options
=
account
=
/dev/fslv00
jfs2
/dev/loglv00
true
rw
false
Copyright IBM Corporation 2005
AU1411.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.
For local mounts, identifies either the block special file where the file
system resides, or the file or directory to be mounted.
V3.1.0.1
Instructor Guide
Uempty
vol
Used by the mkfs command when initiating the label on a new file
system.
mount
true
false
check
vfs
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
9-41
Instructor Guide
Instructor Notes:
Purpose Describe the contents of the /etc/filesystems file.
Details The /etc/filesystems file serves two purposes:
Documents the layout characteristics of the file system
Frees the person who sets up the file system from having to enter and remember items
such as the device where the file system resides, because the information is defined in
this file
Each stanza names the directory where the file system is normally mounted.
Note: From AIX File System Development - Austin, the free parameter in /etc/filesystems
free = true
is there because it is a component of traditional UNIX systems. The df command in
traditional UNIX would use it to determine which file systems to report. It is totally ignored
by any and all AIX commands.
Additional Information UNIX system administrators who are familiar with other flavors
of UNIX may wish to compare this file to /etc/fstab or /etc/vfstab.
Transition Statement In the /etc/filesystems file the term mount is used. What is
mounting?
V3.1.0.1
Instructor Guide
Uempty
Mount
mount is the glue that logically connects file systems to the
directory hierarchy
File systems are associated with devices represented by
special files in /dev (the logical volume)
When a file system is mounted, the logical volume and its
contents are connected to a directory in the hierarchical tree
structure
# mount
/dev/lv00
What to
mount
/home/patsie
Where to
mount it
Copyright IBM Corporation 2005
AU1411.0
Notes:
Mounting a file system
A file system has to be mounted in order for it to be available for use. Use the mount
command or SMIT to do this. The file system can also be umounted using the umount or
unmount command, or SMIT. These commands can be executed by either the root
user or a member of the system group.
It is possible to have file systems automatically mounted at boot time. This can be
specified in the /etc/filesystems file using the mount=automatic or mount=true
parameters.
Mount points
Full path names must be used when specifying the mount point. If SMIT is used to
create the file system, the mount point is created automatically.
9-43
Instructor Guide
Instructor Notes:
Purpose To describe what mounting is.
Details The process of mounting is a key piece to understanding how the individual file
systems are joined to form the view of the system the user sees. A file system has to be
mounted in order for it to be available for use.
The mount command has many options. The visual shows an example of this command. In
the example, /dev/lv00 is the logical volume and /home/patsie is the mount point. This is
the mount point that we will use in the examples on the next two pages. The mount point is
always a directory and it should be empty.
Additional Information mount=automatic is reserved for those file systems, such as
/ (root), which are necessary for the boot process. The attribute of mount=true is the
proper way to automatically mount a user defined file system at system reboot.
Transition Statement Let's look at the directory tree structure before and after a file
system is mounted.
V3.1.0.1
Instructor Guide
Uempty
After...
home
home
liz
john
patsie
data
doc
liz
john
patsie
.profile
.exrc
myscript
.profile
.exrc
myscript
data
doc
AU1411.0
Notes:
Accessing data in a file system
In order for users to get access to the data contained in a file system, it must be
mounted. When the file system is mounted, it becomes a part of the hierarchical tree
structure of files and directories. From the users perspective, there is no way to tell
where one file system ends and another begins.
9-45
Instructor Guide
Instructor Notes:
Purpose Show how file systems are connected to form a single view to users.
Details Discuss how even though each file system is a separate entity, they are
connected together via the mount point directories so that the system of files and
directories are seen as one large file system to end users.
In the example shown, /home/patsie is the mount point. Again, mention that the mount
point must be a directory and it should be empty. The next page will illustrate what happens
if the mount point is not empty.
Additional Information While the student notes state that the user does not see the
difference between file systems, this is only true for the navigation of the tree structure.
There are situations where the user will be aware of working with separate file systems. For
example, hard links can only be built if the source and target are in the same file system;
otherwise a symbolic link must be used. Another example is the use of the mv command
with very large files. If the source and target are in the same file system, then mv is an
almost instantaneous rename. If they are in different file systems, then the data has to be
copied to the target file system before deleting the original file and the move takes much
longer.
Transition Statement Since file systems can be mounted on a directory which has the
required permissions, they can be mounted over directories that have files in them. Let's
see what happens if you do this.
V3.1.0.1
Instructor Guide
Uempty
After...
home
home
liz
john
reports
patsie
liz
john
patsie
.profile
.exrc
pgms
.profile
.exrc
myscript
.profile
.exrc
myscript
data
data
doc
doc
AU1411.0
Notes:
What happens when mounting over files?
It is possible to mount over files and subdirectories. The result is that the files and
subdirectories that have been mounted over are now hidden from the users, that is,
inaccessible. They have not been lost though. They are again accessible when the
unmount command has been executed on the covering file system.
Not everyone has the authority to mount file systems randomly. Authority is based on
two things: what the default mount point is, as specified in the file /etc/filesystems, and
whether the user has write authority to that mount point. Users can issue file or directory
mounts provided they belong to the system group and have write access to the mount
point. They can do device mounts only to the default mount points mentioned in the file
/etc/filesystems. root can mount anywhere under any set of permissions.
9-47
Instructor Guide
Instructor Notes:
Purpose Show that file systems can be mounted over existing files and directories.
Details Simply show students how this can happen and stress that the files don't go
anywhere, they are still there. They simply can't be accessed while the file system is
mounted over the directory that contains the files.
Additional Information
Transition Statement How can you tell what file systems are on the system?
V3.1.0.1
Instructor Guide
Uempty
# lsfs
Name
/dev/hd4
/dev/hd1
/dev/hd2
/dev/hd9var
/dev/hd3
/dev/cd0
/dev/lv00
/proc
/dev/hd10opt
Nodename
----------
Mount Pt
/
/home
/usr
/var
/tmp
/infocd
/home/john
/proc
/opt
VFS
jfs
jfs2
jfs
jfs
jfs
cdrfs
jfs2
procfs
jfs
Size
Options
32768
-90112
-1277952 -65536
-65536
--ro
32768
rw
--65536
--
Auto Accounting
yes no
yes no
yes no
yes no
yes no
yes no
yes no
yes no
yes no
AU1411.0
Notes:
The lsfs command
You can list the various file systems that are defined using the lsfs command. This
command displays information from /etc/filesystems and from the logical volumes in a
more readable format. The lsfs command also displays information about CD-ROM
file systems and remote NFS file systems.
The SMIT fastpath to get to the screen which will accomplish the same task as the lsfs
command is: smit fs.
The syntax for the lsfs command is:
lsfs [-q] [ -c | -l ] [ -v vfstype | -u mountgrp ][file system]
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.
Copyright IBM Corp. 1997, 2005
9-49
Instructor Guide
Instructor Notes:
Purpose List all the file systems defined on the system.
Details The information displayed is as follows:
Name
Nodename
Mount Pt
VFS
Size
Options
Auto
Account
Please note that when the lsfs command is executed, the output of the command will be
slightly different if accounting is on as accounting information will also be shown.
Additional Information
Transition Statement Let's see how we can list all the logical volumes on a system.
V3.1.0.1
Instructor Guide
Uempty
# lsvg -l rootvg
LVNAME TYPE
hd6
paging
hd5
boot
hd8
jfslog
hd4
jfs
hd2
jfs
hd9var jfs
hd3
jfs
hd1
jfs2
hd10opt jfs
lv00
jfs2
LPs
64
1
1
2
156
1
3
1
2
2
PPs
64
1
1
2
156
1
3
1
2
2
PVs
1
1
1
1
1
1
1
1
1
1
LV STATE
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
MOUNT POINT
N/A
N/A
N/A
/
/usr
/var
/tmp
/home
/opt
/home/john
AU1411.0
Notes:
Viewing logical volume information
lsvg -l rootvg
Provides information about the logical volumes in the rootvg volume group.
lslv lvname
This provides status information about the selected logical volume within the volume
group. For example, lslv hd6.
9-51
Instructor Guide
Instructor Notes:
Purpose List the attributes of a logical volume.
Details Do not spend too much time going through all the attributes. This will be covered
in more detail in the next unit.
Additional Information
Transition Statement Now, its time for some checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint (1 of 3)
1. How many different physical partition (PP) sizes can be
set within a single VG? ____________
2. By default, how big are PPs?
____________________________________________
____________________________________________
AU1411.0
Notes:
9-53
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (1 of 3)
1. How many different physical partition (PP) sizes can be
set within a single VG? One
2. By default, how big are PPs? Traditionally 4 MB, but
LVM will choose an optimal size based on the #PPs/PV
and the size of largest PV in the VG.
3. How many volume groups (VGs) can a physical volume
(PV) belong to?
a) Depends on what you specify through SMIT
b) Only one
c) As many VGs as exist on the system
4. True or False? All VGDA information on your system is
identical, regardless of how many volume groups (VGs)
exist. False. All VGDAs within a VG are the same.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Lets continue with more checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint (2 of 3)
Use the following output to answer the questions below:
# lsfs
Name
Nodename Mount Pt
/dev/hd4
-/
/dev/hd1
-/home
/dev/hd2
-/usr
/dev/hd9var -/var
/dev/hd3
-/tmp
/dev/hd10opt -/opt
/dev/cd0
-/infocd
/dev/lv00
-/home/john
VFS
jfs
jfs
jfs
jfs
jfs
jfs
cdrfs
jfs
Size Options
8192
-90112
-507904
-8192
-16384
-65536
-ro
8192
rw
Auto
yes
yes
yes
yes
yes
yes
yes
yes
Accounting
no
no
no
no
no
no
no
no
5.
With which logical volume is the /home file system associated? __________
6.
7.
What is the mount point for the file system located on the /dev/lv00 logical
volume? ________________________
8.
Which are the system supplied logical volumes and their associated file
systems? ______________________________________________________
_______________________________________________________________
9.
Which file system is used primarily to hold user data and home directories?
____________________
Copyright IBM Corporation 2005
AU1411.0
Notes:
9-55
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (2 of 3)
Use the following output to answer the questions below:
# lsfs
Name
Nodename Mount Pt
/dev/hd4
-/
/dev/hd1
-/home
/dev/hd2
-/usr
/dev/hd9var -/var
/dev/hd3
-/tmp
/dev/hd10opt -/opt
/dev/cd0
-/infocd
/dev/lv00
-/home/john
VFS
jfs
jfs
jfs
jfs
jfs
jfs
cdrfs
jfs
Size Options
8192
-90112
-507904
-8192
-16384
-65536
-ro
8192
rw
Auto
yes
yes
yes
yes
yes
yes
yes
yes
Accounting
no
no
no
no
no
no
no
no
5.
With which logical volume is the /home file system associated? /dev/hd1
6.
What type of file systems are being displayed? Journaled file systems (JFS),
enhanced journaled file systems (JFS2), and CD-ROM (CDRFS)
7.
What is the mount point for the file system located on the /dev/lv00 logical
volume? /home/john
8.
Which are the system supplied logical volumes and their associated file
systems? /dev/hd4 (/), /dev/hd1 (/home), /dev/hd2 (/usr), /dev/hd9var (/var),
/dev/hd3 (/tmp), /dev/hd10opt (/opt)
9.
Which file system is used primarily to hold user data and home directories?
/home
Copyright IBM Corporation 2005
Additional Information
Transition Statement Lets continue with more checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint (3 of 3)
Use the following output to answer the question below:
# lsvg -l rootvg
LVNAME
hd6
hd5
hd8
hd9var
hd3
lv00
TYPE
paging
boot
jfslog
jfs
jfs
jfs2
LPs
8
1
1
1
2
1
PPs
8
1
1
1
2
1
PVs
1
1
1
1
1
1
LV State
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
closed/syncd
MOUNT POINT
N/A
N/A
N/A
/var
/tmp
/home/john
AU1411.0
Notes:
9-57
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (3 of 3)
Use the following output to answer the question below:
# lsvg -l rootvg
LVNAME
hd6
hd5
hd8
hd9var
hd3
lv00
TYPE
paging
boot
jfslog
jfs
jfs
jfs2
LPs
8
1
1
1
2
1
PPs
8
1
1
1
2
1
PVs
1
1
1
1
1
1
LV State
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
closed/syncd
MOUNT POINT
N/A
N/A
N/A
/var
/tmp
/home/john
Additional Information
Transition Statement Now, lets do an exercise.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0.
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
9-59
Instructor Guide
Instructor Notes:
Purpose Review the exercise.
Details
Additional Information
Transition Statement Lets summarize what weve learned in this unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
The LVM is organized as follows:
A volume group consists of one or more physical volumes
Each physical volume is divided into physical partitions
A logical volume is made up of logical partitions
Logical partitions are mapped to physical partitions
Logical volumes are used to contain:
JFS or JFS2 file systems
Journal log
Paging space
Dump space
Boot logical volume
Raw space
The most common use of logical volumes is to contain JFS
or JFS2 file systems
Copyright IBM Corporation 2005
AU1411.0
Notes:
9-61
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, unto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
Online
GG24-4484
SG24-5432
SG24-5433
10-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Add, change, and delete:
Volume groups
Logical volumes
Physical volumes
Describe mirroring
Describe striping
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe unit objectives.
Details This unit will go into much greater depth on working with the components
managed by the Logical Volume Manager. SMIT screens will be used for more complex
activities whereas commands that are simple to remember and use will be shown.
Transition Statement Let's look at how SMIT can be used to manage the Logical
Volume Manager.
10-3
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
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.
10-5
Instructor Guide
Instructor Notes:
Purpose Define the options available through SMIT for the LVM.
Details Use this visual as a roadmap to further discussion of the Logical Volume
Manager and its structure. If you have two overhead projectors you may wish to leave this
up until you get to the next SMIT visual for volume groups. We will consider the first three
options of the screen in this unit. The paging space option will be described in the Paging
Space unit.
Additional Information
Transition Statement First, let's do a quick review of volume group concepts.
V3.1.0.1
Instructor Guide
Uempty
10-7
Instructor Guide
Volume Groups
Volume group
PV
PV
AU1411.0
Notes:
Physical volume
A physical volume is an actual disk or hard disk. There is a limit of 128 physical volumes
per volume group unless it is a scalable volume group which can have up to 1024
physical volumes. A physical volume that supports removable media should be
assigned to a volume group containing itself and no other members.
Volume group
A volume group is a collection of related physical volumes on a processor that:
- Are not members of another volume group
- Share a single physical partition size
When you install your AIX system, one volume group called rootvg is automatically
created.
There can be a maximum of 255 volume groups per system.
10-8 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To review the concept of volume groups.
Details Logical Volume Manager concepts are important for system administrators to
understand and yet they can be difficult at first to grasp. For this reason, it is important to
briefly review each component before going into more detail.
Additional Information
Transition Statement Let's look at how SMIT supports working with volume groups.
10-9
Instructor Guide
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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 these items throughout the course.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the options available for volume groups.
Details In the next few visuals, we will describe many of the options listed on this
screen. We will also identify the high-level command which can be used to carry out the
equivalent operation.
This course does not describe the three options regarding mirroring a volume group. These
options are supported in AIX V4.2.1 and later. The mirroring options execute the
commands mirrorvg, unmirrorvg and syncvg. The rootvg volume group can also be
mirrored. All logical volumes within a volume group can be mirrored.
Point out that the last five options deal with backing up the volume group. These options
will be considered in the Backup and Restore unit.
Additional Information
Transition Statement Let's see how information about the volume group can be
extracted.
10-11
Instructor Guide
# lsvg
rootvg
payrollvg
# lsvg -o
rootvg
AU1411.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).
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List volume group information.
Details The lsvg -o command lists only those volume groups that are varied on.
On the SMIT Volumes Group menu, there is an option, List Contents of a Volume
Group. This option allows you to view volume group information three ways: status, by
physical volumes and by logical volumes. We will look at viewing the status first.
Additional Information
Transition Statement We'll next view the contents of a particular volume group.
10-13
Instructor Guide
# lsvg rootvg
VOLUME GROUP:
VG STATE:
VG PERMISSION:
MAX LVs:
LVs:
OPEN LVs:
TOTAL PVs:
STALE PVs:
ACTIVE PVs:
MAX PPs per VG:
MAX PPs per PV:
LTG size (Dynamic):
HOT SPARE:
rootvg
active
read/write
256
11
10
2
0
2
32512
1016
256 kilobyte(s)
no
VG IDENTIFIER:
PP SIZE:
TOTAL PPs:
FREE PPs:
USED PPs:
QUORUM:
VG DESCRIPTORS:
STALE PPs:
AUTO ON:
000bc6fd00004c00000000e10fdd7f52
16 megabyte(s)
1084 (17344 megabytes)
1032 (16512 megabytes)
52 (832 megabytes)
2
3
0
yes
MAX PVs:
AUTO SYNC:
BB POLICY:
32
no
relocatable
AU1411.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)
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List volume group information.
Details Go through each attribute associated with the volume group. Rather than telling
the students what each attribute sets, ask the following questions:
How many disks does rootvg have?
Two
What is an open logical volume and why do you think one of the logical volumes is
closed?
An open logical volume is a logical volume that can be accessed and used. In
general, all logical volumes are open except one, the boot logical volume, which by
default is always closed. This logical volume is used to boot up the system and once
the boot is complete it will not be used until the next boot of the system. For this
reason, there is no need to have this logical volume open. Also, if this logical volume
is corrupted then your system might not boot up. So by closing the logical volume,
there is less chance of corruption occurring.
You might feel that this level of detail is too much at this stage. If so, you may wish to
discuss this during the logical volume topic in this unit. Either way, ensure that you do
describe this at some point.
How much free space is there in this volume group?
1032 physical partitions which makes 16512 MB
How many VGDAs should this system have and is this correct?
There should be three VGDAs as there are two disks in this system.
What is the logical track group size in this volume group?
256 KB, the default size.
Are hot sparing and automatic synchronous turned on?
No, they are off by default.
Additional Information MAX PPs per PV, and MAX PVs apply to AIX V4.3.1 and later.
LTG size, HOT SPARE, and AUTO SYNC apply to AIX 5L V5.1 and later.
Transition Statement We'll next view volume group information by physical volume and
by logical volume.
10-15
Instructor Guide
lsvg -p rootvg
rootvg:
PV_NAME
hdisk0
hdisk1
PV STATE
active
active
TOTAL PPs
159
159
FREE PPs
52
78
FREE DISTRIBUTION
24..00..00..00..28
32..02..00..12..32
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the contents of a volume group.
Details The output on this visual is not meant to match what was on the previous visual.
Rather, it is meant to show an example of viewing volume group information.
The visual illustrates how information can be obtained per volume group with respect to the
physical volumes and the logical volumes.
The first command example shows the list of physical volumes in rootvg, how many
partitions are on each disk and how many are free. Also, a distribution chart of the free
physical partitions is given.
Additional Information Ask the students whether they know what the free distribution
chart is referring to.
Answer: This coincides with the intra-physical allocation policy and the disk bands. From
the output of the command, it can be seen that for hdisk0 there are 24 partitions free on
the outer edge of the disk, and also 28 partitions free on the inner edge. The center and the
middle sections are all used.
Transition Statement Lets look at the contents of rootvg.
10-17
Instructor Guide
# lsvg -l rootvg
rootvg:
LVNAME
TYPE
LPs
PPs
PVs
LV STATE
MOUNT POINT
hd6
hd5
hd8
hd9var
hd4
hd2
hd3
hd1
hd10opt
lv00
lv01
paging
boot
jfslog
jfs
jfs
jfs
jfs
jfs
jfs
jfs2
jfs2
8
1
1
1
1
77
3
11
2
1
4
8
1
1
1
1
77
3
11
2
2
4
1
1
1
1
1
1
1
1
1
2
2
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
N/A
N/A
N/A
/var
/
/usr
/tmp
/home
/opt
/home/john
/home/fred
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the logical volume information of a volume group.
Details The example shows a list of all the logical volumes in rootvg. The first column
gives the name of the logical volume. Point out that all the system logical volumes are
labeled hdx. Encourage students to recognize the system logical volumes. The second
column describes the type of data contained on each logical volume, for example journaled
file system (JFS). The next two fields give the logical partition to physical partition
mappings, and it is from these two fields that you can tell whether any logical volumes have
been mirrored or not.
The PVs column states how many disks that particular logical volume is spanning. The
second to last field shows the logical volume state, that is, whether it is open or not. Notice
that the boot logical volume is the only one that is closed. The syncd attribute states that
the logical volume is up to date. The final field is only applicable for some logical volumes
and it shows to which directory the file system is mounted.
Additional Information Ask the students if there are any mirrored logical volumes. The
answer is yes. /home/john.
Transition Statement How can we add a volume group to our system?
10-19
Instructor Guide
[]
[]
no
yes
+
+
+
+
[]
no
+#
+
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
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 have 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.
10-21
Instructor Guide
Instructor Notes:
Purpose Show students how to add a volume group.
Details After installation, the system has only one volume group containing the
operating system and that is the rootvg. Other physical volumes that are not in a volume
group can be grouped together into additional volume groups.
Note that physical partition size is a value of 1-1024 MB, and must be equal to the power of
2. The default size is 4 MB. Sizes of 512 MB and 1024 MB are valid for AIX V4.3.1 and
later.
The menu item dealing with concurrent mode is used only if in the HACMP environment,
and is supported in AIX V4.2 and later.
Additional Information
Transition Statement Let us look at how adding a scalable volume group differs.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[]
[]
no
yes
+
+
+
+
[]
no
32
256
+#
+
+
+
F4=List
F8=Image
AU1411.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 fixed depending upon the type of volume
group. Now, in scalable volume groups the maximum is tunable.
10-23
Instructor Guide
Instructor Notes:
Purpose To explain the AIX 5L V5.3 scalable volume group creation options.
Details Warn the students not to make the maximums larger than they really need them
to be. The increased size of the control block structures can have a detrimental impact on
performance.
Additional Information
Transition Statement Now, let us move on to how we can manage the volume group
after it has been created.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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
10-25
Instructor Guide
Instructor Notes:
Purpose Introduce the menu of items to be covered on the following visuals.
Details Note that we will not cover the last item on reorgvg until after discussing logical
volume allocation.
Additional Information
Transition Statement First, let us look at what we can do to change the volume group
attributes.
V3.1.0.1
Instructor Guide
Uempty
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[Entry Fields]
rootvg
yes
+
yes
no
no
no
128
n
n
+
+
+
+
+
+
32
256
+
+
F4=List
F8=Image
AU1411.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. 1997, 2005
10-27
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to change the characteristics of a volume group.
Details The menu items referring to concurrent mode are used only with HACMP.
Additional Information
Transition Statement The LTG size attribute deserves a little more attention here.
10-29
Instructor Guide
AU1411.0
Notes:
Logical track group (LTG) size
When LVM receives a request for an I/O, it breaks the I/O down into logical track group
(LTG) sizes before it passes the request down to the device driver of the underlying
disks. The LTG is the maximum transfer size of a logical volume and is common to all
the logical volumes in the volume group since it is a volume group attribute.
Prior to AIX 5L V5.1, the only supported LTG was 128 KB. In AIX 5L V5.1 and V5.2,
LVM accepted LTG values of 128 KB, 256 KB, 512 KB, and 1024 KB. However, many
disks now support transfer sizes larger than 1 MB. To take advantage of these larger
transfer sizes and get better disk I/O performance, AIX 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.
The default LTG size prior to AIX 5L V5.3 is 128 KB. In AIX 5L V5.3, LVM dynamically
discovers the optimal LTG size each time the volume group is varied on.
V3.1.0.1
Instructor Guide
Uempty
10-31
Instructor Guide
Instructor Notes:
Purpose Describe the LTG size.
Details The LTG size is specified either in K or M units implying KB or MB respectively.
When the LTG size is set using the -M flag, the varyonvg and extendvg commands may
fail if an underlying disk has a maximum transfer size that is smaller than the LTG size.
If the -M flag is not used, the varyonvg command will select the optimal LTG size
automatically. This optimal size is the largest common maximum transfer size among the
underlying disks. If an extendvg or reducevg command is subsequently executed and the
optimal LTG size changes, the LVM driver will correct the LTG size on the fly. That is, it will
hold the I/O, modify the LTG size, and then resume.
The lspv command (which will be discussed later) will display the same value as lquerypv
-M but will be shown as MAX REQUEST.
Additional Information Mention that this is a performance, not a function oriented
option.
Transition Statement Now, let us move on to the availability topic of hot spares.
V3.1.0.1
Instructor Guide
Uempty
Hot Spare
2nd copy
of data1
LV
1st copy
of data1
LV
1st copy
of data2
LV
2nd copy
of data2
LV
Synchronization
Hot spare
AU1411.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.
10-33
Instructor Guide
- 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.
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
argument
y (lower case)
Y (upper case)
n
r
Description
Permits one for one migration of partitions from one failed disk to
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
disks; might use the complete pool of hot spare disks.
No automatic migration will take place. (Default)
Removes all disks from the pool of hot spare disks for this volume
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
10-34 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Command
Action
Decide which volume groups with mirrored logical
volumes require high availability
Decide how many hot spare disks are required, and how
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
extendvg
protect
Decide which hot spare policy will be most effective for
your volume groups
chpv
Designate the selected disks as hot spares
Decide which synchronization policy meets the business
chvg
needs, and set the policy
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.
10-35
Instructor Guide
Instructor Notes:
Purpose Describe the new LVM hot spare function.
Details Mention that hot spare capability is a major advantage to the unattended data
center. A data center that is attended, but not 24X7, or has limited system administrator
attention would also benefit from hot spares.
These commands are not replacements for the sparing support available with SSA and
SCSI disk arrays; they complement it. You can also use it with SSA and SCSI disk arrays
when you add one to your volume group.
Additional Information Review the steps for setting up hot sparing with the students;
emphasize the planning and decision making aspects.
Transition Statement Let's discuss adding physical volumes or removing physical
volumes from the volume group.
V3.1.0.1
Instructor Guide
Uempty
myvg
hdisk4
hdisk5
AU1411.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 is 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
10-37
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to extend or reduce the size of a volume group. To show how to
add and remove physical volumes in a volume group.
Details The reducevg command with the -d flag automatically deletes all logical volume
data on the physical volume before removing the physical volume from the volume group. If
a logical volume spans multiple physical volumes, the removal of any of those physical
volumes may jeopardize the integrity of the entire logical volume. SMIT provides a menu
item to indicate if you wish this forced deletion to take place.
Typically, a physical volume may be removed from a volume group if it is damaged and
maintenance work needs to be done on it.
Briefly describe the steps that need to be taken to add or remove a physical drive volume
from a volume group.
Additional Information When the last physical volume has been removed from the
volume group, the volume group effectively no longer exists, since there are no more
VGDAs to define it. At that point, LVM will also remove any record of the volume group from
the ODM database.
Transition Statement SMIT provides a panel which will reduce the volume group out of
existence. Let's take a look at that.
10-39
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show students how to delete a volume group.
Details
Additional Information
Transition Statement Having played with altering the characteristics of the volume
group, let us look at how we can control access to the volume group.
10-41
Instructor Guide
Volumegroup
# varyoffvg datavg
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
In AIX 5L V5.3 a new 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.
10-43
Instructor Guide
Instructor Notes:
Purpose To show how volume groups, other than the rootvg, can be activated and
deactivated.
Details With non-rootvg volume groups, a useful operation that can be done is to
deactivate the volume group, with the option of removing the volume group completely
from the system (provided the volume group is on an external disk pack).
This proves very useful especially in high security environments, where the volume group
can be kept on external disks, and at night the entire volume group can be deactivated and
disconnected. The external disk pack can then be physically removed and placed in a safe
place where it can locked away until the next day. In the morning the volume group can be
activated again.
Before the varyoffvg command can be used, the logical volumes within it must first be
closed. For example, if the logical volume contains a file system, it must be unmounted.
A volume group that has a paging space on it cannot be varied off while the paging space
is active.
Additional Information
Transition Statement Volume groups can be moved from one system to another. Let's
see how this can be done.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
10-45
Instructor Guide
Instructor Notes:
Purpose Show how to export and import a volume group.
Details There may be times when a volume group may need to be moved from one AIX
system to another so that the logical volume's and file system's data in the volume group
can be accessed directly on the target system. It may be necessary to remove all
knowledge of a volume group from the system if the file system and logical volume within it
are no longer being accessed.
To remove all knowledge of a volume group from the ODM database, the volume group
needs to be exported. This command does not remove any user data in the volume group,
but only removes its definition from the ODM database.
Similarly, when a volume group is moved, the target system needs to be made aware of the
new volume group. This is done by importing. Importing reads the data in the VGDA to
build the ODM entries.
Once exported, a volume group can no longer be accessed on the system it was exported
from. rootvg cannot be exported because you cannot vary it off.
Once a volume group is changed or created to hold more than 1016 physical partitions per
physical volume (as supported beginning with AIX V4.3.1), it cannot be imported into AIX
versions earlier than V4.3.1. Also, volume groups created in AIX V4.3.1 or later using a
physical partition size of 512 MB or 1024 MB cannot be imported into previous versions of
AIX.
Additional Information A volume group with a mirrored striped logical volume cannot
be back ported into a version older than AIX 4.3.3.
When importing the volume group, if you do not specify the volume group name (with the
importvg -y flag), it will use the generic name like vg00 or vg01. The previous volume
group name is not the default name when the volume group is imported.
Unless instructed to do so by support personnel, never interrupt an LVM command.
Transition Statement There are some special concerns in defining and managing
RAID devices with the Logical Volume Manager.
V3.1.0.1
Instructor Guide
Uempty
[ y/n ]
Volumegroup
# chvg -b y datavg
Turns off bad block relocation policy of a volume group:
# chvg -b n datavg
AU1411.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.
10-47
Instructor Guide
Bad block relocation policy should be turned off for RAID devices and storage
subsystems unless the manufacturer tells you otherwise.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the ability of LVM to discover dynamically growing disks (RAID).
Details
Additional Information
Transition Statement Lets do an exercise where you get a chance to define and work
with your own volume group.
10-49
Instructor Guide
AU1411.0
Notes:
Introduction
The exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review the exercise.
Details
Additional Information
Transition Statement Continue the lecture with logical volumes.
10-51
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
10-53
Instructor Guide
Logical Storage
Physical volumes
1
7
13
19
25
31
35
41
47
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
1
7
13
19
25
31
35
41
47
4
10
16
22
28
34
38
44
50
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
4
10
16
22
28
34
38
44
50
Logical
volume
Logical
Partitions
Logical
volume
Copyright IBM Corporation 2005
AU1411.0
Notes:
Logical volumes
A logical volume is a group of logical partitions which may span physical volumes (as
long as the physical volumes are in the same volume group). A file system resides on
top of a logical volume (LV). A logical volume can be dynamically extended.
Logical partitions
Logical partitions are mapped one-to-one to physical partitions unless they are being
mirrored.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review the logical volume structure as an introduction to a more detailed
discussion.
Details Review logical volumes and logical partitions and how they map to physical
partitions.
Review the fact that the Logical Volume Manager (LVM) is a device driver that assimilates
the physical volumes into a logical view.
Additional Information
Transition Statement Because of the logical partition/logical volume structure, you can
have more than one copy of a logical volume on a system. This is called mirroring.
10-55
Instructor Guide
Mirroring
First copy
hdisk0
PP1
PP2
Second copy
hdisk1
PP1
PP2
Third copy
hdisk2
PP1
PP2
lv00
LP1
LP2
AU1411.0
Notes:
Mirroring concept
Mirroring of data over multiple drives protects against a potential hardware failure. The
structure of LVM enables mirroring by manipulating the relationship between the
physical partition and the logical partition.
The AIX mirror function does not apply to a physical disk, only to logical volumes. This
is the most important principle to understand for the AIX LVM mirroring function.
In a normal operating environment each physical partition is mapped to a logical
partition. When you mirror data, the ratio becomes one logical partition to two physical
partitions for a two-way mirror. Or, one logical partition to three physical partitions for a
three-way mirror.
V3.1.0.1
Instructor Guide
Uempty
Scheduling policies
The scheduling policy determines how reads and writes are conducted to a mirrored
logical volume. The following table describes the four possible scheduling policies.LVM
offers several scheduling policies for mirrored volumes to control how data is written
and read from the copies. The following table shows the scheduling policies and the
mklv or chlv arguments to set the policies.
Policy
Sequential
Parallel
Parallel/sequential
Parallel/round-robin
Write
Operation
Sequential
Parallel
Parallel
Parallel
Read
Operation
Sequential
Parallel
Sequential
Round-robin
mklv or chlv
argument
-d s
-d p
-d ps
-d pr
Sequential write
Sequential mirroring performs writes to multiple copies or mirrors in order. The multiple
physical partitions representing the mirrored copies of a single logical partition are
designated primary, secondary, and tertiary. In sequential scheduling, the physical
partitions are written to in sequence. The system waits for the write operation for one
physical partition to complete before starting the write operation for the next one. When
all write operations have been completed for all mirrors, the write operation is complete.
Parallel write
Parallel mirroring simultaneously starts the write operation for all the physical partitions
in a logical partition. When the write operation to the physical partition that takes the
longest to complete finishes, the write operation is completed.
Sequential read
When a sequential read is specified, the primary copy of the read is always read first. If
that read operation is unsuccessful, the next copy is read. During the read retry
operation on the next copy, the failed primary copy is corrected by LVM with a hardware
relocation. This patches the bad block for future access.
Parallel read
On each read, the system checks whether the primary is busy. If it is not busy, the read
is initiated on the primary. If the primary is busy, the system checks the secondary and
then the tertiary. If those are also busy, the read is initiated in the copy with the least
number of outstanding I/Os.
10-57
Instructor Guide
Round-robin read
Round-robin reads alternate between copies. This results in equal utilization for reads
even when there is more than one I/O outstanding.
Synchronizing
When turning on mirroring for an existing logical volume, the copies have to be
synchronized so the new copy contains a perfect image of the existing copy at that point
in time. This can be done by using the -k option on the mklvcopy command at the time
mirroring is turned on or with the syncvg command at a later time. Until the copies are
synchronized, the new copy is marked stale.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define what mirroring is.
Details It is the entire logical volume that is mirrored, and so all the logical partitions
within a logical volume will have multiple copies. By default, a logical volume is not
mirrored.
To increase availability, mirror the copies onto physical volumes that are attached to
separate buses, adapters and power supplies. Upon failure of one of these components,
the copies may still be maintained, since they are not attached to the failing device.
A mirrored copy of the data can be removed. This will be shown later in this unit. Similarly,
extra copies of the data can be added later on, the maximum being three copies. However,
in order for the copies to be useful, they have to be synchronized.
Additional Information If you are configuring your storage subsystem for maximum
performance, mirroring should be disabled. If mirroring is required, then the scheduling
policy should be set to parallel and allocation policy to require the LVM to place copies on
separate physical volumes. In addition, write verification and mirror write consistency
should also be set to no. This will prevent an extra disk revolution on every write to read
back the data for validity. It also stops the LVM from waiting for all writes to copies to
succeed before returning successful completion of a write.
Discussion Items Why would you use mirroring? Answer: The main use of mirroring is to enhance
availability. If one disk containing the data goes down, and there is a second disk on the
system containing exactly the same data, the system may be able to carry on with normal
operations as if nothing had happened until the failing disk can be replaced and mirroring
resumed.
Transition Statement Lets look at an additional feature for mirroring: mirror write
consistency.
10-59
Instructor Guide
Copy 1
Copy 2
Copy 3
Forced synchronization
Synchronize the read partitions
AU1411.0
Notes:
Introduction
Mirror Write Consistency (MWC) ensures data consistency on logical volumes in case a
system crash occurs during mirrored writes. The active method achieves this by logging
when a write occurs. LVM makes an update to the MWC log that identifies what areas of
the disk are being updated before performing the write of the data. Records of the last
62 distinct logical transfer groups (LTG) written to disk are kept in memory and also
written to a separate checkpoint area on disk (MWC log). This results in a performance
degradation during random writes.
With AIX 5L V5.1 and later, there are two ways of handling MWC:
- Active, the existing method (prior to AIX 5L V5.1)
- Passive, the new method (beginning with AIX 5L V5.1)
V3.1.0.1
Instructor Guide
Uempty
MWC settings
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
Following is a description of the MWC arguments:
Argument Meaning
Description
Each write is logged to the MWC log. When the volume
Yes or
group is varied back online, the log is used to make logical
y or a
Active
partitions consistent. This is the default for mirrored logical
volumes.
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
p
Passive
started. Consistency is maintained while the
synchronization is in progress by propagating the blocks
being read to the other mirrors in the logical volume.
The mirrors of a mirrored logical volume can be left in an
inconsistent state in the event of a system or volume group
n
No
crash. There is no automatic protection of mirror
consistency.
10-61
Instructor Guide
Instructor Notes:
Purpose Differentiate the active and passive options of MWC.
Details If crash occurs, upon reboot the last 62 writes to mirrors are examined and one
of the mirrors is used as a source to synchronize the mirrors. For sequential mirroring, the
latest write that occurred is guaranteed to be completed, since there is a definite PRIMARY
disk which is used as the source for synchronization. For parallel mirroring, all mirrors are
guaranteed to be consistent, but the latest write is not guaranteed to be completed after the
crash.
Stress that the passive method reduces write time during normal processing. It actually
increases recovery time; since crashes are relatively rare it improves performance over all.
Additional Information
Transition Statement Another thing that you can do with logical volumes is spread the
data across physical volumes using a technique called striping.
V3.1.0.1
Instructor Guide
Uempty
Striping
Normal flow of data blocks when a logical volume is spread across
physical volumes:
10
11
6
12
13 14
15
16
17
18
25 26
27
28
29
30
19 20
21
22
23
24
31 32
33
34
35
36
19 22
10
13
16
11
25
28
31
34
20 23
26
29
14
32
17
12
15
18
35
21
24
27
30
33
36
AU1411.0
Notes:
Overview
Striping is a technique for spreading the data in a logical volume across several disks
such that the I/O capacity of the disk drives can be used in parallel to access data on
the logical volume.
Striping is designed to increase the read/write performance of frequently accessed,
large sequential files. Striping can also be used to simply distribute data evenly across a
set of disks so that random I/O can be scattered across many drives simultaneously.
In non-striped logical volumes, data is accessed using addresses to data blocks within
physical partitions. In a striped logical volume, data is accessed using addresses to
stripe units.
10-63
Instructor Guide
Stripe size
The size of the stripe unit is specified at creation time.
Prior to AIX 5L V5.3, the stripe size could range from 4 KB -128 KB in powers of 2
(4 KB, 8 KB, 16 KB, 32 KB, 64 KB, and 128 KB). AIX 5L V5.3 supports the following
stripe sizes: 4 KB, 8 KB, 16 KB, 32 KB, 64 KB, 128 KB, 1 MB, 2 MB, 4 MB, 8 MB,
16 MB, 32 MB, 64 MB, and 128 MB.
Constraints
There are some constraints imposed by implementing striping:
- The number of physical partitions allocated to a striped logical volume must be able
to be evenly distributed among the disks
- At least two physical volumes are required
Performance considerations
There are some considerations in configuring striping for performance:
- Use as many adapters as possible. For example, if multiple disks in the stripe width
are on the same SCSI adapter, a read/write of a stripe will not be able to read/write
the stripe units in parallel.
- Design to avoid contention with other uses of the disks used by the striped logical
volume.
- Create on a volume group dedicated to striped logical volumes
It is not a good idea to mix striped and non-striped logical volumes in the same physical
volume. Physical volumes should be the same size (ideally) within the set used for a
striped logical volume.
Just because a logical volume is striped does not mean that the files data blocks are
going to be perfectly aligned with the stripe units. Therefore, if a file block crosses a
stripe boundary, the block gets split up into multiple LVM I/Os.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define what striping is.
Details When we add a logical volume there are a number of attributes that can be set,
one of them being whether the logical volume will be striped or not. The default is Not
Striped. If striping is desired, the stripe size may be chosen from the pop-up list. The
smallest stripe size is one block (4K). Care must be taken when creating a logical volume
with striping as certain logical volume parameters are not compatible with striping. Prior to
4.3.3, striped logical volumes could not be mirrored. The number of physical partitions
allocated must be a multiple of the number of disk drives used.
Additional Information Data in a striped logical volume is no longer accessed using
data block addresses. The LVM tracks which blocks on which physical drives actually hold
the data. If the data being accessed is on more than one physical volume, the appropriate
number of simultaneous disk I/O operations will be scheduled for all drives.
Transition Statement Sometimes increasing the size of a striped logical volume can be
a problem. Lets see how the AIX 5L V5.3 striped columns enhancement helps us with this.
10-65
Instructor Guide
Striped Columns
Striped column 2
Striped column 1
PV1
PV2
PV3
Strip 1
Strip 2
.
.
.
Strip n
Strip 1
Strip 2
.
.
.
Strip n
Strip 1
Strip 2
.
.
.
Strip n
PV4
PV5
PV6
Strip n + 1
Strip n + 2
.
.
.
Strip n + 1
Strip n + 2
.
.
.
Strip n + 1
Strip n + 2
.
.
.
AU1411.0
Notes:
Striped column support
AIX 5L V5.3 provides striped columns support for logical volumes. This new feature
allows a striped logical volume to be extended even if one of the physical volumes in the
disk array becomes full.
Prior to AIX 5L V5.3, if you had a striped logical volume that completely filled the
capacity of the disks that formed its stripe width and you needed more room to grow the
logical volume, it was not easy. The work-around required you to backup and delete the
striped logical volume and then to recreate the logical volume with a larger stripe width
followed by a restore operation of the logical volume data.
Prior to AIX 5L V5.3, you could not configure a striped logical volume with an upper
bound larger than the stripe width. In AIX 5L V5.3, the upper bound 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. There is no need to back up, redefine, and then restore the data.
It is done dynamically.
10-66 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to increase the size of a striped logical volume using striped
columns.
Details Note that the upper bound value is not related to number of mirror copies in
case you are using a RAID 10 (mirroring+striping) configuration.
Additional Information The upper bound shown in the visual is the logical volume
characteristic that limits the number of disks the logical volume can be spread across. For
striped logical volumes, the upper bound must be an multiple of the stripe width.
Transition Statement Let us look at the logical volume allocation intra-policies.
10-67
Instructor Guide
E M
Inner Edge
Inner Middle
Center
Outer Middle (Middle)
Center Edge (Edge)
Inter-physical volume allocation policy:
Maximum number of physical volumes to use
Range of physical volumes to use
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
When creating or changing a logical volume you can define 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.
V3.1.0.1
Instructor Guide
Uempty
10-69
Instructor Guide
Instructor Notes:
Purpose Define the logical volume allocation policies.
Details By default, you do not have to worry where a logical volume is placed on disk
and on which disk it is placed. The LVM handles all the policies for you. However, if you
have a specific requirement you can specify this through SMIT. Policies can also be
changed after you have set up the logical volume. However, this operation requires a little
bit of work because the volume group has to be reorganized.
Additional Information Ask the students why, in their opinion, certain logical volumes
are good candidates to be placed either at the center or on the edge.
Answer: Disk devices have locations that they can access quicker than others. Based on
the disk documentation, you can select the area on disk that best suits your needs.
Logical volumes on 200 MB, 540 MB and 1 GB disks that contain large sequential files
should be at the edge because sequential performance is better there (there are more
blocks per track at the edge than farther in).
For inter-physical policy, choose 'minimum' on non-mirrored logical volumes to provide the
greatest availability (access to data in case of hardware failure). With this option, you
reduce the risk of losing data because of a disk failure. Each additional physical volume
used for a single physical copy increases that risk.
The 'maximum' setting spreads the physical partitions of the logical volume as evenly as
possible over as many physical volumes as possible. This is a performance-oriented option
because spreading the physical partitions over several disks tends to decrease the
average access time for the logical volume.
Transition Statement Let's look at SMIT's LVM screens.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
SMIT Logical Volumes screen
This is the top-level SMIT menu for logical volumes. The next few pages discuss these
items.
10-71
Instructor Guide
Instructor Notes:
Purpose Define the SMIT Logical Volumes screen.
Details Once again, consider many options in turn. Use this as a roadmap for the pages
that follow.
Additional Information
Transition Statement Let's first show characteristics of a logical volume.
V3.1.0.1
Instructor Guide
Uempty
IN BAND
70%
DISTRIBUTION
000:000:007:003:000
PV1
hdisk0
hdisk0
hdisk0
PP2
PV2
PP3
PV3
AU1411.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).
10-73
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List logical volume attributes.
Details Two additional options that can be used to obtain information about a logical
volume:
The first command (lslv -l lvname) primarily shows whether mirroring has been set
on or off, and also the physical partition distribution across the different bands of the
disk for that logical volume. Make sure that the students are clear about the attribute
COPIES.
The second command (lslv -m lvname) shows the mapping of the logical partitions to
the physical partitions; that is, LP1 is mapped to PP134 on hdisk0, LP2 is mapped to
PP135 on hdisk0 and LP3 is mapped to PP136 on hdisk0.
Discussion Items:
Ask the students what this information tells them about the logical volume?
Answer: This will show how much fragmentation you have with the logical volume, in
this case none as all the physical partitions are contiguous. If this logical volume had
been mirrored, the remaining fields (which are shown as blank) would also show a
similar sort of map for the second and the third copies.
Additional Information The command, lslv -p pvname lvname, will display the status
for each physical partition on a physical volume. The -p option on lslv does not have a
corresponding SMIT menu option.
Transition Statement Let's see how we can add and remove logical volumes.
10-75
Instructor Guide
F2=Refresh
F6=Command
F0=Exit
[Entry Fields]
[]
rootvg
[]
[]
[]
outer_middle
minimum
[]
#
+
+
+
+
#
active
yes
+
+
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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
mklv
mklv
mklv
mklv
-y
-y
-y
-y
-y
newlv1
newlv2
newlv3
newlv4
newlv5
datavg
datavg
datavg
datavg
datavg
1
1b
1k
1m
1g
The system rounds to the physical partition size of the volume group.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to add a logical volume.
Details Go through the attributes, as each one has already been defined and shown
before. This is simply a review.
Additional items exist further down the menu such as maximum number of logical partitions
for this logical volume, scheduling policy for mirrored logical volumes and stripe unit size.
Additional Information
Transition Statement Let's see how to remove a logical volume.
10-77
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F0=Exit
[Entry Fields]
[]
+
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to remove a logical volume.
Details Be sure to mention not to remove a logical volume this way if it has a journaled
file system on it. If you do, certain other information related to the file system does not get
removed and problems could be caused later on. The same applies to paging spaces; to
avoid problems use the rmps command instead of the rmlv command.
Transition Statement Let's look at how some logical volume characteristics can be
changed.
10-79
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.
10-81
Instructor Guide
Instructor Notes:
Purpose Change the characteristics of a logical volume.
Details This shows the various logical volume characteristics that can be changed once
a logical volume has been created.
Additional Information
Transition Statement Let's see how to list the attributes of a logical volume.
V3.1.0.1
Instructor Guide
Uempty
LPs
PPs
PVs
hd6
hd5
hd8
hd9var
hd4
hd2
hd3
hd1
hd10opt
lv00
lv01
8
1
1
1
1
77
3
11
2
1
4
8
1
1
1
1
77
3
11
2
2
4
1
1
1
1
1
1
1
1
1
2
2
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
paging
boot
jfslog
jfs
jfs
jfs
jfs
jfs2
jfs
jfs2
jfs2
N/A
N/A
N/A
/var
/
/usr
/tmp
/home
/opt
/home/john
/home/fred
AU1411.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.
10-83
Instructor Guide
Instructor Notes:
Purpose List the attributes of a logical drive.
Details Do not spend too much time going through all the attributes. The student should
by now be familiar with this type of output.
Additional Information
Transition Statement Let's look at the characteristics of a particular logical volume on
the next page.
V3.1.0.1
Instructor Guide
Uempty
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
AU1411.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.
10-85
Instructor Guide
Instructor Notes:
Purpose List the attributes of a logical volume.
Details The following attributes are specific to logical volumes so spend a few minutes
going through them: WRITE VERIFY, BB POLICY, and WRITE VERIFY. For further information
on these attributes, see the Web-based documentation. Remind the class that Mirror Write
Consistency was described in the previous section about mirroring.
Additional Information You could pose the following questions:
If mirroring is set up, which write policy would be used?
Parallel
Is this logical volume mirrored?
No, because the number of copies is one
Transition Statement Let's see how to add or remove a mirror.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
[]
middle
minimum
[32]
+
+
+
yes
[]
no
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Adding a copy of a logical volume
The mklvcopy command is used to add copies (mirroring) to a logical volume that has
none or to increase the copies from two or three. Specify the logical volume to change
and the desired total number of copies. This only succeeds if there are enough physical
partitions to satisfy the requirements on the physical volumes that are specified to be
used (that is, if all copies are to be on different physical volumes).
Once a logical volume has been created, striping cannot be imposed or removed.
10-87
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to turn mirroring on and off.
Details Be sure to point out the importance of synchronizing the copies either while
turning mirroring on or after it is turned on. Until the copy is synchronized, it will be marked
as stale.
Additional Information
Transition Statement Let's discuss one other concept before moving to physical
volumes.
10-89
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
10-90 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how logical volumes in a volume group can be reorganized to handle
changing logical volume requirements.
Details The reorgvg command can be used to change the allocation of logical volumes
in a volume group based on the allocation policy set on the logical volume. This command
will try to place the specified logical volume in the new place (or as close to the requested
place as possible). This command will only be successful if there is space to maneuver.
The volume group must be varied on to use this command.
In AIX V4.1, if you run this command with the volume group name and no other arguments,
only the first logical volume in the volume group will be reorganized (that is, the first one
listed by the lsvg -l volumegroup command). In AIX V4.2 and later, if you run the
command with the volume group name and no other arguments, the entire volume group is
reorganized.
When running this command, priority is given to the first logical volume name in the
parameter list and lowest priority is given to the last logical volume in the list.
Additional Information reorgvg can be performed through SMIT. This option is listed
under Volume Groups (smit vg -> Set Characteristics of a Volume Group).
Transition Statement Let's take a look at physical volumes.
10-91
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
10-93
Instructor Guide
Physical Volumes
Volume group
PV1
1
7
13
19
25
31
35
41
47
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
PV2
1
7
13
19
25
31
35
41
47
4
10
16
22
28
34
38
44
50
2
8
14
20
26
32
36
42
48
3
9
15
21
27
33
37
43
49
4
10
16
22
28
34
38
44
50
Physical Partitions
AU1411.0
Notes:
Overview
A physical partition is a fixed size, contiguous set of bytes on a physical volume (PV).
Physical partitions (PP) must be the same size across an entire volume group.
However, there may be multiple volume groups on a single system, each having a
different PP size.
The limitations for each type of volume group (normal, big, and scalable) such as the
number of physical volumes and size of the physical partitions, was given in the last
unit, System Storage Overview.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review physical volume and physical partition concepts before going into a
greater discussion on them.
Details Simply review the basic concepts.
Additional Information Refer back to the System Storage Overview unit if you need to
review the size limitations of the LVM components.
Transition Statement Let's look at what we can do with physical volumes through
SMIT.
10-95
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the operations that can be carried out on physical volumes.
Details As with volume groups, many options of the SMIT screen will be considered in
turn. The high level commands will also be listed.
Additional Information
Transition Statement Let's first list information about the disks on the system.
10-97
Instructor Guide
da1c923411d52ec91cd600802eda72c9
bebc800000000000000000802evg79c9
rootvg
rootvg
active
active
hdisk0
VOLUME GROUP:
da1c923411d52ec91cd600802eda72c9
000bc6fd00004c00000000e10fdd7f52
active
0
ALLOCATABLE:
4 megabyte(s)
LOGICAL VOLUMES:
95 (380 megabytes)
VG DESCRIPTORS:
3 (12 megabytes)
HOT SPARE:
92 (368 megabytes)
MAX REQUEST
00..03..00..00..00
19..16..19..19..19
rootvg
yes
6
2
no
256 KB
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List physical volume information.
Details The lspv command with no options can be used to find out what disks are on
the system. Two disks are listed with their PVIDs and both are in rootvg.
The first output lists all the physical volumes in the system. If this operation is carried out
through SMIT, the undocumented command getlvodm -c is used to list the physical
volumes.
The second output is a list of characteristics of one particular disk, hdisk0.
Note the new field Max Request. This is basically the largest data transfer that can be
handled by the disk. It is the same information that we obtained in AIX 5L V5.2 by running
the command lquerypv -M <hdisk#>. Relate this back to the LTG size discussion.
Discussion Items - Ask the students the following:
How many free partitions are there on hdisk0 and where are they?
3 partitions on the outer middle sector of the disk.
How many logical volumes are there on this disk?
Six
Notice how similar this information is to the volume group listing.
Transition Statement Just as you can do for volume groups and logical volumes, it is
possible to view physical volumes by status, or from a physical or logical point of view.
10-99
Instructor Guide
LPs
12
3
29
13
1
8
1
2
2
PPs
12
3
29
13
1
8
1
2
2
DISTRIBUTION
00..00..00..12..00
00..03..00..00..00
00..00..17..12..00
00..00..13..00..00
00..00..01..00..00
00..00..00..08..00
01..00..00..00..00
00..00..02..00..00
00..00..02..00..00
MOUNT POINT
/home
/tmp
/usr
/
N/A
N/A
N/A
/var
/opt
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the contents of the disk by listing the logical volumes on it.
Details The output from this command shows, on a per logical volume basis, where on
the disks the logical volumes are residing.
Transition Statement Let's look at yet another option that can be used to obtain a more
detailed partition list.
Instructor Guide
hdisk0
STATE
used
used
free
used
free
used
used
used
used
used
used
used
used
used
used
REGION
outer edge
outer edge
outer edge
outer middle
outer middle
center
center
center
center
center
center
center
center
center
inner middle
LV NAME
hd5
hd2
TYPE
boot
jfs
MOUNT POINT
N/A
/usr
hd6
paging
N/A
hd8
hd4
hd2
hd9var
hd3
hd1
hd2
paging00
hd10opt
hd2
jfslog
jfs
jfs
jfs
jfs
jfs2
jfs
paging
jfs
jfs
N/A
/
/usr
/var
/tmp
/home
/usr
N/A
/opt
/usr
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the physical partitions of a physical volume.
Details The output from this command shows, on a granular level, which physical
partitions are being used for specific logical volumes. From this listing, you can tell how
much fragmentation you have on your system and where free physical partitions are
located.
Transition Statement Let's see now how disks can be added to the system.
Instructor Guide
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
partitions per physical volume for this volume group changes to factor multiplied by
1016.
Instructor Guide
Instructor Notes:
Purpose To discuss how to add a disk to the system, and move the contents of it from
one disk to the other.
Details Note that whatever way you try to add a disk drive to the system, if you do not
have the correct software installed for that type of device, the system will prompt you to
install the software first from installation media before continuing. Remind the students that
this is true for any device.
If the PP/PV limitation is changed for the volume group, it cannot be imported into AIX
V4.3.0 or earlier versions. The migratepv command enables logical volumes to be moved
from one physical volume to the next in the same volume group. The example shows how
lv02 can be moved from hdisk0 to hdisk6 provided there is room to do so.
Additional Information Prior to 4.3.3, migratepv could not be used to migrate striped
logical volumes. This was due to the old limitation that striped logical volumes could not be
mirrored. migratepv temporarily mirrors the logical volumes and then breaks the mirror
leaving the single copy in the new location.
Transition Statement Lets look at commands that help you to document your disk
storage setup.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
What to document
Its important to have your storage information readily available in case you have a
problem with your system, or in the very worst case, a totally crashed system. The
commands in the visual help you to get this information.
Instructor Guide
Instructor Notes:
Purpose Document storage setup.
Details Encourage the students to have this information readily available in case they
have a problem with their system or in the very worst case, a totally crashed system.
You could also mention having a copy of /etc/filesystems, although this file has not yet
been discussed.
Transition Statement Before we summarize, let's consider a few questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
1. True or False? A logical volume can span more than
one physical volume.
2. True or False? A logical volume can span more than
one volume group.
3. True or False? The contents of a physical volume can
be divided between two volume groups.
4. True or False? If mirroring logical volumes, it is not
necessary to perform a backup.
5. True or False? SMIT can be used to easily increase or
decrease the size of a logical volume.
6. True or False? Striping is done at a logical partition
level.
Copyright IBM Corporation 2005
AU1411.0
Notes:
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. True or False? A logical volume can span more than one
physical volume.
2. True or False? A logical volume can span more than one
volume group.
3. True or False? The contents of a physical volume can be
divided between two volume groups.
4. True or False? If mirroring logical volumes, it is not necessary
to perform a backup. False. You still need to back up to
external media.
5. True or False? SMIT can be used to easily increase or
decrease the size of a logical volume. False. SMIT can only be
used to increase a file system. Decreasing one requires backing
up the file system, removing it, re-creating it, and then restoring.
6. True or False? Striping is done at a logical partition level.
False. It is done at a stripe unit level.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Now, lets do an exercise with LVM.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This lab has you set up a new volume group and a new logical volume. You use this
volume group and logical volumes in future exercises.
The exercise can be found in your Student Exercise Guide.
Instructor Guide
Instructor Notes:
Purpose Review the exercise.
Details
Additional Information
Transition Statement Lets summarize what weve learned in this unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
AU1411.0
Notes:
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement Now, onto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4908
SC23-4910
GG24-4484
11-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Identify the components of an AIX file system
Add an enhanced journaled file system
Change characteristics of a file system
Add a RAM file system
Add a UDF file system on a DVD-RAM
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for this unit.
Details
Transition Statement Let's begin by looking at the structure of a JFS file system.
11-3
Instructor Guide
inodes
Indirect
Blocks
Data 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
AU1411.0
Notes:
File systems and logical volumes
AIX journaled file systems are built within logical volumes. Because journaled file
systems exist within logical volumes, the size of the file system is always a multiple of
the logical partition size for that logical volume (for example, 4 MB).
Unit of allocation
An individual file within a file system 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.
V3.1.0.1
Instructor Guide
Uempty
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-5
Instructor Guide
Instructor Notes:
Purpose Describe the structure of an AIX JFS file system.
Details The file system contains a list of the unused data blocks and unused inodes on
the file system. These are called the free block list and free inode list. Each block on the
disk must either belong to a file or be pointed to by the free list.
Because the number of inodes is fixed by the NBPI value, there is a maximum possible
number of files that can be created within a JFS file system. It is rare that this number is
insufficient.
The rest of the file system consists of data blocks which can either be allocated to files or
unused, and indirect blocks which contain pointers to data blocks. (These extend the
addressability of the inode and are used for large files.)
When the file system is in use, the superblock and some of the inodes and the free list are
held in memory by the kernel to improve disk performance.
The AIX file systems are called journaled file systems because they use journaling
techniques to maintain the integrity of the file system's structural information (superblock,
inodes) which can be recovered in the event of a system crash.
The data blocks are not journaled, so you may lose data, but you shouldn't lose whole
directories which could happen in other versions of UNIX.
To find a piece of data the file system uses directories to point to inodes which in turn point
to the data blocks.
The file system is oblivious to the LVM and thinks that it has all its data contiguous on disk.
In actuality, the data is on disk in 4 MB increments (the physical partition size) and some of
the data may actually reside in memory at the time.
Additional Information
Transition Statement Let's take a closer look at the structure of an inode.
V3.1.0.1
Instructor Guide
Uempty
Structure of an Inode
permissions
no. of links
type of file
user ID
group ID
file size
addresses of blocks
time modified
time accessed
time changed
access control information
reserved other
Contents of an inode
-li /home/team01
drwxr-xr-x 2 team01 staff 512
drwxr-xr-x 2 team01 staff 512
-rw-r--r-- 1 team01 staff 28
May 2 14:33
May 2 14:33
May 16 10:11
c
doc
Manuals
AU1411.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
11-7
Instructor Guide
Instructor Notes:
Purpose Identify the major fields in the inode and the importance of the information kept
in it.
Details All the base permissions, links, userid, groupid, and so forth, are kept in the
inode. The difference between the time changed and time modified is the following: time
changed means that only the inode changed. For example, maybe just the permissions on
the file were changed but not the actual file; whereas the time modified means that the file
actually changed.
The reserved other are pointers to the actual data blocks.
Although we have not yet discussed ACLs in this course, you might be asked where ACLs
are kept. ACLs are kept in an extended inode and are not kept in the actual inode itself. We
will have a limited discussion of extended attributes later in the unit.
Only use the following information as reference material for a Standard Journaled File
System only.
Direct addressing:
The first 8 fields are used to contain the absolute address of disk data blocks. Each disk
data block is 4 KB in size. (8 x 4KB = 32 KB). This scheme is used for files that are less
than 32 KB in size.
Single Indirect:
Field number 9 is used to represent where data is located on the disk. Instead of pointing to
a 4 KB block of real data, it contains the address of where the system can find 1024
addresses that point to 4 KB blocks of real data each (1024 x 4 KB = 4 MB). This scheme is
used for files in the range 32 KB to 4 MB in size.
Double Indirect:
The block pointed to by field 10 points to 512 entries on the disk. However this time the 512
entries do not point to data but instead point to 1024 addresses that point to data blocks
(512 x (1024 x 4KB) ) = 2 GB.
This scheme is used for files in the range from 4 MB to 2 GB only. Larger blocks of 128 KB
are implemented in files systems enabled for large files (to be discussed shortly).
Additional Information istat can be used to list inode information, as well.
Transition Statement File systems can be created so that less than the 4 KB logical
block is allocated for files smaller than 4 KB. This facility is called fragmentation.
V3.1.0.1
Instructor Guide
Uempty
4096 bytes
2000 bytes
4096 bytes
Fragmentation enabled
File size = 2000 bytes
Fragment size = 1024 bytes
2000 bytes
1024
1024 1024
1024
AU1411.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-9
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the JFS file system fragmentation facility.
Details Many UNIX systems only allocate contiguous disk space in units equal in size.
These units are referred to as disk blocks. Using a relatively large logical block size (for
example 4096 bytes) and maintaining disk block allocations that are equal in size to the
logical block are advantageous for reducing the number of disk I/O operations that must be
performed by a single file system operation, since a file's or directory's data is stored on the
disk in a small number of large blocks rather than a large number of small disk blocks. For
example, a file with a size of 4096 bytes or less would be allocated a single 4096 byte disk
block if the logical block size is 4096 bytes. A read/write operation would therefore only
have to perform a single disk I/O operation to access the data on disk. If the logical block
size were smaller (requiring more than one allocation for the same amount of data), then
more than one disk I/O operation may be required to access the data. A large logical block
and equal disk block size are also advantageous for reducing the amount of disk space
allocation activity that must be performed as new data is added to files and directories,
since large disk blocks hold more data.
Restricting the disk space allocation unit to the logical block size can, however, lead to
wasted disk space in a file system containing numerous files and directories of a small size.
Wasted disk space occurs when a logical block's worth of disk space is allocated to a
partial logical block of a file or directory. Since partial logical blocks always contain less
than a logical block's worth of data, a partial logical block will only consume a portion of the
disk space allocated to it. The remaining portion remains unused since no other file or
directory can write its content to disk space that has already been allocated. The total
amount of wasted disk space can be large for file systems containing a large number of
small files and directories.
In AIX, however, the disk space allocation unit, referred to as a fragment, can be smaller
than the logical block size of 4096 bytes (see student notes for other valid fragment sizes).
With the use of fragments smaller than 4096 bytes, the data contained within a partial
logical block can be stored more efficiently by using only as many fragments as are
required to hold the data. For example, a partial logical block that only has 500 bytes could
be allocated a fragment of 512 bytes (assuming a fragment size of 512 bytes), thus greatly
reducing the amount of wasted disk space. If the storage requirements of a partial logical
block increase, one or more additional fragments will be allocated.
As the files and directories within a file system grow beyond 32 KB in size, the benefit of
maintaining disk space allocations of less than 4096 bytes for partial logical blocks
diminishes: the disk space savings as a percentage of total file system space grows small
while the extra performance cost of maintaining small disk space allocations remains
constant. Since disk space allocations of less than 4096 bytes provide the most effective
disk space utilization when used with small files and directories, the logical blocks of files
and directories equal to or greater than 32 KB are always allocated 4096 bytes of
fragments. Any partial logical block associated with such a large file or directory is also
allocated 4096 bytes of fragments.
Copyright IBM Corp. 1997, 2005
11-11
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
4096
4096
4096
1
2
File system
INODES
128 bytes
1
2
3
4
5
6
7
8
4096
4096
4096
4 X 1024
AU1411.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.
11-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe how the number of inodes per file system can be altered.
Details The number of disk inodes 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 disk. Another way to look at this is that a
small NBPI value (512 for instance) results in a large number of inodes while a large NBPI
value (such as 16,384) results in a small number of inodes. The allowable NBPI values are
512, 1024, 2048, 4096, 8192, 16,384, 32768, 65536 and 131072. For consistency with
previous versions of AIX, the default NBPI value is 4096. The specified number of disk
inodes is created during file system creation. If the file system size is increased, additional
inodes will be created using the same NBPI value that was specified during the file
system's creation.
To clarify the visual, the first example when the NBPI is set to 4096 indicates that for every
4096 bytes there will be one inode available. However if the NBPI is set to 1024 then for
every 1024 bytes there will be one inode available. So in the second circumstance there
will be four times as many inodes as the first.
An easy way to help the students understand what NBPI represents is to explain that this is
just another way of saying average file size.
Additional Information
Transition Statement The AIX files and file systems are further characterized by the
Allocation Group Size (agsize) defined for the file system. Let's take a look at what role the
agsize plays when defining the file system.
11-15
Instructor Guide
inodes
Groupings of related
inodes and disk blocks
16 MB
16 MB
agsize
16 MB
16 MB
disk blocks
inodes
64 MB
Groupings of related
inodes and disk blocks
64 MB
agsize
64 MB
64 MB
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
NBPI
8 MB
16 MB
32 MB
64 MB
11-17
Instructor Guide
Instructor Notes:
Purpose Explain the concept of allocation group size.
Details Some like to think of an allocation group as a 'chunk' of contiguous disk space.
With a very large allocation group size, you have the potential to improve performance,
since data should be located in contiguous space on disk, and thus there should be less
movement of disk heads.
Note that there is a relationship between the agsize and the NBPI ranges in JFS.
Additional Information JFS2 also uses allocation groups. Since inodes are allocated
dynamically in JFS2, there is no NBPI parameter.
Transition Statement Let us look at the optional file system characteristic of doing
automatic compression of the files in the file system.
V3.1.0.1
Instructor Guide
Uempty
4096
4096
4096
4096
AU1411.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-19
Instructor Guide
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.
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain what compressed file systems are and how can they can be set up.
Details Data compression is an attribute of a JFS file system which is specified when
the file system is created with the crfs command. Compression only applies to regular files
and long symbolic links in such file systems. Fragment support continues to apply to
directories and metadata that are not compressed.
Each logical block of a file is compressed by itself before being written to disk. Once
compressed a logical block usually requires less than 4096 bytes of disk space. The
compressed logical block is written to disk and allocated only the number of contiguous
fragments required for storage. If a logical block does not compress, then it is written to
disk in its uncompressed form and allocated 4096 bytes of contiguous fragments.
4096 bytes of disk space are allocated to a logical block when it is first modified so that
there will be disk space available even if the block does not compress. If a 4096 byte block
is not available, the system returns an error condition even though there may be enough
disk space to accommodate the compressed logical block. Premature reporting of an
out-of-space condition is most likely when operating near disk quota limits or with a nearly
full file system.
Compatibility and Migration
Previous versions of AIX are compatible with the current JFS. Disk image compatibility is
maintained with previous versions, so that file systems can be mounted and accessed
without requiring disk migration activities or losing file system performance.
Performance Costs
Because data compression is an extension of fragment support, the performance costs
associated with fragments also apply to data compression. Compressed file systems also
affect performance in the following ways:
It may require a great deal of time to compress and decompress data so that the
usability of a compressed file system may be limited for some user environments.
Most UNIX regular files are written only once, but some are updated in place. For the
latter, data compression has the additional performance cost of having to allocate 4096
bytes of disk space when a logical block is first modified, and then reallocate disk space
after the logical block is written to the disk. This additional allocation activity is not
necessary for regular files in a noncompressed file system.
Data compression increases the number of processor cycles. For software
compression, the number of cycles for compression is approximately 50 cycles per
byte, and for decompression 10 cycles per byte.
Additional Information
Transition Statement Let's look at an AIX feature called Large File Enabled File
Systems.
11-21
Instructor Guide
1
2
3
4
1 Block
4 KB
..
.
1055
1056
..
.
File
132 MB
1025
1026
1027
132 MB
132 MB
32 Blocks
128 KB
1023
1024
128 KB
1057
1058
1059
..
.
32 Blocks
128 KB
AU1411.0
Notes:
Support of file sizes greater than 2 GB
On AIX V4.2 and later versions of AIX, JFS supports large file enabled file systems.
Only file systems enabled for large files can support files with a size greater than 2 GB.
V3.1.0.1
Instructor Guide
Uempty
11-23
Instructor Guide
Instructor Notes:
Purpose Explain what large file enabled file systems are and how they differ from the
standard file systems.
Details AIX V4.2 introduced the concept of large file enabled file systems to
accommodate file sizes greater than 2 GB.
The visual shows an example of the potential for disk space savings with large file enabled
file systems. It is important to note that if this 132 MB file was inside a regular standard file
system defined with 4 KB blocks it would have consumed a total of 33,792 blocks because
the system would have systematically allocated as many 4K blocks as it required. In the
example shown, the total block consumption is only 2048 blocks. This is why it is stated
that only 2 single indirect blocks are required because this works out to only 2 blocks of
1024 each.
Even with a file size of 132 MB, there is disk space efficiency if placed in a large file
enabled file system since fewer pointers are needed in the inode table. However, the 'catch'
is that any file in these file systems will require 32 contiguous 4 KB blocks for sizes beyond
4 MB. The file system may have thousands of free blocks, but if 32 of them are not
contiguous, the allocation will fail. The defragfs command reorganizes disk blocks to
provide larger contiguous free block areas.
Additional Information Do another example on the board. Suggestion: a 64 MB file
would be (1024 * 4 KB blocks) + (480 * 128 KB blocks) = 64 MB
Transition Statement Let's do an exercise about inodes and NBPI.
V3.1.0.1
Instructor Guide
Uempty
Exercise 11:
Working with File Systems (Part 1)
Part 1:
Inodes and NBPI
AU1411.0
Introduction
This exercise can be found in your Student Exercise Guide.
Only do Part 1 - Inodes and NBPI
11-25
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details Be sure to tell the students to ONLY do Part 1. The other parts (2-6) will be done
at the end of this unit.
Additional Information
Transition Statement Lets now look at journal logs.
V3.1.0.1
Instructor Guide
Uempty
Journal Log
1
Write data
sync / fsync
1) Inode changes to log
2) COMMIT to log
3) Update inode
4) Sync log
Inodes
Data
block
JFSLOG
AU1411.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-27
Instructor Guide
Inline logs
An inline log is a new feature specific to JFS2 file systems that allows you to log directly
to the file system. The default inline log size is 0.4% of the logical volume size
(in AIX 5L V5.1).
The following table lists the default inline log size in AIX 5L V5.2 and later.
LVsize
<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
JFS
JFS2
Yes
Yes
Yes
Yes
No
Yes
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe how journaled file systems are implemented.
Details AIX file systems by default are journaled, so every time a write operation is
carried out, the system will first log all the changes that it is going to make in the log file,
then it will carry out the update, and then it will compare the actual change to the logged
changes. If the two are consistent the operation is considered successful and the log entry
can then be discarded. Note: ONLY inode changes are logged and not the changes for the
data blocks. This is because it is far more important to be able to recover the structure of
the file system, which is what the inodes will allow, rather than the individual data blocks.
A dedicated disk is created on hd8 for rootvg when the system is installed. The JFS log
size is the same as the physical partition size of the volume group.
Additional Information When file systems exceed 2 GB or when the total amount of file
system space using a single log exceeds 2 GB, the default log size may not be sufficient. In
either case, the log sizes should be scaled upward as the file system size increases. The
JFS log is limited to a maximum size of 256 MB.
Transition Statement Let's summarize how the newer Enhanced Journaled File
System (JFS2) differs from JFS.
11-29
Instructor Guide
JFS2
64 Gigabytes / 64 Gigabytes
1 Petabyte / 1 Terabyte
1 Terabyte / 1 Terabyte
4 Petabytes / 1 Terabyte
Inode size
128 Bytes
512 Bytes
Number of inodes
Dynamic
Sequential
B-tree
Yes
No
Yes
AIX 5L V5.3
Compression
Quotas
JFS2 uses extent based allocation for high performance and large file size.
.
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction to JFS2
Enhanced Journaled File System (JFS2) is a new file system type that was introduced
in AIX 5L V5.1. It is based on JFS.
Reference information
The following reference information may be useful when you are reviewing the table on
the visual:
1 Petabyte
1 Terabyte
(TB)
1 Gigabyte
= 1024 Gigabytes
V3.1.0.1
Instructor Guide
Uempty
Extent-based allocation
JFS2 uses extent-based allocation. An extent is an address-length pair, which identifies
the starting block address and the length of the extent in blocks. This allows multiple
adjacent blocks to be addressed. The advantages of extent-based allocation are high
performance and large file size.
Dynamic inodes
The traditional approach of reserving a fixed amount of space for inodes at file system
creation time required accurate estimates of the number of files that would reside in the
file system. If the estimate was high, disk space was wasted. If the estimate was low, no
files could be added until the file system was expanded. JFS2 dynamically allocates
space for inodes as needed, and frees the space when it is no longer required.
11-31
Instructor Guide
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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce JFS2 file systems.
Details Note that JFS2, is the newer, Enhanced file system
Additional Information Stress that JFS2 has all the benefits of JFS; they are both
robust, journaling file systems. It was designed to support larger files and file systems and
perform faster due to extent based allocation. While we discuss this in the AIX 5L V5.3
installation unit as an AIX BOS installation choice, point out that JFS2 is optimized for use
with a 64-bit kernel. It is suggested that you install the 64-bit kernel if you have a 64-bit
hardware platform and you intend to use JFS2.
The absolute maximum size of a JFS file system in AIX V4.2 and later is 1 TB. However,
the actual maximum for JFS will be determined by that file system's NBPI and fragment
size. The actual maximum will be determined when the file system is created by the smaller
of (fragment size * 228 ) or (NBPI * 224 ).
The first calculation, (fragment size * 228 ) is based on the fact that 228 , which is equal to 256
MB, is the maximum number of fragments that a file system can have.
The second calculation, (NBPI * 224 ) is based on the fact that 224 , which is equal to
16 MB, is the maximum number of inodes that a file system can have.
The larger the NBPI and fragment size are, the larger the file system can be. Fortunately,
when SMIT is used to create a file system, it will do the calculations for you to determine
how large that file system can be.
For example, if a file system is created with a fragment size of 4096 bytes and an NBPI of
4096 bytes, the calculations would be:
(212 ) * (228 ) = (240 ) = 1 TB (Where 212 = 4096)
(212 ) * (224 ) = (236 ) = 64 GB
The smaller of the two is going to be the limiting factor. Therefore, the answer is 64 GB and
the number of inodes is the limiting factor.
Aside from this, there are many issues that have to be evaluated in order to implement an
ideal file system. Existing systems offer historical data regarding file size, use and growth
characteristics, but on a new system this data may not be readily available. Conscientious
planning on the outset can save time and effort and possibly avoid costly file system
conversion and migration procedures down the road.
Transition Statement One of the system administrator choices when creating an
Enhanced JFS is what format to use for any extended attributes. Lets look at what this
involves.
11-33
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.
11-35
Instructor Guide
Instructor Notes:
Purpose Introduce the concept of extended attributes and the new EAv2 support in
AIX 5L V5.3.
Details Focus on the fact the AIX 5L V5.3 now allows a choice of the format to be used
when defining a JFS2 file system - we will see this, as well as the compatibility issues with
previous versions of AIX 5L, later.
While we cannot delve into NFS in this course, it should be pointed out that, for most
systems, the only reason to use the newer EAv2 is to support the use of ACLs under NFS
V4.
Additional Information
Transition Statement Having discussed the major concepts behind both JFS and JFS2
file systems, let us look at how you can manage these file systems through SMIT.
V3.1.0.1
Instructor Guide
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
AU1411.0
Notes:
Using SMIT to manage file systems
As shown on the visual, SMIT can be used to complete numerous file system
management tasks.
11-37
Instructor Guide
Instructor Notes:
Purpose Show what activities a system administrator can perform with file systems.
Details Use this as a road map for the next several pages. On some pages the SMIT
screens will be shown. On others, the command. Where the command is simple and
quickly executed on a command line, the command will be shown. For the more complex
commands, the SMIT screens will be shown.
Additional Information
Transition Statement Let's see how to list file system information.
V3.1.0.1
Instructor Guide
Uempty
Nodename
Mount Pt
VFS
Size
Options
Auto
/dev/hd4
/dev/hd1
/dev/hd2
/dev/hd9var
/dev/hd3
/proc
/dev/hd10opt
/budget
/dev/cd0
__
__
__
__
__
__
__
sys4
__
/
/home
/usr
/var
/tmp
/proc
/opt
/reports
/cdrom
jfs
jfs2
jfs
jfs
jfs
procfs
jfs
nfs
cdrfs
16384
90112
1277952
8192
24576
__
__
__
__
__
__
__
__
__
ro
__
bg,hard,intr
ro
yes
yes
yes
yes
yes
yes
yes
no
AU1411.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.
11-39
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to list all the file systems defined on the system.
Details The information displayed is as follows:
Name
Nodename
Mount Pt
VFS
Virtual file system type: jfs = journaled file system, jfs2 = Enhanced
journaled file system, cdrfs = CD-ROM, nfs = network file system,
procfs = thread and process support file system
Size
Options
Auto
The Mount options shown for the NFS file system in the example are:
bg - If the first mount attempt is unsuccessful, additional mount attempts are made in
the background. The default is fg.
hard - Continuously send a request to the server until the server responds. This is the
default.
intr - Allows keyboard interrupts on hard mounts (that is, you can use <Ctrl>+c).
Please note that if the lsfs command is executed, the output of the command will be
slightly different, as accounting information is also shown. This has been deliberately left
out so that the visual is easier to read.
Additional Information
Transition Statement Now, how can you see just mounted file systems?
11-41
Instructor Guide
sys4
mounted
/dev/hd4
/dev/hd2
/dev/hd9var
/dev/hd3
/dev/hd1
/proc
/dev/hd10opt
/budget
/dev/ramdisk
/dev/project
/dev/cd0
mounted over
/
/usr
/var
/tmp
/home
/proc
/opt
/reports
/ramdisk
/project
/cdrom
vfs
jfs
jfs
jfs
jfs
jfs2
procfs
jfs
nfs
jfs
jfs2
cdrfs
date
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
Jul 11
20:14
20:15
20:15
20:15
20:16
20:16
20:16
20:16
20:17
20:18
20:19
options
rw,log=/dev/hd8
rw,log=/dev/hd8
rw,log=/dev/hd8
rw,log=/dev/hd8
rw,log=/dev/loglv00
rw
rw,log=/dev/hd8
rw,hard,bg,intr
rw,nointegrity
rw,log=INLINE
ro
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
- hd1
/home
- hd2
/usr
- hd3
/tmp
- hd9var
/var
- proc
/proc
- hd10opt
/opt
11-43
Instructor Guide
Instructor Notes:
Purpose Explain how to list all the mounted file systems.
Details The output from this command is similar to that from the lsfs command, but
only the mounted file systems are listed.
The mount command is also used to mount a file system to the tree, as will be seen later.
Additional Information This example also shows an NFS-mounted file system. We
have mounted budget from the remote server sys4. This file system is mounted on our
local client's mount point of /reports.
Transition Statement You've now seen how to list file system information. Let's see
how to add file systems in the AIX environment.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
11-45
Instructor Guide
Instructor Notes:
Purpose Describe how to locate and work with the file system management menus for
different types of file systems.
Details
Additional Information
Transition Statement Lets first look at the traditional JFS menu.
V3.1.0.1
Instructor Guide
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
AU1411.0
Notes:
Managing JFS file systems
The visual shows the SMIT menu displayed when the smit jfs fastpath is used.
11-47
Instructor Guide
Instructor Notes:
Purpose Show the students how to use the SMIT menus for creating file systems.
Details We will first discuss how to add a file system. The options on the first menu
shown for showing the characteristics of, and removing a file system will be discussed later
in this unit. The option of defragmenting the file system will be discussed in the next unit.
Be sure to point out that there are two options available if adding a file system. The option
to Add a Journaled File System will create both the logical volume and file system for
you. The option to Add a Journaled File System on a Previously Defined Logical
Volume assumes the logical volume has already been created. Ask the students 'Why
would you choose this second option?'. The answer is that you have more control over the
logical volume, its placement on disk, and so forth.
The second SMIT menu is shown for JFS in AIX V4.2 and later. This same menu will be
displayed for either adding a JFS, or adding a JFS to a previously defined logical volume.
Mention that Add a Compressed File System creates a JFS file system in which all data
is compressed automatically using LZ compression before being written to disk and all data
is uncompressed automatically when read from disk. The option to Add a Large File
Enabled Journaled File System creates a JFS file system in which the maximum file size
can be 64 GB (up from 2 GB for a standard journaled file system).
Transition Statement Let's assume we are going to add a standard JFS file system to a
previously defined logical volume.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
+
[ ]
no
read/write
[ ]
no
4096
4096
8
[ ]
F3=Cancel
F7=Edit
Enter=Do
+
+
+
+
+
+
+
+
F4=List
F8=Image
Figure 11-18. Add a Standard Journaled File System on a Previously Defined Logical Volume
AU1411.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.
11-49
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to add a JFS file system on an existing logical volume.
Details This visual shows the SMIT menu for creating a standard journaled file system
on a previously defined logical volume. The option for allocation group size is shown in
AIX V4.2 and later. Note that there is no option for specifying size. The file system will
assume the same size as the logical volume.
You may wish to leave this visual up for comparison with the next visual.
Additional Information
Transition Statement Let's see how you could create a JFS file system and a logical
volume at the same time.
11-51
Instructor Guide
*
*
[Entry Fields]
rootvg
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
Megabytes
[ ]
[ ]
no
read/write
[ ]
no
4096
4096
8
[ ]
+
#
+
+
+
+
+
+
+
+
F4=List
F8=Image
AU1411.0
Notes:
SMIT fastpath for reaching this screen
Use the SMIT fastpath smit crjfsstd to access this screen.
V3.1.0.1
Instructor Guide
Uempty
11-53
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe how a JFS file system can be created.
Details This visual shows how to create a journaled file system. The logical volume will
automatically be created.
You may wish to compare this visual with the previous one. Note that most of the fields that
need to be filled out are the same. However, if adding a file system without a previously
defined logical volume, it is necessary to indicate the size of the file system - this is the
primary difference between the two screens.
Additional Information Ask students why they might want to follow the two step
procedure of creating a logical volume and then adding a file system to it.
Answer: It is at the logical volume level that we can control logical volume location for
better performance. Thus, if performance is an issue, create the logical volume first.
Transition Statement Now lets look at how similar the process for adding a JFS2 file
system is.
11-55
Instructor Guide
F1=Help
Esc+9=Shell
F2=Refresh
Esc+0=Exit
F3=Cancel
Enter=Do
Esc+8=Image
Figure 11-20. Working with Enhanced Journaled File Systems (JFS2) in SMIT
AU1411.0
Notes:
Managing JFS2 file systems
The visual shows the SMIT menu displayed if the smit jfs2 fastpath is used.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the SMIT menu for working with Enhanced Journaled File Systems.
Details If anyone asks about the last 6 items in the menu (those related to JFS2
snapshots), point out that they are covered in the course Q1316 (AIX System
Administration II: Problem Determination.
Additional Information
Transition Statement Lets look at the two ways to add a JFS2 file system.
11-57
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
+
[ ]
no
read/write
[ ]
4096
[ ]
[ ]
Version 1
no
+
+
+
+
+
#
+
+
F4=List
F8=Image
Figure 11-21. Add an Enhanced Journaled File System (JFS2) on a Previously Defined Logical Volume
AU1411.0
Notes:
SMIT fastpath for reaching this screen
The SMIT fastpath for reaching this screen is crjfs2lvstd.
V3.1.0.1
Instructor Guide
Uempty
11-59
Instructor Guide
Instructor Notes:
Purpose Show how to add a JFS2 file system on an existing logical volume.
Details This visual shows the SMIT menu for creating an Enhanced journaled file
system on a previously defined logical volume. Note that there is no option for specifying
size. The file system will assume the same size as the logical volume.
On this and the next visual, only briefly remind the students of the difference between
letting the logical volume be allocated implicitly vs first creating the logical volume and then
defining the JFS2 upon it. That should have been sufficiently covered during the earlier JFS
discussion.
Instead focus on block sizes being effectively the same as fragment size and on the
ability to define either an external log or an inline log and size. The AIX 5L V5.3 panel will
show inline as one of the choices on the F4 list for Logical Volume for Log.
Also relate the last two items to the previous discussion about disk quota system support
and EAv2.
You may wish to leave this visual up for comparison with the next visual.
Additional Information
Transition Statement Let's see how you could create a JFS2 file system and a logical
volume at the same time.
V3.1.0.1
Instructor Guide
Uempty
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]
rootvg
Megabytes
[ ]
[ ]
no
read/write
[ ]
4096
[ ]
[ ]
Version 1
no
+
#
+
+
+
+
+
#
+
+
AU1411.0
Notes:
SMIT fastpath for reaching this screen
Use the SMIT fastpath smit crjfs2std to access this panel.
11-61
Instructor Guide
Instructor Notes:
Purpose Describe how a JFS2 file system can be created.
Details This visual shows how to create an Enhanced journaled file system. The logical
volume will automatically be created.
You may wish to compare this visual with the previous one. Note that most of the fields that
need to be filled out are the same. However, if adding a file system without a previously
defined logical volume, it is necessary to indicate the size of the file system - this is the
primary difference between the two screens.
Details
Transition Statement Once a file system has been created, it needs to be mounted in
order to get access to it. Let's see how this can be done.
V3.1.0.1
Instructor Guide
Uempty
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[ ]
[ ]
no
+
+
+
+
[ ]
no
no
no
no
+
+
+
+
F4=List
F8=Image
AU1411.0
Notes:
Mounting a file system makes it accessible
The files within a file system can only be accessed when the file system is mounted
within the overall file system structure. Either an individual file system or a group of file
systems can be mounted.
11-63
Instructor Guide
V3.1.0.1
Instructor Guide
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.)
11-65
Instructor Guide
Instructor Notes:
Purpose Discuss the mounting of file systems and what conditions must be satisfied in
order to mount or unmount them.
Details All of the default mount options for a journaled file system may be overridden if
the appropriate options are used in the mount command.
Mounted file systems may be unmounted using the umount or unmount commands if they
are not in use at the time. Some commands such as the backup command may want to
unmount a file system in order to work. If the file system is in use and cannot be unmounted
the command may fail, depending on the commands requirements.
If you enter unmount -a, then all the mounted file systems will be unmounted. The
unmount all command will unmount all the mounted file systems, except those with
stanzas in the /etc/filesystem file with the mount=automatic attribute.
A device is in use if any file is open for any reason or if a user's current directory is on that
device. The fuser command lists the process numbers of local processes that are using
the files. The -u flag specifies that the login name for the processes should also be listed.
Additional Information
Transition Statement You have a file system, and it is mounted. At some later point,
you may wish to make changes to it. Let's see what changes can be made.
V3.1.0.1
Instructor Guide
Uempty
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]
/var
[/var]
512bytes
[65536]
[bootfs]
yes
read/write
[ ]
no
4096
4096
no
true
16
+
#
+
+
+
+
AU1411.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.
11-67
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the characteristics that can be changed for a file system.
Details This visual is very similar to the Add a Journaled File System option. However,
spend a few minutes going through the new options, and also point out some of the values
that have been changed from the default.
On the SMIT menu, some items are merely informational and cannot be changed.
Examples of items that cannot be changed: fragment size, NBPI, compression, large file
enabled and agsize.
Discuss the size attribute, and point out that when the size of the file system is changed, it
will automatically increase the size of the logical volume. Remember, the smallest unit that
an logical volume can be increased is by one physical partition, so no matter what you
specify as the file system size, it will always round up to the next largest physical partition
size.
Additional Information If a file system is originally created with a size less than 8 MB,
the allocation group size will show up as whatever the file system size is, for example,
4 MB. 4 MB is not a valid value that can be specified by the user, but the system can still
use this value. Some of the system-created file systems use an agsize of 4 MB (for
example, /home). If the file system is later enlarged, the agsize will not increase. This is
because the agsize cannot be changed once the file system is created.
Transition Statement Now, lets look at how to make changes to JFS2 file systems.
11-69
Instructor Guide
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]
/home
[/home]
512bytes
[32768]
[ ]
yes
read/write
[ ]
no
4096
no
[ ]
Version 1
no
+
#
+
+
+
+
+
+
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss methods for making changes to a JFS2 file system.
Details Point out that the techniques used to make changes and the relevant file system
characteristics for JFS and JFS2 are similar.
Additional Information
Transition Statement Let's take a closer look at the new AIX 5L V5.3 capability to
dynamically shrink a JFS2 file system.
11-71
Instructor Guide
LP1
After:
LP2
LP1
# chfs
-a size="-16M"
/myfs
AU1411.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).
V3.1.0.1
Instructor Guide
Uempty
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.
11-73
Instructor Guide
Instructor Notes:
Purpose Explain the AIX 5L V5.3 capability to dynamically shrink a JFS2 file system.
Details See student notes.
Additional Information There is no command to show exactly how much a file system
can be shrunk, since the df command does not show the size of the metadata. In addition,
the free space reported by the df command is not necessarily the space that can be
truncated by a shrink request due to file system fragmentation. A fragmented file system
may not be shrunk if it does not have enough free space for an object to be moved out of
the region to be truncated, and a shrink does not perform file system defragmentation. In
this case, the chfs command should fail with the returned code 28. However, there is a
rule of thumb. A way to use it is to enter the df command to get information regarding the
file system and look at the size of the Free field. That might be the maximum size that you
can remove from the file system. Use the chfs -a command to shrink the file system and
then check the final size with the df command. Remember that a file system can be
extended or shrunk by a multiple of the physical partition size.
It must be noted that you can not shrink a file system if the requested size is less than a
physical partition size. If you attempt to reduce the size with less than a physical partition
size, the request will be ignored.
The size of the inline log can also be manually increase or decreased in AIX 5L V5.3 with
the logsize attribute of the chfs command.
Transition Statement Now that we have looked at creating and modifying our file
systems, let us look at how we remove then.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
+
+
no
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
11-75
Instructor Guide
Syntax
The syntax of the rmfs command is:
rmfs [-r] [-i] FileSystem
-r
-i
Displays warning and prompts the user before removing the file system
Example:
# rmfs -r /home/george/myfs
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain how to remove a file system.
Details This operation is supported through SMIT. You can specify removal of the mount
point (the directory) as well. However, this will only be possible if the directory is empty.
Additional Information
Transition Statement Lets discuss adding a RAM file system.
11-77
Instructor Guide
AU1411.0
Notes:
Adding a RAM file system
The visual shows a series of steps that can be used to add a RAM file system.
Limitations
Use ramdisk only for data that can be lost. After each reboot, the ramdisk file system is
destroyed and must be rebuilt.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss adding of a RAM file system.
Details Describe the process for adding a RAM file system (as shown on the visual) and
say a few words about the possible uses and limitations of such file systems (as pointed
out in the student notes).
Additional Information
Transition Statement Lets also discuss adding a UDF file system.
11-79
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
11-81
Instructor Guide
Instructor Notes:
Purpose Discuss adding a UDF file system on a DVD-RAM.
Details
Additional Information Starting with AIX 5L V5.2, DVD-RAM with UDF should be used
for system backup using mksysb. That is much easier then writing to a CD-RW in ISO9660
format.
Transition Statement Finally, lets recall a few important points regarding system
storage.
V3.1.0.1
Instructor Guide
Uempty
hd2
hd4
hd6
hd8
/usr
/(root)
hd1
/usr
lv00
Page Space
lv00
hd61
hd9var
free
free
hd1
/home
/home
hd1
/home
/home
/tmp
hd2
free
hd1
/usr
hd3
Page Space
log
hd5
free
hd2
free
free
lv00
special DB
special DB
lv00
/blv
/var
special DB
special DB
hdisk0
hdisk1
hdisk2
hdisk3
rootvg
uservg
File Systems
/(root)
File System
File Systems
Directories
/bin
/dev
/etc
/usr
/lib
/tmp
/var
/home
AU1411.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.
11-83
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review basic concepts regarding the Logical Volume Manager and how it
relates to the users view of the system.
Details The important point to drive home with this visual is the connection between the
logical volume and the file system.
Additional Information
Transition Statement Its time for a checkpoint.
11-85
Instructor Guide
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?
___________________________________________
___________________________________________
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test understanding of what has been covered in this unit.
Details A suggested approach is to give the students a few minutes to answer the
questions themselves and then go over the answers as a group. A suggested checkpoint
solution is given below:
Checkpoint Solutions
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.
Additional Information
Transition Statement Lets move on to the exercise for this unit.
11-87
Instructor Guide
Exercise 11:
Working with File Systems (Parts 2-6)
Part 2: Creating a journaled file system
Part 3: Changing The file system size
Part 4: Reducing the size of a file system
Part 5: Removing a file system
Part 6: Working with mirrors
AU1411.0
Notes:
Introduction
This lab has you build on the logical volume you created in the last exercise. It also
gives you an opportunity to create a file system and learn to increase the size of both
the logical volume and file system.
The exercise can be found in your Student Exercise Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise.
Details Part 1 was done earlier in this unit. The students should now do Parts 2-6.
Additional Information
Transition Statement Lets summarize the key points weve covered in this unit.
11-89
Instructor Guide
Unit Summary
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the key points covered in this unit.
Details
Additional Information
Transition Statement Weve reached the end of this unit.
11-91
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4910
12-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Monitor file system growth and control growing files
Manage file system disk space usage
Implement basic file system integrity checks
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for this unit.
Details
Additional Information
Transition Statement Managing storage space is an important part of system
administration.
12-3
Instructor Guide
Space Management
File systems expand upon notice, NOT automatically
To keep from running into problems:
Monitor file system growth
Determine causes
Control growing files
Manage file system space usage
Control user disk usage
Defragment file system
AU1411.0
Notes:
The need to monitor file system growth
Although AIX provides for dynamic expansion of a file system, it does not expand the
file system on the fly. The system administrator must continually monitor file system
growth and expand file systems as required before they get full. If a file system
becomes 100% full, then the users will receive out of space messages when they try to
extend files.
V3.1.0.1
Instructor Guide
Uempty
12-5
Instructor Guide
Instructor Notes:
Purpose Introduce key concepts regarding management of file system usage.
Details Make sure students understand the importance of managing file system usage.
If a file system fills up, typically there is no warning to the end user or program. Sometimes
you will end up with unpredictable results, such as the case when data blocks are gone but
directory space is not gone. You may have created a file, and the file exists, but it has zero
length, because there are no more data blocks available. This is why it is so important to
monitor the status of the file systems.
Additional Information
Transition Statement Now that we have listed the steps necessary to monitor our file
systems, let's take a closer look at each step.
V3.1.0.1
Instructor Guide
Uempty
512-blocks
16384
1630208
24576
24576
24576
65536
24576
8192
Free
7600
101648
22360
21520
5160
48728
3172
7848
%Used
53%
93%
9%
12%
79%
26%
86%
5%
Iused
1243
22217
257
144
518
374
620
17
%lused
30%
10%
8%
3%
16%
5%
22%
2%
Mounted on
/
/usr
/var
/tmp
/home
/proc
/opt
/home/john
/ramdisk
AU1411.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.
12-7
Instructor Guide
Flag (Option)
df -I
df -k
df -m
df -g
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to identify a file system that needs to be expanded or a file system
that needs to be reduced.
Details Make sure the students understand the difference between capacity planning on
a file system versus capacity planning for disk. For example, a file system may be 100%
full, but there may be plenty of additional physical partitions available on disk, so you could
easily go out and expand the file system. In addition, you may find your file system is full,
and you want to expand the file system. You may not be able to if there are no available
physical partitions on the disk.
Spend time talking about when a file system should be considered too full. Typically, the
number to use is above 80% full. Encourage the students to use a method which will
provide an automatic message on the console if a certain threshold is exceeded.
Sometimes a file system has much more space allocated than it is utilizing, and it might be
desirable to return that space to the volume group so as to allocate it to other file systems
that need more space. With JFS, this requires copying/backup of the file system, redefining
the file system with a smaller allocation, and finally, restoring of the data. With JFS2, the
reduction in size may be done dynamically. File systems that have been allocated only one
physical partition cannot be reduced even if only a small fraction of the file system is being
used. Also note that other file systems, such as /tmp, seem to be underutilized. The
%Used for /tmp varies a lot, so extra space may be needed, especially when doing
backups. /tmp is used for other operations, such as backup, which requires at least 8 MB
free. However, if we only had 12% utilization on /usr, then we would seriously have to think
about reducing the file system size.
Note also that (in the example shown on the visual) /usr is 93%, which suggests that this
file system should be increased. However, you typically do not want to increase the size of
this file system, as this should be a read only file system with only the operating system
files. Normally, usage of /usr increases as a result of installing filesets. The utilities which
install the filesets have a commonly used option which increases the /usr file system to a
size which is just sufficient to hold what is being installed. As a result /usr is often at 99%
full (or even 100%), and this may not be a problem. Remember that 1% free space in /usr,
which is a very large file system, is often more free space than many other file systems that
appear underutilized.
Additional Information
Transition Statement Now that we have identified what file systems may be very full
and may need to be expanded, and what file systems may need to be reduced, let's
determine if we need to expand those file systems or if there is something else we should
do.
12-9
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
- Example 1:
# cat /dev/null > /var/adm/wtmp
- Example 2:
# > /etc/security/failedlogin
The file /var/adm/sulog can be edited directly.
12-11
Instructor Guide
Instructor Notes:
Purpose Identify common types of files that grow uncontrollably. The system
administrator may want to control these on an ongoing basis.
Details The files listed tend to grow quite large and need to be cleaned out periodically.
For example, when you do a mksysb backup via SMIT, your smit.log file grows very large
and needs to be reduced or totally erased after the operation.
The wtmp file contains information about users logging in and logging out of the system.
The condition of ttys respawning too rapidly will create failed login entries as well. If
accounting is implemented, this file is managed through accounting. If accounting is not
implemented, then you at least need to reduce this file manually. The who command is used
against this particular file to take a look at the information it contains.
The /etc/security/failedlogin file can also become very large due to the condition of ttys
respawning too rapidly. This creates failed login entries as well.
When there is a bad serial connection to a tty device (terminal or modem) the getty
process which issues the login prompt will die. Since the /etc/inittab specifies that this is a
respawn process, the init process immediately respawns the getty for that tty. Each time
this happens, failed login entries are generated. If the serial connection repeatedly and
rapidly fails, then the respawn happens rapidly, and the error log will grow rapidly.
$HOME/websm.log is used to log the Web-based System Manager. This file can become
quite large since it tracks graphics-based activity.
Additional Information
Transition Statement There is a tool to help monitor these and other files that need
periodic clean-up. Let's take a look at skulker.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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:
-
12-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the skulker command.
Details Point out that this is an example of a task that is typically invoked periodically.
skulker is a shell script that is shipped with AIX BOS and performs useful clean ups of the
system, removing temporary and junk files.
As a template, it is suited to the operating system at the level on which it was installed. If
the operating system has been upgraded or modified, it may be inadvisable to use an old
version of skulker.
The skulker shell script is moderately complex. When making modifications, it is advised
to make a copy of the shell script first just in case!
Additional Information 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.
The cron command has not yet been covered. You will need to explain briefly that skulker
runs as a scheduled job by cron. The cron command will be addressed in a later unit.
Transition Statement Also, there is a command to help locate files that might be filling
a file system. That is the du command.
12-15
Instructor Guide
/home
/home/fred
/home/tom
/home/mary
/home/liz
/home/suzy
/home/guest
/home/steve
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.
12-17
Instructor Guide
Instructor Notes:
Purpose Explain how to determine the directory, file, and/or user that is causing the disk
expansion problem within a particular file system.
Details Note that the disk usage command is being used against a particular file system
and piped into the sort command. The sort command sorts on the first field, which is a
numeric field as specified by the -n option. The sort output will also be reversed because
of the -r option. The numbers that you see are in terms of 512-byte blocks. Use the -k
option to view sizes in 1 KB blocks.
The point is to identify who the user of file system is and, before expanding the file system,
ask the person if they really need that space.
Additional Information
Transition Statement Creating file systems that will allocate smaller logical blocks, a
process referred to disk fragmentation, is one way of saving disk space in an environment
where large numbers of small files are used. Let's see what needs to be considered when
deciding whether or not to use disk fragmentation.
V3.1.0.1
Instructor Guide
Uempty
Fragmentation Considerations
4096 bytes
Without fragmentation
2000 bytes
With fragmentation
2000 bytes
1024
1024
1024
1024
Considerations to be made:
Disk space allocation
Disk space utilization
I/O activity
Free space fragmentation
Fragment allocation map
Copyright IBM Corporation 2005
AU1411.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.
12-19
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss considerations related to fragmented file systems.
Details Although there is a distinct advantage in providing this enhancement for
ensuring optimal disk space utilization, this can sometimes be at the expense of
performance.
For files of greater than 32 KB in size, whatever the fragment size, allocation is performed
in logical blocks of 4 KB. The inode pointers therefore point to 4 KB logical blocks as before
For those files of up to 32 KB in size, fragments come into play.
Consider a file of 17 KB in size. The first 16 KB of this file are allocated logical blocks as
before, the disk addresses of these blocks pointed to by the first four pointers in the inode.
The last 1 KB of the file is allocated sufficient contiguous fragments to contain the
remaining data, if available. Assuming a fragment size of 512 bytes, two fragments in this
case.
As an example of disk space allocation, assume that a file is extended by 500 bytes, and
the file system fragment size is 512 bytes, this results in one allocation to this file of a
512-byte fragment. If the file is extended by another 500 bytes, another allocation of a
512-byte fragment is made to this file. So far, two allocation operations have already been
performed.
However, with a file system fragment size of 4 KB, the first file extension operation would
have involved one allocation to this file of a 4 KB fragment and the second file extension
operation would not have resulted in an allocation as there would have been sufficient
space from the first allocation. The number of allocations made in the file system using a
512-byte fragment could have been minimized if the two separate file extension operations
were performed as one extension of 1024 bytes. Although two 512-byte fragments would
still be allocated, this would involve only one file system operation to complete.
To clarify, assume that there is a portion of the disk consisting of eight contiguous 512- byte
fragments and that four files, each 500 bytes in size, have written to these fragments in a
non-contiguous manner. The free disk space within this area of the disk (four 512-byte
fragments) are unallocated fragments which also reside in a non-contiguous manner. A file
extension operation which would require 2048 bytes would not be allocated to these free
fragments as they would have to be contiguous for a single allocation to succeed.
Additional Information
Transition Statement If a file system becomes fragmented, AIX has a tool to fix this
problem.
12-21
Instructor Guide
filesystem
Options:
-q
-r
-s
AU1411.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
V3.1.0.1
Instructor Guide
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.
12-23
Instructor Guide
Instructor Notes:
Purpose Show how to defragment a file system.
Details Running the command with options will give you statistics as to the state of the
file system before the defragfs command runs. Then, when the command is run to do the
defragmenting, the same statistics are produced again, so a comparison can be made.
Additional Information This command was introduced with AIX V4.
Transition Statement Another operation that you can carry out to enhance system
availability is to verify the file systems. Let's see how this is done.
V3.1.0.1
Instructor Guide
Uempty
file system ]
AU1411.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.
Copyright IBM Corp. 1997, 2005
12-25
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define how the integrity of a file system can be checked.
Details
Additional Information
Transition Statement Let's see how we can document file system setup.
12-27
Instructor Guide
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List useful commands that should be run to document the file system setup
and state.
Details Encourage the students to run the commands listed on the visual, and any other
commands that they feel would be useful for documenting file system setup for their
system(s). (This type of participation/involvement should be encouraged during all lecture
sessions.)
Additional Information
Transition Statement Its time for a checkpoint.
12-29
Instructor Guide
Checkpoint
1. What command can you use to determine if a file
system is full? __________
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test understanding of what has been covered in this unit.
Details A suggested approach is to give the students a few minutes to answer the
questions themselves and then go over the answers as a group. A suggested checkpoint
solution is given below:
Checkpoint Solutions
1. What command can you use to determine if a file
system is full? df
Additional Information For question #2, use of the find command with the -size
option would also be a perfectly acceptable answer.
Transition Statement Lets move on to the exercise for this unit.
12-31
Instructor Guide
AU1411.0
Notes:
Introduction
The lab allows you to get some experience with the file system management tools. It
also allows you to build and test file systems with different characteristics.
This exercise can be found in your Student Exercises Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise for this unit.
Details Depending on the class, it might be a good idea to remind the students where
the instructions for the exercise are located.
Additional Information
Transition Statement Lets summarize the key points weve covered in this unit.
12-33
Instructor Guide
Unit Summary
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the key points covered in this unit.
Details
Additional Information
Transition Statement Thats the end of this unit.
12-35
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4908
SC23-4910
SC23-4905
13-1
Instructor Guide
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
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for this unit.
Details
Additional Information
Transition Statement So, what is paging space?
13-3
Instructor Guide
RAM Usage
Operating System
Database
8 MB FREE
TCP/IP
Current applications
Total = 248 MB
RAM Usage
Operating System
Database
4 KB
TCP/IP
Application
New application
needs RAM > 8 MB
4 KB
Paging Space
Copyright IBM Corporation 2005
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
13-5
Instructor Guide
Instructor Notes:
Purpose Define what paging space is.
Details Using the diagram in the visual, give a brief overview of how paging works.
While discussing the diagram, be sure to define the terms. Be careful not to go too deeply
into this topic. This is only meant to be a level set of terms for these students who have
never heard the terms before.
Make sure that you emphasize that in AIX, paging space is NOT intended to be used as an
extension to real memory.
Some UNIX operating systems use swap space rather than paging space, and some
people use the terms swap and page interchangeably. Actually, paging in AIX is demand
paging in 4 KB chunks. Swapping moves the entire process (which is most likely greater
than 4 KB) from RAM to disk.
Additional Information In the AIX environment, paging space is not used for
information that has a permanent home in file system space.
Transition Statement Now that you have an idea of what paging space is, lets talk
about why we need it.
V3.1.0.1
Instructor Guide
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
AU1411.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.
13-7
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain what paging space is and is not.
Details Cover the student notes and ensure that students understand what thrashing is.
It is not running out of paging space. The next page will cover what running out of paging
space will do.
Additional Information
Transition Statement What happens when you run out of paging space?
13-9
Instructor Guide
#
ksh: cannot fork no swap space
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
13-11
Instructor Guide
Instructor Notes:
Purpose Discuss points related to sizing of paging space.
Details The AIX VMM manages the use of system memory. It allows applications to
request more memory than there is physically installed in the system and will move pages
of memory to disk to make room for applications. If paging space becomes full, the system
will be unable to start any new processes until some of the running processes terminate or
release allocated memory. This situation should be avoided.
Systems with large amounts of memory typically do not need to have an amount of paging
space equal to or greater than the amount of RAM. Paging space can be smaller than RAM
because, by default, paging space pages are not allocated until the data in the page frame
needs to be paged-out. But, this is tricky because if paging activity begins to occur, the
machine could quickly run out of paging space. Before you size the paging area smaller
than RAM, you should have monitored the machines during peak times to know how much
paging space is generally needed.
Paging space can be added or enlarged easily. Prior to AIX 5L V5.2, reducing the size of a
paging space used to be difficult (involving a reboot). Now, reducing the size of a paging
space has become fairly simple. The paging space is a logical volume and has all of the
same characteristic of a normal logical volume.
Additional Information The system monitors the number of free paging space blocks
and detects when a paging space shortage exists. When the number of free paging space
blocks falls below a threshold known as the paging space warning level, the system
informs all processes (except the kernel ones) of this condition by sending a SIGDANGER
signal. If the shortage continues and falls below a second threshold known as the paging
space kill level, the system sends a SIGKILL signal to selected processes. (By default,
processed that have a signal handler for the SIGDANGER signal will not be sent a SIGKILL
in this situation. However, in AIX 5L V5.3, this default behavior can be altered by changing
the value of the low_ps_handling setting using vmo.) Also, AIX 5L V5.3 introduced two
paging space garbage collection (PGSC) methods to enhance paging space management.
Refer to the AIX 5L Differences Guide Version 5.3 Edition for more information about
PGSC.
The following information regarding paging space allocation policies is for instructor
background only. Don't try to cover this information in this class.
The following paging space allocation policies are available in AIX:
- Early Page Space Allocation (EPSA)
- Late Page Space Allocation (LPSA)
- Deferred Page Space Allocation (DPSA)
The paging space allocation policy determines when paging space will be allocated for
a process. Individual processes may use the system paging space allocation policy
(which can be set to DPSA or LPSA), or override the system paging space allocation
policy and use EPSA.
13-12 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
When the early page space allocation (EPSA) policy is used, paging space is allocated
as soon as a memory request is made, even if the memory is not accessed. Thus, if a
process that has specified EPSA uses the malloc() subroutine to allocate memory,
paging-space disk blocks will be allocated and reserved for that process at that point.
So, if the process needs to page out, there will always be paging space slots available
for it.
When the late page space allocation (LPSA) policy is used, the disk block for a paging
space page is only allocated when a page of a segment is used for the first time.
The deferred page space allocation (DPSA) policy is the default policy in AIX. With
deferred page space allocation, the disk block allocation of paging space is delayed
until it is necessary to page out the page. The goal of this policy is to avoid wasted
paging space allocation.
The system paging space allocation policy can be set to either LPSA or DPSA. The
system paging space allocation policy is used for any process that does not override
this system-wide setting by use of the PSALLOC environment variable. For AIX 5L, the
default system paging space allocation policy is DPSA.
The system paging space allocation policy can be displayed or set using the vmo
command.
The environment variable PSALLOC can be used by individual processes to override the
system paging space policy. If the value of PSALLOC is set to early, EPSA will be used
for processes subsequently started in that environment. If the value of PSALLOC is set to
null (or any value other than early), the system paging space policy is used.
Transition Statement As we have seen in the storage unit, paging space is contained
within a logical volume, and a logical volume can be placed at specific parts of the disk.
Let's see what considerations have to be made for paging space placement.
13-13
Instructor Guide
hd6
paging00
paging01
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
13-15
Instructor Guide
Instructor Notes:
Purpose Consider performance impact of the placement of paging space.
Details All processes starting during the boot processes are allocated to hd6. After that,
the round robin technique is used to assign paging space.
Cover the points on the visual.
The rc.boot script that controls the boot sequence is where the reference to hd6 is located.
If hd6 ever needs to be reduced in size, the rc.boot script will need to be edited to look for
a different default boot area. This procedure is well documented in the Web-based
documentation.
Never set up two paging areas on the same disk. The two areas will be used equally in the
round-robin scheme and the disk head will be moving back and forth to use each space
equally. This added disk head activity will surely decrease performance.
Additional Information It used to be true that allocating paging space to the center of
the disk was good practice. However, with many of the newer disks, this is no longer true.
Many of the new disks will perform better on the edges. You would need to check the specs
on the particular disk drive to determine the location that has the best performance.
Transition Statement Let's see how we can monitor the paging activity.
V3.1.0.1
Instructor Guide
Uempty
Physical Volume
hdisk0
hdisk2
Volume Group
rootvg
rootvg
Size %Used
64MB
43
64MB
20
AU1411.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.
13-17
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to list information regarding paging spaces defined on the system.
Details The important field to notice is the %Used. The value in this field should ideally be
between 30% - 70%. Note, however, that this figure will continually change depending on
the current work load of the system. The lsps command should be regularly executed at
different times of the day, to get a feel for how well the paging space is being used. You
should not panic if the value goes over or falls below the thresholds occasionally, or at
certain times of the day (say when all the users are on the system). What you are looking
for are trends, even to the extent of identifying when the peak times are for the system
activity and maybe scheduling some jobs to be carried out when the system load is slightly
less.
If throughout the day the %Used value is below 30% then the paging space you have
defined is too large for your system, and if it is continually over 70%, then you need to
define some more. Be careful, because if this value goes over 90%, then the system will
start to kill off processes in order to rectify the problem. Generally, when paging space is
low, the system will issue messages such as INIT: Paging space is low!. It is also
possible that users running applications will receive similar messages.
Also point out the names of the paging spaces as shown in the example. The paging space
hd6 was created during system installation. Paging spaces created by the system
administrator after installation will be name paging00, paging01, and so forth.
At system installation, initial paging space requirements include the following:
- AIX V4.2.1 requires that hd6 be a minimum of 32 MB
- AIX V4.3.1 and later versions require that hd6 be a minimum of 64 MB
The AIX 5L V5.1 documentation suggests keeping all paging spaces in rootvg until the
system administrator is thoroughly familiar with the system. Until the other volume groups
are varied-on, those non-rootvg paging areas cannot be activated.
It is also suggested that the system contain several paging areas of roughly the same size,
each on a different disk drive. For best performance, the primary paging space (hd6)
should be slightly larger (by about 16 MB) than the secondary paging spaces. The
secondary paging spaces should then be of equal size to ensure that the VMM round-robin
algorithm will work effectively.
Additional Information These guidelines apply to early paging space allocation, the
only allocation scheme prior to 4.3.2. With late or deferred paging space allocation, no
paging activity may exist. (The default paging space allocation policy for AIX 5L V5.3 is
DPSA.) Some paging space should still be kept in case paging is needed.
Transition Statement Let's assume that you have identified a problem with your system
as having too little paging space. How can you add some more?
13-19
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
Pvname
-s NumLPs
-a
V3.1.0.1
Instructor Guide
Uempty
-n
-t Type
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
13-21
Instructor Guide
Instructor Notes:
Purpose Describe how to add paging space
Details Ideally, there should be several paging spaces of roughly equal size, each on
different physical volumes. If you decide to create additional paging spaces, create them
on physical volumes that have the least activity.
Additional Information When using the method shown on the visual to add paging
space, the inter-physical volume policy will be set to middle. The system will then try to
place the paging area in the middle as long as there is room.
To have the policy set to someplace other than middle, instead of using this screen, you
would set up the paging area like a standard logical volume using smit lvm. When you use
this method, set the logical volume type to paging and set the policy to the desired
location. It is probably a good idea to name it pagingxx to keep it consistent with the
system's naming convention.
If you use this method, the paging area will not automatically be activated. You will need to
run swapon to activate the paging area. You will also need to ensure that /etc/swapspaces
is updated. You may encounter problems by directly editing /etc/swapspaces. The better
way to do it is to go in to smit pgsp and set the characteristic within SMIT. You can also
use chps -ay pagingxx.
Transition Statement Once paging space is installed, there are some characteristics
that can be changed. Let's look at those.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
13-23
Instructor Guide
The process chps goes through to decrease an active paging space is as follows:
Step
1
2
3
4
5
Action
Create a new, temporary space from the same volume group as the
one being reduced
Deactivate the original paging space
Reduce the original paging space
Reactivate the original paging space
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe how to change the characteristics of paging space.
Details The size of the paging space can be increased or decreased using this method,
The ability to decrease paging space was introduced in AIX 5L V5.1.
Usually, system administrators have a small area of paging space defined as inactive swap
space which is brought online in case of an emergency. This usually allows the
administrator enough of a buffer to sort out the problem, without the system killing
processes.
Additional Information Be aware that by default hd6 is also the dump area. If a system
is operating with less paging space than real memory, this could create a problem during a
system dump. A rule of thumb is that when a dump is created, it is about 1/4 of the size of
real memory. The command sysdumpdev -e will also provide an estimate of the dump
space needed for your machine. System dumps are covered in AU16/Q1316.
Transition Statement What if we have defined too much paging space? The next
operation will be to remove some of the defined areas. Let's see what conditions have to be
satisfied before the remove operation can be carried out.
13-25
Instructor Guide
Make inactive
# swapoff /dev/paging00
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
13-27
Instructor Guide
Instructor Notes:
Purpose Show how to delete paging space.
Details When a paging space is removed, the corresponding entry in /etc/swapspaces
is also removed.
The paging space /dev/hd6 cannot be made inactive and therefore cannot be removed. To
remove /dev/hd6, it is necessary to update rc.boot, which is not recommended. In
general, it is not recommended that any of the default paging spaces (hd6, hd61, and so
forth) be removed except by an experienced system administrator. Removing default
paging spaces incorrectly can prevent the system from restarting.
Do not expand hd6, create other paging spaces instead.
Additional Information
Transition Statement Let's outline once again what should be done if there is too little
or too much paging space defined on the system.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Overview
All ideas on this visual have already been considered. The visual simply pulls together
all the ideas discussed so far.
13-29
Instructor Guide
Instructor Notes:
Purpose List corrective suggestions for dealing with too much or too little paging space.
Details
Additional Information
Transition Statement As with all the other logical volumes, the paging space setup
should be documented. Let's see what steps can be taken.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
13-31
Instructor Guide
Instructor Notes:
Purpose Show how to document the paging space setup.
Details
Additional Information
Transition Statement Lets move on to some checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page
Space
Physical Volume
Volume
Group
Size
%Used
hd6
paging00
paging01
hdisk0
hdisk1
hdisk1
64 MB
64 MB
16 MB
43%
7%
89%
yes
yes
yes
rootvg
rootvg
rootvg
yes
yes
yes
lv
lv
lv
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
2. True or False? The size of paging00 (in the above example) can
be dynamically decreased.
Copyright IBM Corporation 2005
AU1411.0
Notes:
13-33
Instructor Guide
Instructor Notes:
Purpose Present the checkpoint questions.
Details
Checkpoint Solutions
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page
Space
Physical Volume
Volume
Group
Size
%Used
hd6
paging00
paging01
hdisk0
hdisk1
hdisk1
64 MB
64 MB
16 MB
43%
7%
89%
yes
yes
yes
rootvg
rootvg
rootvg
yes
yes
yes
lv
lv
lv
2. True or False? The size of paging00 (in the above example) can
be dynamically decreased.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Lets move on to the exercise for this unit.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
13-35
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise for this unit.
Details Depending on the class, it might be a good idea to remind the students where
the instructions for the exercise are located.
Additional Information
Transition Statement Lets summarize the key points weve covered in this unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
AU1411.0
Notes:
13-37
Instructor Guide
Instructor Notes:
Purpose Summarize the key points covered in this unit.
Details
Additional Information
Transition Statement Weve reached the end of this unit.
V3.1.0.1
Instructor Guide
Uempty
References
Online
Online
SG24-5765
SG24-5766
14-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Identify issues which have to be considered when deciding
which backup policies to implement:
Media to be used
Frequency of the backup
Type of backup
List the different backup methods supported through SMIT
and on the command line
Create a customized installable system image backup
Execute other useful commands to manipulate the backed
up data on the media
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List this unit's objectives.
Details Please remember to point out that the backup tools/methods described in this
unit are only applicable to files and directories visible to the operating system (for example,
mounted/available) and to data belonging to any one system.
When maintaining a network of AIX systems, it would be wise to purchase another product
(an LPP) that can manage network-wide backups (for example, Tivoli Storage Manager
(TSM) or Legato Networker).
Many AIX systems are used as database servers. The database is seen by the operating
system as a raw disk device or as a series of data files. Regardless of the location of the
database data, the point is that AIX cannot see beyond the file/directory level.
Databases should have their own backup tools.
Transition Statement Lets start by talking about why we need to backup.
14-3
Instructor Guide
Why Backup?
Data is very important:
Expensive to recreate
Can it be recreated?
Disaster recovery:
Hardware failure
Damage due to installation/repair
Accidental deletion
Transfer of data between systems
Reorganizing file systems
Defragmentation to improve performance
System image for installation
Checkpoint (before and after upgrade)
Long term archive
Copyright IBM Corporation 2005
AU1411.0
Notes:
Reason to have backups
The data on a computer is usually far more important and expensive to replace than the
machine itself. Many companies have gone out of business because they did not plan
for disaster recovery.
Backup to tape is the cheapest alternative but a duplicate disk or complete system
would also provide protection and fast recovery from a disaster.
Backups should be taken before installing/maintaining hardware/software, in case a
disk or files accidentally get damaged.
Backups are not just used for disaster recovery. One way of transferring a number of
files from one machine to another is to back those files up to diskette, tape or a file on
disk and then transfer that backup media to another machine.
When reorganizing the file systems on the disk you need to backup file systems so that
they can be deleted and moved to another location.
14-4 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
If you are going to install a number of similar machines, or wish to be able to quickly
reinstall a machine then a complete system image backup should be used.
14-5
Instructor Guide
Instructor Notes:
Purpose Describe good reasons for backing up data.
Details It is a known fact that most companies that have not had a backup policy have
gone out of business after a computer disaster.
There are three basic ways to reduce the size of file system. When performing a file system
backup, all that needs to be done is to remove the file system, recreate it to make it smaller,
and restore it from the backup. If you have sufficient space in another file system or can
create a temporary filesystem, you can move the contents of the file system to the
temporary space, delete and redefine the file system with a smaller size and then move the
data back. If using an enhanced journal filesystem (JFS2), you can dynamically shrink the
size in place.
This procedure is fine if the file system was not part of the operating system, (for example
/usr).
When working with operating system file systems, the procedure involves a system image
backup (more on this in a few visuals time). The image backup can be adjusted to restore
into the smallest possible file systems. (see the /image.data file later).
Additional Information
Transition Statement Having listed the reasons for backing up, let's look at the different
types of backup.
V3.1.0.1
Instructor Guide
Uempty
Types of Backup
Three types of backup:
System
Records image backup of the operating system
Full
Preserves all user data and configuration files
Incremental
Records changes since previous backups
Must be used carefully
Very quick
rootvg
Copyright IBM Corporation 2005
AU1411.0
Notes:
System backup
The system backup (system image backup) records and preserves all system data,
including logical volume inter/intra allocation policies, striping, file system setup (nbpi,
compression, fragment size) and paging setup.
Full backup
A full backup is similar to a system backup, but it is for user data.
14-7
Instructor Guide
Incremental backup
There are two types of incremental backups:
- The first method is to do a full backup. For example, do a full backup on Sunday,
and then for the rest of the week, only backup the changes from the previous day.
This method has the advantage of being quick, but there are a lot of tapes involved.
Should one of the tapes be missing, you will have problems restoring using the
remaining tapes.
- The second method again involves taking a full backup on Sunday. However, the
other days of the week backup only the changes made since the full backup; that is,
since Sunday. The backups take slightly longer than the previous method, and
towards the end of the week, if most of your system has changed, then the time
taken is similar to a full backup. The restoration procedure does not depend on the
tape from the previous day.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To enumerate the different ways in which a backup can be achieved.
Details It is recommended that a system backup should be performed every time the
system changes.
Transition Statement We will now work on describing a backup strategy.
14-9
Instructor Guide
Backup Strategy
Backup all data that changes!
System backup
Full backup
Incremental backup
Incremental backup
Copyright IBM Corporation 2005
AU1411.0
Notes:
Elements of a backup strategy
Every organization sets its own backup policy, but a suggested strategy could include
doing a system backup when the system is installed or upgraded, then a full backup
periodically, perhaps weekly. The incremental backups can be run each day to copy
files that have changed since the last incremental backup or the last full backup.
The key to any backup strategy is to ensure the data that is changing is saved regularly
while trying to avoid interruptions to users' access to the data on your system.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the elements of a backup strategy.
Details This is not intended to describe an exact backup policy for an organization since
each organization has its own special considerations. For example, a retail store that
closes at night can have a different strategy than an hospital that has a need for
uninterrupted access to their patient records.
If you have time, you might ask the students what factors have to be considered. You
should be able to develop a list that mentions some of these items:
Amount of data
Type of back up media
Hours of operations
Staffing in the computer center
Can the data be off-line for a short period of time or not at all
Additional Information rootvg should be separate from the user data on your system.
Data in rootvg shouldn't be changing very much whereas the user data is typically
changing constantly. Keeping your operating system and user data separate is always
good practice.
The incentive for incremental backups is to reduce the window of time during which the
applications must be quiesced in order to insure the integrity of the backup. When no down
time is acceptable, other strategies must be used, such as the splitting off of a mirror copy
to act as the source of the backup. Splitting mirror copies is an advanced topic covered in
later courses such as System Administration II: Problem Determination (Q1316/AU16) and
System Administration IV: Storage Management (Q1320/AU20).
Transition Statement Lets take a look at some backup media, starting with diskettes.
14-11
Instructor Guide
Drive
3 1/2-inch (1.44)
3 1/2-inch (2.88)
/dev/fdxl
720 KB
/dev/fdxh
1.44 MB
720 KB
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
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.
14-13
Instructor Guide
Instructor Notes:
Purpose Show how to use the diskette device.
Details Diskettes are only useful for small amounts of data.
Don't spend a lot of time on the different names. Make sure everyone understands
/dev/fd0. This is the one they most likely will be using. Point out the device names from the
chart to show the same device can have multiple logical names that will effect how a device
is handled.
Explain that the AIX can read DOS diskettes. Make sure it is clear that AIX cannot run DOS
executables. dosread and doswrite both have a -a option that converts DOS ASCII to
UNIX ASCII.
Additional Information
Transition Statement Now, let's look tape backup devices.
V3.1.0.1
Instructor Guide
Uempty
1/2 - inch
VXA
8 mm
DLT
QIC
Low
Capacity
Retension on
Open
Rewind on
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
AU1411.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.
14-15
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show the logical names that are assigned to tape devices.
Details Listed are the most commonly used tape devices. You do not need to explain
each type in depth. The main thing that determines what is best for a particular
environment is capacity, speed and cost.
Most of these tapes are available in tape subsystems (systems contain multiple tapes) or
tape libraries (large scale tape storage devices). Point students to the Web site in the
student note for details.
Concentrate on the logical device names. In particular, make sure students understand
rmt0 and rmt0.1 These are the most commonly used devices.
Additional Information Of these tape devices, some are only supported on certain
types of SCSI. This is too much details for this class. Again, the Web site has specifics.
Transition Statement One other form of backup devices is becoming more popular.
That is the read/write optical drives. Let's take a look at those.
14-17
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
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.
Backing up to DVD is only supported with the IBM 7210 (see next visual) and there is
no need to install special software in order to write using the standard UDF format.
14-19
Instructor Guide
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 is covered in the
Q1316 AIX System Administration II: Problem Determination course.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show AIX provides support to read/write optical drives.
Details Optical drives can be supported like a CD as a read only device. This would be
good if you are only interested in reading data already contained on the optical drive.
It can also be supported with a standard JFS file system. The optical drive is treated like a
physical volume instead. The procedure are the same for the optical drive as they are for a
physical volume. However, optical drives volume groups cannot span any additional
device. They must be self-contained on one optical drive.
If an optical drive containing a volume group is brought to a new system, the disk should be
imported onto the new system (just like if it were a physical volume). If you create a new
volume group with the optical drive, it will overwrite all of the data on optical drive.
If you want to remove the optical disk, use the exportvg command. The device is removed
but not the data. If you remove the file system and then the volume group, the data will also
be removed.
Optical devices will have the logical name omdX.
Additional Information DVD support has been available since AIX 5L V5.1. Creating a
backup CD/DVD is similar to making a backup tape for your personal use, but with some
noticeable differences.
For information about CD/DVD-R/DVD-RAM drives and CD/DVD-R creation software, refer
to the README file, /usr/lpp/bos.sysmgt/mkcd.README.txt.
The Web-based System Manager and SMIT both use the mkcd command, which calls the
mksysb or savevg command, if needed. For system backups, the CDs can be created as:
Non-bootable CDs
Generic CDs (bootable on any target system)
Personal CDs (bootable only on the source system)
Only CHRP systems support booting from DVD.
Web-based System Manager does not support backups to DVD.
Transition Statement Now, lets look at the SMIT backup menus.
14-21
Instructor Guide
Backup Device
7210 External DVD-RAM Drive
Writes DVD-RAM media
Reads DVD media in 2.6 GB, 4.7 GB, 5.2 GB and 9.4 GB
Supports CD-ROM media in Modes 1 or 2, XA, and CDDA
and audio formats
Reads multi-session disks, CD-R, CD-ROM, and CD-RW
disks
Loading tray accommodates 8 cm and12 cm media
SCSI attachable
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce students to capabilities of 7210 drive.
Details Emphasize that this drive is the only supported drive for doing DVD writes on the
AIX/pSeries platform. It does not write to CD, for that they need an OEM drive.
Additional Information
Transition Statement Now that we have discussed some the alternative backup media,
let us look at the various backup utilities.
14-23
Instructor Guide
File Systems
Volume Groups
Volume Groups
Back Up a Volume Group
Remake a Volume Group
List Files in a Volume Group Backup
Restore Files in a Volume Group Backup
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose This visual shows the various locations in SMIT where backups can be done.
Details The underlying theme is that in each sub-menu you can back up the elements
that sub-menu supports.
For example, in the SMIT Volume Groups menu, volume groups can be backed up and
restored.
Additional Information
Transition Statement We will now look at the processes involved in a system image
backup.
14-25
Instructor Guide
AU1411.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
V3.1.0.1
Instructor Guide
Uempty
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.
14-27
Instructor Guide
Instructor Notes:
Purpose To show what the mksysb command backs up and doesn't back up.
Details Make sure the students understand that unmounted file systems are ignored.
If you need to clone a machine with different hardware, the machine must be booted from
an installation CD. Then, during the installation from the tape, the appropriate filesets will
automatically be installed using both the mksysb image and the CD. Since the mksysb
image does not contain a complete set of all AIX filesets (it only has the fileset contained on
the source machine), the CD is able to supplement the filesets contained on the mksysb
image.
Additional Information
Transition Statement Let's turn our attention to the restore process. There is a file that
allows us to customize restore process.
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
Copyright IBM Corp. 1997, 2005
14-29
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To describe the mkszfile utility and the functionality of the /image.data file
that it creates.
Details When the SMIT panel for the system image backup runs, it will automatically
invoke the mkszfile command.
mkszfile will parse the rootvg volume group, logical volume and file systems information
for the root volume group and place the result in the file /image.data.
During the mksysb backup, the /image.data file is placed in the second file on the mksysb
backup tape. During the restore process, this file is loaded into the RAM file system when
recovering with the mksysb in maintenance mode. The result of this is that the restore of a
system will retain the same logical volume and file system arrangements as when created.
Additional Information The mkszfile utility will create an image.data file which has
configuration information about all the logical volumes and file systems in the rootvg, not
just the those which are system defined. If the installation needs to be as generic as
possible, then the mkszfile utility can be circumvented by using the template file
/usr/lpp/bosinst/image.template which is a blank template containing only the system
defined logical volumes. Great care should be taken when editing this file. Failure to do this
will result in a partial installation!!!
System image backups are localized to the architecture supported, for example,
uniprocessor systems vs. multiprocessor systems. A mksysb image created from a
uniprocessor system will be unusable on a symmetric multiprocessor system without
getting the supplemental files from the installation CD. There are some exceptions to this. If
the system had been installed with the option to install all devices and kernels, then it is
clonable to any system. If the source system did not have all the devices and kernels
installed, then we can still clone by booting into maintenance mode using the AIX
installation CD and than identifying the mksysb tape as the source of the recovery. The
third option is the backup to CD or DVD and include all the device and kernel filesets in the
file system that is recorded onto the backup media.
Transition Statement The other side to the restore from an image backup is to provide
the functionality for an unattended installation. We shall now see how this can be achieved.
14-31
Instructor Guide
AU1411.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.
V3.1.0.1
Instructor Guide
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.
14-33
Instructor Guide
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.
14-34 AIX System Administration I
V3.1.0.1
Instructor Guide
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
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. 1997, 2005
14-35
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how the installation of AIX can be affected in order to make it
unattended.
Details When performing the mksysb backup, the /bosinst.data file is placed in the
second file on the backup tape (along with the /image.data file). Upon restore, this file is
loaded into the RAM file system when booting in maintenance mode.
Emphasize that in order to be able to carry out these commands, the package
bos.sysmgt.sysbr is required.
Additional Information
Transition Statement This outlines the manual procedure. This can be followed if
control over the image backup is desired.
On the other hand, if the backup is to be localized to a particular system, then the SMIT can
be used.
14-37
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.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:
-
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the new backup options in SMIT.
Details AIX 5L V5.3 has a new option in this menu to create generic backups. Basically
this will prompt you to mount the installation media so that all the kernels and device driver
can be included in the backup, thus making it more easily cloned to other machines.
Additional Information
Transition Statement Lets learn how to back up your rootvg in SMIT with the smit
mksysb fast path.
14-39
Instructor Guide
[Entry Fields]
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.
F2=Refresh
F6=Command
F10=Exit
[]
no
no
no
no
yes
no
no
yes
[]
F3=Cancel
F7=Edit
Enter=Do
+/
+
+
+
+
+
+
+
+
#
F4=List
F8=Image
AU1411.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.
EXCLUDE files?
This option excludes the files and directories listed in the /etc/exclude.rootvg file from
the system image backup.
14-40 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
14-41
Instructor Guide
Instructor Notes:
Purpose Show how SMIT performs a system image backup.
Details Some older PCI machines cannot boot from a tape device. If you are using one
of these older machines, you will need to boot from an installation CD. During the
installation, you specify the location of the files to restore. In this case, specify the tape
device.
You can use the bootinfo -e command to determine if the machine is bootable from tape.
If a 1 is returned, the system is tape bootable. A 0 indicates it is not.
Some documentation indicates that the bootinfo command is not supported in AIX V4.2
and later. However, the command still exists and executes on the AIX V4.3 and later
systems.
Beginning with AIX V4.2 also has the option List files as they are backed up?. This
corresponds to the -v option of the mksysb command. Another option is -p, which can be
used to disable packing of files.
Additional Information In order to create a bootable tape, sufficient space is required
in /tmp. Use the command bosboot -qad hdiskn to determine how much space will be
needed in the /tmp directory when creating the mksysb image.
A restriction on the mksysb utility is that only mounted file systems are backed up!
Transition Statement We now look at how non-rootvg volume groups are backed up.
Let's see what the tape format looks like for a mksysb image.
V3.1.0.1
Instructor Guide
Uempty
mksysb Image
Blocksize =
512
Blocksize =
512
Blocksize =
512
Tape Drive
Blocksize
BOS Boot
image
mkinsttape
image
dummy
.toc
rootvg
data
Kernel
Device Drivers
./image.data
./bosinst.data
./tapeblksz
Dummy TOC
Backup
by name
AU1411.0
Notes:
Introduction
This visual shows the tape layout of a mksysb image.
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.
14-43
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show the format for the mksysb tape.
Details This information is important to know if you want to restore one file from the
image rather than the whole image. If the tape is positioned to the fourth file (rootvg data),
files can be retrieved using restore. restore is discussed later.
Additional Information
Transition Statement Let's see how we back up other volume groups.
14-45
Instructor Guide
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the new backup options in SMIT to back up a non-rootvg volume
group.
Details
Additional Information
Transition Statement Lets see how we back up other volume groups with smit
savevg.
14-47
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[]
[]
no
yes
no
no
no
no
yes
[]
no
no
+/
+
+
+
+
+
+
+
+
#
+
+
F4=List
F8=Image
AU1411.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
14-48 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
14-49
Instructor Guide
Instructor Notes:
Purpose To cover how to backup non-rootvg volume groups.
Details The SMIT screens for Back Up a Volume Group to Tape/File and Back Up the
System are nearly identical since they both perform volume group backups. But, Back Up
the System, using mksysb, creates bootable backups.
Since you have just covered the Back Up the System screen, you only need to point out
the differences. Review the student notes for those differences.
The command that is run is savevg. The -i option calls the mkvgdata command to create
the vg_name.data file. The -m option creates map files.
Additional Information This screen can backup rootvg but it will not be bootable.
Therefore, Back Up the System, using mksysb, is the tool of choice for rootvg.
Transition Statement Once you have your backups, how do you recover? Let's take a
look.
V3.1.0.1
Instructor Guide
Uempty
Restoring a mksysb (1 of 2)
Boot the system in install/maintenance mode:
Welcome to Base Operating System
Installation and Maintenance
>>
1
2
3
Maintenance
>>
1
2
3
4
Tape Drive
tape/scsi/4mm/2GB
Path Name
/dev/rmt0
AU1411.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.
14-51
Instructor Guide
Instructor Notes:
Purpose Show the correct procedure to recover the mksysb image.
Details Explain how to boot the machine from tape. This should be a review from the
installation section, so ask the students how it is done.
Make sure they understand about boot lists and ensuring the device they are trying to boot
from precedes the hard disk.
Additional Information Some older PCI machines could not boot from tape. They have
to boot from CD. The procedure is the same only you will need both the installation CD and
the mksysb image. Some PCI models will not support an AIX 5L V5.2 and later image.
The command bootinfo -e will display whether the machine can boot from tape (1=yes,
0=no). The man pages state that bootinfo is not a supported command in 4.2 and later, but
it still works.
When booting from a tape, there is a limit in the size of the boot image which can be
handled. If there are too many device drivers installed on the system being backed up, the
boot image size will exceed this limit and will not be bootable. In that situation, it may be
necessary to boot into maintenance mode from installation media and then specify the tape
as the source of the mksysb backup image.
Transition Statement You will then see two more screens. Let's take a look.
V3.1.0.1
Instructor Guide
Uempty
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
hdisk0
No
No
AU1411.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.
14-53
Instructor Guide
- 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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the remaining steps to complete the mksysb install.
Details Cover the options concerning map files and shrinking the file systems. Using the
shrink capability allows / (root) and /usr to be shrunk easily. You can ask the students how
to shrink a file system. When they say remove it and re-create it, you can then ask them
how can you do that with / (root) and /usr. This shrink option with the mksysb recover is the
easiest method.
Additional Information If recovering the data on to disks of a difference size then when
the backup occurred, then the map files will not work correctly. The map file option only
works if they are mapped to the same drive.
Individual file systems can be shrunk. This requires editing the image.data file before
performing the backup. This is not covered in this class.
Transition Statement Let's look at restoring a non-rootvg volume group.
14-55
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
Fields]
[/dev/rmt0]
no
no
[]
+/
+
+
+
yes
[]
+
+#
[]
[]
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
14-57
Instructor Guide
Instructor Notes:
Purpose To show how a non-rootvg volume group can be restored using SMIT.
Details This utility can be used to shrink the size of file systems contained in an external
volume group. If yes is chosen for SHRINK the filesystems?, the file systems within the
volume group will be recreated to the minimum size required to contain the data. This
reduces wasted free space in a file system
Additional Information Individual file systems can be shrunk by editing the
vg_name.data file. This is not covered in this class
The Recreate logical volumes and filesystems only option will use the image.data
information to recreate the logical volumes and file systems, but will not restore any of the
data to the file systems.
Transition Statement We will now look at how to backup the a system to either CD or
DVD, but to fully understand the options we need to first discuss the differences between
using ISO9660 and UDF mechanisms.
V3.1.0.1
Instructor Guide
Uempty
CD or DVD
Copyright IBM Corporation 2005
AU1411.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.
14-59
Instructor Guide
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
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To provide the big picture of what is involved with creating a mksysb that is
burned to disk using ISO9660.
Details
Additional Information
Transition Statement Let us compare this with using a UDF formatted DVD.
14-61
Instructor Guide
UDF DVD
File system
Copyright IBM Corporation 2005
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To explain the advantages of using UDF when backing up to DVD.
Details
Additional Information
Transition Statement Lets move on to the details of how to actually specify system
backup to CD or DVD using smit.
14-63
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
[Entry Fields]
[]
+
no
no
no
yes
[]
[]
[]
+
+
+
+
/
/
/
[rootvg]
yes
yes
yes
[]
[]
[]
[]
[]
no
[]
+
+
+
/
/
+/
/
/
+
/
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to specify a system backup to CD or DVD using smit.
Details
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to:
/usr/lpp/bos.sysmgt/mkcd.README.txt.
Transition Statement We will next see that the screen for doing a DVD backup using
ISO9660 is almost identical.
14-65
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[]
no
no
no
yes
[]
[]
[]
+
+
+
+
[rootvg]
yes
yes
yes
[]
[]
[]
[]
[]
no
[]
+
+
+
/
/
+/
/
/
+
/
/
/
/
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Point out the options in burning to DVD (ISO9660).
Details Dont spend much time on this; just point out the similarities with burning a CD.
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to:
/usr/lpp/bos.sysmgt/mkcd.README.txt
Transition Statement Let's compare burning a DVD with writing directly using UDF.
14-67
Instructor Guide
[]
no
no
no
yes
[]
+
+
+
+
/
[rootvg]
yes
[]
[]
[]
[]
[]
no
[]
+
/
/
+/
/
/
+
/
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the differences in using UDF to write directly to the DVD.
Details Stay focused on relating the selection of options to the previous discussion. For
example, most of the fields are the same except you no longer have to pre-build the
information on disk first (except for the mksysb image file itself), but instead can directly
write to the file system on the UDF DVD.
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to:
/usr/lpp/bos.sysmgt/mkcd.README.txt.
Transition Statement Not only can you create a mksysb to CD or DVD, you can do the
same for non-rootvg backups.
14-69
Instructor Guide
CD-R Device
* Volume Group to back up
savevg creation options:
Create map files?
Exclude files?
Disable software packing of backup?
Backup extended attributes?
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
Advanced Customization Options:
Remove final images after creating CD?
Create the CD now?
Debug output?
Backup Volume Group information files only?
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
no
no
no
yes
+
+
+
+
[]
[]
[]
/
/
/
[rootvg]
yes
yes
no
no
+
+
+
+
+
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain what is involved in backing up a volume group to CD media.
Details Just briefly point out the similarities with doing a mksysb backup to CD and move
on.
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to:
/usr/lpp/bos.sysmgt/mkcd.README.txt.
Transition Statement We can also backup up non-rootvg volume groups to DVD, lets
briefly look at those screens.
14-71
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
+
+
no
no
no
yes
+
+
+
+
[]
[]
[]
/
/
/
[rootvg] +
[]
[]
yes
yes
no
no
+
+
+
+
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Overview
Backing up a non-rootvg volume group to ISO9660 DVD is similar to backing up a
rootvg volume group.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain savevg when using ISO9660 to DVD.
Details Very briefly point out how similar this is to backing up to CD and move on.
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to the file:
/usr/lpp/bos.sysmgt/mkcd.README.txt.
Transition Statement And finally, we can also write the savevg directly to a DVD.
14-73
Instructor Guide
[]
[]
+
+
no
no
no
yes
+
+
+
+
[]
[rootvg] +
no
no
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
+
+
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Overview
Backing up a non-rootvg volume group to UDF DVD is similar to backing up a rootvg
volume group.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain doing savevg to a DVD using UDF.
Details Once again briefly point out how we do not have to specify the intermediate file
system location because we will be writing directly to the DVD.
Additional Information For additional information on how to back up rootvg and other
volume groups to these devices please refer to the online documentation: Installation
Guide and Reference: Creating Backups or refer to:
/usr/lpp/bos.sysmgt/mkcd.README.txt.
Transition Statement Lets work on an exercise.
14-75
Instructor Guide
AU1411.0
Notes:
Introduction
In this exercise, you create a backup of datavg and save it to the a file in rootvg.
The exercise can be found in your Student Exercises Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the exercise.
Details Be sure to let the students know to only do Part 1 of the exercise.
Additional Information
Transition Statement We will now look at how file and directory backups can be carried
out, starting with the backup command.
14-77
Instructor Guide
Back Up by Filename
backup -i [-q] [-p] [-v] [-f device]
-q
-p
-v
Media is ready
Pack files which are less than 2 GB
Verbose - display filenames during backup
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
14-79
Instructor Guide
Instructor Notes:
Purpose To explain the syntax used with backup and explain the different between
backup by file systems and backup by inode.
Details Make sure the difference between the two method is understood.
Additional Information The -p option is not needed if the tape device itself is doing
compression. The 2 GB limit to file compression is a characteristic of the pack utility that is
used here.
Transition Statement Standard input is used to determine what files are backed up with
a backup by name. This list of files can be supplied by a file or by a command. Let's take a
look at a few examples.
V3.1.0.1
Instructor Guide
Uempty
< listfile
AU1411.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. 1997, 2005
14-81
Instructor Guide
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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to use backup by name.
Details Explain the examples based on the student notes. Make certain you draw the
distinction concerning absolute and relative pathnames.
All of the examples show backup to tape, but the -f option is to specify the file. A backup
can be made to a file on disk. However, make certain that you are not trying to backup the
backup. The backup file should be a least one directory above the files that are being
backed up.
Additional Information If a list file contains a directory name, the directory is backed up
as an empty directory. The list file must explicitly name the directory and the files in the
directory if all the files are to be backed up. This is why the find command is commonly
used with backup since it provides a recursive listing.
Some people will also create a list file with the find command. This allows the
administrator to modify the file list quickly and easily before running the backup command.
Transition Statement It is important to know how to run backups from the command
line so they can be scheduled to start. If you are around when the backup needs to be run,
you can use SMIT to help. Let's see how.
14-83
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
+/
/
+
+
+
+
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how SMIT manages a file or directory backup.
Details The visual shows how files can be backed up by name using SMIT. This SMIT
menu produces a backup by name.
The default for the FILE or DIRECTORY to backup field is a .. This means that everything
in the current working directory will be backed up.
Care should be used if changing the default for the PACK files? field. Change the default
only when backing up inactive files. If a file is modified while a backup is in progress, the file
may become corrupted and it may be difficult to recover the data.
Additional Information
Transition Statement Backups can also take place on a per file system basis, we will
now see how this is done.
14-85
Instructor Guide
-u -1 -f /dev/rmt0
/home
AU1411.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.
V3.1.0.1
Instructor Guide
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.)
14-87
Instructor Guide
Instructor Notes:
Purpose To show how the backup command can be used to backup entire file systems.
Details This method is more commonly known as backup by inode. The advantage of
an incremental backup rather than a full backup is that incremental backups take less time
(in general). The disadvantage is there are many more tapes involved in the process. If one
of the tapes is misplaced, then you can only partially restore that data successfully.
The -u option is required if you are making an incremental backup.
The /etc/dumpdates file is appended to each time the backup command is run with the -u
option and thus it grows over time. It is recommended that old dumpdates entries prior to
the last level 0 backup be periodically removed.
Additional Information
Transition Statement Let's look at an example.
V3.1.0.1
Instructor Guide
Uempty
Mon
Tue
Wed
Thur
Fri
Sat
1
10
11
12
13
14
15
level 6
level 6
level 6
level 6
level 0
16
17
18
19
20
21
22
level 6
level 6
level 6
level 6
level 3
23
24
25
26
27
28
29
level 6
level 6
level 6
level 6
level 0
30
level 0
3
4
level 6
5
level 6
6
level 6
7
level 6
level 3
31
Copyright IBM Corporation 2005
AU1411.0
Notes:
Defining the level of backup
You can use the -level parameter to back up either all files on the system (a full
backup) or only the files that have been modified since a specific full backup (an
incremental backup). The possible levels are 0 through 9. If you do not supply a level,
the default level is 9. A level 0 (zero) backup includes all files in the file system. An n
level backup includes all files modified since the last n-1 backup or lower. The levels, in
conjunction with the -u flag, provide a way to maintain a hierarchy or incremental
backups for each file system.
14-89
Instructor Guide
Calendar example
The visual shows a calendar that describes how different levels of backups can be
accomplished.
- A level 0 backup is performed on the first Friday, and thereafter every other Friday.
- A level 6 is performed on each day of the week except on the Fridays that a full
backup is not carried out, when a level 3 backup is performed.
- During the first full week, the level 6 backup on Monday backs up all files modified
since the level 0 backup on the previous Friday. Each level 6 backup Tuesday
through Thursday backs up all files that have been modified since the last n-1
backup or lower (in this case level 0).
- The first level 3 backup of the month backs up all files modified since the level 0
backup. The remaining level 3 backups backs up all those files modified since the
last level 0 backup.
- During the second full week, the level 6 backups on Monday through Thursday back
up all files that were modified since the last level 3 backup. The level 3 backups on
Fridays backs up everything since the last level 0.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the incremental backup strategy.
Details The levels 6 and 3 are selected arbitrarily. Using numbers that are not in
sequence builds in a safety net to perform another level increment if needed between
backups. This is the same philosophy that a good programmer follows, writing lines of code
numbering the lines in a multiple rather than sequential allowing him/her to add additional
lines of code later.
As the level 6 incremental backups are performed between Monday and Thursday, the size
of the tapes grow depending on the amount of user data that gets changed.
If the system crashes on Tuesday the 12th, what tapes would you use to restore the
system and what order would you install them?
1. Level 0 from Friday 1st
2. Level 3 from Friday 8th
3. Level 6 from Monday 11th
The instructor may wish to show alternate backup strategies such as having an increased
backup level each day of the week and discuss the trade off in time to run the backups
versus the number of backups needed to a restore in the situation that a failure occurs.
Additional Information
Transition Statement This form of the backup command is front-ended by SMIT.
14-91
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how SMIT is used to backup an entire file system.
Details The visual illustrates how the operation can be carried out through SMIT.
Additional Information
Transition Statement Having backed up, we may need to restore.
14-93
Instructor Guide
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
AU1411.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.
V3.1.0.1
Instructor Guide
Uempty
14-95
Instructor Guide
Instructor Notes:
Purpose Show how to use the restore command.
Details The restore command is used to extract data from backups.
The -T option allows you to verify the backup. This should be done after each backup to
ensure the data is really there. This will not actually restore anything.
The -x option can be used with both inode backups and backups by name. The -x
doesn't provide a restoresymtable file when restoring. If you are planning to restore the
entire file system, the -r option is preferred.
The -r option only works with inode backups. The -i only works with inode backs as well.
Additional Information Make certain everyone understands that the file system must
exist and be mounted prior to restoring the data. The backup command, unlike mksysb and
savevg, doesn't save any structural information. It only has the filenames and data contain
in those files. Therefore when the recovery occurs, it expects the file system to be in place.
Transition Statement The restore command had a few enhancements beginning with
AIX 5L V5.2, lets take a look at those.
V3.1.0.1
Instructor Guide
Uempty
restore Command (2 of 2)
Restores the file attributes without restoring the file contents:
restore -Pstring
AU1411.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
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. 1997, 2005
14-97
Instructor Guide
Instructor Notes:
Purpose Describe how to restore only the file attributes.
Details If the file specified does not exist in the target directory path, the file is not
created.
Usage of -P flag will overwrite the attributes of files owned by another user when executed
by the superuser.
Additional Information
Transition Statement Recoveries can be performed from SMIT. Let's take a look at that
screen.
V3.1.0.1
Instructor Guide
Uempty
* Restore DEVICE
* Target DIRECTORY
FILE or DIRECTORY to restore
(Leave blank to restore entire archive.)
VERBOSE output?
Number of BLOCKS to read in a single input
operation
Restore Extended Attributes?
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[Entry Fields]
[/dev/fd0]
+/
[.]
/
[]
no
[]
yes
+
#
+
F4=List
F8=Image
AU1411.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.
14-99
Instructor Guide
Instructor Notes:
Purpose To show how SMIT can be used to restore files or directories from a backup.
Details Note that if the files were backed up using relative pathnames, you have to
change to the correct directory before the files are restored.
If the backup was of a file system, the path names are ALWAYS relative.
Additional Information
Transition Statement Lets do an exercise using backup and restore.
V3.1.0.1
Instructor Guide
Uempty
Figure 14-39. Exercise 14: Using backup and restore (Parts 2, 3, and 4)
AU1411.0
Notes:
Introduction
This lab allows you to perform backups and recoveries using the AIX tools, backup and
restore. It gives you an opportunity to perform a backup by name and a backup by
inode.
This exercise can be found in your Student Exercise Guide.
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details The students already did Part 1 of this exercise earlier in this unit.
Additional Information
Transition Statement The backup and restore commands are AIX-specific. To move
information between UNIX platforms, standard commands are provided.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Why need backup commands?
The AIX backup tool is preferred for an AIX backup intended to be used exclusively on
AIX machines. AIX supports access control lists (ACL) and Trusted Computing Base
(TCB) which provide additional security-related features for AIX files and directories.
Only the backup command supports these additional security features. If you are using
ACLs or TCB, you need to use backup or these elements of security are lost during the
backup.
AIX does support other generic UNIX backup tools. For backups that are recovered on
another UNIX operating system, these tools would need to be used since only AIX
supports backup and restore.
Instructor Guide
The dd command
The dd command is used to copy and convert data byte-by-byte.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to use other UNIX commands for backups.
Details Stress that for AIX to AIX backup, the backup command should be used. These
tools are best when transferring data to other UNIX systems.
You do not need to spend time discussing ACLs or TCB. A brief description to distinguish
why backup is the better tool is enough. Just make students aware that if they are using
ACLs and TCB, then backup is the only tool that can preserve that environment.
Additional Information tar and backup do not follow symbolic links. A symbolic link is
a file that points to another inode. tar and backup will backup up the link file, but will not
follow the link and backup that data. tar can be forced to follow the link by using the -h
option.
Transition Statement Let's take a look at a few examples of these other tools.
Instructor Guide
/home
/dev/rmt0 /home/team01/mydir
/dev/rmt0
AU1411.0
Notes:
Introduction
The tar command only works with mounted file systems.
Here is a list of the commonly use options:
-c create a tar backup
-x extract (restore) a file(s) from a tar file
-t reads the content of the tar file (verify the backup)
-v verbose output - displays files as they are backed up and restored
-f identify the file or device holding the tar image
V3.1.0.1
Instructor Guide
Uempty
example, /home is the starting point for the tar command. It backs up all of /home and
its subdirectories, and so on.
# echo $?
3
-R
-L <filename>
-x
-U
Instructor Guide
Instructor Notes:
Purpose Show the usage of the tar command.
Details tar is a generic UNIX backup tool. You should be familiar with it to allow file
transfers to other systems.
The default backup device for tar is /dev/rmt0 but the -f option is used to specify a
different location.
tar is not enabled for files larger than 2 GB due to size limitation imposed by XPG/4 and
POSIX.2 standards.
Make sure everyone understands that the file named to be backed up is the starting point.
It is much like naming the starting point with the find command. It backups everything
recursively, unless you use the new -D flag to repress recursive processing.
Additional Information If root restores a tar image, all files retain their original
ownership. If a non-root user attempts to restore a tar image, that user owns all of the
files. This prevents someone from restoring root files from a tar image by someone without
root authority.
While AIX 5L 5.3 supports the backup and restore of ACL extended attributes, if youre
using it to copy between systems be sure that the target system and utility also support
extended ACLs.
Transition Statement Let take a look at another widely used UNIX backup tool, cpio.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
The cpio tool is another generic UNIX tool. cpio stands for copy input/output.
Some of the common options that are used with cpio:
-o
-i
-t
-v
-d
-m
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to use the cpio command.
Details Try to draw similarities between the different tools.
-t displays content of images (backup uses -T)
-v verbose output
-f device to be used (cpio used > and < instead)
Backup by name and cpio read from standard input to determine what to backup.
All three use the relative and absolute pathnames the same way.
Additional Information
Transition Statement One more backup tool to look at: dd.
Instructor Guide
The dd Command
The dd command converts and copies files
To copy a file to diskette
# dd if=/etc/inittab
of=/dev/rfd0
of=text.ebcdic
conv=ebcdic
AU1411.0
Notes:
Introduction
The dd command reads in standard input or the specified input file, converts it, and then
writes to standard out or the named output.
The common options are:
if=
of=
conv=
V3.1.0.1
Instructor Guide
Uempty
Examples
In the first example in the visual, the file /etc/inittab is copied to the floppy diskette.
In the second example in the visual, the file text.ascii is converted into EBCDIC and is
written to a file called ebcdic.text.
In the last example in the visual, no output or input file is specified so standard out and
standard in is used. The file containing lower case characters, lcase, is converted into
uppercase characters and displayed to standard out.
Instructor Guide
Instructor Notes:
Purpose Discuss the dd command.
Details
Additional Information
Transition Statement When working with tapes, you need to position it at times.
V3.1.0.1
Instructor Guide
Uempty
rewind
fsf
offline
rewoffl
Rewinds a tape
Fast forwards a tape
Ejects a tape
Rewinds and ejects a tape
restore
-s
AU1411.0
Notes:
The tctl command
The tape control, tctl, command is used to position the tape and eject the tape. All of
the backup commands addressed so far assume the tape was positioned correctly.
None of those commands reads the entire tape, rather they only look at the tape file
where the tape is positions. To ensure you position it correctly, be sure to document the
content and order of the data on the tape.
Some of the tctl options are:
- The rewind option is generally the first place to start. This ensures you start from the
beginning.
- The fsf option moves the tape forward. It counts end-of-file markers. In the
example in the visual, fsf 3 positions the tape to the beginning of the fourth file.
- The offline and rewoffl options will eject the tape.
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To explain how and why a tape needs to be positioned.
Details Explain the use of the tctl command and restore -s. It helps if it is put in the
context of a mksysb image since this was discussed earlier. Stress that tctl counts
end-of-file markers whereas restore counts files. They do not use the same numbering
scheme.
Be sure to explain each of the examples.
Also, in the student notes, the tcopy command is addressed. This command can copy tape
to tape if there are two tape devices. Or, if only a source tape is supplied, the tape is read
and the block size and number of files is display. This can take a while depending on the
amount of data on the tape.
Additional Information tctl and mt (used in other UNIXs) are the same command.
They are links of each other.
To use the restore -s, you must specify a no-rewind, no-retension tape device (like
rmt0.1).
Transition Statement Now that you have seen some of the commands, let's cover a
few good practices that you should follow.
Instructor Guide
Good Practices
Verify your backups
Check the tape device
Keep old backups
Offsite secure storage
Label tape
Test recovery procedures before you have to!
AU1411.0
Notes:
Verify your backups
Always verify your tapes. Use restore -T (or tar -t) to view the contents. Even with
mksysb tapes, you can position the tape to the correct file and verify it without having to
restore the entire contents.
V3.1.0.1
Instructor Guide
Uempty
Instructor Guide
Instructor Notes:
Purpose To emphasize some good practices.
Details Go through each bullet point. Planning and testing is always the best approach
to backup practices. Redundancy and documentation is also very important.
Additional Information
Transition Statement Now, let's answer a few checkpoint questions.
V3.1.0.1
Instructor Guide
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
AU1411.0
Notes:
Instructor Guide
Instructor Notes:
Details Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. 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
Additional Information
Transition Statement If there is time and interest, have the students do the optional
exercise.
V3.1.0.1
Instructor Guide
Uempty
Using tar
Using cpio
AU1411.0
Notes:
Introduction
This is an optional exercise. The instructor determines if there is time and interest to
complete this exercise. It gives an opportunity to try out the generic UNIX tools, tar and
cpio.
This exercise can be found in your Student Exercise Guide.
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Summarize the unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
In order to perform successful backups, consideration must
be given to the frequency of the backup, the media to be
used and the type of backup.
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.
There are many other UNIX backup commands which can
be used, however their limitations must be fully understood.
The commands include: tar, cpio and dd.
Other useful commands also exist to manipulate the data on
the backup media such as tctl.
Copyright IBM Corporation 2005
AU1411.0
Notes:
Instructor Guide
Instructor Notes:
Purpose Summarize the unit
Details
Additional Information
Transition Statement Now, onto the next unit.
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4910
SC23-4907
15-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Define the concepts of users and groups, and explain how
and when these should be allocated on the system
Describe ways of controlling root access on the system
Explain the uses of SUID, SGID and SVTX permission bits
Administer user accounts and groups
Identify the data files associated with users and security
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for this unit.
Details
Additional Information
Transition Statement Well start by discussing some important security-related
concepts. First, lets consider user accounts. Effective administration of user accounts is a
key factor in promoting system security.
15-3
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
15-5
Instructor Guide
User Accounts
Each user has a unique name, numeric ID, and password
File ownership is determined by a numeric user ID
The owner is usually the user who created the file, but
ownership can be transferred by root
Default users:
root
adm, sys, bin, ...
Superuser
IDs that own system files but
cannot be used for login
AU1411.0
Notes:
Importance of user accounts
The security of the system is based on a user being assigned a unique name, user ID
(UID) and password. When the user logs in, the UID is used to validate all requests for
file access.
File ownership
When a file is created, the UID associated with the process that created the file is
assigned ownership of the file. Only the owner or root can change the access
permissions.
V3.1.0.1
Instructor Guide
Uempty
15-7
Instructor Guide
Instructor Notes:
Purpose Highlight some basic concepts concerning AIX security, particularly the role of
user accounts in setting up system security.
Details AIX security can be defined by two basic principles:
1. Ownership of data controls access
2. Permissions or access to the data is granted by the owner to other users
Additional Information In the event you are asked:
AIX 5L V5.3 introduced several security-related features, including support for long (up
to 255 characters in length) user names.
AIX 5L provides support for a variety of system-level security options including C2 and
optional B1 functions.
AIX 5L provides support for International Computer Security Association (ICSA) Virtual
Private Network (VPN). Beginning with AIX 5L, enhancements were made to the
Internet Key Exchange (IKE) protocol to enable the use of Certificate Revocation Lists
(CRL) when authenticating remote users or devices. AIX V4.3 was the first server
operating system to receive Virtual Private Network (VPN) certification by the
International Computer Security Association (ICSA).
AIX 5L includes Network Authentication Service, IBM's implementation of MIT's
Kerberos V5 Release 1.1 network authentication service. Network Authentication
Service negotiates authentication between two points on the Internet or between
components on a system.
A new version of IBM SecureWay Directory was released with AIX 5L. SecureWay
Directory provides a common directory for you to address the proliferation of
application-specific directories, a major driver of high costs. IBM SecureWay Directory
is a Lightweight Directory Access Protocol (LDAP) cross-platform, highly scalable,
robust directory server.
AIX 5L offers an implementation of the cryptographic API PKCS#11 version 2.01.
PKCS#11 is a de facto industry standard for accessing cryptographic hardware devices.
AIX V4.3 was the first 64-bit operating system to achieve the high E3/F-C2 level
security rating by the Bundesamt Fr Sicherheit in der Informationstechnik, a German
government certification authority.
AIX V4.3 was also the first 64-bit UNIX environment to receive the TCSEC C2
certification from the US Government National Security Agency (NSA).
AIX V4.3, along with Groupe Bull's B1/EST-X, received the Common Criteria 2.0 B1
certification recognized in many countries around the world.
The TCSEC security levels can be researched at:
http://www.radium.ncsc.mil/tpep/library/rainbow/.
The European ITSEC levels can be researched at:
http://www.cesg.gov.uk/site/iacs/itsec/media/formal-docs/Itsec.pdf
15-8 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
The newer Common Criteria for Information Technology Security Evaluation (CCITSE),
also referred to as simply the Common Criteria (CC), can be researched at
http://commoncriteriaportal.org. AIX 5L V5.2 and later provides the ability to enable
Controlled Access Protection Profile (CAPP) and Evaluation Assurance Level 4+
(EAL4+) technology based on CC standards.
Transition Statement The effective use of groups is also important in promoting AIX
system security.
15-9
Instructor Guide
Groups
A group is a set of users, all of whom need access to a
given set of files.
Every user is a member of at least one group and can be a
member of several groups.
The user has access to a file if any group in the users
groupset provides access. To list the groupset, use the
groups command.
The user's real group ID is used for file ownership on
creation. To change the real group ID, use the newgrp
command.
Default groups:
System administrators: system
Ordinary users: staff
AU1411.0
Notes:
Function of groups
Users that require shared access to a set of files are placed in groups. Each group has
a unique name and Group ID (GID). The GID, like the UID, is assigned to a file when it
is created.
A user can belong to multiple groups.
Predefined groups
There are several groups predefined on an AIX system. For example, the system
group is root's group and the staff group is for all ordinary users.
V3.1.0.1
Instructor Guide
Uempty
Types of groups
There are three types of groups on the system:
- User Groups
User groups should be made for people who need to share files on the system, such
as people who work in the same department, or people who are working on the
same project.
- System Administrator Groups
System administrators are automatically members of the system group.
Membership of this group allows the administrators to perform some of the system
tasks without having to be the root user.
- System Defined Groups
Several system-defined groups exist. staff is the default group for all
non-administrative users created in the system. security is another system-defined
group having limited privileges for performing security administration. The
system-defined groups are used to control certain subsystems.
15-11
Instructor Guide
Instructor Notes:
Purpose Describe the concept of a group and to show how users can change their
group.
Details A users groupset can contain up to 32 groups. The permissions of each group
in the groupset are available to the user.
When defining a user via SMIT or mkuser, you have the option of specifying a primary
group ID. This is stored as the principal group ID in the etc/passwd file. When the user
initially logs in, this principal group ID is used to establish the real group ID in the user's
environment. The current real group ID is recorded in the inode of any new file created in
that environment, unless overridden by a SGID on the parent directory. While the real
group ID, can be changed using the newgroup command, the principle group ID in
/etc/passwd is unaffected and will be used to set the real group ID the next time the user
logs in.
Additional Information The entry for the newgrp command in the AIX 5L Version 5.3
Commands Reference has some helpful information.
Transition Statement Several groups have been mentioned. Now, lets look at the
group hierarchy.
V3.1.0.1
Instructor Guide
Uempty
Group Hierarchy
security
system
printq
adm
audit
Rights to
administrative
functions
shutdown
staff
Ordinary
user
AU1411.0
Notes:
Rights to administrative functions
As indicated on the visual, membership in some groups confers rights to the use of
certain administrative functions. Membership in the staff group does not provide rights
to the use of administrative functions.
Common groups
Common groups on the system (and their intended uses) are as follows:
system
printq
15-13
Instructor Guide
security
adm
staff
Default group assigned to all new users. You may want to change this in
/usr/lib/security/mkuser.defaults.
audit
For auditors.
shutdown
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe common groups in the system.
Details Other groups added to the system do not inherit any special attributes as far as
the operating system is concerned.
AIX 5L provided additional groups that were first added to AIX V4.3, most notably a group
called shutdown. Members of this group can issue the shutdown, fastboot and reboot
commands (fastboot and reboot are equivalent commands). Recent versions of AIX also
include a group called perf. Members of this group can execute various AIX performance
tools.
Additional Information Each group has privileges for a specific tasks. For example,
members of the system group can perform hardware and software administration but
members of the security group can perform user administration. No one group is more
powerful than the other since they each control their own specific area.
Transition Statement User accounts have a similar hierarchy.
15-15
Instructor Guide
User Hierarchy
To protect important users and groups from members of the
security group, AIX has admin users and admin groups
Only root can add, remove, or change an admin user or
admin group
Any user on the system can be defined as an admin user
regardless of the group they are in
root
admin user
(admin flag set to true)
normal user
Copyright IBM Corporation 2005
AU1411.0
Notes:
Capabilities of members of certain groups
The ability to perform certain system tasks (like creating users) depends upon the
standard AIX file permissions. Most system administration tasks can be performed by
users other than root if those users are assigned to groups such as system, security,
printq, cron, adm, audit or shutdown. In particular, a user in the security group can
add/remove/change other users and groups.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the user hierarchy.
Details The root user sits at the top of the stack. This means that in discussions
concerning security, the root user is the exception to most, if not all, restrictions that are
applied to a system.
The key reason for creating administrative users is to ensure that these users cannot be
managed by any other user than root (that is, only root can change the password of an
administrative user). An example of an administrative user might be an executive - only the
root user can change this executive's system password. Make sure that the students are
clear about the difference between an admin user and an administrator. The former has no
special powers, whereas the latter does.
Additional Information
Transition Statement Since the root user is such a powerful user account, it is a good
idea to guard this account as much as possible.
15-17
Instructor Guide
AU1411.0
Notes:
Guidelines for root account password
If the root password is known by too many people, no one can be held accountable.
The root password should be limited to just two or three administrators. The fewer
people who know root's password the better.
The system administrator should ensure that distinct root passwords are assigned to
different machines. You may allow normal users to have the same passwords on
different machines, but never do this for root.
V3.1.0.1
Instructor Guide
Uempty
15-19
Instructor Guide
Instructor Notes:
Purpose Discuss important concepts related to root security.
Details Review the information on the visual.
Having different passwords on every machine may cause a problem if there are lots of
machines. This needs to be done sensibly. Administrators could create a password
scheme that makes each password slightly different but not impossible to remember.
Be sure to point out the dangers of having an unsecured directory in root's PATH. This
includes the dot (.) for the current directory. You might want to use an example like:
PATH=.:/usr/bin:/usr/sbin
Since the dot (.) represents the current directory, the root user might accidentally execute
something in that directory. A user on the system could creates a destructive file called ls
that contains the one line to delete all the files on the system rm -r /. If the root user is
in that user's home directory and tries to perform a file listing, instead of /usr/bin/ls
running, it will find ./ls first. When this file is run by the unsuspecting system administrator
with root authority, the system will be destroyed.
If the user normally logs in as a regular user and su's to root, the regular account's PATH
should also avoid using unsecured directories. Remember, with the su command, if the
dash (-) is not used, then the current environment is kept (that includes PATH).
Additional Information
Transition Statement Reference to the su audit trail is made in this visual. Let's take a
look at a number of files important for system security.
V3.1.0.1
Instructor Guide
Uempty
Security Logs
/var/adm/sulog
/var/adm/wtmp
/etc/utmp
/etc/security/failedlogin
AU1411.0
Notes:
The sulog file
The sulog file is an ASCII text file that can be viewed with more or pg. In the file, the
following information is recorded: date, time, terminal name and login name. The file
also records whether the login attempt was successful (and indicates a success by a +
and a failed login by a -).
15-21
Instructor Guide
Displays all the recorded logins and logoffs by the user root
# last reboot
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show where the information about accesses to the system is recorded.
Details Where information is recorded will depend on how the user gained access to the
system.
Further information can be recorded about the security of the system. This can be
monitored and reports generated if the audit subsystem is configured. However, this will not
be covered in this course.
Additional Information Stress the importance of monitoring these log files (not just
cleaning them up on a regular basis). You might want to ask the students, if
/etc/security/failedlogin is growing significantly bigger every day what might that
indicate? Suggested answer: Someone might be trying to hack into the system. If this log is
just routinely cleaned out, it isn't serving much purpose.
Transition Statement We will now look at the permissions that can be applied to files
and directories.
15-23
Instructor Guide
File/Directory Permissions
File
Perm. Bit
Directory
SUID
SGID
SVTX
--------
--------
AU1411.0
Notes:
Permission bits
There are a number of permission bits associated with files and directories. The
standard r (read), w (write) and x (execute) permissions define three levels of access
for the user (owner), group and others. In addition there are three permission bits
known as SUID (set UID), SGID (set GID) and SVTX (sticky bit).
V3.1.0.1
Instructor Guide
Uempty
15-25
Instructor Guide
Instructor Notes:
Purpose Examine the effect that permissions have on files and directories.
Details The effects of permissions are often forgotten or misunderstood. It is probably a
good idea to review all the permission bits.
Read permission on a file allows the contents to be examined. The cat, pg and more
commands will work successfully if r is set on the file. Read on the directory allows the
content of the directory to be seen (use the ls command). Keep in mind that a directory is
a file in UNIX; it is a file that contains a list of ordinary files. Therefore, r has the same effect
on both files and directories - it allows you to see the content.
Write permission allows the content to be changed. On a file, this mean modifying the
content with an editor (like vi) or with redirections (> or >>). On a directory, modifying the
content means adding or removing a file from the directory (rm, vi, touch).
The execute permission on a file allows the file to be executed by using the name of the file
as a command. A shell script without this permission can still be executed, however the
shell must be specified as part of the command. For example:
# ksh file1 or # . ./file1.
Execute on a directory gives permission to access the directory. This includes using cd to
enter the directory or accessing a file were the directory is in the path to the file. All the
parent directories must have execute permission as well to allow access to a subdirectory.
There are examples to explain the extra permission bits following this visual. Provide an
introduction here and fully explain using the visuals that follow.
Additional Information The base permission (rwx) must give the user the appropriate
permission before SUID, SGID, or STVX are effective. For example, if a user is part of
others and others don't have execute permission on a file, it is irrelevant whether the
SUID bit is set for that user since they can't execute the file.
SUID and SGID bits will not be effective on shell scripts for security reasons. They can be
set but they will be ignore during execution.
Also, many people misuse the terminology related to these additional permission bits.
Many times all three are incorrectly referred to as the sticky bits. Only SVTX is the sticky
bit. SUID is SUID and SGID is SGID. Be sure to keep your students on track with the
proper terminology.
Historically, SVTX stood for Save Text and was meant to keep a binary executable in
memory. AIX does not support that use of the permission bit.
Transition Statement Let's see how these permissions appear when listing a file.
V3.1.0.1
Instructor Guide
Uempty
Reading Permissions
r
owner
x
w
group
w
x
# ls -ld
SUID
+x
SGID
only
/usr/bin/passwd
-r-sr-xr-x
-r-sr-sr-x
drwxrwxrwt
SUID
only
other
x
w
root security
root cron
bin bin
SGID
+x
sticky
bit
only
/usr/bin/crontab
...
...
...
sticky
bit
+x
/tmp
/usr/bin/passwd
/usr/bin/crontab
/tmp
AU1411.0
Notes:
How SUID, SGID, and SVTX settings are indicated
The SUID bit is indicated by an S or s in the slot normally reserved for the execute
permission for owner (user). The SGID bit is indicated by an S or s in the slot normally
reserved for the execute permission for group. The SVTX bit is indicated by a T or t in
the slot normally reserved for the execute permission for others. Since this slot must
show if execute is on/off and whether the additional permission bit is on/off, the
uppercase S or T is used to indicate that the execute permission is off. The lower case
s or t indicates the execute permission is on.
15-27
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how the AIX permissions appear when set against files and directories.
Details Make sure the students are clear about the meaning of the upper and lower
case s and t, and in which field they will appear.
In the example, the passwd command has SUID set. This allows users to change their
passwords, which are stored in encrypted format in the /etc/security/passwd file. You may
want the students to run the ls -l command against this file. They will see that only the
root user has rw permissions on this file. Because SUID is set for the passwd command,
ordinary users will temporarily become the root user and be able to write their new
passwords to the /etc/security/passwd file.
The crontab command allows users to set their personal crontab file. The directory
(/var/spool/cron/crontabs) where the file resides is a restricted directory. Without the
SUID and SGID bits set, the user would not be able to create or modify the crontab file.
Because the sticky bit is set for the /tmp directory, users can only delete, rename, and so
forth, their own files in that directory.
Additional Information
Transition Statement Having seen how to recognize the permissions, we shall now
look at how these can be set.
15-29
Instructor Guide
Changing Permissions
4
SUID
2
SGID
1
SVTX
owner
r w x
4 2 1
group
r w x
4 2 1
other
r w x
4 2 1
# chmod
4 7 7 7 file1
SUID
# chmod
2 7 7 7 file1
SGID
# chmod
1 777
dir1
SVTX
# chmod
OR
u+s
file1
SUID
# chmod
g+s
file1
SGID
# chmod
+t
dir1
SVTX
AU1411.0
Notes:
Setting the additional permission bits
To set the additional permission bits, you use the same command (chmod) as you do to
set the regular permission bits.
V3.1.0.1
Instructor Guide
Uempty
You normally use the numeric values of 4, 2, and 1 to set r, w and x. That remains the
same. To set the additional bits, you are affecting the x position in either the user, group
or other area. If you assign numeric values to user (4), group (2), and other (1), these
are the values that you insert into the fourth position to set the additional bit:
- SUID is indicated in the user's area; therefore use a 4 in the fourth position
- SGID is indicated in the group area; therefore use a 2 in the fourth position
- SVTX is indicated in the others area; therefore use a 1 in the fourth position
15-31
Instructor Guide
Instructor Notes:
Purpose Demonstrate how to set or change extended permissions on files or
directories.
Details Explain the students notes to be sure the students understand how to set the
permission bits. This is sometimes a difficult concept for students to grasp.
Remind the students that when using the octal method, all permission are reset to the
indicated value. With symbolic notation, use of the + allows for permission to be added to
the existing permission set.
The symbolic notation can be viewed as having three parts.
- The first part identifies the target user category. It can be u for user (owner), g for
group, o for other, or a for all.
- The second part is the operator. It can be + to add, - to remove, or = to reset the
permissions.
- The third part is which permission bits to change. r is read, w is write, x is execute, s
is set (SUID or SGID), and t is SVTX.
The meaning of the s in the third part is determined by which user category is being
specified.
The first and third parts can be a combination of values. For example: ug+rw would add
read and write authority to both the owner and the group.
You can also have a list of operations separated by commas. For example: u=wrx,go=r.
Additional Information If using Access Control Lists (ACLs), the octal notation will
disable them. This is not a topic for this course; this is for your information only.
The symbolic notation will not affect ACLs unless they were enabled with no ACLs
specified. In that case, the symbolic notation will set the ACL to disabled. This doesn't
really impact anything, since no ACLs were set anyway in this case.
Transition Statement Let's see what determines the default permission on a file.
V3.1.0.1
Instructor Guide
Uempty
umask
The umask governs permissions on new files and
directories
System default umask is 022
A umask of 027 is recommended
If the umask value is set to 022, then any ordinary files or
directories created will inherit the following permissions:
Ordinary file:
rw-r--r--
Directory:
rwxr-xr-x
AU1411.0
Notes:
Function of umask
The umask specifies what permission bits are set on a new file when it is created. It is
an octal number that specifies which of the permission bits will not be set.
15-33
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how the file and directory permissions can be set by default.
Details All files, by default (if no umask is used), will receive the permissions of:
-rw-rw-rwAll directories, by default, will receive the permissions of:
drwxrwxrwx
From this default, we will now subtract the umask value.
Remember, permissions (in octal) are:
0 - nothing
1 - eXecute
2 - Write
4 - Read
So, if you want to remove read, write, and execute permission for others and write
permission for group, you should perform the following computation:
USER
1
2
4
---0
GROUP
1
2
4
----2
OTHERS
1
2
4
------ (add together all the bits that you want
7
to take AWAY)
15-35
Instructor Guide
Changing Ownership
The chown command:
# chown fred file1
The chgrp command:
# chgrp staff file1
Changing both user and group ownership:
# chown fred:staff file1
# chown fred.staff file1
AU1411.0
Notes:
Using chown to change ownership
As illustrated on the visual, the chown command can be used by root to change the
ownership on a file.
V3.1.0.1
Instructor Guide
Uempty
15-37
Instructor Guide
Instructor Notes:
Purpose Explain how to change ownership and group ownership of a file.
Details These are fairly easy commands to use. Explain the examples on the visual.
Only root can change the ownership of file. This is a security issue. For example, this
prevents a user from creating a destructive file and then transferring the ownership to a
co-worker he doesn't like.
Additional Information
Transition Statement Let's try an exercise.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This lab gives you a chance to look at some of the security files and allows you an
opportunity to work with the SUID, SGID, and SVTX.
The exercise can be found in your Student Exercises Guide.
15-39
Instructor Guide
Instructor Notes:
Purpose Introduce the Security Files exercise.
Details
Additional Information
Transition Statement The next topic in this unit is user administration.
V3.1.0.1
Instructor Guide
Uempty
15-41
Instructor Guide
Login Sequence
getty
login
User enters login name
Started by init
port settings in ODM
Settings in:
/etc/security/login.cfg
Invalid
/etc/passwd
/etc/security/passwd
Valid
Log entry in:
/etc/security/failedlogin
Setup environment
/etc/environment
/etc/security/environ
/etc/security/limits
/etc/security/user
Display /etc/motd?
$HOME/.hushlogin
shell
/etc/environment
/etc/profile
$HOME/.profile
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
When a user attempts to log in, AIX checks a number of files to determine if entry is
permitted to the system and, if permitted, what parts of the system the user can access.
This section provides an overview of the checks performed during the login process.
V3.1.0.1
Instructor Guide
Uempty
Validation
When the user enters the password, it is checked. If the password is incorrect or if an
invalid user name was given, then the login fails, and an entry is made in the file
/etc/security/failedlogin. (Use the command who /etc/security/failedlogin to
view this file.) The number of failed attempts is also tracked (by user account) in
/etc/security/lastlog. The Login: prompt is redisplayed for another attempt.
It is possible to set the characteristics for a user to prevent unlimited attempts on an
account. If the number of attempts exceeds the maximum allowable failed attempts, the
account is locked.
If a user successfully enters the user name and password, the usw stanza in
/etc/security/login.cfg is checked. This stanza sets the maximum number of
concurrent logins for a user account. If that number is exceeded, the login is denied and
a message is displayed to the user.
15-43
Instructor Guide
Instructor Notes:
Purpose Discuss the 'big picture' of what happens when a user logs in.
Details Explain the visual as per the student notes. The steps have been extensively
documented.
Additional Information In the past, /etc/passwd and /etc/security/passwd were
searched sequentially to find the user's ID and password. This was adequate in the days
when there were just a few users per system. Now, there may be hundreds or thousands of
users on a system. If these files are read sequentially, and the user's entry is near the end
of the file, it is possible for the login attempt to timeout before completion. Also, the amount
of cpu time being consumed by the login process is becoming cause for concern.
In AIX, this can be addressed by creating indexes of these two login files. The files
themselves have not been changed. Students may notice the indexes in the system: For
example, the indexes for the /etc/passwd file are /etc/passwd.nm.idx and
/etc/passwd.id.idx.
The indexes are created when the mkpasswd -f command is executed. It deletes any
existing indexes and builds new indexes.
The /etc/security/lastlog file is also indexed in AIX.
/var/adm/wtmp also is updated during the login and logout process. This file keeps track of
times for a successful logins and logouts. It can be read using the command
who /var/adm/wtmp or the command last.
Transition Statement Now that we've looked at the 'big picture' of what happens when
we log in, let's look further at three of the files listed on this visual - /etc/profile,
/etc/environment and $HOME/.profile.
V3.1.0.1
Instructor Guide
Uempty
/etc/environment
/etc/profile
$HOME/.profile
$HOME/.kshrc
AU1411.0
Notes:
The /etc/environment file
/etc/environment is used to set variables. No commands should be placed in this file.
Only root can change this file.
15-45
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the files listed on this page.
Details Each file can overwrite a variable that the other sets. Therefore, since the
.profile is read after /etc/environment and /etc/profile, the user can overwrite any
variables that the root user has set.
However, the root user can set a variable using the read-only option to prevent this from
occurring. For example:
readonly VAR=value
export VAR
Additional Information
Transition Statement Now, let's look at how users and groups can be managed.
15-47
Instructor Guide
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
The Security & Users menu
The Security & Users menu is used to manage user and group IDs on the system. The
menu consists of the seven options described below.
Users
This option is used to add users to the system, delete existing users and change the
characteristics of existing users.
Groups
This option is used to add groups to the system, delete groups and change the
characteristics of existing groups.
V3.1.0.1
Instructor Guide
Uempty
Passwords
This option is used to change the password for a user. It is also required when setting
up a new user or when a user has forgotten their password.
Login Controls
This option provides functions to restrict access for a user account or on a particular
terminal.
Roles
This option sets up user roles. User roles allow root to give authority to an ordinary user
to perform a portion of root's functions.
PKI
PKI stands for X.509 Public Key Infrastructure certificates. This option is used to
authenticate users using certificates and to associate certificates with processes as
proof of a users identity.
LDAP
LDAP stands for Light Directory Access Protocol. It provides a way to centrally
administer common configuration information for many platforms in a networked
environment. A common use of LDAP is the central administration of user
authentication. The SMIT option here allows us to configure this platform as either an
LDAP client or an LDAP server.
15-49
Instructor Guide
Instructor Notes:
Purpose Show the SMIT menu panel for security and users and explain each option.
Details Point out that AIX 5L implemented login controls. This option will also update
fields in the /etc/security/user and /etc/security/login.cfg files.
In this unit, we will discuss the options Users, Groups, and Passwords. In the machine
exercise, students may choose to explore Login Controls on their own.
The Web-based System Manager fastpaths were made unavailable in AIX 5L. For more
information, see the Web-based System Manager Administration Guide.
The following problem report was included in a previous revision of this course. It has
been retained (without modification) in the current revision for completeness, but it has
been indented to distinguish it from the surrounding text.
For instructor use only: Prior to AIX 5L, based on testing and information from the IBM
Support Center, the Roles option did not appear to work as documented. For example,
if a user is added to the ManageShutdown role, they are still unable to shut down the
system - they must first be added to the shutdown group.
Some of the roles provide limited function. For example, if a user is added to the
ManageBasicPasswords or ManageAllPasswds roles, they will be able to execute
the pwdadm command to change the passwords of other users. Placing a user in the
ManageAllPasswds role allows them to change root's password as well! They are
able to do all this without being in the security group.
The ManageBackup and ManageBackupRestore roles allow the user to run the
backup command only, but not the backup command with the find command.
In other words, the roles did not work as documented. This issue was reported to the
Support Center. At the time this course was updated, we were not able to determine if
this issue was resolved in AIX 5L. As a result, it is suggested to not spend much time on
the concept of roles in this class. The instructor will need to handle this issue
accordingly.
Additional Information
Transition Statement We will next look at the SMIT menus used to manage users.
V3.1.0.1
Instructor Guide
Uempty
SMIT Users
# smit users
Users
Move cursor to desired item and press Enter.
Add a User
Change a User's Password
Change / Show Characteristics of a User
Lock / Unlock a User's Account
Reset User's Failed Login Count
Remove a User
List All Users
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Add a User
Add user accounts.
15-51
Instructor Guide
Remove a User
Removes the user account, but not files owned by that user.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the options available in this SMIT menu.
Details This menu lists all the functions available to administer a user.
Additional Information
Transition Statement We shall now work through some of the options available in this
menu, starting with listing users.
15-53
Instructor Guide
Example:
# lsuser a id home ALL
root id=0 home=/
daemon id=1 home=/etc
bin id=2 home=/bin
...
john id=200 home=/home/john
...
AU1411.0
Notes:
Function of the lsuser command
The lsuser command is used to list the attributes of all users (ALL) or individual users
on the system.
V3.1.0.1
Instructor Guide
Uempty
15-55
Instructor Guide
Instructor Notes:
Purpose Illustrate the result of using the SMIT list users option.
Details This can be run from SMIT (smit lsuser) or by invoking the high-level
command lsuser.
SMIT does not provide much flexibility and responds in a fixed format, but with the lsuser
command, it is possible to extract more information from the system regarding a specific
user.
The keyword ALL represents all users on the system.
Additional Information The lsuser command now has an additional flag (-R), which
can be use to specify an alternative Identification and Authentication mechanism. This flag
is not included in the simplified syntax shown on the visual.
Transition Statement We shall now see how we can add a user to the system.
V3.1.0.1
Instructor Guide
Uempty
[ ]
[ ]
false
[ ]
[ ]
[ ]
[ ]
true
[ALL]
[ ]
[ ]
[ ]
[0]
false
#
+
+
+
+
+
+
+
...
Copyright IBM Corporation 2005
AU1411.0
Notes:
Ways of adding a user
The mkuser command or SMIT can be used to add a user. User attributes can be
specified to override the default values.
User name
The only value that must be specified is the user name. Traditionally, this name was
restricted to 8 characters in length. Beginning with AIX 5L V5.3, this limit can be
changed to allow names as long as 255 characters. The limit is modified in the
Change/Show Attributes of the Operating System panel (smit chsys).
15-57
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Setting a password
When a new user is created, the ID is disabled (an asterisk * is placed in the password
field of the /etc/passwd file). To enable the ID, a password must be set with the
Change a User's Password option or either the passwd or pwdadm command.
15-59
Instructor Guide
Instructor Notes:
Purpose Show how to add a user to the system and detail what information is required.
Details There are many attributes that can be assigned to a user account, but the only
mandatory item of information is the user name.
There will be defaults for all the others.
Mention that what we are displaying is by no means the entire list of attributes that can be
set. As indicated there are more than 30 additional lines. The important attributes which
follow are the password restriction fields, such as password maximum age, minimum
length, minimum repeated characters and so forth.
The menu item ROLES is shown for AIX V4.2 and later.
The menu item EXPIRATION date is Year 2000 enabled, that is, it supports up to year
2037.
Additional Information The new AIX 5L V5.3 ability to change the maximum length of
the user names should be used with caution. If you increase it and later change your mind,
you will have to replace all long names with shorter names within the limit, or those users
will not be able to log onto the system. You also need to be concerned with compatibility
between systems for any situations where the user name is matched. It should also be
noted that the change in maximum length does not take effect until reboot.
Transition Statement What if you wish to change an attribute after you have set the
user up?
V3.1.0.1
Instructor Guide
Uempty
george
[206]
false
[staff ]
[staff,security]
[ ]
[ ]
true
[ALL]
[/home/george ]
[/usr/bin/ksh ]
[ ]
[0]
false
#
+
+
+
+
+
+
+
...
Copyright IBM Corporation 2005
AU1411.0
Notes:
Changing user characteristics
The Change / Show Characteristics of a User option (which runs the chuser
command), allows any of the user characteristics listed previously, except the user
name, to be changed. This can only be executed by root or a member of the security
group (only root can change an admin user). This SMIT screen holds exactly the same
attributes as the Add a User screen.
15-61
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how user attributes can be changed.
Details As detailed on the visual, almost any user attribute can be changed; however,
you cannot change the user name.
The user ID should not be changed either as this is a unique number that the system uses
to identify the user and their files.
If the ID is changed, then the user will experience file access problems as their files will still
be attached to the old user ID.
Additional Information
Transition Statement It may also be necessary to remove a user from the system.
15-63
Instructor Guide
AU1411.0
Notes:
Ways to remove a user
The Remove a User from the System option in SMIT or the rmuser command can be
used to remove any user from the system. Only the root user may remove
administrative users.
V3.1.0.1
Instructor Guide
Uempty
15-65
Instructor Guide
Instructor Notes:
Purpose Explain how to remove a user from the system.
Details There are two ways to remove a user from the system:
Temporarily, by locking the user's account
Permanently, by removing all information about the user from the system
As always, these actions are best performed in SMIT.
Additional Information Before the files that belonged to the ex-user can be used by
anyone, they have to be chown'ed to another user ID.
Transition Statement Having seen how users are created, changed and removed, we
now will look at passwords.
V3.1.0.1
Instructor Guide
Uempty
Passwords
A new user ID cannot be used until a password is
assigned
There are two commands available for making password
changes:
# passwd [username]
# pwdadm username
SMIT invokes the passwd command
An ordinary user can use the passwd command to
change own password
Only root or member of security group can change
password of another user
Copyright IBM Corporation 2005
AU1411.0
Notes:
Setting an initial password
When a user ID is created with SMIT or with the mkuser command, the user ID is
disabled. (An asterisk (*) is in the password field of /etc/passwd.) To enable the ID, the
passwd or pwdadm command must be used to set up the initial password for the user.
15-67
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define how passwords can be changed in AIX, and which commands are
available under certain circumstances.
Details The difference between the passwd command and the pwdadm command is as
follows:
Whenever the passwd command is executed, no matter who you are on the system, the
system will always require the user's old password before allowing the change EXCEPT if
you are logged in as the root user. Then, no password is requested. However, this could
cause a problem when all the user accounts and passwords are administered by the
members of security (who do not necessarily know the root password). What will happen
if one of the ordinary users forgets their password and requests a new password from the
security group? If there was no other command, this would not be possible using the
passwd command because in this situation we neither know the old password, nor root's
password.
So, members of the security group can use the pwdadm command, which works in a
different way as far as authentication goes. Provided you are a user who has authority to
change other people's passwords (namely members of security), you will be required to
enter your own password first, then you will be able to set the other user's password.
Ordinary users do not have the authority to run it and will be given an error message.
Additional Information
Transition Statement What if you forget the root's password? How can you rectify this
problem?
15-69
Instructor Guide
AU1411.0
Notes:
Introduction
A series of steps that can be used to recover if you forget the root password are given
on this visual.
Step 1
First, you must boot your machine from media other than its normal hard drive. Either
an installation CD or a mksysb tape works just fine. Remember to invoke the service
boot list, usually by pressing F5 while your machine is booting.
V3.1.0.1
Instructor Guide
Uempty
Step 2
You will need to define your system console and select a language. Then the
Installation and Maintenance menu will be displayed. Be certain to select option 3,
Start Maintenance Mode for System Recovery. If you select option 1 or 2, you are
reinstalling your operating system.
Step 3
Select the options required to activate the root volume group and start a shell. This gets
you access to rootvg without any passwords.
Step 4
Once you get the # prompt, use the passwd command as you normally would to create
a new root password.
Step 5
Enter the command # sync ; sync. This ensures that the memory buffer is written to
disk. In other words, it ensures that the new root password is saved to disk.
Step 6
Reboot your system. The command shutdown -Fr is a good way to accomplish this.
15-71
Instructor Guide
Instructor Notes:
Purpose Show how to retrieve root's password if you have forgotten it.
Details Students need to understand that in maintenance mode, an ID is not required.
Thus, we are able to execute the passwd command to change root's password.
Be sure to stress the importance of physically protecting the machine. Anyone with
physical access to the machine and bootable media can gain access to root. It is also
extremely important to run the sync commands before rebooting, otherwise your changes
will not be flushed out to disk, and you will probably have the same problem again.
Additional Information On some systems it is possible that the passwd command does
not work in maintenance mode. If this is the case, while in maintenance mode, instead edit
the /etc/security/passwd file and delete the encrypted password.
Transition Statement Let's see how groups can be set up.
V3.1.0.1
Instructor Guide
Uempty
SMIT Groups
# smit groups
Groups
Move cursor to desired item and press Enter.
List All Groups
Add a Group
Change / Show Characteristics of a Group
Remove a Group
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Purpose of groups
The purpose of groups is to give a common set of users the ability to share files. The
access is controlled using the group set of permission bits.
Predefined groups
There are a number of predefined groups on AIX systems, like the system group
(which is root's group) and the staff group (which contains the ordinary users).
15-73
Instructor Guide
Instructor Notes:
Purpose Show the functions available under the Groups SMIT menu option.
Details Before creating groups, you should carefully plan how you want to organize your
users. This will save you time and headaches rather than trying to create groups on the fly.
Additional Information
Transition Statement We will start by looking at the groups that already exist on a
system.
V3.1.0.1
Instructor Guide
Uempty
Example:
# lsgroup ALL
system id=0 admin=true users=root,test2 registry=compat
staff id=1 admin=false users=ipsec,team01,team02,team03,
team04,team05,test1,daemon registry=compat
bin id=2 admin=true users=root,bin registry=compat
sys id=3 admin=true users=root,bin,sys registry=compat
adm id=4 admin=true users=bin,adm registry=compat
uucp id=5 admin=true users=uucp,nuucp registry=compat
...
ipsec id=200 admin=false users= registry=compat
AU1411.0
Notes:
The lsgroup command
The lsgroup command is used to list all groups or selected groups on the system. The
data is presented in line format by default or in colon format (-c) or in stanza format
(-f).
15-75
Instructor Guide
Instructor Notes:
Purpose Show how to find out about the groups on the system.
Details Like the SMIT lsuser option, the SMIT lsgroup option provides output in a
fixed format. The lsgroup command is more flexible.
Additional Information Like the lsuser command, lsgroup now has a flag (-R), which
can be use to specify an alternative Identification and Authentication mechanism. See the
entry for lsgroup in the AIX 5L Version 5.3 Commands Reference (or the corresponding
man page) for information regarding this and other lsgroup flags.
If users want to find out what groups they belong to, they can invoke the groups command.
Their current primary group will be the first one listed in the output.
A user can belong to up to 32 groups.
Transition Statement We shall now see how a group can be added to the system.
V3.1.0.1
Instructor Guide
Uempty
Add Groups
# smit mkgroup
Add a Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Group NAME
ADMINISTRATIVE group?
Group ID
USER list
ADMINISTRATOR list
Projects
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
[support]
false
[300]
[fred,barney]
[fred]
[ ]
F3=Cancel
F7=Edit
Enter=Do
+
#
+
+
+
F4=List
F8=Image
AU1411.0
Notes:
The mkgroup command
The mkgroup command is the command used to create a new group. The group name,
traditionally, must be a unique string of eight or fewer characters. With AIX 5L V5.3 and
later, the maximum name length can be modified to be as large as 255 characters.
The -a option
The mkgroup -a option is used to indicate that the new group is to be an administrative
group. Only the root user can add administrative groups to the system.
15-77
Instructor Guide
The -A option
The -A option makes the invoker of the mkgroup command the group administrator.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Demonstrate how SMIT can be used to add a new group.
Details The only mandatory item of information is the group name.
Users can be added to the group at a later point in time.
The administrator list is not recognized for an administrative group. In other words, the root
user is the only user who can change the attributes of an administrative group.
Administrative groups can be added, although these are not recognized or used by the
system. It is up to an application to use the functions of such a group.
Additional Information The same concerns as were mentioned for increasing the
length of the user names applies to long group names as well.
Neither traditional AIX accounting nor the newer AIX 5L V5.3 Advanced Accounting is
within the scope of this class. A project is a billable entity. In Advanced Accounting, there
is a policies database which determines what project will be charged for work being done.
The group name of the process using the resources can be one of the criteria determining
which project will be billed.
Transition Statement We will now look at changing or removing a group from the
system.
15-79
Instructor Guide
F2=Refresh
F6=Command
F10=Exit
[support]
[300]
false
[fred,barney,wilma]
[fred]
[ ]
F3=Cancel
F7=Edit
Enter=Do
#
+
+
+
+
F4=List
F8=Image
AU1411.0
Notes:
The chgroup command
The chgroup command is used to change the characteristics of a group. It can only be
run by root or a member of the security group.
Group attributes
The group attributes are:
- Group ID (id=groupid). It is not advisable to change the group ID, but it is
occasionally done immediately after a group has been created to match the ID of a
previously deleted group, or a specific group ID needed for a particular software
package.
- ADMINISTRATIVE group? (admin=true|false). Only the root user can change a
group to be an administrative group or make changes to an existing administrative
group.
15-80 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
- USER list (users=usernames). This is a comma separated list of the names of all
the members of the group. The group may be their primary group or an additional
one.
- ADMINISTRATOR list (adms=adminnames). This is the list of group administrators.
- Projects (projects=projectnames). As previously mentioned, this attribute was
added to support the Advanced Accounting subsystem.
15-81
Instructor Guide
Instructor Notes:
Purpose Explain how groups can be changed or removed.
Details Discussion Items - What conditions must be satisfied in order for the rmgroup
command to work?
Answer: There must not be any users whose primary group is the one being deleted.
Additional Information
Transition Statement After you have set up users and groups on the system, it is
sometimes necessary to communicate information to the user community.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Using the /etc/motd file
The message of the day (motd) is a convenient way to communicate information, such
as installed software version numbers or current system news, to all users. The
message of the day is contained in the /etc/motd file. To change the message of the
day, simply edit this file.
15-83
Instructor Guide
Instructor Notes:
Purpose Show one of the ways that information about the system can reach the user.
Details The motd file should not be used to display messages to deter intruders. (By the
time intruders read the message, they are already in the system!) These messages should
be written into the /etc/security/login.cfg file instead, in the herald for a port.
Additional Information Even though users can add a .hushlogin file, administrator can
remove them very easily using the find command: find / -name '.hushlogin' -exec
rm {} \;
If you need to make sure every user sees your message, make sure you remove the
.hushlogin.
You may want to ask the students how they could handle removing the .hushlogin files
and see if they can come up with the find command.
Transition Statement Let's work on an exercise next. Well do the first part of this
exercise now and the rest of the exercise later.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This lab gives you an opportunity to expand your knowledge of user administration. You
add users and groups and review many of the user characteristics.
The exercise can be found in your Student Exercise Guide.
Be sure to only do Parts 1-5. You will be doing Parts 6-7 at the end of this unit.
15-85
Instructor Guide
Instructor Notes:
Purpose Introduce the User Administration exercise.
Details Be sure to tell the students to only do Parts 1-5. They will be doing Parts 6-7 at
the end of this unit.
Additional Information
Transition Statement Lets move on to Security Files, the next topic in this unit.
V3.1.0.1
Instructor Guide
Uempty
15-87
Instructor Guide
Security Files
Files used to contain user attributes and control access:
/etc/passwd
/etc/group
/etc/security
/etc/security/passwd
/etc/security/user
User passwords
User attributes, password
restrictions
Group attributes
User limits
User environment settings
Login settings
/etc/security/group
/etc/security/limits
/etc/security/environ
/etc/security/login.cfg
AU1411.0
Notes:
Introduction
The security on the system is controlled by a number of ASCII files. Key files are listed
on the visual and briefly described below.
/etc/passwd
The /etc/passwd file lists the valid users, and the user ID, primary group, home
directory, and default login shell for each of these users.
/etc/group
The /etc/group file lists the valid groups, their group IDs, and members.
V3.1.0.1
Instructor Guide
Uempty
/etc/security/passwd
/etc/security/passwd contains the encrypted password and update information for
users.
/etc/security/user
/etc/security/user contains extended user attributes.
/etc/security/group
/etc/security/group contains extended group attributes.
/etc/security/limits
/etc/security/limits contains process resource limits for users.
/etc/security/environ
/etc/security/environ contains environment variables for users. This file is not often
used.
/etc/security/login.cfg
/etc/security/login.cfg is a configuration file for the login program. This file contains
security enhancements that limit the logins on a port, for example, the number of login
attempts and the valid login programs (shells).
15-89
Instructor Guide
Instructor Notes:
Purpose Introduce some of the primary files used to hold user, group and security
information.
Details This page provides an introduction to the primary files that hold user, group and
security information. This page is meant as an introduction. Details on most of the files
listed will be covered on the following pages.
Most UNIX systems have /etc/passwd and /etc/group. AIX uses the /etc/security
directory as a way to provide additional security for additional user and group information.
The /etc/security directory is not standard on all UNIX operating systems.
Additional Information
Transition Statement We will now take a look through some of the files that are
involved in the security of your system.
V3.1.0.1
Instructor Guide
Uempty
/etc/passwd File
# cat /etc/passwd
root:!:0:0::/:/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
john:!:200:0:X7560 5th floor:/home/john:/usr/bin/ksh
bill:*:201:1::/home/bill:/usr/bin/ksh
AU1411.0
Notes:
Role of the /etc/passwd file
The /etc/passwd file lists the users on the system and some of their attributes. This file
must be readable by all users, because commands such as ls access it.
15-91
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose The first file we discuss lists all the user IDs on the system.
Details The majority of the user attributes have been moved out of this file into some
shadow files. The reason for this is to provide a greater element of security by taking
information out of world readable files and placing it into a secure directory (/etc/security).
It is recommended that system administrators not update this file directly. Instead, SMIT
will update this file when adding/deleting users.
Be sure to mention the mkpasswd command mentioned in the student notes. This command
is available in AIX V4.3 and later. In order for the index mechanism to be used at login, the
mkpasswd command must be executed to generate the indexes.
Additional Information If bill can't login, using the sample passwd file on the visual,
what is the problem?
Answer: bill has an asterisk(*) in its password field. No password has been set for bill.
Also, user john belongs to the system group. This may be acceptable if the user is an
admin user. On the other hand it could mean that the user, as a regular user, has far too
much power!!!
Transition Statement The file containing the security attributes of a user is now the
/etc/security/passwd file.
15-93
Instructor Guide
/etc/security/passwd File
# cat /etc/security/passwd
root:
password = 92t.mzJBjlfbY
lastupdate = 885485990
flags =
daemon:
password = *
bin:
password = *
...
john:
password = q/gD6q.ss21x.
lastupdate = 884801337
flags = ADMCHG,ADMIN,NOCHECK
Copyright IBM Corporation 2005
AU1411.0
Notes:
Role of the /etc/security/passwd file
The /etc/security/passwd file contains the encrypted user passwords and can only be
accessed by root. The login, passwd, pwdadm and pwdck commands (which run with
root authority) update this file. This file is in stanza format with a stanza for each user.
Index files
As previously mentioned, in AIX, additional files can be created to be used as index files
for /etc/security/passwd and some related files. These index files provide for better
performance during the login process. These indexes are created using the mkpasswd
command.
V3.1.0.1
Instructor Guide
Uempty
Entries in /etc/security/passwd
Valid entries in /etc/security/passwd are:
password
lastupdate
The date and time of the last password update in seconds from
January 1, 1970
flags
15-95
Instructor Guide
Instructor Notes:
Purpose Show the file containing the security attributes for users.
Details This file contains the actual password for each user.
In AIX, it is recommended that this file not be updated directly.
Additional Information
Transition Statement The /etc/security/passwd file contains the actual password
string (encrypted). We will now look at where other user attributes are set.
V3.1.0.1
Instructor Guide
Uempty
/etc/security/user File (1 of 2)
# cat /etc/security/user
default:
admin = false
login = true
su = true
daemon = true
rlogin = true
sugroups = ALL
admgroups =
ttys = ALL
auth1 = SYSTEM
auth2 = NONE
tpath = nosak
umask = 022
expires = 0
...
Copyright IBM Corporation 2005
AU1411.0
Notes:
admin
Defines the administrative status of the user. Possible value: true or false.
login
Defines whether a user can login. Possible values: true or false.
su
Defines whether other users can switch to this user account. The su command supports
this attribute. Possible values: true or false.
15-97
Instructor Guide
daemon
Defines whether the user can execute programs using the system resource controller
(SRC). Possible values: true or false.
rlogin
Defines whether the user account can be accessed by remote logins. Commands
rlogin and telnet support this attribute. Possible values: true or false.
sugroups
Defines which groups can switch to this user account. Alternatively, you may explicitly
deny groups by preceding the group name with a ! character. Possible values: A list of
valid groups separated by commas, ALL or *
admgroups
Lists the groups that a user administers. The value is a comma-separated list of valid
group names.
ttys
Defines which terminals can access the user account. Alternatively you may explicitly
deny terminals by preceding the terminal name with the ! character. Possible values:
List of device paths separates by commas, ALL or *
auth1
Defines the primary authentication method for a user. The commands login, telnet,
rlogin and su support these authentication methods.
auth2
Defines the secondary authentication methods for a user. It is not a requirement to pass
this method to login.
tpath
Defines the user's trusted path characteristics. Possible values: nosak, notsh, always
or on. (For more information refer to the online documentation.)
umask
Defines the default umask for the user. Possible values: 3-digit octal value.
V3.1.0.1
Instructor Guide
Uempty
expires
Defines the expiration time for the user account. Possible values: a valid date in the
form MMDDHHMMYY or 0. If 0, the account does not expire. The 'YY' supports the last
two digits of the years 1939 to 2038. If 0101000070 then the account is disabled.
15-99
Instructor Guide
Instructor Notes:
Purpose Show the location of most user attributes and demonstrate how the default can
be changed.
Details This visual, and the following one, show the file containing the user attributes.
The default stanza contains values that all users will inherit unless their own stanza
overrides it.
There are also stanzas in this file for each configured user on the system.
The file /etc/security/user contains a lengthy comment section at the start of the file, which
amply documents what flags there are and the acceptable values for these. Refer to the file
and the student notes for further information.
You may also want to mention that the expires field supports up to the year 2038 (that is,
AIX 5L V5.1 and later versions are Year 2000 enabled).
Additional Information
Transition Statement We will now look at the second part of this file.
V3.1.0.1
Instructor Guide
Uempty
/etc/security/user File (2 of 2)
default
...
SYSTEM = "compat"
logintimes =
pwdwarntime = 0
account_locked = false
loginretries = 0
histexpire = 0
histsize = 0
minage = 0
maxage = 0
maxexpired = -1
minalpha = 0
minother = 0
minlen = 0
mindiff = 0
maxrepeats = 8
dictionlist =
pwdchecks =
Copyright IBM Corporation 2005
AU1411.0
Notes:
SYSTEM
This attribute can be used to describe multiple or alternate authentication methods the
user must use successfully before gaining access to the system. Possible tokens are:
files
compat
The normal login procedure and therefore allows local and NIS users
access to the system
DCE
Instructor Guide
logintimes
Defines the times a user can login. The value is a comma separated list of items as
follows:
[!][MMdd[-MMdd]]:hhmm-hhmm
or
[!]MMdd[-MMdd][:hhmm-hhmm]
or
[!][w[-w]]:hhmm-hhmm
or
[!]w[-w][:hhmm-hhmm]
where MM is a month number (00=January, 11-December), dd is the day on the month,
hh is the hour of the day (00 - 23), mm is the minute of the hour, and w is the day of the
week (0=Sunday, 6=Saturday).
pwdwarntime
The number of days before a forced password change that a warning is given to the
user informing them of the impending password change. Possible values: a positive
integer or 0 to disable this feature.
account_locked
Defines whether the account is locked. Locked accounts cannot be used for login or su.
Possible values: true or false.
loginretries
The number of invalid login attempts before a user is not allowed to login. Possible
values: a positive integer or 0 to disable this feature.
histexpire
Defines the period of time in weeks that a user will not be able to reuse a password.
Possible values: an integer value between 0 and 260. 26 (approximately 6 months) is
the recommended value.
histsize
Defines the number of previous passwords which cannot be reused. Possible values:
an integer between 0 and 50.
V3.1.0.1
Instructor Guide
Uempty
minage
Defines the minimum number of weeks between password changes. Default is 0.
Range: 0 to 52.
maxage
Defines the maximum number of weeks a password is valid. The default is 0, which is
equivalent to unlimited. Range: 0 to 52.
maxexpired
Defines the maximum number of weeks after maxage that an expired password can be
changed by a user. The default is -1, which is equivalent to unlimited. Range: -1 to 52.
maxage must be greater than 0 for maxexpired to be enforced. (root is exempt from
maxexpired).
minalpha
Defines the minimum number of alphabetic characters in a password. The default is 0.
Range: 0 to 8.
minother
Defines the minimum number of non-alphabetic characters in a password. The default
is 0. Range: 0 to 8.
minlen
Defines the minimum length of a password. The default is 0. Range: 0 to 8. Note that
the minimum length of a password is determined by minlen and/or "minalpha +
minother", whichever is greater. "minalpha + minother" should never be greater than
8. If "minalpha + minother" is greater than 8, then minother is reduced to "8 minalpha".
mindiff
Defines the minimum number of characters in the new password that were not in the old
password. The default is 0. Range: 0 to 8.
maxrepeats
Defines the maximum number of times a given character can appear in a password.
The default is 8, which is equivalent to unlimited. Range: 0 to 8.
Instructor Guide
dictionlist
Defines the password dictionaries used when checking new passwords. The format is a
comma separated list of absolute path names to dictionary files. A dictionary file
contains one word per line where each word has no leading or trailing white space.
Words should only contain 7 bit ASCII characters. All dictionary files and directories
should be write protected from everyone except root. The default is valueless which is
equivalent to no dictionary checking.
pwdchecks
Defines external password restriction methods used when checking new passwords.
The format is a comma separated list of absolute path names to methods or method
path names relative to /usr/lib. A password restriction method is a program module that
is loaded by the password restrictions code at run time. All password restriction
methods and directories should be write protected from everyone except root. The
default is valueless, which is equivalent to no external password restriction methods.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the second half of the security file.
Details The first part of the file, on the last visual, showed fairly generic user attributes.
This second part shows the login controls, such as password histories, password length
and allowed characters.
These values are either set individually on a per-user basis when creating the user (via
SMIT), or system-wide by directly editing this file.
Additional Information
Transition Statement We will now look at the group files.
Instructor Guide
Group Files
# more /etc/group
system:!:0:root,john
staff:!:john
bin:!:2:root,bin
sys:!:3:root,bin,sys
...
usr:!:100:guest
accounts:!:200:john
...
# more /etc/security/group
system:
admin=true
staff:
admin=false
accounts:
admin=false
adms=john
projects=system
Copyright IBM Corporation 2005
AU1411.0
Notes:
The /etc/group file
The fields in the /etc/group file are:
Group - Up to eight alphanumeric characters (not all uppercase)
Password - This field is not used in AIX and should contain a !
ID - The group ID
Members - A comma-separated list of the users who belong to this group
V3.1.0.1
Instructor Guide
Uempty
adms
A comma-separated list of the users who are administrators for the group.
If admin=true this stanza is ignored because only root can change an
administrative group.
Instructor Guide
Instructor Notes:
Purpose Having seen the user security files, we will now look at the group files.
Details The group files are divided, like the user files, into the world-readable
/etc/group and the shadow /etc/security/group files.
In the example, only a small portion of both files are shown. In the example, /etc/group
also shows a group called accounts. This is a group that was added to the system by the
system administrator. All other groups in this example come with the AIX operating system.
In the example, /etc/security/group shows system and staff. These groups come
standard with AIX. The accounts group has been added by the system administrator. john
has the ability to add and delete other system users from this group.
Ask a question here, as a follow-on from the password question, and that is: Is there
anything special in these files?
Answer: The user john is a member of both the system group and the accounts group
where he is an administrator.
Is this a good idea? Discuss.
You might be asked about the ! and whether groups also have passwords set. The
answer is no. Some other UNIX operating systems use this field, but in AIX, you will always
see the !.
Additional Information Once again in AIX 5L V5.3, there is the new group attribute of
projects. This relates to the previous discussion on the Add a Group SMIT panel.
Transition Statement Let's look at the /etc/security/login.cfg file.
V3.1.0.1
Instructor Guide
Uempty
/etc/security/login.cfg File
default:
herald =Authorized use only.\n\rlogin:"
logintimes =
logindisable = 0
logininterval = 0
loginreenable = 0
logindelay = 0
pwdprompt = "Password: "
usernameecho = false
AU1411.0
Notes:
herald
Specifies the initial message to be printed out when getty or login prompts for a login
name. This value is a string that is written out to the login port. If the herald is not
specified, then the default herald is obtained from the message catalog associated with
the language set in /etc/environment.
logintimes
Defines the times a user can use this port to login.
logindisable
Number of unsuccessful login attempts before this port is locked. Use this in
conjunction with logininterval.
Instructor Guide
logininterval
The number of seconds during which logindisable unsuccessful attempts must occur
for a port to be locked.
loginreenable
The number of minutes after a port is locked that it automatically unlocked.
logindelay
The delay in seconds between unsuccessful login attempts. This delay is multiplied by
the number of unsuccessful logins - that is, if the value is two, then the delay between
unsuccessful logins is two seconds, then four seconds, then six seconds and so forth.
pwdprompt
Defines the password prompt message printed when requesting password input. The
value is a character string.
usernameecho
Defines whether the user name should be echoed on a port. If true (this is the default)
the user name echo is enabled. If false, user name echo is disabled. The user name is
not echoed at the login prompt and is masked out of security-related messages.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define some of the attributes of the /etc/security/login.cfg file.
Details Please note that only a few of the attributes have been listed. Most of the
remaining attributes are explained in the Advanced System Administration course. Only
cover the ones listed.
Be sure to point out that this is the file that is used for a customized herald. Students will
create their own login heralds in the machine exercise.
When creating a herald, you must use the \r and \n to specify a return and a new line
respectively. A return moves the cursor to the left of the line and a new line moves the
cursor down one line. So a \n\r is similar to hitting the <ENTER> key. If you try to use the
<ENTER> key when setting up the herald, the lines will not line up correctly.
For more information, please refer to the comments of the file.
Additional Information
Transition Statement With all the information that is spread over such a number of
files, it becomes necessary sometimes to perform sanity checks on these files.
Instructor Guide
AU1411.0
Notes:
Use of validation commands
The commands listed on the visual can be executed by root or any user in the security
group to clean up after a change to the user configuration. Because they run with root
permissions, they give administrative users the ability to make necessary changes to
the /etc/security/passwd file in a controlled way, without knowing the root password.
V3.1.0.1
Instructor Guide
Uempty
-p
-t
-y
Instructor Guide
Instructor Notes:
Purpose Show how consistency in the security files can be maintained.
Details With all the information that is spread over such a number of files, it becomes
necessary sometimes to perform sanity checks on these files.
In the normal run of things, this should be unnecessary since SMIT will maintain
consistency among the files. However, if traditional UNIX administration methods are
employed on AIX (or/and SYSV.4 UNIX), then these files can get out of sync.
In order to remedy this, there are several utilities provided to check and update or warn of
these inconsistencies.
Great care should be used when running these as they have options that fix problems but
do not warn the administrator that a problem existed.
The flags (also given in the student notes) are:
-n
-p
-t
-y
Additional Information
Transition Statement Let's talk about a couple of security features available on the PCI
RS/6000.
V3.1.0.1
Instructor Guide
Uempty
Utilities
PASSWORD
Copyright IBM Corporation 2005
AU1411.0
Notes:
Function of power-on and privileged passwords
The power-on and privileged passwords are security features that help protect the
information on your RS/6000.
Instructor Guide
Instructor Notes:
Purpose Explain how to change the passwords on the RS/6000.
Details Explain that, to get to the password screen, you must boot the SMS programs,
select Utilities and then select Password.
Additional Information In order to set the privileged password, a jumper must be
removed from the system board. Once this is done, then the password can be set in SMS.
Transition Statement Let's see the details of how to set the passwords.
V3.1.0.1
Instructor Guide
Uempty
Entry
Remove
Remote <Off>
Privileged
Entry
Remove
Exit
Copyright IBM Corporation 2005
AU1411.0
Notes:
Power-on password
You can use any combination of up to eight characters (A-Z, a-z, and 9-0). After you set
a power-on password, you are prompted to enter it each time you power on the system.
Before you can use the system, you must type the correct password and press the
Enter key.
When you enter the correct password, the system is unlocked and resumes normal
operations. If you enter the wrong password, you are prompted to enter the correct one.
After three incorrect entries, you must power off the system and start again.
A power-on password can be set only after system power has been turned off and then
on again. You cannot set a power-on password after doing a warm system startup.
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Describe the power-on and supervisory/privileged password.
Details The supervisory password is only prompted for and used with the System
Management Services program. If anyone can load the System Management Services
program into your system and access the system programs it provides, they could cause
some real havoc on your system. This simply protects who can and cannot start the system
in standalone mode. You will have full use of all other features.
Be careful not to lose the supervisory/privileged password. Some of the older PCI RS/6000
systems allow you to remove the battery for at least 30 seconds to reset this password.
However, some of the newer systems (for example, the 43P model 140) require that the
system be returned to IBM for service in order to reset this password.
Also, some models require that a jumper on the system board be changed before the
privileged password can be set.
Together with your power-on password, the supervisory password provides a higher level
of security when used with an operating system that controls access through the use of
passwords.
Additional Information Some models also include a tie-down feature. If the system is
in an area that is accessible by the public, you can secure it to a desk, table, or other
stationary object. The system comes with an opening that accommodates a tie-down cable.
Transition Statement Any good secure system has some documentation that will
explain what the objectives of the system's security are. Let's see what could be
documented.
Instructor Guide
AU1411.0
Notes:
Planning user and group administration
Plan and organize your user and group administration. Every user does not need their
own group. Good planning up front reduces any reorganizing of users and groups later
on.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the documentation of the security policies of a site.
Details This really goes without saying, but it is worth pointing out that:
Security is a very narrow path. On one side there exists a totally secure system that, by
definition, is impossible to gain access to!
On the other side we have a system where everyone logs in as root!
A sensible security policy treads a middle line between these two extremes and provides a
reasonable level of access control (you don't want to annoy the users too much) and still
manages to provide the required functionality and easy access.
The final point on the visual is very important and should be emphasized:
AIX security in itself only controls access to the system and its files and directories. Once in
an application (for example: a database), the Database Administrator (DBA) needs to
provide additional access control to certain data sets.
This last function cannot be provided for by AIX.
Additional Information
Transition Statement Before we summarize, let's consider a few questions.
Instructor Guide
Checkpoint (1 of 2)
1. What are the benefits of using the su command to switch
user to root over logging in as root?
_____________________________________________________
_____________________________________________________
5. True or False? When you delete a user from the system, all
the user's files and directories are also deleted.
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test understanding of what has been covered in this unit.
Details A Checkpoint Solution is given below:
Checkpoint Solutions (1 of 2)
1. What are the benefits of using the su command to switch user to
root over logging in as root?
A log (which can be monitored) of all users executing the su
command is kept in the sulog.
2. Why is a umask of 027 recommended?
This value removes all permission bits for the others category,
which enhances security.
3. As a member of the security group, which password command
would you use?
pwdadm (This command does not prompt for the root password
or the old password of the user whose password is being
changed.)
4. Which password change command does SMIT use?
passwd
5. True or False? When you delete a user from the system, all the
user's files and directories are also deleted.
Copyright IBM Corporation 2005
Additional Information
Transition Statement This checkpoint has two parts.
Instructor Guide
Checkpoint (2 of 2)
6. If an ordinary user forgets their password, can the system
administrator find out by querying the system as to what the user's
password was set to? _______ Why? ___________________
_________________________________________________
7. Password restrictions are set in which of the following files?
a. /etc/passwd
b. /etc/security/passwd
c. /etc/security/restrictions
d. /etc/security/user
8. Which of the following statements are true?
a. A user can only belong to one group
b. A member of the security group can administer user accounts
c. An admin user is a user whose account cannot be administered
by any member of the security group (except root)
d. The chmod g+s command sets the SUID permission of a file
e. The root user, commonly known as the superuser has UID=0
and GID=0
Copyright IBM Corporation 2005
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test understanding of what has been covered in this unit.
Details A Checkpoint Solution is given below:
Checkpoint Solutions (2 of 2)
6. If an ordinary user forgets their password, can the system
administrator find out by querying the system as to what the user's
password was set to? No, because the passwords are held in
encrypted format, so even the system administrator cannot tell what
the password was set to.
7. Password restrictions are set in which of the following files?
a. /etc/passwd
b. /etc/security/passwd
c. /etc/security/restrictions
d. /etc/security/user
8. Which of the following statements are true?
a. A user can only belong to one group
b. A member of the security group can administer user accounts
c. An admin user is a user whose account cannot be administered
by any member of the security group (except root)
d. The chmod g+s command sets the SUID permission of a file
e. The root user, commonly known as the superuser has UID=0
and GID=0
Copyright IBM Corporation 2005
Additional Information
Transition Statement Lets complete the exercise we worked on earlier.
Instructor Guide
AU1411.0
Notes:
Introduction
This lab gives you an opportunity to expand your knowledge of user administration. You
will examine the security set up and customize the login herald.
The exercise can be found in your Student Exercises Guide.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the second part of the User Administration exercise.
Details Remind the students that they did part of this exercise earlier.
Additional Information
Transition Statement Lets summarize the key points weve covered in this unit.
Instructor Guide
Unit Summary
User and groups can be added and deleted from the system
by using SMIT or by using high level commands
Passwords must be set for all users using either pwdadm
or passwd
Administrative users and groups can only be administered
by root
Every user must be in at least one group
Certain groups give users additional privileges
Security files are located in ASCII text files in the /etc and
/etc/security directories
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Summarize the key points covered in this unit.
Details
Additional Information
Transition Statement Thats the end of this unit.
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
References
SC23-4888
SC23-4895
16-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Use crontab files to schedule jobs on a periodic basis
Use the at command to schedule a job or series of jobs at
some time in the future
Use the batch command to schedule jobs in a queue, to
alleviate immediate system demand
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Present the objectives for this unit.
Details
Additional Information
Transition Statement Lets start by discussing the role of the cron daemon.
16-3
Instructor Guide
1 2:3 5
Copyright IBM Corporation 2005
AU1411.0
Notes:
Function of the cron daemon
The system process that allows batch jobs to be executed on a timed basis is the cron
daemon. Many people rely on cron to execute jobs. Jobs are submitted to the cron
daemon in a number of different ways:
- The at and batch facilities are used to submit a job for one-time execution
- crontab files are used to execute jobs periodically - hourly, daily, weekly
Starting of cron
The cron process is usually started at system startup by /etc/inittab. It runs constantly
as a daemon. If killed, it is automatically restarted.
V3.1.0.1
Instructor Guide
Uempty
16-5
Instructor Guide
Instructor Notes:
Purpose Explain what cron is, what it will do, and how it is configured.
Details cron runs system tasks on the behalf of a user. The user can submit a task to
cron and then log out of the system, knowing that the task will still be run.
The output of these tasks handed over to cron must be handled in a special way.
(Redirection of output is sometimes used for such tasks. If no output redirection is used,
then cron will mail the output and the errors to the user.)
Additional Information
Transition Statement Lets cover some key points regarding crontab files.
V3.1.0.1
Instructor Guide
Uempty
crontab Files
Used to start regularly occurring jobs
Schedule is defined in:
/var/spool/cron/crontabs/$USER
Files to control crontab privileges of users:
/var/adm/cron/cron.deny lists users who cannot use
crontab
/var/adm/cron/cron.allow lists users who can use
crontab
An empty cron.deny exists by default
AU1411.0
Notes:
Scheduling a job
The cron daemon starts processes at specified times. It can be used to run regularly
scheduled jobs using files in the /var/spool/cron/crontabs directory, or it can be used
to schedule a command for one-time-only execution using the at command.
16-7
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List files associated with cron and tell where they are located.
Details Explain where the crontab files are located. The content of these files will be
covered on the next visual.
Cover the files that control access to cron. Explain what happens when these files exist,
don't exist, or exist together.
By default, all users can use cron because an empty cron.deny exists.
Additional Information The at command is controlled by a similar set of files named
at.allow and at.deny. The same information applies as with cron.allow and cron.deny.
Transition Statement Let's take a look at the format of crontab files.
16-9
Instructor Guide
* * * /usr/sbin/skulker
* * 0 /usr/lib/spell/compress
* * * /usr/bin/errclear -d S,O 30
* * * /usr/bin/errclear -d H 90
* * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
Format of entries:
minute hour date-of-month month day-of-week command
Copyright IBM Corporation 2005
AU1411.0
Notes:
Viewing a crontab file
Each user can view their crontab file by using the command crontab -l.
The users crontab file contains the schedule of jobs to be run on behalf of that user.
There is a separate crontab file for each user of the crontab facility. This file is located
in /var/spool/cron/crontab/$USER.
V3.1.0.1
Instructor Guide
Uempty
16-11
Instructor Guide
Instructor Notes:
Purpose Explain the format of a crontab file.
Details Cover that each field is separated by white space. Explain what each field
means. Each field can have multiple values separated by commas and ranges can be
specified with dashes.
All fields are compared using and, and all fields must be true before cron will execute the
line. There is an exception to this rule. If a numeric is specified in both the date of the
month field and the day of the week field, these two fields (and only these two fields) are
compared with an or. For example, if a user wanted to run a script on the first of the
month when the first falls on a Friday, the administrator may incorrectly set up the crontab
entry to look like this:
0 0 1 * 5 /usr/bin/newscript
The problem with this is although the first is specified correctly with the 1 and the day of
the week is specified correctly with the 5, these two fields will be compared using or.
Therefore, it will run on the first of the month, AND it will run on Fridays because the 1st
OR Friday makes the condition true.
The crontab file does not provide the capability to accomplish the original goal. However,
you could achieve your objective by running a script every Friday and have the script check
to see if it is the first of the month before proceeding through the script. The logic needs to
be built into the script.
Additional Information You should point out the skulker entry in the file since this was
discussed earlier in the course.
Transition Statement Now that we know the format, lets see how to change this file.
V3.1.0.1
Instructor Guide
Uempty
A safer method:
# crontab -l > /tmp/crontmp
# vi /tmp/crontmp
# crontab /tmp/crontmp
AU1411.0
Notes:
Creating or updating a crontab file
To schedule a job, you must create a crontab file. The cron daemon keeps the
crontab files in memory, so you cannot update the crontab entries by just modifying
the file on disk.
16-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to view or add to a crontab file.
Details The crontab -l command can be used to get the current crontab into a file.
This file can be edited with an editor (for example, vi) and a new crontab generated using
the crontab command. The crontab -e command can be used to do the above steps
interactively.
There is a crontab file for every cron user on the system, and it is given the name of the
user's ID. If you want to remove a job in your crontab file, you need to edit it and remove
that one line. crontab -r will remove your entire file.
Additional Information The cron daemon runs the command named in the sixth field at
the selected date and time. If you include a % (percent sign) in the sixth field, the cron
daemon treats everything that precedes it as the command invocation and makes all that
follows it available to standard input, unless you escape the percent sign (\%).
Transition Statement Let's take a look at the at and batch commands.
16-15
Instructor Guide
AU1411.0
Notes:
Use of the at command
The at command submits a job for cron to run once (rather than on a recurring basis) at
a specified time. It reads the commands to execute from standard input. The at
command mails you all output from standard output and standard error for the
scheduled commands, unless you redirect that output.
Examples of keywords or parameters that can be used with at are: noon, midnight, am,
pm, A for am, P for pm, N for noon, M for midnight, today, tomorrow.
The time can be specified as an absolute time or date (for example, 5 pm Friday), or
relative to now (for example, now + 1 minute).
The Bourne shell is used by default to process the commands. If -c is specified the C
shell is run, and if -k is specified the Korn shell is run. If you specify the -m option, at
sends you mail to say that the job is complete.
V3.1.0.1
Instructor Guide
Uempty
Controlling use of at
The at command can only be used by root unless one of the following files exists:
- /var/adm/cron/at.deny
If this file exists, anybody can use at except those listed in it. An empty at.deny file
exists by default. Therefore, all users can use at by default.
- /var/adm/cron/at.allow
If this file exists, only users listed in it can use at (root included).
16-17
Instructor Guide
Instructor Notes:
Purpose Explain how to use the at and batch commands.
Details Jobs entered using the at command are managed by the cron daemon.
Additional Information The at command performs once-only tasks at a later time than
the present.
This can be used to schedule a task for a time when there will be no users on the system,
for example, at 3 am.
batch jobs are the same as running at -q b.
Transition Statement Weve discussed how to submit a task to at. We will now see
how these jobs can be cancelled.
V3.1.0.1
Instructor Guide
Uempty
Controlling at Jobs
To list at jobs:
at -l [user]
atq [user]
# at l
root.1118077769.a
root.1118078393.a
test2.1118079063.a
Mon Jun
Mon Jun
Mon Jun
6 10:09:29 2005
6 10:19:53 2005
6 10:31:03 2005
To cancel an at job:
at -r job
atrm [job | user]
# at -r test2.1118079063.a
at file: test2.1118079063.a deleted
AU1411.0
Notes:
Listing at jobs
To list at jobs use the at -l command or the atq command. The root user can look at
another user's at jobs by using the command atq <user>.
Removing at jobs
To cancel an at job use at -r or atrm followed by the job number. Use the command
atrm - (placing nothing after the - character) to cancel all of your jobs. The root user
can cancel all jobs for another user using atrm <user>.
16-19
Instructor Guide
Instructor Notes:
Purpose Show how to view the at queue and to cancel jobs from it.
Details The first portion of an at job number shows the user ID that entered the job.
Additional Information
Transition Statement Let's see what we should document.
V3.1.0.1
Instructor Guide
Uempty
Documenting Scheduling
Have a copy of each user's crontab file
Have a copy of the /etc/inittab file
Scheduling Records
AU1411.0
Notes:
Overview
It is important to have correct up to date information regarding your system, in case of
an unexpected system failure.
Maintain as much documentation as possible about all aspects of the system by
following the recommendations we have given throughout the course.
16-21
Instructor Guide
Instructor Notes:
Purpose Describe two useful documentation ideas that can help maintain the
availability of a system.
Details Explain the importance of having correct up to date information regarding the
system, in case of unexpected system failure.
Encourage the user to maintain as much documentation as possible about all aspects of
the system by following the recommendations we have given throughout the course.
Additional Information
Transition Statement Before we do the exercise for this unit, let's look at the
checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
1. True or False? The at.allow and at.deny files must be
used to specify which users are allowed and denied use
of the at command.
2. Give a crontab entry that would specify that a job
should run every Thursday at 10 past and 30 minutes
past every hour.
_____________________________________________
3. How would you schedule a script named myscript, to
run 10 minutes from now?
_____________________________________________
_____________________________________________
_____________________________________________
_____________________________________________
AU1411.0
Notes:
16-23
Instructor Guide
Instructor Notes:
Purpose Review and test understanding of what has been covered in this unit.
Details A suggested approach is to give the students a few minutes to answer the
questions themselves and then go over the answers as a group. A suggested checkpoint
solution is given below:
Checkpoint Solutions
1. True or False? The at.allow and at.deny files must be
used to specify which users are allowed and denied use
of the at command.
False. Only one or the other of these files should be used.
Additional Information
Transition Statement Lets move on to the exercise for this unit.
V3.1.0.1
Instructor Guide
Uempty
Using at
Using batch
Using crontab files
AU1411.0
Notes:
Introduction
This lab gives you the opportunity to schedule jobs using both at and crontab.
The exercise can be found in your Student Exercises Guide.
16-25
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise for this unit.
Details Depending on the class, it might be a good idea to remind the students where
the instructions for the exercise are located.
Additional Information
Transition Statement Lets summarize the key points weve covered in this unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
AU1411.0
Notes:
16-27
Instructor Guide
Instructor Notes:
Purpose Summarize the key points covered in this unit.
Details
Additional Information
Transition Statement Weve reached the end of our scheduling unit.
V3.1.0.1
Instructor Guide
Uempty
References
GG24-3570
Online
Online
17-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Describe the purpose and the benefits of a queuing system
Identify the major components that are responsible for
processing a print request
Add a printer queue and device
Submit jobs for printing
Manage jobs in the queue
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by looking at an overview of the print subsystem.
17-3
Instructor Guide
AU1411.0
Notes:
Introduction
The visual gives an overview of the different approaches that can be taken to printing
under AIX 5L. In the next two visuals, System V printing will be compared to the
traditional AIX print subsystem. The remainder of this unit will focus on using the AIX
print subsystem.
Note: You can use either the AIX print subsystem or the System V print subsystem.
They will not run concurrently.
V3.1.0.1
Instructor Guide
Uempty
In this approach, you lose the ability to serialize (spool) print requests. Only one user
may print at a time. On the other hand, if a printer is being dedicated to one use, this
may be a good solution. Examples might be logging to a printer or printing checks.
17-5
Instructor Guide
Instructor Notes:
Purpose The purpose is to give an overview of printing under AIX 5L, putting System V
and AIX in context. We also give a little advertisement for Infoprint Manager.
Details More detail is provided in the System V print subsystem appendix. If a student is
interested in this print subsystem, the appendix has all the details and an exercise if they
wish to test out the features.
Additional Information There are several places later in this unit that mention a few
System V print commands that are in AIX V4.3.3. These notes have not been changed as
they are still true. AIX 5L now provides full support for the print subsystem.
Transition Statement Now, lets look at the strengths of the AIX print subsystem.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Powerful and flexible printer drivers
AIX printer drivers provide many printing options that can be easily controlled using
command line options to the qprt command. Printer defaults can be easily managed
using SMIT or the command line.
17-7
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List advantages of AIX print subsystem.
Details In summary, the main advantages of AIX printing have to do with flexibility and
ease of use. AIX printing and System V are tightly integrated into SMIT and the Web-based
System Manager.
Additional Information
Transition Statement Now, lets look at the strengths of the System V print subsystem.
17-9
Instructor Guide
AU1411.0
Notes:
Compatibility
System administrators with experience in other UNIX variants that use System V
printing will find it easy to manage printing under AIXs System V print subsystem.
V3.1.0.1
Instructor Guide
Uempty
Security
Controlling user access to printers can be an important issue. For example, you might
need to limit access to the printer used to print checks. System V printing includes
built-in capabilities for restricting user access to certain printers. Using the AIX print
subsystem, the backend program must be customized to restrict user access.
17-11
Instructor Guide
Instructor Notes:
Purpose List advantages of System V print subsystem.
Details In summary, the main advantages of System V has to do with compatibility. This
makes it easy for system administrators from other UNIX variants to transition to AIX and it
drives availability of support for a larger number of printers on AIX.
System V also adds forms support and better security.
Additional Information Directory-enabled printing is supported beginning with
AIX 5L V5.2. System V printing on AIX uses LDAP (Lightweight Directory Access Protocol)
as the directory service.
A directory is an ordered list of objects, including details about each object. Obvious
examples are phone books or library card catalogs. Directories are a type of database.
They differ from other databases in that accesses are mostly reads, with only occasional
writes. Directory protocols are optimized to facilitate a high read environment.
Computer directories can be searched in many ways, making them a very powerful way to
store and manage information.
In the case of a printer directory, this might include searching for the name of a printer to
get its characteristics, searching for printers in a particular location, searching for printers
with particular features, and so forth. Directory enabled printing provides an easy way for
users to search for a printer that is close and has the features they require. If security or
other control features are made part of the directory, directory enabled printing facilitates
easier management by system administrators.
Transition Statement Now, lets look at traditional AIX printing and queues.
V3.1.0.1
Instructor Guide
Uempty
Concepts of Queues
file1
Queue1
file1
file2
file2
.
.
file3
/dev/lp0
Queue2
file3
file4
file4
/dev/lp1
Copyright IBM Corporation 2005
AU1411.0
Notes:
Purpose for queues
The purpose of the queuing system is to maintain a queue of jobs that are waiting for
their turn to run (that is, use some system resource, like a printer or the CPU). The
AIX 5L queuing system performs this function.
Benefits of queues
The queues also give control to the system administrator over the queuing mechanism.
Therefore, the system administrator can perform tasks like cancelling jobs on queues,
changing priorities of jobs, and so forth.
A queue enables the sharing of resources in an ordered fashion.
The diagram above illustrates three important issues:
- One print queue can point to a number of printers (and it is the job of the qdaemon to
determine the next available printer to print on), for example, Queue1.
Copyright IBM Corp. 1997, 2005
17-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Explain the purpose and benefits of queuing versus printing directly to a device
driver.
Details A simple way of submitting jobs to the printer device is with the following
command:
$ cat myfile > /dev/lp0
This prints the output from the cat command on the printer lp0. The printer device will
modify the data stream to ensure things like number of lines on a page, page ends, page
ejects, and so forth. It has certain characteristics like an 80-character line already set.
The major disadvantage of using the above method for printing is that you bypass the
queue facility and lose your ability to serialize print requests to a printer via the queuing
system. Printing by utilizing a queuing system allows a user or an application to send a
print job to a queue, and then the queuing subsystem itself will drive the printers and share
them among the applications and users who wish to access the printers.
Additional Information The motivation behind having two queues sharing the same
printer is the ability to have different types of data streams for the same printer. For
example, one queue might be straight ASCII while another queue might support PostScript
printing.
Transition Statement Let's look at the actual data flow through the queuing system.
17-15
Instructor Guide
lp
lpr
qprt
enq
Queue
Spool
directory
monitors
qdaemon
starts
Virtual Printer
Definition
Backend
(piobe)
submits file to
printer
/dev/lp0
Copyright IBM Corporation 2005
AU1411.0
Notes:
Print request
Local printing is implemented through a queuing mechanism. The user can issue one of
the printer commands qprt, lp, lpr, or enq to submit a print job. Although a user can
use any one of these four commands, the true entry point to the spooler is the enq
command which is responsible for processing the job request, creating a job description
file (JDF) and notifying the qdaemon of the new job.
The qdaemon
The qdaemon process is running all of the time. The qdaemon maintains a list of all of the
defined queues and monitors the queues for newly submitted jobs. qdaemon tries to
process the job if the destination device is available, otherwise the job remains in the
queue and qdaemon tries again later.
V3.1.0.1
Instructor Guide
Uempty
17-17
Instructor Guide
Instructor Notes:
Purpose Explain the flow of a print job using the queuing system.
Details Review the flow of the queuing system as it is shown in the visual. The student
notes provide detailed information on what happens when a print request is made.
The student notes also refer to virtual printer definitions. This file pairs the attributes or
characteristics of a specific printer with the attributes of a specific data stream. For
example, if a printer supports both ASCII and PostScript data streams, you must create two
virtual printer definitions for the printer. These can be created using SMIT and are stored in
the /var/spool/lpd/pio/@local directory. A subdirectory called custom must hold an entry
for each virtual printer. SMIT will automatically place an entry in this directory for each
queue defined. The mkvirprt command can also be used to create a virtual printer.
Additional Information
Transition Statement Now that we have seen the major components, let's take a closer
look at the corresponding files and structures that are directly associated with the queuing
system.
V3.1.0.1
Instructor Guide
Uempty
/var/spool/*
Spooling directories
/var/spool/lpd/qdir/*
Queue requests
/var/spool/qdaemon/*
/var/spool/lpd/stat/*
/var/spool/lpd/pio/@local
AU1411.0
Notes:
Print related files and directories
The system files and directories used for printing include:
- The /etc/qconfig file describes the queues and devices available for use by the
printing commands.
- The /var/spool directory contains files and directories used by the printing programs
and daemons.
- The /var/spool/lpd/qdir directory contains information about files queued to print.
- The /var/spool/qdaemon directory contains copies of the files that are spooled to
print.
- The /var/spool/lpd/stat directory is where the information on the status of jobs is
stored. It is used by the qdaemon and backend programs.
17-19
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the files involved in the queuing/spooling process while the queuing flow is
still fresh in their minds.
Details This is provided as a reference for students who wish to know which files are
involved in printing.
Do not attempt to discuss in detail how virtual printers work. Most users will never work
directly with virtual printers.
Additional Information
Transition Statement Having looked at the files involved in queuing, let's review the
role of the qdaemon.
17-21
Instructor Guide
qdaemon
Manages queues
Started in the /etc/inittab file
Invokes the backend programs
Optionally records accounting data
AU1411.0
Notes:
qdaemon introduction
The qdaemon program schedules jobs that have been enqueued. It is a background
process that is usually started at system IPL via the startsrc command run from
/etc/inittab.
qdaemon is controlled by the /etc/qconfig file. /etc/qconfig contains a stanza for each
queue. The stanza identifies any queue management options and points to a queue
device stanza which identifies the destination printer, the formatting options, and the
backend program.
V3.1.0.1
Instructor Guide
Uempty
17-23
Instructor Guide
Instructor Notes:
Purpose Describe the functions of the qdaemon.
Details qdaemon is a process that starts when you start your system and runs until you
shut your system down. It keeps track of print job requests and the printer. It is also the
parent to the backend process. It maintains queues of outstanding requests and sends
them to the proper device at the proper time. It is managed under the control of the SRC.
The proper way to start and stop it is through the SRC.
Additional Information
Transition Statement The queue-to-device relationships are held in the /etc/qconfig
file. Let's look at the format of this file.
V3.1.0.1
Instructor Guide
Uempty
lp0:
device = lp0dev
up = TRUE
discipline = fcfs
lp0dev:
lpq:
file = /dev/lp0
backend = /usr/lib/lpd/piobe
header = group
trailer = never
feed = never
* 1 queue pointing to 2 devices
device = lpqdev1,lpqdev2
lpqdev1:
file = /dev/lp1
backend = /usr/lib/lpd/piobe
lpqdev2:
ps:
file = /dev/lp2
backend = /usr/lib/lpd/piobe
* 2 queues pointing to 1 device
device = psdev
psdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe
asc:
device = ascdev
ascdev:
file = /dev/lp3
backend = /usr/lib/lpd/piobe
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
The /etc/qconfig file is an attribute file. Some stanzas in this file describe queues, and
other stanzas describe devices. Every queue stanza requires that one or more device
stanzas immediately follow it in the file.
This file is the key to customizing the queues. Although the file can be edited directly, it
is recommended that it be changed through high-level commands or via SMIT.
Queue stanza
This starts with the queue name, which can be up to 20 characters, followed by a colon.
The queue name is used by the person submitting a job to indicate the desired queue.
The first queue in the /etc/qconfig file is the default queue, which receives any job
requests submitted without a specific queue name.
17-25
Instructor Guide
Some of the attributes that can be found in the queue stanza include:
Attribute
Definition
Identifies the symbolic name that refers to
device
the device stanza
discipline Defines the queue serving algorithm
Identifies the file used to save print
acctfile
accounting information
up
Defines the state of the queue
Default
Other
fcfs
sjn
false
filename
TRUE
FALSE
Device stanza
The name of a device stanza is arbitrary and can be from 1 to 20 characters long. The
name is followed by a colon.
The attributes that can be found in the device stanza include:
Attribute
file
backend
access
header
trailer
feed
align
Description
Default
Other
write
never
never
both (used
for modems
or backends
needing
read
capability)
always
group
always
group
never
integer
FALSE
TRUE
V3.1.0.1
Instructor Guide
Uempty
The device stanza must contain an attribute that designates the backend program. The
function of the backend is to manage the printing of the actual job. It also produces the
final data stream that goes to the printer. The most common backend program for local
printing is piobe.
If different users desire different default printers, then the PRINTER variable can be set
up on a per user basis. The PRINTER variable should be set to the queue that the user
wishes to be their own default queue for example:
# PRINTER=ps ; export PRINTER
17-27
Instructor Guide
Instructor Notes:
Purpose Cover all the different relationships that queues and devices can have.
Details The reason that it is recommended to use SMIT rather than editing the file
directly is mainly to keep the contents of /etc/qconfig consistent with the contents of the
ODM. For example if you use vi to remove an entire stanza of information from the file, the
ODM still has an entry for that printer and you will not be able to redefine that printer until
the ODM is in sync with the /etc/qconfig file.
A queue can have a one to one relationship, where there is one queue to one printer. Or, a
queue can have a one to many relationship, where there are lots of printers in the same
room and the job goes to the first available printer. There may be times when there are
multiple queues that support one printer giving each queue its own characteristics of
printing a job, which is referred to as the many-to-one relationship. This occurs when a
printer is capable of printing different types of output such as ASCII, PostScript and
graphics.
The discipline attribute defines the queue serving algorithm. The default value, fcfs,
means first-come-first-served. sjn means shortest job next.
Additional Information How can you tell what the default queue is based on the
/etc/qconfig file? Answer: The first queue name specified is the default queue.
The LPDEST variable can also be set to define a user default queue. If both PRINTER and
LPDEST are set, LPDEST's value will be the value that is used.
Transition Statement Let's look at how to define printers and print queues.
V3.1.0.1
Instructor Guide
Uempty
Printer Menu
# smit spooler_choice
Print Spooling
Move cursor to desired item and press Enter.
AIX Print Spooling
System V Print Spooling
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Interface to manage spooling
AIX print spooling as well as System V print spooling are supported by SMIT in AIX 5L.
The Web-based System Manager also supports both print spooling systems.
17-29
Instructor Guide
Instructor Notes:
Purpose Show the main SMIT menu to manage print spooling.
Details
Additional Information
Transition Statement Lets configure a local print queue through SMIT.
V3.1.0.1
Instructor Guide
Uempty
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
SMIT AIX Printer menu
The SMIT fastpath to this menu is smit spooler. Printers and print queues can also be
managed using the Web-based System Manager.
The options on this menu are:
- Start a Print Job
This option starts a print job by submitting the job to a print queue.
- Manage Print Jobs
This option puts you into a submenu which allows you to cancel jobs, show the
status of jobs, prioritize jobs, hold and release jobs, and move jobs between print
queues.
- List All Print Queues
This displays a list of all the print queues and their associated printers.
17-31
Instructor Guide
Other commands
To show current print subsystem: # switch.prt -d
To change current print subsystem, you can use either:
- # switch.prt -s AIX
- # switch.prt -d SystemV
To check if binaries are correct linked, you can use either:
- /usr/bin/lpstat --> /usr/aix/bin/lpstat
- /usr/bin/lpstat --> /usr/sysv/bin/lpstat
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the options available from the SMIT AIX Print Spooling menu.
Details Explain each option briefly. Remind the students that this is actually quite a
simple procedure and try not to overwhelm them at this point with the many options. Many
of these options will be covered in this unit.
Additional Information
Transition Statement Let's assume we wish to add a queue. Select the option Add a
Print Queue.
17-33
Instructor Guide
F1=Help
F8=Image
/=Find
F2=Refresh
F10=Exit
n=Find Next
F3=Cancel
Enter=Do
AU1411.0
Notes:
Adding a local print queue
In our example, assume that the printer is directly attached to our AIX system. To
configure a printer attached in this way, choose local.
Some applications contain their own print control mechanisms and thus require that a
printer be configured without a queue. Use the SMIT fastpath smit pdp to define a
printer without a queue.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the different attachment types.
Details In AIX V4, the SMIT menus were modified so that both the printer and the queue
can be configured in one operation.
Note that this menu will always be presented to the user, regardless of whether they are
adding a new printer or a queue to an already existing printer.
Point out that this menu supports definitions for printers attached in a variety of ways. Many
installations these days use network-attached printers. To define this type of printer, choose
either hpJetDirect, ibmNetPrinter or ibmNetColor.
You can also configure just the printer device without any queues through SMIT. This is
useful in instances where the application is responsible for the print job and utilizes its own
control mechanisms.
Additional Information
Transition Statement Once the attachment type is defined, the printer manufacturer
has to be specified.
17-35
Instructor Guide
F2=Refresh
F10=Exit
n=Find Next
F3=Cancel
Enter=Do
AU1411.0
Notes:
Specify the printer manufacturer
The next selection that has to be made is the printer type. Notice that IBM is only one of
the choices and many other manufacturers are supported as well. Note also that there
is an Other option which will be selected if the printer type is not supported; that is, not
part of the list.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Choose the printer manufacturer.
Details This screen will also be presented to the user regardless of whether they are
adding a queue to a new device or to an already existing one.
Additional Information
Transition Statement Assuming that we select IBM from this menu, the next screen is
a list of all the IBM supported printers. Let's view the list.
17-37
Instructor Guide
IBM
IBM
IBM
IBM
IBM
IBM
IBM
IBM
IBM
IBM
F1=Help
Esc+8=Image
/=Find
2391
3112
3116
3130
3812
3816
4019
4029
4037
4039
F3=Cancel
Enter=Do
AU1411.0
Notes:
Select the manufacturers supported printer
If you do not have the software installed for your printer, you are prompted to insert the
media to install the software first before configuring the device and the queue.
The choice of printer determines the queue (or the virtual printer) setup. For example,
an IBM 4029 Laser Printer is capable of handling PostScript, ASCII, GL Emulation and
PCL Emulation. The SMIT print spooling menus guide you through the creation of up to
four separate queues which submit to the same printer.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the supported printer type.
Details Having selected IBM from the previous menu, the system will next present the
user with a list of all the supported IBM printers. Once the printer is selected, the system
will then prompt the user to create a separate queue for each mode the printer is capable of
supporting.
If the printer selected from this menu does not have device support installed, the user will
be prompted to install the support at this time. With AIX 5L, no printer drivers are installed
by default. However, the AIX installation media contains the device support for many
printers. Also, many OEM printers are delivered along with the necessary printer support
software.
Additional Information
Transition Statement The next selection deals with how the printer is physically
connected to the server.
17-39
Instructor Guide
Printer Attachment
Printer Interface
Move cursor to desired item and press Enter.
parallel
rs232
rs422
Parent Adapter
Move cursor to desired item and press Enter.
ppa0
AU1411.0
Notes:
Selecting the printer attachment
After selecting a printer type, a pop-up window is displayed where the printer interface
must be chosen. Possible values are parallel, RS232 and RS422. Some printers
support multiple attachment methods.
Then, a list of installed adapters that support that method of attachment is presented.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Choose the printer attachment.
Details If you are adding a queue to an already existing printer, then before the two
menus are seen (as shown on the visual) an extra menu is displayed which reads:
Add a new printer or select existing printer from below.
Let's assume that you already have an IBM 4029 printer configured on the system. Having
just selected IBM from the first menu and IBM 4029 from the second printer type menu, the
system at this point is not sure whether you are trying to add a queue to the printer which
already exists or whether you are trying to configure yet another IBM 4029 printer for your
system. That is why it will come back and ask for clarification by giving you the extra screen
with the above message.
In the visual, we are assuming that there are no printers configured yet (or at least not one
of the type that we have selected) so the two screens are displayed. We are assuming that
the printer is connected to the parallel port.
Additional Information
Transition Statement Once information about the printer has been defined, the next
menu asks for information about the new print queues.
17-41
Instructor Guide
[asc]
[]
[]
[ps]
[p]
[standard]
[600]
available
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
+
+
+#
+
F4=List
F8=Image
AU1411.0
Notes:
Create the print queues
This menu varies depending on the characteristics of the physical printer. If the printer is
capable of two or three different modes or emulations the system prompts you for a
separate queue name for each emulation. Once these queues are created, they are
sometimes referred to as virtual print devices.
Additional queues can be added to this printer after the initial queues are created.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define why there can be multiple instances of queue names required.
Details There are many variations on the naming of print queues and print devices. It is
recommended that they are kept short and simple without loosing the unique description
required by the users.
Once these initial print queues are created, more queues and queue customization can be
done. It is this procedure that creates the print and queue relationships and subsequently
updates the /etc/qconfig file. It is highly recommended that you do not edit the
/etc/qconfig file directly. Use SMIT whenever possible because of the implications with the
ODM updates.
In our example, we have chosen to create just two queues for our IBM 4029 printer. Take
the time to point out the two queues (ps and asc as shown in the student notes) that were
created as a result of having a printer which is capable of multiple modes. More often than
not, this is probably going to be the case. Also point out that the /etc/qconfig file will have
a stanza construct added that will point two queues to a single printer.
Additional Information
Transition Statement Now that the printer infrastructure is in place, let's talk about
remote printing.
17-43
Instructor Guide
Remote Printing
client1
host1
lp1
9 Configure a
remote queue
AU1411.0
Notes:
Overview of print server setup
Once your system has the local queue set up, any user on that system can print. If the
machine is networked, it can also provide printing for client machines by becoming a
print server.
To set up a print server, you need to define the client machine names or IP addresses in
the /etc/hosts.lpd file and then start the lpd daemon. Both of these tasks can be done
through SMIT. To use SMIT, the fastpath to identify the client system is smit
mkhostslpd.
The lpd daemon is controlled by SRC. You should use SMIT to start it however,
because SMIT also adds entries to /etc/inittab to ensure that it is started on reboot.
The fastpath for this screen is smit mkitab_lpd.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To explain the step for setting up remote printing.
Details Keep this discussion simple. This is not a discussion on networking or TCP/IP.
This visual assumes that networking is already configured. Most users operate in a
networking environment and network printing is very common.
There are different techniques to set up remote printing. Here we are showing how to take
an AIX system with a local printer and turn it into a print server. This doesn't need much
discussion of the network itself. All the user needs to know is what are the names (or IP
addresses) of the client machines.
There are other ways to set up remote printing. For example, HP Jet Direct cards are very
common. If the students are using these, then the AIX system is a client rather than host.
We will address that in a moment.
Additional Information These SMIT screen can be found in Print Spooling -->
Manager Print Server.
Transition Statement Let's take a look a the screen to define the client systems.
17-45
Instructor Guide
Client Authorization
# smit mkhostslpd
Add Print Access for a Remote Client
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Name of REMOTE CLIENT
[client1]
(Hostname or dotted decimal address)
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Set up client authorization
This step is done on the print server. On this screen, enter the client machine's name or
IP address. A plus sign ( + ) is also valid. It indicates that this AIX system is a print
server to all machines.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how to set up client authorization.
Details Enter the name or IP address. A plus (+) symbol gives access to all machines.
The entries will be added to the /etc/hosts.lpd file.
Additional Information
Transition Statement Let's see how to start the print server.
17-47
Instructor Guide
Start lpd
# smit mkitab_lpd
Start the Print Server Subsystem
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry
[both]
[no]
[no]
Fields]
+
+
+
Note:
Exporting this print server's directory
containing its print attributes will allow
print clients to mount the directory. The
clients can use this server's print attributes
to display and validate print job attributes
when starting print jobs destined for this
print server. Note that the Network File
System (NFS) program product must be installed
and running
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Starting the lpd daemon
This step is done on the print server. The lpd daemon is controlled by the system
resource controller (SRC). The commands startsrc and stopsrc can be used to
control lpd. By using SMIT, an entry is placed in the /etc/inittab file to ensure that lpd
is started each time the machine is booted.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to start the lpd daemon.
Details Keep this simple. The screen's defaults are all that is needed to start the lpd
daemon and turn the AIX system into a print server.
Additional Information
Transition Statement Now that the server is running, let's see how to configure a client
machine for remote printing.
17-49
Instructor Guide
F1=Help
F8=Image
/=Find
F2=Refresh
F10=Exit
n=Find Next
F3=Cancel
Enter=Do
AU1411.0
Notes:
Adding a remote queue on the client
This step is done on the client machine. The procedure to add remote queue starts the
same way as a local queue: smit spooler -> Add a Print Queue. This time select
remote as the attachment type.
You will be prompted to determine if you want to perform any type of filtering or
pre-processing to the print job before it is sent. Normally, Standard Processing is
selected. This just sends the job to the printer server and the print server is responsible
for processing the job.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show what to pick from SMIT to set up a remote print queue.
Details Each attachment type will ask for different information. We will show what
information is needed to set up the remote queue.
Be sure to mention there will be one more screen that follows this. It is used to do
preprocessing on a job. Selecting Standard Processing will leave all processing to the
printer server.
Additional Information
Transition Statement Let's see what is needed to complete the process.
17-51
Instructor Guide
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
[Entry Fields]
[rq1]
[host1]
[lp1]
AIX Version 3 or 4 +
[]
#
no
+
[]
[]
F4=List
F8=Image
AU1411.0
Notes:
Required input
Only three lines are required to complete the queue set up. You must name your local
(to the client) queue name. Then, provide the name of the printer server. Lastly, name
the queue on the print server.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To complete the remote queue set up
Details Focus in on the first three lines.
Name of QUEUE to add is the name of the queue on the client side. Users logged into the
client machine will send their jobs to this queue.
The hostname must be added and the name of the queue on the host.
Additional Information The local queue name and printer server's queue names can
be different or they can be the same. By keeping them the same, users on both machines
would direct their print jobs to queue of the same name. This is many time easier on the
users and on the administrator as well.
Transition Statement Let's do a quick review.
17-53
Instructor Guide
Let's Review
1. True or false? The qdaemon is responsible for printing jobs.
________________________________________________
________________________________________________
________________________________________________
2. To set up remote printing, what daemons are needed and do
they run on the server, the client or both?
________________________________________________
________________________________________________
3. What does the up = TRUE indicate in the /etc/qconfig file?
________________________________________________
________________________________________________
4. What does discipline mean in reference to the
/etc/qconfig file? What are its possible values?
________________________________________________
________________________________________________
________________________________________________
Copyright IBM Corporation 2005
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Review and test the students understanding of the first part of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Additional Information
Transition Statement Lets now look at how to submit print jobs.
17-55
Instructor Guide
System V
lp
AIX
qprt
$ lp -d queuename filename
- OR$ qprt -P queuename filename
AU1411.0
Notes:
Introduction
There are three sets of commands for submitting, listing and cancelling print jobs. They
come from either System V, BSD or IBM versions of UNIX and are all available in AIX.
The commands have slightly different options.
V3.1.0.1
Instructor Guide
Uempty
Spooling
The commands lp and qprt both queue without spooling by default. Specify the -c
option if spooling is desired. The command lpr spools and queues by default. The -c
option will turn off spooling with lpr.
Multiple copies
To print multiple copies, with qprt use the -N # option, with lp use -n # option, and
with lpr use just a dash followed by the number of copies ( - # ).
The lp, lpr and qprt commands create a queue entry in /var/spool/lpd/qdir and
(depending upon the options specified) copy the file to be printed to the
/var/spool/qdaemon directory.
17-57
Instructor Guide
Instructor Notes:
Purpose Show how to submit jobs to the printer.
Details Explain the visual using the student notes. Do not explain every single option for
every command. Concentrate on the AIX command.
Note that qprt was chosen to be on the visual because it is the AIX command. lp was also
included because it illustrates that these commands use different options. lp is the most
popular printing command in UNIX. The student notes include a discussion on all the
available commands. Students should choose what will work best for them.
You may also want to mention the -j option which can be used with the enq and lpr
commands so that the job number will be displayed once the job has been submitted to
print. The lp command displays the job number by default. The qprt command uses the -j
option for another purpose.
Additional Information
Transition Statement Once you have submitted a job, you probably want to view where
in the queue your job is. Let's see how you can do this.
V3.1.0.1
Instructor Guide
Uempty
BSD
lpq
AIX
qchk
For example:
$ qchk
Queue
ps
Dev
lp0
Status Job
Files
User
DOWN
QUEUE 569 /etc/motd root
PP %
Blks Cp
Rnk
AU1411.0
Notes:
Checking status with the qchk command
Many of the print job control tasks require the user to supply a job number. The job
number, along with other queue status information is available by checking the status of
print jobs.
The fields from the qchk command are as follows:
Queue
Queue name
Dev
Status
Job
Files
User
17-59
Instructor Guide
PP
Percent completed
Blks
The number of 512-byte blocks the print job has been split into
Cp
Rnk
lpq
qchk -A
enq -A
qchk -W
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose How to list the jobs in a queue.
Details Explain the advantage of the lpstat command which by default lists information
about all the configured queues. With the qchk command, use the -A option to obtain a
similar sort of listing. The qchk with no options will list only the default queue information.
Also mention the -L option with the qchk command. This option displays a long-form listing
of the queues including spool file information. The -W option displays a wide-form listing,
which is helpful if device or queue names are long. The wide-form listing lists queue names
up to 20 characters and device names up to 14 characters (vs. 7 and 5 characters
respectively). This option is available with AIX V4.2.1 and later and cannot be used when
the -L option is used.
All the attributes have been defined in the student notes.
Additional Information
Transition Statement Let's look at more tools that allow you to manage your print
queues.
17-61
Instructor Guide
[Entry Fields]
PRINT QUEUE name
[ps]
AU1411.0
Notes:
Attributes for Printer Setup option
After selecting 1. Printer Setup, the following attributes can be changed or shown:
-
V3.1.0.1
Instructor Guide
Uempty
17-63
Instructor Guide
Instructor Notes:
Purpose Show how the characteristics of the queue can be customized.
Details You must select the queue name to which you wish to make the changes. Then,
select one of the options (the one that holds the attribute that you are trying to change).
Refer to the student notes in order to obtain a list of what is contained in each option.
The actual contents of each option will vary depending on the type of queue being
customized (for example, an ASCII queue vs. a PostScript queue).
Under Default Print Job Attributes => Job Processing Options..., some queues allow
you to specify the page number where printing should begin. This can be helpful if there is
a paper jam in the middle of printing a job. Bring the queue down and fix the jam. Then,
alter this value to indicate the page at which you want the print job to resume. Then,
change the value back to 1 for printing future jobs.
The queueing discipline will be covered in more detail shortly. If a student asks, the two
disciplines that can be chosen are either First Come First Serve or Shortest Job Next.
Additional Information
Transition Statement Let's see how we can remove a queue.
V3.1.0.1
Instructor Guide
Uempty
Removing a Queue
# smit rmpq
Remove a Print Queue
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
ps:lp0
/dev/lp0
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
no
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Removing a queue with SMIT
It is not possible to remove a queue containing jobs. The jobs would have to be
removed first.
The last option on the screen asks whether the printer device definition should be kept.
This option will only appear if the queue being removed is the only queue defined for a
printer. Note that by default, it will be removed.
17-65
Instructor Guide
Instructor Notes:
Purpose Show how queues can be deleted from the system.
Details The last option on the screen asks whether the printer device definition should
be kept. This option will only appear if the queue being removed is the only queue defined
for a printer. Note that by default, it will be removed. (You may wish to keep the definition if
in the future you wish to add a new queue which uses the same printer.) If there were other
queues which were using the printer, the last option would not be present on the SMIT
screen. This option will remove the print queue from the system configuration.
Additional Information
Transition Statement Other management tasks can be carried out on queues. Let's
see what they are.
V3.1.0.1
Instructor Guide
Uempty
Managing Queues
# smit pqmanage
Manage Print Queues
Move the cursor to the desired item and press Enter.
Show Status of Print Queues
Stop a Print Queue
Start a Print Queue
Set the System's Default Print Queue
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
SMIT Managing Queues options
The following actions can be done:
- Show Status of Print Queue gives output similar to qchk and lpstat
- Stop a Print Queue runs the disable command
- Start a Print Queue runs the enable command
- Set the System's Default Print Queue reorders the /etc/qconfig file to ensure the
default queue is the first queue in the file
17-67
Instructor Guide
Instructor Notes:
Purpose List the supported management tasks for queues through SMIT.
Details The visual is fairly self explanatory. Point out that if a print queue is stopped,
print jobs can still be submitted to the queue. However, they will not be processed until the
queue is enabled.
If the system wide default printer is changed, this will have an effect for everyone other than
those who have set the PRINTER or LPDEST variable to their own personal choice.
We will look at the first three items on this menu. The last item is self-explanatory, so there
is no need to spend more time on it.
Be sure to point out that the last three tasks on this menu can only be performed by the
root user or a member of the printq group.
Additional Information
Transition Statement Let's see what the different queue statuses mean.
V3.1.0.1
Instructor Guide
Uempty
Dev
lp0
Status
DOWN
QUEUED
Job
Files
User PP %
1569
/etc/motd root
Bks
Cp Rnk
State
DEV_BUSY
Description
Printer is busy servicing other print requests
DEV_WAIT
DOWN
OPR_WAIT
QUEUED
READY
RUNNING
UNKNOWN
AU1411.0
Notes:
Introduction
The status of the queues and jobs can be displayed with qchk, lpstat or lpq. There are
a number of different status states that may be seen.
DEV_BUSY
This status can occur when more than one queue is defined to a print device and
another queue is currently using the print device. It could result when the qdaemon
attempts to use the printer port device and another application is currently using that
print device. Normal recovery: You have to wait until the queue or application has
released the print device, or kill the job or process that is using the printer port.
17-69
Instructor Guide
DEV_WAIT
This status means that the queue is waiting on the printer because the printer is offline,
out of paper, jammed, or the cable is loose, bad or wired incorrectly. Normal recovery:
Check to see if the printer is offline, out of paper, jammed or loosely cabled. Sometimes
the jobs have to be removed from the queue before the problem can be corrected.
DOWN
This status is set when the device driver cannot communicate with the printer after
TIME OUT seconds (which can be set through SMIT). This variable indicates the
amount of time, in seconds, that the queuing system waits for a printer operation. If the
printer is off, the queue will go down. Also, the operator can bring down the queue
intentionally, which might be necessary for system maintenance. Normal recovery:
Correct the problem that has brought the queue down and then bring the queue up
again.
OPR_WAIT
This status is set when the backend program is waiting on the operator to change the
paper, change forms and so on. This is usually software related. Normal recovery:
Respond appropriately to the request that is made by the queuing system.
QUEUED
This status is set when a print file is queued and is waiting in line to be printed.
READY
This is the status of a queue when everything involved with the queue is ready to queue
and print a job.
RUNNING
This status occurs when a print file is printing.
UNKNOWN
This status occurs when a user creates a queue on a device file that another queue is
using and its status is DEV_WAIT. The queue cannot get a status from the printer
device when it is on hold. Normal recovery: Bring down the other queue or fix the
problem with the printer (paper out, jammed, offline and so on). Bring the new queue
down and then back up so that the queue will register as READY.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define the different queue states.
Details Explain each of the values (not in too much detail) using the student notes.
Additional Information
Transition Statement Let's see how to bring a queue up and down.
17-71
Instructor Guide
Dev
lp0
Quality lp0
Status Job
DOWN
QUEUED 132
READY
Files
User
PP %
Bks Cp Rnk
/etc/motd team01
AU1411.0
Notes:
Enabling a queue
Occasionally, problems with printers can bring a queue down. Once the problem has
been fixed it can be brought back up with:
# enable <queuename>
Disabling a queue
Sometimes, you may wish to bring a queue down. This is recommended if any
maintenance is going to be performed on the printer. You can do this with either of the
commands:
- # disable <queuename>
- # enq -D -P <queuename>
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to bring up a queue after a problem is resolved or down for
system administration purposes.
Details There are several commands that can be used to bring queues up and down.
The student notes show two of them.
The enq options -D and -U can only be used on local print jobs. Most system administrators
find that the enable and disable commands are the easier ones to use.
This example shows queue names of draft and quality. These are the queue names that
will be used in the machine exercises.
Additional Information
Transition Statement Let's turn our focus to jobs and how to manage them.
17-73
Instructor Guide
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Who can manage print jobs?
The root user or a member of the print group can work with any print request. Normal
users can only work with their own print jobs.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Discuss the SMIT screen that is used to manage print requests.
Details Do not go into too much detail at this point for each option. We have already
discussed the menu item Show the Status of Print Jobs. The other options will be
discussed next.
Additional Information
Transition Statement Let's look at these tasks one at a time.
17-75
Instructor Guide
[Entry Fields]
[ ]
+
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
[ ]
+#
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Introduction
The qcan command cancels either a particular job number or all jobs in a print queue.
Normal users can only cancel their own jobs, whereas root can cancel any job.
V3.1.0.1
Instructor Guide
Uempty
Examples
To cancel job number 127 on whatever queue the job is on, you can use either of the
following two commands:
- # qcan -x 127
- # cancel 127
To cancel all jobs queued on printer lp0, you can use either of the following two
commands:
- # qcan -X -Plp0
- # cancel lp0
17-77
Instructor Guide
Instructor Notes:
Purpose How to cancel a job in a queue.
Details Point out that there are restrictions. As an ordinary user, you can only cancel
your own requests (which is a desirable thing!). However, root or a member of the printq
group can cancel any job from any queue.
Note the two examples in the student notes. The use of the -x option allows you to cancel
a specific job by its job number. An equivalent command to that shown in the student notes
is cancel 127. The use of the -X option allows you to cancel all jobs queued on a specific
printer. If a normal user uses this option, only the jobs that they submitted will be cancelled.
The qcan command can be used to cancel both local and remote jobs.
This command can also be used to cancel HELD jobs.
Additional Information You may want to mention that a running job can only be
cancelled if all of it hasn't been sent to the printer. Today's printers all have buffers. Once
the print job has left the system it is outside the control of printer commands. The status
may show running but there won't be any way to cancel it. On some printers, it is possible
to power-off the printer as a way to clear the buffer. A large job that is bigger than the
printer buffer can be cancelled before it completes. Keep in mind that whatever is in the
printer buffer will still be printed.
Transition Statement Let's see how the priority of print requests can be changed.
V3.1.0.1
Instructor Guide
Uempty
-L
Dev
___
lp0
Status Job
Name
Rnk
_______ Submitted
DOWN
QUEUED 569 /etc/qconfig root
1/07/03 09:39:25
1
/etc/qconfig
QUEUED 570 /etc/motd
1/07/03 09:40:15
/etc/motd
# qpri
# qchk
Queue
______
ps
-#570 -a 25
-L
Dev
Status Job
___
______ Submitted
lp0
DOWN
QUEUED 570 /etc/motd
1/07/03 09:40:15
/etc/motd
From
Pri
To
Cp PP %
Blks
To
Cp PP %
root
15
root root
2 15
Name
Rnk
Blks
From
Pri
root root
1
25
AU1411.0
Notes:
Processing order
The discipline line in the /etc/qconfig file determines the order in which the printer
serves the requests in the queue. In the queue stanza, the discipline field can either
be set to fcfs (first-come-first-serve) or sjn (shortest-job-next). If there is no
discipline in the queue stanza, requests are serviced in fcfs order.
17-79
Instructor Guide
Example
The example in the visual shows that when print jobs are submitted they receive the
default priority of 15. The example shows how the qpri command can be used to
change the priority of job number 570 to 25. Use the qchk -L command to show the
new job priorities.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Define how to change the priority of a print job.
Details Mention that normal users can only raise their priority to 20, whereas members
of the printq group or root can change their priority to 30. Mention also that jobs by default
are submitted with a priority of 15.
You can only assign priority on local queues. You cannot assign the priority of a remote
print job.
The example shows that when print jobs are submitted they receive the default priority of
15. The example shows how the priority of job number 570 has been increased to 25. This
is clearly seen in the output of the qchk -L command.
Students will note that the ps queue has been disabled. However, it is still possible to send
jobs to the queue.
Priority takes precedence over discipline. Even in the shortest-job-next environment,
priority is the most important.
Additional Information
Transition Statement Now let's see how a job can be held in a queue.
17-81
Instructor Guide
# qhld -#1493
# qchk
Queue Dev Status Job
ps
lp0 DEV_BUSY
HELD
1493
# qhld -r -#1493
# qchk
Queue Dev Status Job
ps
lp0 DEV_BUSY
QUEUED 1493
Files User
PP%
Blks
Cp
/etc/qconfig root 1
Files User
Cp
PP%
Blks
/etc/qconfig root 1
Files User
PP% Blks
Cp
/etc/qconfig
root 1
Rnk
1
Rnk
1
Rnk
1
AU1411.0
Notes:
Holding and releasing a print job
The qhld command is used to put a temporary hold on a job that is waiting in the
queue. The qhld command is also the command that is used to release job back in the
queue.
The visual provides a example of using the qhld command to hold and then release job
# 1493.
This task can also be accomplished through smit (smit qhld).
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show how to use the qhld command.
Details Cover the example. qhld can be used to hold a job, a queue (use -P) or jobs
owned by a particular user (use -u).
If you specify and own and do not specify a queue name, then all jobs by that owner are
effected.
You cannot hold a job once it starts printing.
You cannot hold or release remote print jobs.
Explain the example per the visual. Job number 1493 is first held and then released.
In reality, if the queue were ready and only one job was queued, the job would print before
you could alter it to HELD. So, for the sake of example, assume that there are other jobs in
the queue that may currently be printing.
Additional Information
Transition Statement Print jobs can also be moved from one queue to another. Let's
see how this can be done.
17-83
Instructor Guide
Job
Files User
PP%
Blks Cp
11
/etc/qconfig root
Rnk
1
Rnk
1
AU1411.0
Notes:
Moving print jobs
You can move jobs between queues in AIX. The command qmov is used. The -m option
specifies what queue to move the job to and the -# option specifies the job number.
This can be done through smit using smit qmov.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show how jobs can be moved from one queue to another.
Details In the example the job is moved from the asc queue to the ps queue.
You cannot move a remote print job to another queue.
A job cannot be moved once it starts printing.
Additional Information When would this be useful?
Answer: if the user has made a mistake of submitting a job to the wrong queue.
Transition Statement Let's see what print-related directories to monitor.
17-85
Instructor Guide
var
spool
lpd
qdaemon
qdir
Temporary copies of
enqueued files if
spooling
Copyright IBM Corporation 2005
AU1411.0
Notes:
Why directories may fill up
The directories shown in the visual fill up very quickly if the spooling mechanism
encounters a problem. For example, if the queue goes down, or if there are many users
submitting jobs, there may not be enough room to handle the requests.
Remember, when print jobs are submitted to spooling rather than just queuing, a copy
of that file is created and stored in the /var/spool/qdaemon directory until that job has
printed. At that time, the temporary file is removed. If the queue or multiple queues quit
working, jobs don't get through the system. This could cause a full condition in this
directory structure.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose List the directories that should be monitored.
Details The following are directories which could potentially grow, so these have to be
regularly monitored. The spooling directories and files are under /var/spool. Do not go
through each file and directory name, however two of the more frequently used directories
have been listed. /var/spool/lpd/qdir contains one request for each job submitted to the
printer, and the requests are in the format NumberUser_name:Queue_name. This is what
qdaemon will use to determine who submitted the job, which of the users will use to
determine who submitted the job, which of the users requested this particular job, and the
queue name to which the job was submitted. The /var/spool/qdaemon directory contains
the spool files (if one is requested).
If the print spooler system needs to be cleared and restarted, it is possible to remove all
files from these directories. For example: rm /var/spool/lpd/qdir/* and
rm /var/spool/qdaemon/*. Be aware that these commands will completely delete all jobs
in the queues and the jobs will need to be resubmitted. There are times when these actions
will be necessary due to system problems. Of course, only the root user can execute these
rm commands.
Also, if the /var file system becomes too large, actions will also need to be taken.
Additional Information
Transition Statement What if you encounter a problem with your printer or the queues?
What can you try?
17-87
Instructor Guide
> /dev/lp0
Any output?
NO
YES
Check hardware
9
9
9
9
Check software
9
9
9
9
qdaemon running
Check /etc/qconfig
Queue enabled
/var and /tmp not full
AU1411.0
Notes:
First step
If you experience problems trying to print, start by checking the simple things first.
The easiest test to perform is to cat a file and redirect standard output to the printer
device file. This by-passes the queuing system and helps to narrow the problem.
Check hardware
After redirecting a file to the print device, if it does not print, the problem is usually
hardware-related. Check to make sure the cables are attached securely. Make sure the
printer is ready to print (online). Make sure there is paper in the printer and there are no
paper jams.
V3.1.0.1
Instructor Guide
Uempty
17-89
Instructor Guide
Instructor Notes:
Purpose Explain how to troubleshoot printing problems.
Details Cover the visual in detail.
Make sure the students understand why performing a cat to direct a file to the printer helps
to pinpoint the problem area.
When checking cables, if using serial connection, be sure the pins have not been bent or
broken.
Ask the students if /tmp or /var is full, what commands would be useful in determining what
is filling the file system?
Answer:
# df
# du -ax /tmp
# du -ax /var
Additional Information When checking to see if qdaemon is running, make sure there is
only one qdaemon running. Having multiple qdaemons running is not a likely problem, but it
would cause a problem if it happened. If qdaemon is being used properly under SRC, it is
not likely that this problem would ever occur.
Transition Statement Let's take a look at some checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint (1 of 2)
1. True or False? One of the advantages of queues is that
each user can have a different default queue set up for them.
________________________________________________
2. True or False? The /etc/qconfig file is read by the backend
program to determine what the queue discipline is.
________________________________________________
3. True or False? All printer software is automatically installed
when you install the base operating system.
________________________________________________
4. What is the difference between these two commands?
# qprt -Pasc file1
# qprt -c -Pasc file1
________________________________________________
Copyright IBM Corporation 2005
AU1411.0
Notes:
17-91
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (1 of 2)
1. True or False? One of the advantages of queues is that each
user can have a different default queue set up for them.
True. This can be accomplished using the PRINTER
environment variable.
2. True or False? The /etc/qconfig file is read by the backend
program to determine what the queue discipline is.
False. It is read by qdaemon.
3. True or False? All printer software is automatically installed
when you install the base operating system.
False. Only a handful of printer software is installed by default.
4. What is the difference between these two commands?
# qprt -Pasc file1
# qprt -c -Pasc file1
The -c flag produces a spool file.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Continue with more checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint (2 of 2)
5. What three methods can be used to find out what the system
default queue is?
AU1411.0
Notes:
17-93
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (2 of 2)
5. What three methods can be used to find out what the system
default queue is?
First entry in /etc/qconfig file
The output from the qchk command with no options
The first queue listing from the lpstat command
6. What users can bring print queues down?
The root user or members of the printq group.
7. True or False? Once the queue is down, no more jobs can
be submitted to the printer.
False. Jobs can be submitted to the queue. However, they
will not be printed until the queue is brought up again.
8. Can users hold all their print jobs in a specific queue?
If so, how?
Yes, they can by only specifying a queue name and not
individual job numbers.
Copyright IBM Corporation 2005
Additional Information
Transition Statement Now, lets do an exercise.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This exercise gives you an opportunity to work with the AIX queuing system. If your
classroom does not have locally attached printers, your instructor needs to supply you
with local modification for this lab.
This exercise can be found in your Student Exercise Guide.
17-95
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Summarize the unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
Queues can be added for local or remote printing
Queue characteristics can be changed either through
SMIT or via high-level commands
Queues can be brought up and down by the system
administrator
The following tasks were considered:
Submit and cancel print jobs
List the jobs in a queue
Hold and release jobs in a queue
Move a job from one queue to another
Change priorities of a print job
AU1411.0
Notes:
17-97
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement This is the end of this unit.
V3.1.0.1
Instructor Guide
Uempty
References
Online
18-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Define the basic TCP/IP terminology
Configure TCP/IP for an Ethernet or Token-Ring
connection
Use some of the standard TCP/IP facilities to:
Log in to another system
Transfer files
Run commands
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start by defining what TCP/IP is.
18-3
Instructor Guide
What Is TCP/IP?
Transmission Control Protocol/Internet Protocol
Software to enable different systems to exchange data over
a variety of types of network
The way in which systems are connected and how data is
passed between them is transparent to the user
TCP/IP is vendor-independent; development is overseen by
the Internet Architecture Board
AU1411.0
Notes:
Networking architecture
TCP/IP is a networking architecture which defines a mechanism for cooperating
computers connected by some sort of network to exchange data. TCP/IP software has
been implemented across many platforms from mainframes to personal computers,
although it is most commonly associated with UNIX environments.
Protocols
TCP/IP is a set of protocols which define various aspects of how two computers on a
network may communicate with each other. A protocol is a set of rules which describe
the mechanisms and data structures involved. Using these definitions, vendors can
write software to implement the protocols for particular systems.
V3.1.0.1
Instructor Guide
Uempty
18-5
Instructor Guide
Instructor Notes:
Purpose Introduce TCP/IP.
Details TCP/IP is another protocol stack.
As well-known alternatives, there are OSI and SNA. These also achieve communication
between computers.
The difference between these and TCP/IP is that TCP/IP is now the de facto standard
protocol for network communications across all platforms.
TCP/IP is available from many vendors on many platforms. Whatever the vendor or the
platform, the same level of functionality is provided.
TCP/IP has undergone some changes. The IP protocol that has typically been used is
IPV4. However, a new version of IP has been introduced, IPV6, (also known as IPng - next
generation). IPV6 is supported by AIX V4.3 and later. This version of IP will address the
current shortage of network and host addresses.
Additional Information In spring of 1995, US Federal funding for the IAB was
discontinued.
Transition Statement We have mentioned that most systems either already use
TCP/IP or could at least communicate with those that do use it. This is the so-called
Internet.
V3.1.0.1
Instructor Guide
Uempty
An Internet
A TCP/IP network is often called an internet.
A
gateway
Token
Ring
Serial
gateway
modem modem
C
B
D
FDDI
E
gateway
gateway
X.25
F
Ethernet
AU1411.0
Notes:
Introduction
TCP/IP works with many different types of networks from slow-speed serial type
connections to fast local area networks like Token-Ring or Ethernet or even faster
networks like FDDI (using fiber optics).
18-7
Instructor Guide
Internet
An Internet is a term given to a number of TCP/IP networks connected together. An
Internet can be a combination of similar networks or heterogeneous networks. In an
Internet, data can be transferred transparently from one host to another without the
sending host needing to know the route taken or the type or number of connections
involved.
There are a number of public Internets worldwide, the largest of which is called The
Internet (or the connected Internet). The Internet consists of millions of connected
systems.
Host
A host is any computer attached to the network which has a TCP/IP address. This
includes machines of any size or functionality. For example, an X-Terminal is a host as
far as TCP/IP is concerned. Each host is given a unique name (for users) and address
(for software) so that it can be uniquely identified in the interconnection of networks.
Gateway
A host which has interfaces on multiple networks and the ability to route traffic from one
to another is called an IP Gateway or an IP Router. The ability to route between the
attached networks is an important factor. A server which has interfaces on multiple
networks for the purpose of improved availability or performance, is called a
multihomed host or multihomed server. It is not recommended to configure a
multihomed server to be router because the extra load of the routing will impact the
server performance.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Here we look at the concept of an Internet and what it entails.
Details The Internet is simply a collection of computer systems connected together
using TCP/IP protocols.
The distinctions between WANs and LANs get blurred when satellite links are used to
provide a fast, dedicated link between a remote station and a company hub.
As a cheaper alternative, short-wave radio can also be used.
These technologies mean that a mobile site in the Nigerian oil fields, for example, could be
seen as part of the base office LAN in Oslo.
Transition Statement Whether working in a LAN or WAN, we need to identify the
computer systems that make up the network. This is done by naming or addressing them.
18-9
Instructor Guide
AU1411.0
Notes:
Names and addresses
All network utilities need to know a computer system identification. This can be
achieved by assigning each system a unique number.
This appears in either a numerical format, for example, 234.56.78.91 or in a textual
format (symbolic name), for example, spud.maff.uk.gov.
The symbolic name is translated into the numeric IP address by name resolution
services, such as Domain Name Server (DNS). The above symbolic name example is
what is called a fully qualified name which includes the names services domain name
(maff.uk.gov).
The name services can often obtain a translation for an abbreviated form of the name
(typically called the short name) when defined as an alias name or when it is in your
default DNS domain. For example, the short name, spud, would translate to the same
IP address as would spud.maff.uk.gov.
18-10 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
Some network utilities will work with both the notations, while others (rsh, rlogin, rcp)
must know of the textual form in order to work.
18-11
Instructor Guide
Instructor Notes:
Purpose Explain how computer systems are identified in an Internet.
Details The TCP/IP address used in the visual is an example of an IPV4 address. This
is the address format used by most companies at this time. IPV6 supports a 128-bit
address, which looks much different. For example, FE80::1:23e7:f5db
Additional Information All machines within a common networking environment
(whether public or private) must have unique IP addresses. Within a private network, this
can be coordinated just within the owning organization. But, when you want to
communicate on the international Internet, the addresses have to be coordinated through
an international Internet Registry organization. For example, the American Registry for
Internet Numbers (ARIN) coordinates IP address assignment for the Americas. For
practical purposes, the Internet Registries have been delegating this job to the Internet
Service Providers (ISPs). It is also important to have unique symbolic names. This is
insured by the hierarchical naming embodied in the fully qualified names we discussed.
In a LAN, all the names and addresses can be held on each system in an ASCII file or can
be centralized in a network Domain Name Server.
Only small isolated networks tend to depend on ASCII files to handle name resolution.
Transition Statement So why use networks?
V3.1.0.1
Instructor Guide
Uempty
Clients
Network
Management
PC
File Transfer
Mail
Network
RS/6000
Other Systems
RS/6000
AU1411.0
Notes:
Network applications
There are many applications that require or can take advantage of TCP/IP. The ones
listed are available from IBM either as standard or as licensed program products. There
are many third-party applications (for example databases) that can also use TCP/IP for
distributed work.
- Network File System (NFS) allows access of remote files as if they were local.
- Network Information Services (NIS) provides a distributed database of system
information.
- Domain Name Service (DNS) provides server support to keep track of host names
and addresses in the network.
- Dynamic Host Configuration Protocol (DHCP) allows a host to dynamically obtain a
TCP/IP address from a server in the network.
18-13
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show product examples that use the facilities provided by TCP/IP.
Details TME10 Netview for AIX is available through IBM.
This may be a good time to advertise the IBM AIX TCP/IP Networking classes. In most
countries, DNS, NIS and NFS are taught in either Q1307, AU05 and AU09.
Additional Information One statement sums it up: Try living WITHOUT a network...!
Transition Statement Having explored the background to TCP/IP, let's see how we can
set it up.
18-15
Instructor Guide
AU1411.0
Notes:
Introduction
Each system in a TCP/IP network must have a unique TCP/IP address and hostname.
Your network administrator centrally manages tables of names and addresses, and
assigns these for your system. On some networks a subnet mask is also required which
is used to determine which network your machine belongs to for routing purposes.
Address
AIX V4.3 and later provides support for both IPV4 and IPV6 addresses. The IPV6
addresses are 128 bits in length, represented as eight 16-bit fields separated by colons.
A technique called tunneling is used to allow systems with IPV4 and IPV6 to coexist.
SMIT and the Web-based System Manager provide separate support for configuring
IPV6.
V3.1.0.1
Instructor Guide
Uempty
Name resolution
Each host in a network is allocated a name which the users find easier to remember.
However, the TCP/IP protocols can only use TCP/IP addresses when sending data.
Therefore, a portion of TCP/IP is responsible for translating the symbolic host names
into TCP/IP addresses. This process is called name resolution.
Two common mechanisms for name resolution are:
- Flat network
Each host in the network has a record of the name and address of every other host
it will communicate with. This is in a text file called /etc/hosts. This is quick but
becomes difficult to administer if there are a large number of hosts.
- Domain network (Domain Name Server)
Hosts are grouped together into domains which form a hierarchy (similar to the file
directory structure). One (or more) hosts in a domain (called name servers) have a
record of the name and address of all hosts. Client hosts request name to address
translations from a name server. Use the /etc/resolv.conf file.
There may be more than one name server in a domain network for backup, but only one
will have the primary copy of the database on its local disk. Clients only need to know
the domain name and the address of the name servers. This mechanism is more
suitable for large networks because administration is centralized on a few machines.
Gateway
If your network is just part of a larger network then you need to know about the gateway
machines which link your network to others. Most network designs only have one
gateway, called the default gateway. You need to know the address of the default
gateway to allow your system to communicate with other systems through the gateway.
18-17
Instructor Guide
Instructor Notes:
Purpose Show the information needed to configure TCP/IP.
Details This information will be provided by the network administrator, and it may not be
the responsibility of the system administrator to configure TCP/IP.
In this unit, only flat networks are considered. Do not explain in any detail domain networks.
The student notes mention the IPV6 addresses. These are supported at AIX V4.3 and later.
These addresses are 128 bits in length. The contents of these addresses is way beyond
the scope of this class. The point here is to let the students know that AIX supports these
128-bit addresses. The advantage of this address format is to provide many more
addresses for hosts and networks than were previously available.
AIX RS/6000 systems with network interfaces configured with IPV4 and IPV6 can coexist
using a technique called tunneling. This technique basically puts an IPV6 packet inside an
IPV4 packet. This then provides for gradual transition to IPV6.
IPV6 also provides support for the Neighbor Discovery Protocol (NDP), auto-configuration
of IP addresses and additional routing enhancements. AIX also supports additional IP
security for both IPV4 and IPV6.
SMIT provides support to configure IPV6 and tunneling.
Transition Statement Having gathered the network address/hostname, the next step
can be done through SMIT.
V3.1.0.1
Instructor Guide
Uempty
Configuring TCP/IP
# smit mktcpip
Minimum Configuration & Startup
To Delete existing configuration data, please use Further Configuration menus
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
* HOSTNAME
* Internet ADDRESS (dotted decimal)
Network MASK (dotted decimal)
* Network INTERFACE
NAMESERVER
Internet ADDRESS (dotted decimal)
DOMAIN Name
Default Gateway
Address (dotted decimal or symbolic name)
Cost
Do Active Dead Gateway Detection?
Your CABLE Type
START TCP/IP daemons Now
F1=Help
Esc+5=Reset
Esc+9=Shell
F2=Refresh
Esc+6=Command
Esc+0=Exit
F3=Cancel
Esc+7=Edit
Enter=Do
[Entry Fields]
[sys1]
[10.0.0.1]
[255.255.255.0]
en0
[]
[]
[10.0.0.192]
[0]
no
N/A
no
#
+
+
+
F4=List
Esc+8=Image
AU1411.0
Notes:
Methods to configure TCP/IP
When the TCP/IP software is installed, a new menu called TCP/IP (fastpath: tcpip) is
added to SMIT in Communications Applications and Services and other places.
The Web-based System Manager can also be used to configure the network.
Minimum configuration
The SMIT Minimum Configuration & Startup option (fastpath: mktcpip) or the
mktcpip command can be used to quickly configure TCP/IP on AIX systems. This
initializes TCP/IP (for client services) but further customization will be required.
The minimum information that is required to start TCP/IP is the hostname, and one
interface and its Internet address. If subnetting is used, then the subnet mask should be
specified. A static route can be specified to a default gateway. Also, the domain name
and name server for a client in a domain network can be specified.
Copyright IBM Corp. 1997, 2005
18-19
Instructor Guide
You can decide whether to start the TCP/IP daemons when initializing TCP/IP through
this option.
Further configuration
The Further Configuration menu (fastpath: configtcp) contains a series of menus for
customizing TCP/IP options. For example, hostnames, routes, interfaces, name
resolution, server and client services.
Dead gateway detection is a mechanism for hosts to detect a dead gateway or a
gateway that is not responding. The cost is used with dead gateway detection to
prioritize routes.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Show the SMIT panel used to configure TCP/IP on the system.
Details Check that the right interface settings are being used: 4/16 Mbps for token-ring,
and so forth. The wrong settings will, in the worst case, stop the entire ring! Most of the
newer token-ring adapters can autosense the ring speed.
If using ethernet, cable type may need to be specified. bnc is used for thin cable, dix is
used for thick cable and tp is used for twisted pair. In most cases, the network adapters are
designed to autodetect the cable type, in which case the default of N/A is best.
Additional Information If IPV6 is being used, a separate set of SMIT screens is
available for configuration. The SMIT screen shown supports only IPV4 style addresses.
Transition Statement Having set up TCP/IP, the next step is to add the names of other
systems to this one.
18-21
Instructor Guide
#Internet Address
127.0.0.1
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
Hostname
loopback
sys1
sys2
sys3
sys4
#Comments
localhost
timeserver
AU1411.0
Notes:
The /etc/hosts file
Host names and their Internet addresses are mapped by entries in the /etc/hosts file. In
a flat network, there should be entries for the local machine name, local host and all
other hosts known to the system. Typically, /etc/hosts is kept consistent between all
machines.
In a domain network, the /etc/hosts file can be empty. Although, usually some hosts
can be added for access to other hosts if the name server is down, except for the
loopback address and the local machine's own assigned IP address(es).
On AIX, you can use SMIT or the vi command to add entries to /etc/hosts. The Hosts
Table menu (fastpath: hosts) contains options to list/add/change/delete hosts in the
/etc/hosts file. To get to this menu from the TCP/IP menu, select Further
Configuration then Name Resolution. The /etc/hosts file can be edited directly if
desired.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Provide an example of how system names can be resolved into addresses.
Details Name resolution is commonly performed in two ways: a) an ASCII file or b)
DNS.
For small isolated networks, the ASCII file (/etc/hosts) is good enough, but when
managing a network of 100+ systems or when needing Internet access, then DNS
becomes an attractive alternative.
For the purposes of simplicity, the flat network model is used here.
Additional Information For those wishing to find out more about DNS, refer to the AIX
documentation. There is also an additional course offering titled AIX V4 Configuring TCP/IP
which may be of interest to some of the students.
AIX supports two additional methods of name resolution:
Lightweight Directory Access Protocol (LDAP)
Network Information Services (NIS)
Both can provide remote name resolution, remote user authentication, and other services.
Transition Statement Let's take a look at a few useful commands.
18-23
Instructor Guide
host command:
Examples:
# host sys3
sys3 is 10.0.0.3,
Aliases: sys3.washington.ibm.com
# host 10.0.0.3
sys3 is 10.0.0.3,
Aliases: sys3.washington.ibm.com
AU1411.0
Notes:
Commands to determine the hostname or IP address
Two useful commands are hostname and host:
- hostname is used to determine the name of the machine.
- host determines the IP address, when used with the hostname. When used with the
IP address, it determines the hostname.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Identify the commands to determine the hostname and IP address.
Details The hostname command can be used to determine the hostname of the
machine. It can also be used to set the hostname, but the change will not remain in effect
after a reboot, unless issued in a boot script such as /etc/rc.net.
The host command can be useful for resolving your hostname to IP or vice versa. Supply
either the IP address or the hostname as the argument to produce the output showing the
machine information.
There are many other commands that can be used to determine this same information (like
ifconfig and netstat). Keep this discussion simple.
Additional Information
Transition Statement Now, lets look at some network user utilities.
18-25
Instructor Guide
ping
ftp
Remote login:
telnet
AU1411.0
Notes:
Introduction
The ARPA commands for testing connectivity, remote execution, file transfer, and
remote login are ping, rexec, ftp, and telnet respectively.
These commands can be used between any TCP/IP system that supports the
appropriate protocols, not just UNIX/AIX systems.
In order to ensure security across the network, these commands always require a user
name and password to be supplied when you establish a connection.
V3.1.0.1
Instructor Guide
Uempty
time=15 ms
time=3 ms
time=2 ms
time=2 ms
time=2 ms
packet loss
18-27
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
can terminate the telnet client by using the quit subcommand. Many of the
subcommands are for managing an existing connection.
When in a telnet session with a remote host, you can obtain the telnet> prompt by
issuing the escape sequence <ctrl+]> (press the ] key while holding down the Ctrl
key). The telnet client will maintain the connection while allowing you to use telnet
subcommands. If you then wish to obtain a shell prompt from your local client host, the
telnet subcommand z will place the telnet client in a suspended state and return you
to the parent shell. It will tell you the job number of the suspended telnet process.
From here, you can run other commands. If you wish to return to your telnet session,
simply resume the suspended job with the fg command. The telnet process will be
resumed. If you just hit Enter, then you will be back in your interactive session with the
remote host.
An example:
sys1$ telnet sys2
Trying . . .
Connected to sys2.
Escape character is '^]'.
login: tom
password: tom's password
sys2$
^]
telnet> ?
18-29
Instructor Guide
Instructor Notes:
Purpose List several user utilities that depend on TCP/IP.
Details All of the listed utilities are used but of them all, the ping utility is probably the
most useful at this stage, since it allows test data to be exchanged between two systems.
These utilities are also known as the authenticated TCP/IP commands as they expect a
user id and password on the remote system.
The syntax of the ftp command is: ftp [options] host
There are a number of options, the most notable are:
-g enables wildcards in file names
-i disable interactive prompting during multiple transfers
-n prevent automatic login
To execute a shell on the local system use ! To execute a command on the local system
use ! command.
The illustrated example of ftp in the student notes does the following:
-
The numbers displayed are messages defined by file transfer protocol which are
exchanged between the local and remote systems.
Note: The remote user must exist and must have a password defined at the remote host. If
no password is assigned, ftp will not allow you to establish a connection.
The tn and tn3270 commands are alternative names for telnet. The tn3270 command
runs telnet in 3270 terminal emulation mode when connecting to a System/370host.
Additional Information Beginning with AIX 5L V5.2, the AIX ftp server can restrict
which clients are allowed access and what directories users on those clients can read or
write into. Provision is made for defining restrictions for anonymous ftp users. The
configuration file that defines these restrictions is /etc/ftpaccess.ctl.
Transition Statement Before we summarize, let's look at a few checkpoint questions.
V3.1.0.1
Instructor Guide
Uempty
Checkpoint
1. What are the following commands used for?
ftp
______________________________________
rexec ______________________________________
telnet ______________________________________
2. What is the difference (if any) between a host and a gateway?
______________________________________________
______________________________________________
______________________________________________
3. True or false? Each machine in a TCP/IP network must have a
unique hostname and TCP/IP address.
4. Which file holds the name and the TCP/IP address of each
host in a flat network? _________________________
Copyright IBM Corporation 2005
AU1411.0
Notes:
18-31
Instructor Guide
Instructor Notes:
Purpose Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions
1. What are the following commands used for?
ftp transfers files from one machine to another
rexec executes a command on a remote system
telnet logins to another system
2. What is the difference (if any) between a host and a gateway?
A host is an individual machine connected to a network,
whereas a gateway is a special kind of host which links two
or more physical networks together.
3. True or false? Each machine in a TCP/IP network must have a
unique hostname and TCP/IP address.
4. Which file holds the name and the TCP/IP address of each
host in a flat network? /etc/hosts
Copyright IBM Corporation 2005
Additional Information
Transition Statement Now, lets do an exercise with networking.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Introduction
This lab gives you an opportunity to configure an AIX system on a TCP/IP network. This
gives you practical application of the concepts presented in this unit.
This exercise can be found in your Student Exercise Guide.
18-33
Instructor Guide
Instructor Notes:
Purpose Do the networking exercise
Details
Additional Information
Transition Statement Now, lets summarize the unit.
V3.1.0.1
Instructor Guide
Uempty
Unit Summary
TCP/IP is a networking architecture which defines a set of
rules. These rules describe how computers can
communicate with one another over a network.
A flat TCP/IP network can be configured through SMIT by
supplying the following information: addresses, subnet mask
and hostnames.
There are many useful utilities which are provided by
TCP/IP, such as telnet to login to another system, ftp to
transfer files and rexec to execute a command on a remote
system.
Use the ping command to check for connectivity to remote
hosts.
AU1411.0
Notes:
18-35
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement This is the last unit for the course.
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. What type of adapter are you likely to require for a singleuser graphics workstation?
a. Asynchronous
b. Communications
c. Graphics
2. What is the difference between UP and SMP machines?
Uniprocessors only have one microprocessor. SMP
machines are symmetric multiprocessing machines that
have multiple microprocessors.
3. True or False? The su command allows you to get root
authority even if you signed on using another user ID.
But, you must also know the root password.
A-1
Instructor Guide
Checkpoint Solutions
1. AIX 5L can be installed from which of the following:
(select all that are correct)
a. 8 mm tape
b. CD-ROM
c. Diskette
d. 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 user (/usr),
variable (/var), temporary (/tmp), and root (/) file systems. Other
product (application) files and configuration data are destroyed.
A-2
V3.1
Instructor Guide
AP
Checkpoint 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
A-3
Instructor Guide
Checkpoint Solutions
1.
2.
3.
4.
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
What command is used to list all installed software on your system?
lslpp -l
Which of the following can you install as an entity?
(select all
that apply)
a. Fileset
b. LPP
c. Package
d. Bundle
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-4
V3.1
Instructor Guide
AP
Checkpoint 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 Eclipsebased Web server function.
Copyright IBM Corporation 2005
A-5
Instructor Guide
Checkpoint Solutions
1. True or False? The Web-based System Manager is available
for client access automatically after the BOS is installed.
False. The Web-based System Manager server must be
configured and enabled for client access.
2. Which of the statements are true regarding the Web-based
System Manager?
a) An AIX 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 Webbased System Manager.
Copyright IBM Corporation 2005
A-6
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. What is the first process that is created on the system
and which file does it reference to initiate all the other
processes that have to be started?
The initial process is init, which checks /etc/inittab
for information regarding other processes that have to
be started.
2. Which AIX feature can be used to stop and start groups
of daemons or programs?
The System Resource Controller (SRC)
3. True or False? You can only execute the shutdown
command from the console.
A-7
Instructor Guide
Unit 8: 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
A-8
V3.1
Instructor Guide
AP
1. Volume Group___
Descriptor Area__
VGDA
6. Physical Volume
2. Physical Partition
3. Logical Partition
4. Logical Volume
Copyright IBM Corporation 2005
A-9
Instructor Guide
Checkpoint Solutions (1 of 3)
1. How many different physical partition (PP) sizes can be
set within a single VG? One
2. By default, how big are PPs? Traditionally 4 MB, but
LVM will choose an optimal size based on the #PPs/PV
and the size of largest PV in the VG.
3. How many volume groups (VGs) can a physical volume
(PV) belong to?
a) Depends on what you specify through SMIT
b) Only one
c) As many VGs as exist on the system
4. True or False? All VGDA information on your system is
identical, regardless of how many volume groups (VGs)
exist. False. All VGDAs within a VG are the same.
Copyright IBM Corporation 2005
V3.1
Instructor Guide
AP
Checkpoint Solutions (2 of 3)
Use the following output to answer the questions below:
# lsfs
Name
Nodename Mount Pt
/dev/hd4
-/
/dev/hd1
-/home
/dev/hd2
-/usr
/dev/hd9var -/var
/dev/hd3
-/tmp
/dev/hd10opt -/opt
/dev/cd0
-/infocd
/dev/lv00
-/home/john
VFS
jfs
jfs
jfs
jfs
jfs
jfs
cdrfs
jfs
Size Options
8192
-90112
-507904
-8192
-16384
-65536
-ro
8192
rw
Auto
yes
yes
yes
yes
yes
yes
yes
yes
Accounting
no
no
no
no
no
no
no
no
5.
With which logical volume is the /home file system associated? /dev/hd1
6.
What type of file systems are being displayed? Journaled file systems (JFS),
enhanced journaled file systems (JFS2), and CD-ROM (CDRFS)
7.
What is the mount point for the file system located on the /dev/lv00 logical
volume? /home/john
8.
Which are the system supplied logical volumes and their associated file
systems? /dev/hd4 (/), /dev/hd1 (/home), /dev/hd2 (/usr), /dev/hd9var (/var),
/dev/hd3 (/tmp), /dev/hd10opt (/opt)
9.
Which file system is used primarily to hold user data and home directories?
/home
Copyright IBM Corporation 2005
A-11
Instructor Guide
Checkpoint Solutions (3 of 3)
Use the following output to answer the question below:
# lsvg -l rootvg
LVNAME
hd6
hd5
hd8
hd9var
hd3
lv00
TYPE
paging
boot
jfslog
jfs
jfs
jfs2
LPs
8
1
1
1
2
1
PPs
8
1
1
1
2
1
PVs
1
1
1
1
1
1
LV State
open/syncd
closed/syncd
open/syncd
open/syncd
open/syncd
closed/syncd
MOUNT POINT
N/A
N/A
N/A
/var
/tmp
/home/john
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. True or False? A logical volume can span more than one
physical volume.
2. True or False? A logical volume can span more than one
volume group.
3. True or False? The contents of a physical volume can be
divided between two volume groups.
4. True or False? If mirroring logical volumes, it is not necessary
to perform a backup. False. You still need to back up to
external media.
5. True or False? SMIT can be used to easily increase or
decrease the size of a logical volume. False. SMIT can only be
used to increase a file system. Decreasing one requires backing
up the file system, removing it, re-creating it, and then restoring.
6. True or False? Striping is done at a logical partition level.
False. It is done at a stripe unit level.
Copyright IBM Corporation 2005
A-13
Instructor Guide
Checkpoint Solutions
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.
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. What command can you use to determine if a file
system is full? df
A-15
Instructor Guide
Checkpoint Solutions
1. What conclusions regarding potential paging space problems can
you reach based on the following listing?
Page
Space
Physical Volume
Volume
Group
Size
%Used
hd6
paging00
paging01
hdisk0
hdisk1
hdisk1
64 MB
64 MB
16 MB
43%
7%
89%
yes
yes
yes
rootvg
rootvg
rootvg
yes
yes
yes
lv
lv
lv
2. True or False? The size of paging00 (in the above example) can
be dynamically decreased.
Copyright IBM Corporation 2005
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. What is the difference between the following two commands?
a) find /home/fred | backup -ivf /dev/rmt0
b) cd /home/fred; find . | backup -ivf /dev/rmt0
(a) will backup the files using the full path names, whereas
(b) will backup the file names using the relative path names.
So (b)s files can be restored into any directory.
2. On a mksysb tape, if you entered tctl rewind and then
tctl -f/dev/rmt0.1 fsf 3, which element on the tape could
you look at? You would be at the start of the backed up images of
the files, having skipped over the boot portion of the tape.
3. Which command could you use to restore these files?
The files were backed up using the backup command so you would
have to use the restore command.
4. True or False? 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-17
Instructor Guide
Checkpoint Solutions (1 of 2)
1. What are the benefits of using the su command to switch user to
root over logging in as root?
A log (which can be monitored) of all users executing the su
command is kept in the sulog.
2. Why is a umask of 027 recommended?
This value removes all permission bits for the others category,
which enhances security.
3. As a member of the security group, which password command
would you use?
pwdadm (This command does not prompt for the root password
or the old password of the user whose password is being
changed.)
4. Which password change command does SMIT use?
passwd
5. True or False? When you delete a user from the system, all the
user's files and directories are also deleted.
Copyright IBM Corporation 2005
V3.1
Instructor Guide
AP
Checkpoint Solutions (2 of 2)
6. If an ordinary user forgets their password, can the system
administrator find out by querying the system as to what the user's
password was set to? No, because the passwords are held in
encrypted format, so even the system administrator cannot tell what
the password was set to.
7. Password restrictions are set in which of the following files?
a. /etc/passwd
b. /etc/security/passwd
c. /etc/security/restrictions
d. /etc/security/user
8. Which of the following statements are true?
a. A user can only belong to one group
b. A member of the security group can administer user accounts
c. An admin user is a user whose account cannot be administered
by any member of the security group (except root)
d. The chmod g+s command sets the SUID permission of a file
e. The root user, commonly known as the superuser has UID=0
and GID=0
Copyright IBM Corporation 2005
A-19
Instructor Guide
Checkpoint Solutions
1. True or False? The at.allow and at.deny files must be
used to specify which users are allowed and denied use
of the at command.
False. Only one or the other of these files should be used.
V3.1
Instructor Guide
AP
A-21
Instructor Guide
Checkpoint Solutions (1 of 2)
1. True or False? One of the advantages of queues is that each
user can have a different default queue set up for them.
True. This can be accomplished using the PRINTER
environment variable.
2. True or False? The /etc/qconfig file is read by the backend
program to determine what the queue discipline is.
False. It is read by qdaemon.
3. True or False? All printer software is automatically installed
when you install the base operating system.
False. Only a handful of printer software is installed by default.
4. What is the difference between these two commands?
# qprt -Pasc file1
# qprt -c -Pasc file1
The -c flag produces a spool file.
Copyright IBM Corporation 2005
V3.1
Instructor Guide
AP
Checkpoint Solutions (2 of 2)
5. What three methods can be used to find out what the system
default queue is?
First entry in /etc/qconfig file
The output from the qchk command with no options
The first queue listing from the lpstat command
6. What users can bring print queues down?
The root user or members of the printq group.
7. True or False? Once the queue is down, no more jobs can
be submitted to the printer.
False. Jobs can be submitted to the queue. However, they
will not be printed until the queue is brought up again.
8. Can users hold all their print jobs in a specific queue?
If so, how?
Yes, they can by only specifying a queue name and not
individual job numbers.
Copyright IBM Corporation 2005
A-23
Instructor Guide
Checkpoint Solutions
1. What are the following commands used for?
ftp transfers files from one machine to another
rexec executes a command on a remote system
telnet logins to another system
2. What is the difference (if any) between a host and a gateway?
A host is an individual machine connected to a network,
whereas a gateway is a special kind of host which links two
or more physical networks together.
3. True or false? Each machine in a TCP/IP network must have a
unique hostname and TCP/IP address.
4. Which file holds the name and the TCP/IP address of each
host in a flat network? /etc/hosts
Copyright IBM Corporation 2005
V3.1
Instructor Guide
AP
Checkpoint Solutions (1 of 2)
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 5L V5.2 documentation is viewed
using a Web browser.
3. True of false? The Web-based System Manager is
available for client access automatically after the BOS is
installed.
A-25
Instructor Guide
Checkpoint Solutions (2 of 2)
4.
V3.1
Instructor Guide
AP
Checkpoint Solutions
1. True or false? If a device, like a TTY, is left for cfgmgr to
configure automatically, it picks up the default values which
might not be desirable. TTYs and other serial devices are not selfconfigurable and so are not detected by cfgmgr.
A-27
Instructor Guide
V3.1
Instructor Guide
AP
A-29
Instructor Guide
Checkpoint Solutions
1.
2.
3.
6.
7.
8.
9.
V3.1.0.1
Instructor Guide
Uempty
References
Online
SG24-5765
B-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
In AIX 5L V5.2:
Set up and use AIX Web-based documentation
Define the use of the Web-based System Manager
AU1411.0
Notes:
B-2
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Set the students expectations for this unit.
Details
Additional Information
Transition Statement Lets start with an overview.
B-3
Instructor Guide
Documentation Client
Web browser software
Documentation Client
Web browser software
AU1411.0
Notes:
Overview
In addition to providing SMIT to make system administration tasks easy, beginning with
AIX V4.3, softcopy documentation is 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.
B-4
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To provide the big picture of how AIX 5L V5.2 documentation works.
Details When AIX 5L V5.2 is installed, the system administrator will most likely set up
AIX 5L V5.2 softcopy documentation.
The system administrator will first set up the documentation server. It has the following
installed:
The AIX 5L V5.2 Documentation - This consists of most of the manuals that are found in
the traditional InfoExplorer product.
Web server software - AIX 5L V5.2 includes: the Lite NetQuestion Web Server and the
IBM HTTP server software. Any other Web server software that supports CGI (Common
Gateway Interface) can also be used.
Web browser software - This is necessary if users on the server wish to access
documents. The Netscape Navigator is included with AIX 5L V5.2. Actually any browser
can be used, assuming it is HTML 3.2-enabled and supports frames.
In AIX 5L V5.2, the Documentation Library Service is installed by default with the base.
Prior to AIX 5L V5.1, additional software must also be installed on the documentation
server to support the search function. For this class, this is probably a detail you can
avoid. This information is included here for instructor background only.
The client system will include a Web browser (such as the Netscape Navigator).
Users at the client system will issue requests to view AIX documentation. These requests
will be sent to the documentation server and the results will then be sent back to the user at
the client.
If you have a standalone computer, both the server and client software are installed on the
same standalone computer. Instead of going to a remote computer, requests from users on
the standalone computer go to the Web server software on their own computer.
Be sure not to go into too much detail on the software that needs to be installed. In this
class, the purpose here is for students to understand the big picture.
Additional Information This section walks through the steps necessary to configure the
documentation Web server. If students have the computer in front of them, you may want to
have them perform the step as you talk about them.
The activity at the end of this unit has them complete these steps. If you have them do it
during the lecture, you can skip the next activity.
Transition Statement Next, we will take look at the AIX 5L V5.2 documentation home
page.
B-5
Instructor Guide
AU1411.0
Notes:
Configuration steps
The steps outlined above are used to configure an AIX 5L V5.2 documentation server or
online documentation for a standalone RS/6000 system.
1. Configure TCP/IP on the AIX system.
2. Install the Web server software. AIX 5L V5.2 includes two products that can be
used: the Lite NetQuestion server software and the IBM HTTP Server Web server.
Any other Web server software that supports CGI (Common Gateway Interface) can
also be used. The Lite NetQuestion server can only be used for local users, not
remote users.
3. Configure and start the Web server software. Use IBM HTTP Server Web server for
easy set up.
B-6
V3.1.0.1
Instructor Guide
Uempty
4. Install Web browser software. This is necessary if users on the server wish to
access documents. The Netscape Communicator is included with AIX 5L V5.2.
Actually, any browser can be used, provided it supports Java 1.3.
5. The AIX 5L V5.2 Documentation includes User Guides, System Management
Guides, Application Programmer Guides, Commands Reference Volumes, Files
References, and Technical Reference Volumes. This documentation can be
installed to disk or mounted as a CD-ROM file system.
6. Configure the Documentation Library Service (bos.docsearch). This is installed by
default with the base operating system. To configure it use the smit web_configure
fastpath or the Web-based System Manager.
B-7
Instructor Guide
Instructor Notes:
Purpose Discuss the steps necessary to install the AIX 5L V5.2 online documentation.
Details The student notes provide details on the steps necessary to install the AIX 5L
V5.2 online documentation. Remind the students that TCP/IP configuration will be covered
in a later unit.
IBM HTTP Server Web server is included in the AIX 5L V5.2 Expansion Pack and, it is the
easiest to configure on AIX 5L V5.2. When installing the AIX documentation, it is possible
to select specific manuals to install. For example, the CD contains manuals on 3D
graphics, which may not be necessary to install. The documentation CD can be either
installed or mounted. If you mount the CD, the entire CD is mounted. You cannot install part
of the CD and mount the remainder.
During the machine exercise, students will configure the Documentation Library Service.
At this time, also mention the steps necessary to set up the documentation client:
1. Install and configure TCP/IP.
2. Install the Web browser software.
3. Configure the Documentation Library Service. Only the bos.docsearch client filesets
need to be installed on the clients.
Transition Statement Let's assume that all the steps have been completed except for
the configuration of the Documentation Library Service. We will use SMIT to complete this
step next.
B-8
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
F8=Image
AU1411.0
Notes:
Begin configuration
Use the SMIT fastpath smit web_configure to access this menu. This menu is also
accessed via the System Environments option on the main SMIT menu.
Choose the first option, Change/Show Default Browser to begin configuration of
either a documentation server or client.
The Web-based System Manager can also be used to configure the AIX 5L V5.2 online
documentation.
B-9
Instructor Guide
Instructor Notes:
Purpose Show the SMIT screen necessary to configure a documentation server.
Details We will walk through the steps necessary to configure the documentation
server. Mention that the first and third options must also be chosen if configuring a
documentation client.
Additional Information The SMIT menu item Web-based System Manager will be used
to configure Web-based SMIT for remote administration.
Transition Statement Choose Change/Show Default Browser.
V3.1.0.1
Instructor Guide
Uempty
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
[Entry Fields]
[netscape]
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
What browser?
Select Change/Show Default Browser from the SMIT Web-configure screen.
On this screen, type in the command that launches the browser that will be the default
browser for users on this system. Indicate the full path name if necessary and any
applicable options/flags. Netscape does not require any options/flags.
Use this SMIT screen also on the documentation clients to indicate the default browser.
B-11
Instructor Guide
Instructor Notes:
Purpose Show students how they indicate the default browser on either the
documentation server or client.
Transition Statement After this step completes successfully, on the server it will be
necessary to return to the previous menu and then choose Change Documentation and
Search Server.
V3.1.0.1
Instructor Guide
Uempty
[Entry Fields]
None - disabled
F1=Help
F8=Image
/=Find
F2=Refresh
F10=Exit
n=Find Next
F3=Cancel
Enter=Do
AU1411.0
Notes:
Location of the documentation server
Select Change Documentation and Search Server from SMIT Web-configure screen.
Indicate the location of the documentation server. If configuring the server, choose
Local - this computer. Choose this option also if using a standalone AIX 5L V5.2
system.
If configuring the client, choose Remote computer. If this option is chosen, an
additional menu is displayed where the hostname of the server is entered.
B-13
Instructor Guide
Instructor Notes:
Purpose Show how SMIT is used to indicate the location of the documentation server.
Details Choose Local if configuring the server. Choose Remote if configuring the client.
Choose None to deactivate the documentation functions.
Transition Statement Assume we are configuring the server. So, on this menu, we will
choose Local. Press Enter to continue with the configuration.
V3.1.0.1
Instructor Guide
Uempty
Change Local
Documentation and Search Server (1 of 2)
Change Local Documentation and Search Server
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
[Entry Fields]
IBM HTTP Server Web se>
F2=Refresh
F10=Exit
n=Find Next
F3=Cancel
Enter=Do
AU1411.0
Notes:
Define the Web server software
Use this menu to choose the Web server software that is being used. A pop-up menu is
available.
B-15
Instructor Guide
Instructor Notes:
Purpose Show the SMIT menu used to indicate which Web server software is being
used.
Details If the Web server software is something other than the ones shown on the
menu, choose Other. Press the Enter key to view the SMIT menu on the next page.
Transition Statement Press Enter on this screen to view the next page.
V3.1.0.1
Instructor Guide
Uempty
Change Local
Documentation and Search Server (2 of 2)
Change Local Documentation and Search Server
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
*
*
*
*
[Entry
Web server SOFTWARE
Local web server PORT number
Local web server cgi-bin DIRECTORY
Local web server HTML document directory
For versions prior to 1.3.6.0, Auto-start
server if not already running
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
Fields]
IBM HTTP Server Web se>
[80]
#
[/usr/HTTPServer/cgi-bi>
[/usr/HTTPServer/htdocs>
Yes
F4=List
F8=Image
AU1411.0
Notes:
Changing Web servers
If using the IBM HTTP Server Web server, Lotus Domino Go Web server or the IBM
Internet Connection Server, this menu is filled out automatically. Update this screen if
changing the defaults or using other Web server software to access the AIX 5L V5.2
online documentation.
Note: When using the IBM HTTP Server Web server to allow other systems to use this
system as a documentation server, you must configure the server name manually.
Follow these steps to accomplish this:
1. Edit the file: /usr/HTTPServer/conf/httpd.conf
2. Change the line:
# ServerName
to
new.host.name
B-17
Instructor Guide
ServerName YourSystemName
(Take out the comment (#) and insert the systems host name for new.host.name)
3. Reboot the system or run the command: /usr/HTTPServer/bin/httpd
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose This is the final step to configuring the AIX 5L V5.2 online documentation.
Details Press Enter once all the entries are correct. If using IBM HTTP Server Web
server, Lotus Domino Go or the IBM Internet Connection Server, the entries will be
automatically filled in.
Additional Information When configuring the IBM HTTP Server Web server, and entry
is put into the /etc/inittab file. However, the server will not run due to the ServerName not
being defined. The manual steps to do this are detailed in the Student Notes.
Transition Statement Once the online documentation is set up, it's time to test it.
B-19
Instructor Guide
AU1411.0
Notes:
Accessing the documentation
Once the documentation is set up, it can be accessed with:
- Your Web browser (for example, Netscape), using the URL:
http://<hostname>/cgi-bin/ds_form
The <hostname> is the name of the server as configured to TCP/IP. This hostname
must be able to be resolved in the /etc/hosts file or through DNS.
- The Search function from the Documentation Library icon using CDE (the
Common Desktop Environment)
- The docsearch command
Online documentation is also available at: http://www.ibm.com/servers/aix/library.
V3.1.0.1
Instructor Guide
Uempty
On the library home page, near the top, you are given different methods to look at the
documentation. You can view the documents by books, look at command
documentation or view it by a topics and task list.
Moving down the screen, the next area allows you to perform a search. This is probably
the quickest and easiest way to locate information on a specific item. Just type in a key
word and let it find the documents for you.
The last part of the screen shows icons representing the books and category of books
that are available. You can click the icons to expand their information.
B-21
Instructor Guide
Instructor Notes:
Purpose Show the students how to access the online documentation once it has been
configured.
Details The URLs needed are listed in the student notes. Students learned how to use
the AIX 5L V5.2 online documentation in the AIX 5L Basics course, Q1313/AU13.
The Documentation Library is also available using CDE. It can be accessed using the CDE
Help Manager or the Application Manager.
Additional Information The documentation is designed to work in a graphical
environment. You must have a browser and graphic monitor to see it.
ASCII users will have to rely on man pages.
Point out the Search area and the Print button. These will be discussed in the next couple
visuals.
Transition Statement Now let's look at how to download or print the documentation.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Printing documentation
The Documentation Library Service contains a Print Tool button. When you click this
button, you see a list of books that can be downloaded in a single printable file. You
have the option of customizing this list to include your own book for printing.
B-23
Instructor Guide
Instructor Notes:
Purpose Present the AIX 5L V5.2 documentation print page.
Details
Additional Information
Transition Statement Let's take a look at the result of a search.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Searching documentation
Probably the easiest way to find an answer is to search the documentation using the
Search window on the Documentation Library screen.
Above are the results of a search. A star system is used to indicate the documents that
best match your keywords. Five stars is the best. Clicking the item takes you to that
document.
B-25
Instructor Guide
Instructor Notes:
Purpose To show the output of a search.
Details Explain the star systems. Also point out that each item is a link to that document.
Transition Statement
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Accessing the Information Center
The IBM Eserver pSeries Information Center is a Web Site that serves as a focal point
for all information pertaining to pSeries and AIX. It provides access to the AIX V4.3, AIX
5L V5.1 and V5.2 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.
- You can access the Information Center by using the URL:
http://publib16.boulder.ibm.com/pseries/en_US/infocenter/base
- Run the command infocenter from the command line. This command starts the
default browser with the URL previously mentioned.
- Start the Information Center with the Information Center icon located on the Help
panel of the CDE desktop.
B-27
Instructor Guide
Instructor Notes:
Purpose
Details
Additional Information
Transition Statement
V3.1.0.1
Instructor Guide
Uempty
Activity:
Configuring
Web-based
Documentation
AU1411.0
B-29
Instructor Guide
5. Congratulations! You have configured the AIX online documentation. Be sure to add a
bookmark with your browser so you don't need to remember the long URL. When you
are done, exit from the browser.
On the Netscape toolbar, click Bookmarks -> Add Bookmarks.
On the Netscape toolbar, click File -> Exit.
6. A quick way to locate information in the documentation is to do a search. Use the
command (from the command line) that starts the Documentation Library Service. As
time permits, get familiar with the Web-based documentation by trying a few searches
and looking at some of the documentation. When you are done, log out.
END OF ACTIVITY
V3.1.0.1
Instructor Guide
Uempty
B-31
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose
Details
Additional Information
Transition Statement
B-33
Instructor Guide
V3.1.0.1
Instructor Guide
Uempty
AIX 5L V5.2
System
AIX System
with Java 1.3
AIX 5L V5.2
System
Stand-alone
Web-based
System Manager
Client-Server
Web-based
System Manager
AU1411.0
Notes:
Introduction
AIX V4.3 introduced the Web-based System Manager, which is the next step in the
evolution of AIX system administration tools. There have been many enhancements to
the Web-based System Manager since AIX 5L V5.1 it is called the default system
administration tool for AIX.
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 client-server environment. 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.
B-35
Instructor Guide
The client can operate in either application mode on AIX with Java 1.3 or in applet mode
on platforms that support Java 1.3. Thus, the AIX system can be managed from another
AIX system or from a PC running Microsoft Windows NT/2000/XP.
Client requirements
To download Web-based System Manager Client code from an AIX host use the
address http://<hostname>/remote_client.html.
Supported clients are Microsoft Windows NT/2000/XP and RedHat Linux 7.2 and 7.3.
To download Windows Web-based System Manager Client code from an AIX host and
start Install Shield use the address: http://<hostname>/wsmship/pc_client/setup.html.
The Windows Web-based System Manager Client installation needs around 64 MB disk
space.
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose Introduce the AIX 5L V5.2 Web-based System Manager.
Details The visual shows the two environments in which the Web-based System
Manager can be run: standalone and Client-server.
Use the standalone environment if you wish to administer the AIX system from the system
itself, that is, not across the network. Use the client-server environment if you wish to
administer the AIX system from across the network. In this environment, the AIX system
being administered is the server and the system doing the administration work is the client.
The server does not require a graphics terminal. However, the client will need graphical
support.
Because the Web-based System Manager is written in Java, the client can be any machine
with a browser that supports Java 1.3. Thus, the client can be another AIX system with a
graphics terminal or a PC running Windows NT/2000/XP.
Building on the client-server model, it is now possible to manage an AIX system from
anywhere on the Internet or intranet.
The Web-based System Manager code and Java are both installed with the base AIX
operating system. There is no additional charge for either of these software packages. It is
also necessary to configure TCP/IP to run the Web-based System Manager. More
information on TCP/IP will be covered later in the course.
Additional Information
Web-based System Manager Security is an optional feature that provides for the secure
operation of the Web-based System Manager servers and clients. It is based on public key
cryptography, the Secure Socket Layer (SSL), and the standard AIX login security.
The Web-based System Manager Security fileset, sysmgt.websm.security, will be
available on the AIX Version 5.2 Expansion Pack.
The icon for the Security application is available in the System container when:
The Security software has been installed from the Expansion Pack
You are running Web-based System Manager in local mode
You are logged in as the root user
Please refer to the AIX Version 5.2 System Management Guide for information or installing
and configuring Web-based System Manager Security.
Transition Statement Let's take a look at the Web-based System Manager.
B-37
Instructor Guide
Client-Server
With browser, URL:
http://<hostname>/wsm.html
As Standalone Java application
Double-click on the Web-based SystemManager
Remote Client icon
From AIX client:
# wsm -host <hostname>
Copyright IBM Corporation 2005
AU1411.0
Notes:
Standalone mode
In standalone mode, to access the Web-based System Manager use the command wsm.
- From the CDE Application Manager, you can also access by icons if you are using
CDE. Open the System Admin folder and double-click on Management Console
to view icons for each of the Web-based System Manager applications.
Client-server mode
If using the Web-based System Manager in client-server mode:
- If the Web-based System Manager client is running as a Java applet in a browser
use the appropriate URL to access the tool. The default URL is
http://<hostname>/wsm.html. Be aware that AIX 5L V5.1 is using Java 1.3.0 and AIX
5L V5.2 is using Java 1.3.1 and that your browser plug-in-version must be
compatible to the Java version on the AIX server.
B-38 AIX System Administration I
V3.1.0.1
Instructor Guide
Uempty
B-39
Instructor Guide
Instructor Notes:
Purpose Discuss the various methods to invoke the Web-based System Manager.
Details The visual shows how to access the Web-based System Manager from both the
standalone and client-server environments.
Accessing the Web-based System Manager from standalone mode implies that you are
performing the system administration tasks directly on the AIX system. Access the
Web-based System Manager from either the command line or from the CDE Application
Manager.
Accessing the Web-based System Manager from a client system allows for AIX to be
remotely administered through a graphical interface. There are two ways this can be done.
If the client is an AIX system, you can use the command
wsm -host <hostname> -or- you can use your Web browser. If the client machine is a
non-AIX machine, you will need to use a browser. The URL to access the Web-based
System Manager is http://<hostname>/wsm.htm.
The hostname used in the URL must be resolvable. If it is not, an IP address may be used
in place of the hostname.
Additional Information Some set up is needed on the server before remote access to
the Web-based System Manager can be made. This is discussed shortly.
Transition Statement Let's assume you use one of the listed methods to access the
Web-based System Manager. Let's take a look at what you will see.
V3.1.0.1
Instructor Guide
Uempty
AU1411.0
Notes:
Console window
This 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.
B-41
Instructor Guide
Instructor Notes:
Purpose Introduce the Web-based System Manager console.
Details The visual shows the Web-based System Manager console.
Point out that this application is intuitive, object-oriented and easy-to-use.
Also point out the different icons (also referred to as plug-ins) displayed on the screen.
These icons provide support for most of the functions that are currently supported by SMIT.
The student notes also mention that the Web-based System Manager provides
TaskGuides. These TaskGuides are similar to what the user sees when using the AIX
Configuration Manager. The user is asked questions and is led through the steps to
perform a task.
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. Entries in the log include:
-
Short message
V3.1.0.1
Instructor Guide
Uempty
AU1411.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.
B-43
Instructor Guide
Instructor Notes:
Purpose In our example, we have chosen System Environment, then Settings. This is
the window that will be displayed.
Details Explain some of the options in the tool bar and in the menu bar as outlined in the
student notes. These options will vary depending on the window being used.
In our example, double-click Date and Time.
Transition Statement The next page shows us what we will see if we double-click Date
and Time
V3.1.0.1
Instructor Guide
Uempty
AU1411.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/ .
B-45
Instructor Guide
Instructor Notes:
Purpose Show the window used to change the system date and time.
Details Be sure to point out that most of the Web-based System Manager applications
are similar to this, providing point-and-click support to perform various system
management functions.
Note that in this application there is a second option, Time Zone. Click this option to
change the system's time zone.
Daylight Savings Time Dates can vary from country to country. Click this button to change
the dates from the U.S. defaults of the first Sunday in April and the last Sunday in October.
Transition Statement Now, we will look at how to configure the Client/Server
Web-based System Manager.
V3.1.0.1
Instructor Guide
Uempty
-docdir directory
-enable
AU1411.0
Notes:
Setting up the Web server
These are the steps needed to set up the Web server from scratch. If you already have
set up the Web-based documentation, the first two steps (Install the Web server and
Test the Web server) are already done.
The Web-based System Manager is installed by default in AIX 5L V5.1 and V5.2. The
following filesets are installed from the AIX 5L 5.2 Base Installation media:
sysmgt.help.en_US.websm
sysmgt.help.msg.en_US.websm
sysmgt.msg.en_US.websm.apps
sysmgt.websm.apps
sysmgt.websm.diag
sysmgt.websm.framework
sysmgt.websm.icons
B-47
Instructor Guide
sysmgt.websm.rte
sysmgt.websm.Webaccess
To set up the documentation directory, you need to know the location of the document
directory for the Web server you are using. We are using the IBM HTTP Server Web
server in the classroom. The path needed is /usr/HTTPServer/htdocs.
Run the following command:
/usr/websm/bin/wsmappletcfg -docdir directory
For example, for IBM HTTP Server Web server, the command would be:
/usr/websm/bin/wsmappletcfg -docdir /usr/HTTPServer/htdocs
Next, enable the Web-based System Manager server
/usr/websm/bin/wsmserver -enable
This can also be done through smit using the fastpath
smit web_based_system_manager .
Which automatically runs
/usr/websm/bin/wsmserver -enable
To access the Web-based System Manager from the client machine, use the URL:
http://<hostname>/wsm.html
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose To show the complete steps to configure the Web-based System Manager for
client machine access.
Details Walk through the steps using the student notes as a guide. They are very
detailed.
Be sure to point out to the students that they need to know the documentation directory for
their Web server. The example commands shown only work when using the IBM HTTP
Server Web server.
The Web-based System Manager will install as part of the BOS if there is a graphics
adapter in the machine at the time of installation. No additional configuration is needed
after the installation to allow it to work locally.
Setting the document directory can be done through SMIT, but enabling the Web-based
System Manager must be done from the command line.
Additional Information If the Web-based System Manager won't launch from the
client's browser, check to make sure the Web server is configured correctly. This can be
done using the URL: http://hostname. The machine should respond with the Web server
home page. If this doesn't work, the Web server is not set up correctly.
The httpdlite Web Server, installed with the file set IMNSearch.rte.httdlite when the BOS
is installed, will not work for client access to the Web-based System Manager.
Transition Statement Time for a checkpoint.
B-49
Instructor Guide
Checkpoint (1 of 2)
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 5L V5.2 documentation is viewed
using a Web browser.
3. True of false? The Web-based System Manager is
available for client access automatically after the BOS is
installed.
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Details Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (1 of 2)
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 5L V5.2 documentation is viewed
using a Web browser.
3. True of false? The Web-based System Manager is
available for client access automatically after the BOS is
installed.
Additional Information
Transition Statement Continue with checkpoint questions.
B-51
Instructor Guide
Checkpoint (2 of 2)
4.
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Details Review and test the students understanding of this unit.
Details A suggested approach is to give the students about five minutes to answer the
questions on this page. Then, go over the questions and answers with the class.
Checkpoint Solutions (2 of 2)
4.
Additional Information
Transition Statement Summarize the unit.
B-53
Instructor Guide
Unit Summary
Softcopy documentation is 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 documentation searches are performed, they are
done on the server computer and the results are then sent
back to the user on the client computer.
The Web-based System Manager supports system
administration tasks in a standalone or client-server
environment.
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
Uempty
Instructor Notes:
Purpose
Details
Additional Information
Transition Statement
B-55
Instructor Guide
V3.1.0.1
Instructor Guide
AP
shutdown
Directories
mkdir
Make directory
cd
rmdir
rm
pwd
ls
List files
-a (all)
-l (long)
-d (directory information)
-r (reverse alphabetic)
-t (time changed)
-C (multi-column format)
-R (recursively)
-F (places / after each directory name and * after each exec
file)
Files - Basic
cat
chmod
C-1
Instructor Guide
chgrp
cp
Copy file
mv
pg
h (help)
q (quit)
<cr> (next pg)
f (skip 1 page)
l (next line)
d (next 1/2 page)
$ (last page)
p (previous file),
n (next file)
. (redisplay current page)
/string (find string forward)
?string (find string backward)
-# (move backward # pages)
+# (move forward # pages)
Current directory
..
Parent directory
rm
Remove (delete) files (-r option removes directory and all files
and subdirectories)
head
tail
wc
su
Switch user
id
tty
C-2
V3.1.0.1
Instructor Guide
AP
Files - Advanced
awk
banner
cal
cut
diff
find
grep
-c
-l
-n
-v
Expression metacharacters:
C-3
Instructor Guide
sort
Editors
ed
Line editor
vi
Screen editor
INed
LPP editor
emacs
Screen editor +
> (write)
>> (append)
2>
tee
C-4
V3.1.0.1
Instructor Guide
AP
Metacharacters
*
[abc]
[a-c]
&
Comment character
"
'
compress
crfs
extendlv
extendvg
fsck
fuser
Lists the process numbers of local processes that use the files
specified
lsattr
C-5
Instructor Guide
lscfg
lsdev
lsfs
lslv
lspv
lsvg
lvmstat
migratepv
migratelp
mkdev
Configures a device
mkfs
mklv
mkvg
mount
quotaon
rmdev
Removes a device
rmlv
rmlvcopy
umount
uncompress
unmount
varyoffvg
varyonvg
C-6
V3.1.0.1
Instructor Guide
AP
Variables
=
HOME
Home directory
PATH
Path to be checked
SHELL
Shell to be used
TERM
PS1
PS2
$?
set
export
env
echo
Reads a file in, converts the data (if required), and copies the
file out
fdformat
flcopy
format
backup
mksysb
Copyright IBM Corp. 1997, 2005
C-7
Instructor Guide
restore
cpio
-o (output)
-i (input),
-t (table of contents)
-v (verbose),
-d (create needed directory for relative path names)
-u (unconditional to override last modification date)
for example, cpio -o > /dev/fd0 or
cpio -iv file1 < /dev/fd0
tapechk
tcopy
tctl
tar
pax
Transmitting
mail
d - delete
s - append
q - quit
enter - skip
m - forward
mailx
Upgrade of mail
uucp
C-8
V3.1.0.1
Instructor Guide
AP
uuto/uupick
uux
System Administration
df
installp
Install program
kill (pid)
mount
ps -ef
umount
smit
Miscellaneous
banner
Displays banner
date
newgrp
nice
passwd
sleep n
stty
touch
xinit
Initiate X-Windows
wall
who
man,info
C-9
Instructor Guide
System Files
/etc/group
List of groups
/etc/motd
/etc/passwd
/etc/profile
/etc/security
/etc/security/environ
/etc/security/group
Group attributes
/etc/security/limits
User limits
/etc/security/login.cfg
Login settings
/etc/security/passwd
User passwords
/etc/security/user
$var
echo
HOME
PS1
PS2
PATH
= Search path
TERM
export
env
V3.1.0.1
Instructor Guide
AP
${var:-string}
$1 $2 $3...
$*
$#
$0
$$
Process ID (PID)
$?
Commands
#
Comment designator
&&
||
exit n
expr
Arithmetic expressions
Syntax: "expr expression1 operator expression2"
operators: +
\* (multiply) / (divide) % (remainder)
for loop
if-then-else
if test expression
then
elif
then
else
then
fi
command
test expression
command
command
read
shift
test
C-11
Instructor Guide
if [ expression ]
(for example, if [ $# -eq 2 ]) (spaces required)
Integer operators:
-eq (=)
-lt (<)
-le (=<)
-ne (<>)
-gt (>)
-ge (=>)
String operators:
=
!= (not eq.)
-z (zero length)
File status (for example, -opt file1)
-f (ordinary file)
-r (readable by this process)
-w (writable by this process)
-x (executable by this process)
-s (non-zero length)
while loop
Miscellaneous
sh
vi Editor
Entering vi
vi file
vi file file2
.exrc
wm=nn
Sets wrap margin to nn. Can enter a file other than at first line
by adding + (last line), +n (line n), or +/pattern (first occurrence
of pattern).
vi -r
vi -r file
:n
:set all
:set nu
:set list
V3.1.0.1
Instructor Guide
AP
:set wm=n
:set showmode
:w file2
:w >> file2
:q
:q!
:r file2
:r! com
:!
:wq or ZZ
Units of Measure
h, l
k or <Ctrl>p
j or <Ctrl>n
w, b
^, $
<CR> or +
Cursor Movements
Can precede cursor movement commands (including cursor arrow) with number of times to
repeat, for example, 9--> moves right nine characters.
0
fx
Fx
C-13
Instructor Guide
tx
Tx
<Ctrl>f
<Ctrl>d
<Ctrl>b
<Ctrl>u
nG
Go to line n
<Ctrl>g
?pattern
V3.1.0.1
Instructor Guide
AP
Adding Text
a
<esc>
Deleting Text
<Ctrl>w
dw
dW
dd
d)
d}
dG
d^
Replacing Text
ra
s/s1/s2
cc
C-15
Instructor Guide
ncx
Moving Text
p
nYx
"ayy"
Miscellaneous
.
V3.1.0.1
Instructor Guide
AP
D-1
Instructor Guide
The following shell script, lab 6, was used in the Optional Exercises section in the Printers
Exercise:
#!/usr/bin/ksh
echo "Working, please wait .\c"
stopsrc -s qdaemon 2> /dev/null 1>/dev/null
echo ".\c"
echo "\n\n: \n" >> /etc/qconfig 2>/dev/null
echo ".\c"
D-2
V3.1.0.1
Instructor Guide
AP
The following shell script, lockvi, is first used in the Managing File Systems Exercise:
while true # always perform loop unless see a break statement
do
filename='basename $1' # retrieve just the filename, not the directory
if [ -f /tmp/lock${filename} ]
then echo "Someone else is editing $1. Please wait in the queue."
sleep 2
continue # to top of while loop until lock is removed
else
trap "rm /tmp/lock${filename}" 1 2 3 15 # If they try to cut out
# early, clean up the lock
touch /tmp/lock${filename}
echo "now editing $1"
sleep 1
/usr/bin/vi $1
rm /tmp/lock${filename}
break
# only when you're done can you break out of while loop
fi
done
D-3
Instructor Guide
The following shell script, mkfile, is used in the Managing File Systems Exercise:
#!/usr/bin/ksh
# mkfile filesize
usage()
{
clear
echo " "
echo " "
echo " "
echo " "
echo "Usage: mkfile filesize"
echo "
filesize should be in multiples of 512 bytes"
echo " "
echo " "
echo " "
echo " "
exit
}
# Main...
if [ $# != 1 ]
then
usage
fi
filesize=$1
filename="$1"bytefile
integer mod='expr $filesize % 512'
integer div='expr $filesize / 512'
if [ $mod != 0 ]
then
usage
fi
integer i=0;
integer j='expr $div \* 128'
> $filename
echo " "
echo "Creating file \"$filename\". Please wait ... "
while true
do
echo "yes" >> $filename
i=i+1
if $i = $j
then
break
fi
D-4
V3.1.0.1
Instructor Guide
AP
done
D-5
Instructor Guide
The following shell script, fragcopy, is used in the Managing File Systems Exercise:
#!/usr/bin/ksh
# fragcopy
usage ()
{
clear
echo " "
echo " "
echo " "
echo " "
echo "Usage: fragcopy numfiles dir/sourcefilename dir/targetfilename"
echo " "
echo " "
echo " "
echo " "
exit
}
# Main...
integer i=0
integer cnt=$1
source=$2
target=$3
if [ $# != 3 ]
then
usage
fi
while true
do
cp $source $target.$i
if [ $? != 0 ]
then
echo " "
exit
fi
i=i+1
echo " Files copied: \c"
echo "$i\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\c"
if [ $i = $cnt ]
then
echo " "
break
fi
done
D-6
V3.1.0.1
Instructor Guide
AP
lslpp -L
lsdev -C -H
lsdev -Cc disk
lsdev -Cc memory (MCA)
lsattr -El sys0 -a realmem (PCI)
lsattr -El mem0
List system resources
lsattr -EHl sys0
List the VPD (Vital Product Data)
lscfg -v
Document the tty setup
lscfg or SMIT screen capture F8
Document the print queues
qchk -A
Document disk Physical Volumes (PVs) lspv
Document Logical Volumes (LVs)
lslv
Document Volume Groups (long list)
lsvg -l vgname
Document Physical Volumes (long list) lspv -l pvname
Document File Systems
lsfs fsname
/etc/filesystems
Document disk allocation
df
Document mounted file systems
mount
Document paging space (70 - 30 rule) lsps -a
Document paging space activation
/etc/swapspaces
Document users on the system
/etc/passwd
lsuser -a id home ALL
Document users attributes
/etc/security/user
Document users limits
/etc/security/limits
Document users environments
/etc/security/environ
Document login settings (login herald) /etc/security/login.cfg
Document valid group attributes
/etc/group
lsgroup ALL
Document system wide profile
/etc/profile
Document system wide environment
/etc/environment
Document cron jobs
/var/spool/cron/crontabs/*
Document skulker changes if used
/usr/sbin/skulker
Document system startup file
/etc/inittab
Document the hostnames
/etc/hosts
Document network printing
/etc/hosts.lpd
Document remote login host authority /etc/hosts.equiv
E-1
Instructor Guide
Directories to monitor
/var/adm/sulog
/etc/security/failedlogin
/var/adm/wtmp
/etc/utmp
/var/spool/lpd/qdir/*
/var/spool/qdaemon/*
/var/spool/*
Spooling directory
smit.log
smit.script
E-2
V3.1.0.1
Instructor Guide
AP
F-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
Define a serial device to the system
Set terminal characteristics
Describe the purpose of the terminfo database
Diagnose and solve common problems with terminals
AU1411.0
Notes:
F-2
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Go over the objectives with the students.
Details
Additional Information
Transition Statement Lets start by defining self-configuring devices and list those that
do not fall under this category.
F-3
Instructor Guide
Non-Self-Configuring Devices
Devices not configured automatically at boot up by the
configuration manager (cfgmgr):
ASCII (dumb) terminals
Printers
Modems
AU1411.0
Notes:
Self-configuring and non-self-configuring devices
During the bootup of an AIX system, the cfgmgr command is run to bring certain
devices up and available on the system.
Only devices which have a defined industry standard that describes the way in which
they can identify themselves to the system are configured by cfgmgr. For example, the
SCSI adapter for CD-ROM disks, tape drives, and so forth, will be made available.
Some devices do not have the mechanism for identifying themselves. These
non-self-configuring devices include ASCII terminals and printers. These devices must
be manually defined to the operating system.
F-4
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose To remind the audience about self-configuring devices and to list those that do
not fall under this category.
Details All devices directly connected to the system via the system bus or the SCSI bus
can be recognized and have device support automatically installed for them.
The exceptions are devices attached to the serial and parallel ports. Another exception are
those non-integrated devices attached to the ISA bus on PCI RS/6000 systems.
Additional Information
Transition Statement We shall now look at what we need to know before we can add a
serial device to the system.
F-5
Instructor Guide
Adding a Terminal
Questions to be answered before adding TTYs:
Server Configuration:
TTY interface
Adapter
Port number
AU1411.0
Notes:
How to add a TTY
To add a terminal to the system, you must add a TTY logical device using Add a TTY on
the TTY menu in SMIT or the mkdev high-level command. You can use the SMIT
fastpath maktty or mktty to access this menu.
When adding a TTY, you must know the port where the terminal is plugged into the
system, the terminal type (for the TERM variable) and the line characteristics for the
port.
F-6
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose List the information required before a serial terminal can be added.
Details The information required:
TTY Interface:
Adapter:
Port:
Line Characteristics:
Terminal Type:
Keyboard Attributes:
This information is obtained from the device itself (setup menus, manuals) as well as from
the SMIT menu panels.
Additional Information
Transition Statement We will now look at how a terminal line can be used for various
purposes.
F-7
Instructor Guide
Enable/Disable
Enable login attribute:
login=disable
login=enable
login=delay
login=share
AU1411.0
Notes:
Login attributes
Appropriate values for the login attribute are:
F-8
disable
The port is still defined, but it is only available as a dial-out port for an
asynchronous connection to another machine
enable
The port is enabled for login, a getty process runs on the port when
not in use
delay
The port is enabled for login, but the login prompt is not displayed until
the user presses a key
share
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Explain the purpose of the login attribute for a serial device.
Details A serial port can be used for directly connected terminals, a modem, or a serial
printer. Typical interfaces include RS-232C for lower speeds, and RS422 for higher speeds.
When or if the login attributes are not coordinated with the use or intent of the line,
interesting communication problems occur. For example, data blocks sent to the terminal
must be kept relatively small. A delay time between data block transmissions must also be
established to minimize data reception errors.
This is not a great concern when data transmission is slow and irregular, as with keyboard
input. It becomes a problem with raw-mode applications, where massive chunks of input
are transmitted by other computers and by devices such as fax machines.
Depending on its use, the flow of data will be initiated by either the device on the port or by
the system.
If the device is a terminal, then the communications are usually started by the terminal
itself.
This requires the login attribute to be set to enable or delay.
If the device is an outbound modem, then the login attribute should be set to disable.
If the device is a dial-in modem, then the attribute should be set to enable.
If the device is a bi-directional modem, then the attribute should be set to share.
A delayed port can be used for both dial-in and dial-out but the user dialing into a delayed
port will need to send a character (or two) before a login herald will be issued to the port.
Additional Information
Transition Statement We shall now look at some of the attributes that control
communications between the computer and the serial device.
F-9
Instructor Guide
Port Attributes
Various attributes play an important role during
communication between the computer and the serial device.
These include:
bps/baud rate:
The speed of the line in bits per second
Number of stop bits:
A signal to a receiving mechanism to wait for the next
signal
Bits per character:
The number of bits per character to be transmitted
Parity:
A simple error detection mechanism
Copyright IBM Corporation 2005
AU1411.0
Notes:
Baud Rate
The speed of an asynchronous communications line is usually expressed in bits per
second (bps). Sometimes, the term baud rate is used to mean the same thing although
the baud rate actually means the number of possible voltage changes on the line per
second.
Stop bit
During communication, the voltage on one of the lines (the receive/transmit line) is
normally set to high. When a system starts to send a byte, the voltage is set to low for
1.5 clock pulses. This is called a start bit. Similarly, at the end of the transmission of the
byte, (that is, after the last bit), the voltage is set high for a further clock pulse. This is
called a stop bit.
V3.1.0.1
Instructor Guide
AP
Using two stop bits on low-speed lines or poor quality lines will improve
communications.
Parity
Parity is a method of detecting transmission errors. If enabled, a parity bit is appended
to each character transmitted. Types of parity checking are:
EVEN
ODD
The parity bit ensures that the number of ones transmitted is always odd
MARK
SPACE
NONE
No parity
F-11
Instructor Guide
Instructor Notes:
Purpose To show some of the attributes that control the communications between the
computer and the serial devices.
Details There are many more attributes assigned to serial devices. For example, if you
wish to see the default settings for an rs232 serial terminal, enter the following.
# lsattr -Dc tty -s rs232
Additional Information Additional information on 'Stop Bit': During communications,
when gaps appear between the character transmission, the line is said to be in 'mark state'.
A mark is a binary 1 (or negative voltage) that is set during periods of inactivity on the line.
When the mark state is interrupted by a positive voltage (binary 0), the receiving system
knows that data characters will follow. It is for this reason that the start bit (which precedes
the data character) is always a space bit (binary 0) and the stop bit (which signals the end
of a character) is always a 'mark bit' (binary 1).
Transition Statement We will now work with SMIT to add a serial terminal to the
system.
V3.1.0.1
Instructor Guide
AP
F1=Help
F9=Shell
F2=Refresh
F10=Exit
F3=Cancel
Enter=Do
Esc+8=Image
AU1411.0
Notes:
Configuring TTY devices
The SMIT TTY menu is used to manage the configuration of asynchronous terminals
and other TTY devices in the system. These are typically TTY devices attached directly
to either RS232 or RS422 communication adapters. TTY devices attached to network
terminal servers or serial printers are not generally configured using this method for
performance reasons.
TTY devices can be listed, added to the system, made unavailable/available, removed
and have their characteristics changed using these menus.
F-13
Instructor Guide
Instructor Notes:
Purpose To show the SMIT menu for the serial terminal devices.
Details TTY devices include both terminals and modems. It is not recommended to
attach printers to the serial port due to poor performance when attached in this fashion.
Additional Information
Transition Statement We will now work with the SMIT screens that you would see
when adding a serial terminal.
V3.1.0.1
Instructor Guide
AP
Attachment
TTY Type
Move cursor to desired item and press Enter.
tty rs232 Asynchronous Terminal
tty rs422 Asynchronous Terminal
tty vcom Asynchronous Terminal
Parent Adapter
Move cursor to desired item and press Enter.
sa0
sa1
sa2
sa3
sa4
Available
Available
Available
Available
Available
AU1411.0
Notes:
Defining the TTY type and parent adapter
When you select Add a TTY from the TTY menu you are presented with two pop-ups to
select the TTY type and adapter.
TTYs can either be connected to an RS232, RS422 or vcon adapter.
Once a type has been selected, you are presented with a list of installed adapters that
support that method of attachment.
F-15
Instructor Guide
Instructor Notes:
Purpose To show how a serial terminal is added to the system. We start by defining the
attachment for the device.
Details The choices presented in the first panel are for the serial protocol that will be
used to communicate with that device. In the second panel, a list of all devices that use the
selected serial protocol is displayed.
Additional Information
Transition Statement Lets take a look at the device nomenclature for the example
were talking about before we continue with the Add a TTY screen.
V3.1.0.1
Instructor Guide
AP
Device Nomenclature
For the built-in serial connection, the nomenclature looks like this:
sa0
sa1
s1
s2
Built-in adapters
on system planar
Serial ports
sa2
sa3
sa4
16-Port
RAN
16-Port
RAN
16-Port
RAN
AU1411.0
Notes:
Pictorial view
This visual shows a picture and the associated nomenclature for the scenario were
discussing on adding a TTY.
F-17
Instructor Guide
Instructor Notes:
Purpose Show a picture of the scenario for the TTY were adding.
Details Point out the naming conventions.
Additional Information
Transition Statement The final step is to enter the information about the device.
V3.1.0.1
Instructor Guide
AP
Add a TTY
Add a TTY
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP]
TTY type
TTY interface
Description
Parent adapter
* PORT number
Enable LOGIN
BAUD rate
PARITY
BITS per character
Number of STOP BITS
TIME before advancing to next port setting
TERMINAL type
FLOW CONTROL to be used
[MORE...31]
F1=Help
Esc+5=Reset
Esc+9=Shell
F2=Refresh
Esc+6=Command
Esc+0=Exit
[Entry Fields]
tty
rs232
Asynchronous Terminal
sa2
[]
+
disable
+
[9600]
+
[none]
+
[8]
+
[1]
+
[0]
+#
[dumb]
[xon]
+
F3=Cancel
Esc+7=Edit
Enter=Do
F4=List
Esc+8=Image
AU1411.0
Notes:
Port number
There is only one mandatory field on this screen and that is the PORT number. The F4
key provides a list of possible port numbers. For the first built-in serial port 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
Built-in serial port S2
8-Port Adapter
16-Port Adapter
Each 16-PORT RAN
Copyright IBM Corp. 1997, 2005
s1
s2
0-7
0-15
0-15
Appendix F. Serial Devices
F-19
Instructor Guide
Enable LOGIN
The Enable LOGIN attribute is set to disable by default. If you are adding a terminal
that should have a login prompt, you should change this to enable.
TERMINAL type
The TERMINAL type attribute is used to assign the TERM environment variable when
a user logs in on the device. There is no list available for this entry. The easiest way to
find out the required values is to refer to the terminfo database, which is discussed
shortly.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Show the options for adding a serial terminal.
Details There are many settings that can be used for a serial terminal. There is only one
mandatory setting and that is the port number for the device.
The combination of parent adapter and port number provide the system with the
information to build the correct location code. In the case of the 128 port adapter, if the
device is attached to port 5 of the first RAN, the parent adapter would have been sa2
(based on our example) selected on the Parent Adapter screen and PORT number 05
selected on the Add a TTY screen. Thus, from this information, the location code
00-03-11-05 would be derived.
Other settings that should be changed are:
Enable LOGIN = enable
TERMINAL type = the default terminal type is 'dumb', which has a very limited set of
available features and is not fully functional with ibm3151's and vt100's
BAUD rate = if the BAUD rate desired is not listed, such as 14400, it can be entered
directly into the field
Additional Information
Transition Statement The other item that should be configured for a serial terminal is
the terminal type. We shall see how this works.
F-21
Instructor Guide
terminfo
Database of terminal capabilities
Required by full screen programs:
TERM variable
/usr/share/lib/terminfo/?/$TERM
IBM, DEC and Wyse terminals supported
Sample files for many other terminal types:
/usr/share/lib/terminfo/*.ti
AU1411.0
Notes:
Database of terminal characteristics
When a function key is pressed on the keyboard a sequence of characters (escape
sequence) is sent to the system. When the system needs to display a special terminal
feature such as reverse video or clear screen, the system must send a sequence of
characters to the terminal.
Because there are a large number of ASCII terminals on the market which all offer a
variety of functions, there is no standard for how these functions are implemented. The
solution has been to build a terminal-independent set of programming interfaces which
get the terminal information from a database of known terminals.
The terminfo database is this kind of facility. Another example is the termcap facility on
Berkeley systems. (This is also available in AIX 5L through the file /etc/termcap.)
V3.1.0.1
Instructor Guide
AP
F-23
Instructor Guide
Instructor Notes:
Purpose Show how the TERM variable can be preset and what it does.
Details The only thing not mentioned in the student notes is that SMIT can configure a
port to contain the terminal type. This is achieved by setting an attribute for the terminal in
the ODM database.
The /etc/profile contains the lines
# If termdef command returns terminal type (that is, a non NULL value),
# set TERM to the returned value, else set TERM to default lft.
TERM_DEFAULT=lft
TERM=termdef
TERM=${TERM:-$TERM_DEFAULT}
That ensures that the terminal type is set at login.
Additional Information The student notes mention the termcap database.
Experienced UNIX users may be familiar with this. The termcap database is not loaded on
the systems in the classroom. The termcap database is delivered with the base AIX
operating system, but is optionally installed. It is found in the bos.compat fileset.
Transition Statement Sometimes the setup may not be quite right. It is then that we
need to coordinate the attributes set for the terminal in SMIT with the actual terminal
settings.
V3.1.0.1
Instructor Guide
AP
[Entry Fields]
tty3
tty
rs232
Asynchronous Terminal
Available
01-G0-00-00
sa0
[s1]
+
enable
+
[19200]
+
[none]
+
[8]
+
[1]
+
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Changing characteristics
TTY characteristics cannot be adjusted or changed while the port or the device is busy.
The device has to be temporarily disabled (for example, pdisable command) before
proceeding and subsequently enabled again (using the penable command) before use.
F-25
Instructor Guide
Instructor Notes:
Purpose Show how a terminal device can be changed.
Details This is normally done to modify the settings of a terminal so that it works better
(or at all) or to change some attributes, for example to enable the terminal for login. The
graphic shows the characteristics of tty3, which is attached to serial adapter 0 (serial port
1) on a PCI RS/6000 system. This visual is not meant to show the TTY just added but
rather view the characteristics of a TTY on a PCI RS/6000 system.
Before a terminal can be changed, it must be disabled (see the pdisable command later in
this unit).
Additional Information
Transition Statement Having set up the terminal in the operating system, we will now
look at how to set up the terminal device itself.
V3.1.0.1
Instructor Guide
AP
Communication
Code Page
Screen
Row & Column
Scroll
Auto LF
CRT Saver
Line Wrap
Message Type
General
CP 850
NORMAL
24 x 80
Jump
Off
Off
On
NON-DISPLAY
Communication
Operation Mode
Line Speed (bps)
Word length (bits)
Parity
Stop Bit
Turnaround Character
ECHO
19200
8
NO
1
CR
Keyboard/Printer
Function
Forcing Insert
Tab
Characters
Both
Field
Term.id
Alarm Volume Level
Cursor
_________
7
Steady-block
Keyboard/Printer
Interface
Line Control
Break Signal
Send Null Suppress
Pacing
Function
RS-232C
IPRTS
500ms
ON
XON/XOFF
AU1411.0
Notes:
Example
The example shows the settings for the UK-English AIX Multiuser Enhancement
Cartridge to work with AIX 5L. The menus appear different depending on the cartridge.
A cartridge is not necessary to operate in US-English mode.
To access the setup menus on an IBM 3151 press <Ctrl+Setup>. Use the cursor keys
to move between fields and the space bar to toggle values. To go to the next menu
press the <Send> key.
F-27
Instructor Guide
Instructor Notes:
Purpose Show the terminal setup menus for the IBM 3151 terminal.
Details Every ASCII terminal has setup menus. They are all different depending on the
cartridge that is installed in the TTY, or the lack of one. To have the IBM 3151 operating in
the native US mode you wouldn't need a cartridge. The menus are invoked in different
ways depending on the above factor. The example shown is for an IBM 3151 with a UK
3151 cartridge at the back of the terminal.
Whatever the terminal, it has to be told what the port on the computer is trying to do. For
example, at what speed is the data expected to arrive/depart the computer?
On the ibm315x terminals, the pcmcia-type cartridge provides some setup. Remember to
tell the students to power-off the terminal BEFORE inserting or removing the cartridge. If
this is not done, there is a risk of damaging the contents of the cartridge.
One of the common reasons for terminals to suddenly cease working correctly is because
the user of the terminal just discovered the setup menus!
Someone may ask about attaching a printer to the auxiliary port and doing transparent
printing. This is supported on all systems except the 40P at this time.
Additional Information
Transition Statement The next page has the rest of the setup menus.
V3.1.0.1
Instructor Guide
AP
Communication
KEYBOARD
General Code set
Enter
Return
New Line
Send
Insert Character
NUM Message
General
PRINTER
Line Speed (bps)
Word Length (bits)
Parity
Stop Bit
DTR Pacing
ASCII
RETURN
NEW LINE
CR
PAGE
SPACE
ON
Communication
Recall
Save
Keyboard/Printer
Keyboard/Printer
Function
19200
8
NO
1
OFF
Function
Default
Reset Terminal
[EMBKB]
AU1411.0
Notes:
Function menu
Most modern ASCII terminals store their characteristics in non-volatile memory and
provide some setup menus to modify these characteristics.
The IBM 3151 ASCII terminal has different capabilities depending upon a cartridge
which is plugged in the back. This will provide different emulation modes and national
language support.
The FUNCTION menu provides options to Recall the previous values, Save the current
values, reset to the Default values, or Reset Terminal. To exit without updating the
values press <Ctrl+Setup> again.
F-29
Instructor Guide
Instructor Notes:
Purpose Show the terminal setup menus for the IBM 3151 terminal.
Details
Additional Information
Transition Statement Removing terminals can be problematic if you forget to disable
the device first. The next page illustrates how to properly disable and remove a terminal.
V3.1.0.1
Instructor Guide
AP
Deleting TTYs
# smit rmvtty
Remove a TTY
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
tty0
yes
TTY
KEEP definition in database
F1=Help
F5=Reset
F9=Shell
F2=Refresh
F6=Command
F10=Exit
F3=Cancel
F7=Edit
Enter=Do
F4=List
F8=Image
AU1411.0
Notes:
Preparing to remove a TTY
You cannot remove a TTY if it is in use, either with a user logged in or a getty process
running. So, if a user is using the TTY and you wish to remove it, the user needs to log
out. Then, disable the TTY either by changing its attributes (through SMIT or with the
chdev command directly) or using the pdisable command.
If a TTY has been disabled, a user may still be able to use it if they were already logged
in to that TTY. The user needs to log out before you attempt to delete the TTY,
otherwise problems may occur. When they log out a new getty process is NOT run on
the terminal because it is disabled.
Now, you can delete the TTY using either SMIT or the rmdev command.
F-31
Instructor Guide
Instructor Notes:
Purpose Show the students how terminals can be removed from the system.
Details If you select to keep the definition, then the device will be put in the 'defined'
state. When you are ready to use the TTY again you would go back and Configure a
Defined TTY.
Additional Information
Transition Statement Before a terminal can be changed or deleted, it must be disabled.
V3.1.0.1
Instructor Guide
AP
penable/pdisable
To enable terminals, run the penable command:
penable [-a] [device_name]
To disable terminals, run the pdisable command:
pdisable [-a] [device_name]
penable and pdisable by themselves, list all the
terminals enabled or disabled respectively
AU1411.0
Notes:
The penable command
The penable command enables asynchronous ports and allows users to log in. The
system enables the port by updating the getty entry in the /etc/inittab file, and then
sending a signal to the init process. This process then starts the getty placing the
logon herald (logon prompt) on the terminal allowing user access.
F-33
Instructor Guide
by init. If this respawning takes place too often, the message TTY respawning too
rapidly is displayed on the console. Temporarily disable the TTY while you check and
repair the cabling.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Show how a terminal can be enabled or disabled.
Details In AIX 5L, unless the terminal is disabled by pdisable, it cannot be removed or
permanently changed.
Additional Information
Transition Statement Let's look at some common TTY problems.
F-35
Instructor Guide
TTY Problems
Incorrect terminal type/settings:
Change attributes (SMIT)
Terminal setup menu
TERM variable/terminfo database
Hung terminal (crashed program or cat binary file):
From terminal:
Try start key <ctrl-q>
Reset terminal from setup menu
Try interrupt, quit keys
<ctrl-j> stty sane <ctrl-j> then log off/on again
From another terminal:
stty -a < /dev/ttyn
Then, stty sane </dev/ttyn
or
kill -9 pid_of_login_shell
Copyright IBM Corporation 2005
AU1411.0
Notes:
Questions to ask
When approaching a terminal problem, there are several issues to investigate:
- Can the system communicate with the terminal? Try the command
echo hello > /dev/ttyn and check if any output is sent to the TTY.
- Are cabling, power, brightness, contrast correct?
- Are there any processes running on the terminal? Verify this using the
fuser -u /dev/ttyn command.
These questions normally produce a resolution to the problem.
V3.1.0.1
Instructor Guide
AP
Things to try
Other things to try:
- <Ctrl+q> (release screen)
- <Ctrl+c> (kill current process)
- Power off, then power on the terminal
- Check the NVRAM setup
- Is there a getty process running on the device? If so, pdisable the TTY, then
penable it.
If the backspace key does not work correctly, it needs to be remapped. Use the stty
command to do this:
stty erase (press backspace key)
F-37
Instructor Guide
Instructor Notes:
Purpose List some of the problems that you may face when working with serial devices.
Details When approaching a terminal problem, there are a number of questions that
must be asked. Both the graphic and the student notes provide some things to try in the
event of a 'non-working' TTY.
The student notes briefly mention the stty command. This command is used to set or
display TTY settings. To list the settings for a TTY, enter stty -a. This command is
covered in more detail in Q1316/AU16.
Additional Information
Transition Statement Documentation of TTYs in your environment is very important.
Let's look at this next.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Documentation
Since the setup of serial devices is relatively complex and involves an amount of
manual labor, it is recommended that at least a map of where the devices exist, their
port numbers, and the specific settings (stty, etc) be drawn up.
This will make life a lot easier for the system administrator who looks after the system.
F-39
Instructor Guide
Instructor Notes:
Purpose Highlight the value of documenting the terminal or serial line setup.
Details
Additional Information
Transition Statement Let's review the topic.
V3.1.0.1
Instructor Guide
AP
Checkpoint
1. True or false? If a device, like a TTY, is left for cfgmgr
to configure automatically, it picks up the default values
which might not be desirable.
2. True or false? If TTYs are connected via concentrator
boxes, they must all be connected in sequence on the
concentrator box otherwise they are not configured.
3. True or false? /dev/tty0 indicates that the TTY is
connected to port 0, /dev/tty1 to port 1 and so on.
4. What environment variable holds the terminal type for a
terminal?
AU1411.0
Notes:
F-41
Instructor Guide
Checkpoint Solutions
1. True or false? If a device, like a TTY, is left for cfgmgr to
configure automatically, it picks up the default values which
might not be desirable. TTYs and other serial devices are not selfconfigurable and so are not detected by cfgmgr.
Additional Information
Transition Statement Now, lets do an exercise.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
This exercise can be found in your Student Exercise Guide.
F-43
Instructor Guide
Instructor Notes:
Purpose Optionally, do the exercise.
Details
Additional Information
Transition Statement Now, lets summarize the unit.
V3.1.0.1
Instructor Guide
AP
Unit Summary
Serial devices, such as TTYs and modems must be
configured manually, either through SMIT or by a highlevel command
To ensure the correct operation of devices such as TTYs,
certain characteristics, such as the terminal type and baud
rate, must be set
The terminfo database stores all the terminal
characteristics
Enable and disable TTYs using the penable and
pdisable commands
AU1411.0
Notes:
F-45
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement
V3.1.0.1
Instructor Guide
AP
References
Online
SG24-6018
Online
G-1
Instructor Guide
Unit Objectives
After completing this unit, you should be able to:
List two advantages of the System V print subsystem
List two advantages of the AIX print subsystem
Switch between the AIX and System V print subsystems
Describe the process of printing a file using the System V print
subsystem, including the following components:
Print service daemon
Printer configuration file
Terminfo database
Interface programs
Slow and fast filters
Configure a local printer using the System V print subsystem and
print to it
Describe the process of configuring a remote System V printer
Copyright IBM Corporation 2005
AU1411.0
Notes:
G-2
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Review unit objectives with students.
Details
Additional Information
Transition Statement Lets start by taking a high-level look at whats changed with
printing in AIX 5L.
G-3
Instructor Guide
AU1411.0
Notes:
System V print subsystem
The classic AIX print subsystem was designed to combine the features of the System V
and the Berkeley Software Distribution (BSD) printing standards, along with some
unique features found only in AIX. However, these same features made the AIX print
subsystem less compliant to widely used standards. With the development of AIX 5L, a
more standard print subsystem was needed. The System V print subsystem was
chosen because of its wide use across many different UNIX systems.
The addition of System V printing allows system administrators with System V printing
experience to easily transition to printing using AIX. Also, since the System V print
subsystem is the de facto standard printing environment for UNIX systems, it will be
easier for printer manufacturers to add support for AIX printing. System V printing also
adds new features, such as enhanced security and support for using preprinted forms.
G-4
V3.1.0.1
Instructor Guide
AP
Administration
A new user (lp) and group (lp) have been added to support System V printing.
System V print administrators need to belong to the lp group.
AIX print administrators need to belong to the printq group.
Users who belong to the printq group can add printer devices which can be used by
either print subsystem.
G-5
Instructor Guide
Instructor Notes:
Purpose The purpose of this first visual is to give an overview of how the print
environment has changed with the addition of System V.
Details Introduce students to the reasons for going to System V printing.
Additional Information
Transition Statement In order to choose which print subsystem to use, system
administrators need to evaluate their overall printing requirements. In the next visual, well
take a brief look at the printing environments available under AIX 5L. Then, well look more
specifically at the advantages and disadvantages of AIX and System V printing.
G-6
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
The visual gives an overview of the different approaches that can be taken to printing
under AIX 5L. In the next two visuals, System V printing will be compared to the
traditional AIX print subsystem. The remainder of this unit focuses on using the System
V print subsystem.
G-7
Instructor Guide
In this approach, you lose the ability to serialize (spool) print requests. Only one user
may print at a time. On the other hand, if a printer is being dedicated to one use, this
may be a good solution. Examples might be logging to a printer or printing checks.
G-8
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose The purpose is to give an overview of printing under AIX 5L, putting System V
and AIX in context. We also give a little advertisement for Infoprint Manger.
Details More detail is provided in later visuals.
Additional Information
Transition Statement Now, lets compare the advantages and disadvantages of
System V and AIX printing.
G-9
Instructor Guide
AU1411.0
Notes:
Compatibility
System administrators with experience in other UNIX variants that use System V
printing find it easy to manage printing under AIXs System V print subsystem.
V3.1.0.1
Instructor Guide
AP
Security
Controlling user access to printers can be an important issue. For example, you might
need to limit access to the printer used to print checks. System V printing includes
built-in capabilities for restricting user access to certain printers. Using the AIX print
subsystem, the backend program must be customized to restrict user access.
G-11
Instructor Guide
Instructor Notes:
Purpose List two advantages of System V print subsystem.
Details In summary, the main advantages of System V have to do with compatibility.
This makes it easy for system administrators from other UNIX variants to transition to AIX
and it drives availability of support for a larger number of printers on AIX.
System V also adds forms support and better security.
Additional Information Directory-enabled printing is supported beginning with AIX 5L
V5.2. System V printing on AIX uses LDAP (Lightweight Directory Access Protocol) as the
directory service.
A directory is an ordered list of objects, including details about each object. Obvious
examples are phone books or library card catalogs. Directories are a type of database.
They differ from other databases in that accesses are mostly reads, with only occasional
writes. Directory protocols are optimized to facilitate a high-read environment.
Computer directories can be searched in many ways, making them a very powerful way to
store and manage information.
In the case of a printer directory, this might include searching for the name of a printer to
get its characteristics, searching for printers in a particular location, searching for printers
with particular features, and so forth. Directory enabled printing provides an easy way for
users to search for a printer that is close and has the features they require. If security or
other control features are made part of the directory, directory enabled printing facilitates
easier management by system administrators.
Transition Statement Now, lets look at the strengths of the AIX print subsystem.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Powerful and flexible printer drivers
AIX printer drivers provide many printing options that can be easily controlled using
command line options to the qprt command. Printer defaults can be easily managed
using SMIT or the command line.
G-13
Instructor Guide
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose List advantages of AIX print subsystem.
Details In summary, the main advantages of AIX printing have to do with flexibility and
ease of use. AIX printing is tightly integrated into SMIT and the Web-based System
Manager. Also, System V is not yet mature on AIX, although system management features
will be enhanced in future releases.
Additional Information
Transition Statement Now lets look at how the two print subsystems are packaged
and installed.
G-15
Instructor Guide
Software Packaging
Both print subsystems are installed as part of BOS
installation
AIX print subsystem is enabled by default
System V print subsystem filesets:
bos.svprint.rte
bos.svprint.fonts
bos.svprint.hpnp
bos.svprint.ps
bos.terminfo.svprint.data
bos.msg.en_US.svprint
AIX print subsystem filesets:
bos.rte.printers
printers.*
Copyright IBM Corporation 2005
AU1411.0
Notes:
Print subsystems installed
Both print subsystems are installed. Only one subsystem can be active at a time. The
AIX print subsystem is enabled by default.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe how the two print subsystems are installed.
Details
Additional Information
Transition Statement You can switch between System V and AIX printing.
G-17
Instructor Guide
AU1411.0
Notes:
Introduction
Either the AIX print subsystem or the System V subsystem can be active, but not both
at once.
Status
Use SMIT, the Web-based System Manager, or the switch.prt -d command to
display the active print subsystem.
Switching
Use SMIT, the Web-based System Manager, or the switch.prt -s subsystem-type
command to switch subsystems.
V3.1.0.1
Instructor Guide
AP
Action
1.
Checks for active print jobs. If there are, exits with error message:
All print jobs must be terminated.
2.
3.
Modifies /etc/inittab so that the AIX daemons will not be started on the
next boot and the System V daemon will be started on next boot.
4.
5.
6.
7.
Removes AIX links and adds System V links for the common commands.
8.
Action
1.
Checks for active print jobs. If there are, exits with error message:
All print jobs must be terminated.
2.
3.
Modifies /etc/inittab so that lpsched will not be started on the next boot
and the AIX daemons will be started on next boot.
4.
5.
6.
7.
Removes System V links and add AIX links for the common commands.
8.
G-19
Instructor Guide
User submits job using enq or qprt when System V printing is active
If a user submits a job using the AIX print commands when the System V print
subsystem is active, the user will receive this error message:
Cannot awaken qdaemon (request accepted anyway).
If the AIX print subsystem is reactivated, the jobs are queued and print.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Provide details about how to switch between print subsystems.
Details It is not expected that system administrators will be switching between print
subsystems on a regular basis, but it is good to understand how to do it and what happens.
You do not need to lecture through each step of switching, but you should discuss what
happens to disabled queues or printers when switching and what happens to jobs
submitted via enq when the System V subsystem is active.
Additional Information
Transition Statement The AIX print subsystem and the System V print subsystem
share a number of commands, but the functionality and option flags are somewhat
different. In the next visual, well look at how AIX switches between the different versions of
these commands.
G-21
Instructor Guide
AU1411.0
Notes:
Introduction
Both print subsystems share a number of commands, but command behavior and
option flags differ for the same command, depending on which subsystem is active. AIX
handles this by linking commands from /usr/bin to either /usr/aix/bin or /usr/sysv/bin.
V3.1.0.1
Instructor Guide
AP
man pages
The man page for each common command includes information about both versions of
the command. You need to make sure you are reading the correct part of the man page
for the print subsystem you are using.
G-23
Instructor Guide
Instructor Notes:
Purpose Describe how the two versions of common print commands are managed and
how to locate the correct version in the man pages. Emphasize this point: its very easy to
forget and just start reading the man page, however there are some important differences
between how these commands works in the two different systems.
Details
Additional Information
Transition Statement Now, were ready to take a close look at how the System V print
subsystem operates.
V3.1.0.1
Instructor Guide
AP
prin
ter
init
ial
print service
daemon
(lpsched)
optional
slow filters
log directory
iza
tion
interface
program
fast filters
default
fast filter
spool directory
optional
fast filter
printer device
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
This visual provides an overview of the System V printing process. In the following
pages, we provide additional details.
lpsched
lpsched is the print service daemon. It is started at boot time from the /etc/inittab file if
the System V print subsystem is active.
G-25
Instructor Guide
terminfo database
The terminfo database contains data describing characteristics of different printer
types. This data is used in two ways. lpsched uses the data to determine if the job can
be printed. Later in the process, the interface program uses this same information to
initialize the printer.
V3.1.0.1
Instructor Guide
AP
Filters
Filters are used by the System V print subsystem to perform three functions:
- Converting file content
This could include tasks such as adding carriage returns to line feeds, mapping one
set of control characters to another set, and so forth. For example, converting a
simple text file to PostScript so that it can be printed by a PostScript printer.
- Interpreting special print modes requested by the user
This could include print modes such as landscape page orientation, reverse page
order, and so forth.
- Detecting printer faults.
There are two types of filters:
- Slow filters are filters that incur a lot of overhead and do not need to be connected to
the printer while they run. lpsched runs slow filters in the background so that the
printer is not tied up while they perform file conversion.
- Fast filters interact directly with the printer. They can control the printer and receive
status back from the printer. Some fast filters also perform file conversion tasks like
slow filters.
Filtering
lpsched determines which filters must be used, based on:
- Printer type
- Content of the file to be printed (as specified by the user)
- Types of content the printer will accept (from the printer configuration file)
- Any special mode options requested by the user
- Capabilities of the available filters (registered using the lpfilter command)
lpsched may decide to use a combination of several filters. Slow filters are run directly
by lpsched. Fast filters are run by the interface program, as directed by lpsched.
Several filters may be piped together to achieve the desired file format.
G-27
Instructor Guide
Interface program
The interface program is a shell script that manages the printer. When you create a
System V printer, you specify which interface script you wish to use. Two interface
scripts are provided with the System V print subsystem or you can write your own
interface scripts. In addition, some printer manufacturers provide interface scripts
specifically for their printers.
The interface script performs the following tasks:
- Initializes the printer port, if necessary, and printer hardware using terminfo data
- Invokes the fast filter to print a banner page, if required
- Invokes the fast filter to print requested number of copies of the file to be printed
Logging
lpsched is responsible for monitoring job status and updating files in the log directory.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose This visual gives an overview of the entire printing process.
Details Walk students through the process. Let them know that this is an overview.
Were going to provide more details for most of this process.
Additional Information
Transition Statement In the next visual, well define some terms.
G-29
Instructor Guide
System V Terminology
Term
Description
Examples
Printer device
/dev/lp01
System V printer
myprinter
Printer type
Content type
postscript
Interface type
/usr/lib/lp/model/PS
Class
bldg5
AU1411.0
Notes:
Introduction
One of the most confusing things about System V printing is the terminology. For
example, many different things are referred to as types. The table in the visual
describes some System V terms. The lpadmin command at the bottom of the visual
shows how these terms are used when defining a System V printer.
Printer device
The term printer device usually refers to the actual printer device driver. Printer devices
are created using mkdev and associated with a System V printer using the
-v device_name flag to the lpadmin command.
In the example, the printer myprinter is configured to use printer device /dev/lp01.
V3.1.0.1
Instructor Guide
AP
System V printer
The term System V printer, or even just printer by itself, usually refers to the printer
queue, which is defined using the -p printer_name flag to the lpadmin command.
In the example, the System V printer is named myprinter.
Printer type
The printer type associates a printer to an entry in the terminfo database. Use the
-T printer_type flag to lpadmin to specify the printer type. The information in the
terminfo database is used by the interface program to initialize the printer.
In the example, the printer type is PS, which is one of several terminfo entries for
PostScript printers.
Content type
The content type identifies what kind of content the printer can handle. This can be a list
of content types. For example, some laser printers can accept both PostScript and
Printer Command Language (PCL). Use the -I content_type flag to lpadmin to
specify printer content types.
In the example, the content type is postscript.
G-31
Instructor Guide
Description
-i interface_path
-e printer_name
-m model
In the example, lpadmin copy the /usr/lib/lp/model/PS interface script to be used for
myprinter.
Class
Printers can be grouped into classes. A class is an arbitrary group of printers. If a user
submits a job to a class of printers, the print service prints it on the first available printer
that can handle the job. Printers are added to a class using the
-c class_name flag to lpadmin. If the class does not exist, it is created.
In the example, myprinter is added to class bldg5.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Explain the following System V printer terms: printer device, printer, printer
type, content type, interface, and class.
Details
Additional Information
Transition Statement Lets take a minute to review what weve covered so far.
G-33
Instructor Guide
Let's Review 1
1. What command is used to display which print subsystem is
active? _________
2. When the System V print subsystem is active,
/usr/bin/cancel is linked to _________.
3. The _________ or _________ commands can be used to
submit print jobs to the System V print service.
4. _________ is the System V print service daemon.
5. _________ filters are executed by lpsched and do NOT
interact with the printer.
6. _________ filters are executed by the interface program
and DO interact with the printer.
7. The printer type associates a printer with an entry in
_________.
Copyright IBM Corporation 2005
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Provide students with a chance to review and consolidate whats been
covered so far.
Details
Additional Information
Transition Statement Next, lets cover how to add a System V printer to the print
service.
G-35
Instructor Guide
AU1411.0
Notes:
Introduction
Creating a System V printer is done in two steps:
- Creating the printer device
- Creating the System V printer
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Identify the basic steps in adding a printer.
Details No need to spend much time here.
Additional Information
Transition Statement The first step is creating the device.
G-37
Instructor Guide
Printer device attributes are not used when printing from AIX or System V print
subsystem:
# lsplp lp0
device = /dev/lp0
(+ yes
! no)
CURRENT FORMATTING PARAMETERS (ignored by qprt, lpr, and lp commands)
Note: -p + causes the other formatting parameters to be ignored.
-p !
pass-through?
-c +
send carriage returns?
-l 64
page length (lines)
-n +
send line feeds?
-w 80
page width (columns)
-r +
carriage rtn after line feed?
-i 0
indentation (columns)
-t !
suppress tab expansion?
-W !
wrap long lines?
-b +
send backspaces?
-C !
convert to upper case?
-f +
send form feeds?
CURRENT ERROR PROCESSING PARAMETERS
-T 300 timeout value (seconds)
-e !
return on error?
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
Printer devices can be used by either print subsystem. Printer devices may be added
using SMIT, the Web-based System Manager, or the command line using mkdev.
Connecting printers
Local printers may be connected in one of two ways: serial or parallel.
Network-attached printers may be connected directly to the network, or they may be
connected to a remote print server host that is accessed over the network.
V3.1.0.1
Instructor Guide
AP
between your printer and the printer device driver software. You should chose a printer
device that is:
- A similar kind of printer, for example: laser, ink jet, and so forth
- Similar in speed to your actual printer
In the example in the visual, lp0 has been configured using the parallel port and the
Lexmark Optra Color 1200 printer device driver; however, the physical printer is actually
a Canon Bubble Jet. These printers are similar enough that the printer device operates
correctly for the Canon printer.
G-39
Instructor Guide
Instructor Notes:
Purpose Review some basics on printer devices
Details Creating devices should be a review for this audience. They will get a chance to
create a printer device in the exercise.
Students should be aware that an exact match between physical printer and printer device
is usually not necessary.
Also, most of the attributes shown using lsattr or splp are not used when printing from
the AIX or System V print subsystem. Further, if you are printing directly to the device, you
can override these attributes by putting the printer device in pass though mode using splp.
Additional Information
Transition Statement The next step in creating a System V printer is using lpadmin,
which creates the printer configuration file.
V3.1.0.1
Instructor Guide
AP
Print server
daemon
(lpsched)
AU1411.0
Notes:
Introduction
System V printers are added, or modified, using lpadmin, SMIT or the Web-based
System Manager. This visual shows a printer created using lpadmin.
G-41
Instructor Guide
Instructor Notes:
Purpose Describe the contents of the printer configuration file.
Details
Additional Information
Transition Statement In this example, we set the printer type to bj-300. Lets take a
closer look at what the printer type is.
V3.1.0.1
Instructor Guide
AP
Printer Types
terminfo source for printers:
/usr/share/lib/terminfo/svprint.ti
Compiled terminfo file for a Canon Bubble Jet
(printer type bj-300):
/usr/share/lib/terminfo/b/bj-300
To compile terminfo source:
# tic svprint.ti
To view bj-300 terminfo entry:
# infocmp bj-300
J
terminfo
database
ing
reen
c
s
ob
Printe
r
initiali
zation
Print server
daemon
(lpsched)
Interface
program
AU1411.0
Notes:
Introduction
System V printer types are defined in the terminfo database. Printer types are similar in
function to the virtual printer definition files used by the AIX print subsystem. Unlike AIX
virtual printer definitions, one terminfo entry may be used for a number of different
System V printers.
Purpose
Printer type information is used by lpsched to perform job screening and by the
interface program to initialize the printer.
G-43
Instructor Guide
Organization
Terminfo entries are binaries which are compiled from terminfo source files. The
database resides at /usr/lib/terminfo. By convention, source files reside in
/usr/share/lib/terminfo and are named *.ti. For example, the source file for the System
V printer types supplied with AIX 5L is svprint.ti. Each compiled terminfo entry is a
separate file which resides in /usr/lib/terminfo/X, where X is the first letter of the
terminfo name. For example, the terminfo entry for printer type bj-300, is
/usr/lib/terminfo/b/bj-300.
Commands
Use the tic command to compile a terminfo source file. Use infocmp to display a
terminfo entry, or to compare two entries.
No printer type
If you do not specify a printer type, it defaults to unknown. Depending on how you are
using the printer, this may not be a problem. It does mean that:
- Your printer is not initialized by the interface program.
- Any -o options on the lp command line (such as -o cpi, -o width, -o length,
and so forth) cannot be used
- Some simple control characters may not function correctly
The exception to this would be if you have a printer specific interface script which
generates the command sequences internally in the script without consulting terminfo.
V3.1.0.1
Instructor Guide
AP
More information
If you believe that you need to create a new terminfo entry for your printer, see Printing
for Fun and Profit under AIX 5L (Redbook), Appendix C. Virtual printer colon files and
System V terminfo.
G-45
Instructor Guide
Instructor Notes:
Purpose Describe what a printer type is and how to choose one for your printer.
Details Usually choosing a printer type is easy. Choose your model from the model.stz
file or the Web-based System Manager, or if you cant find your model, search for a similar
printer.
Additional Information
Transition Statement Next, lets take a look at printer interface programs.
V3.1.0.1
Instructor Guide
AP
Interface Programs
interface
program
fast filters
default
fast filter
optional
fast filter
printer device
AU1411.0
Notes:
Introduction
The interface is responsible for performing the functions as listed in the visual:
- Initialize the printer port using stty
- Initialize the printer hardware using commands from terminfo
- Print the banner page
- Print copies of the print job using a filter
- Handle any printer errors from the filter and return exit status (success or failure)
back to lpsched
G-47
Instructor Guide
lpsched
lpsched calls the printers interface program for local print requests. lpsched passes
information to the interface program. Some of the information sent to the interface
program includes:
- Terminfo entry to use
- Fast filter to use
- Character set (optional)
- Number of copies
- Files to print
Note: Interface programs are sometimes mistakenly referred to as print drivers.
Administrative concerns
When a printer is created, a copy is made of the interface script for that printer. For
example, if printer myprinter is defined to use the PS interface, the
/usr/lib/lp/model/PS file is copied to /etc/lp/interfaces/myprinter.
If you need to modify a printers interface script, modify the copy in /etc/lp/interfaces. If
you want to change the template for all future printers created, modify the source file.
More information
If you need to create a custom interface script, you can use the standard or PS script as
a template. For more information, refer to: Printing for Fun and Profit under AIX 5L
(Redbook), Chapter 4. System V Advanced Printing.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe the purpose of the interface program and how to choose an interface
program for your printer.
Details
Additional Information .
Transition Statement When a job is submitted to a queue, request files are created in
the spool directory.
G-49
Instructor Guide
AU1411.0
Notes:
Introduction
Each time a user sends a print job to a printer, the print service creates one or more files
in the spool directory (/var/spool/lp/tmp/<hostname>) that describe the job request.
These files remain in this directory while the job is in the queue waiting to be printed.
When the job is finished printing, information in the files is appended to the log file
/var/lp/logs/requests and the files are removed from the spool directory.
V3.1.0.1
Instructor Guide
AP
Copying files
Normally, if you send a file to the print service using the lp command, the print service
does not copy your file to the spool directory, but instead just reads from the original.
This means that if you delete the original copy after you submit the print request, but
before it is printed, the print request fails. In some circumstances a copy is created. It is
also possible to request that the print service create a copy of the print file in the spool
directory before printing. Files are copied under the following circumstances:
- The job is submitted using lp -c. (The default for the lp command is NOT to copy.)
- The job is submitted using lpr, without the -s flag. (The default for the lpr
command IS to copy.)
- The job is received from a remote system. (In this case, the file does not exist on the
print server system, and so must be copied.)
- Copying files has been enabled as the default by issuing the
lpadmin -O copy command.
Note: This flag sets the value of the copy-files parameter in the /etc/default/lp file to
on.
Files in /var/spool/lp/tmp/<hostname>
This directory contains the following files:
File
Description
.SEQF
X-0
X-N
G-51
Instructor Guide
Example
In the example in the visual, job 10 was created without copying while copying was
requested for job 11. Excerpts from the request files are shown in the visual. In the
request file:
- C indicates the number of copies requested.
- D indicates the name of the printer.
- F indicates the name of the file to print.
- O indicates additional information. In this case, the locale and the name and size of
the original file (flist=).
Notice that for job 11, /var/spool/lp/tmp/kca48/11-1 is the file to print. This would be a
copy of the original file, in this case: /etc/passwd.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe the request and log files and copying issues.
Details
Additional Information The Guide to Printers and Printing describes different paths for
the spool directories (/usr/spool/...). The System V directories are linked extensively.
/usr/spool is linked to /var/spool.
Also, /etc/lp/logs is a link to /var/lp/logs. And /var/spool/lp/admins/lp is a link to /etc/lp.
The Guide to Printers and Printing says the log is /usr/spool/lp/logs/requests. This file
didnt exist on the system used for development. Instead the log file was
/var/lp/logs/requests as noted in the student notes.
Currently skulker does not address pruning the System V request log.
Transition Statement Now that weve covered the basic printing process, lets take a
look at the commands used to manage System V printers.
G-53
Instructor Guide
Managing Printers
Start printing:
enable printer
Stop printing:
disable [-c] [-r reason] [-W] printer
Start queuing:
accept printer
Stop queuing:
reject [-r reason] printer
Creating and enabling a new printer:
mkdev
lpadmin
accept
enable
Copyright IBM Corporation 2005
AU1411.0
Notes:
Introduction
The System V print subsystem allows you to control queueing and printing separately.
enable / disable
The enable and disable commands control whether jobs in the queue are printed. For
example, if you need to perform service on the physical printer, or need to mount a
form, use disable to stop printing. This allows users to continue to submit jobs, but
nothing is printed while you perform service on the printer. When service is complete,
use enable to restart printing and jobs from the queue are again printed.
V3.1.0.1
Instructor Guide
AP
disable syntax
The table shows options to disable.
Option
Description
-c
-r reason
-W
accept / reject
The accept and reject commands control whether the printer adds print requests to
the printer queue. For example, use reject to stop queueing for a printer if you need to
change queue parameters. Any jobs remaining in the queue are printed. When the
queue is empty, make the desired changes and then use accept to restart the queue
using the new parameters.
reject syntax
The table shows options to reject.
Option
Description
Assign a reason for rejecting requests. The reason
is reported by lpstat -a. The flag reason must be
quoted if it includes spaces.
-r reason
G-55
Instructor Guide
Instructor Notes:
Purpose Describe the commands used to control System V printers.
Details The main idea here is the difference between queueing jobs (accept/reject)
and printing jobs (enable/disable).
Additional Information
Transition Statement Now, lets take a look at the commands available to users to
utilize the print service.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
This visual summarizes the commands (accessible by any user) to utilize the System V
print service. Refer to the respective man page for detailed information on the many
options available.
G-57
Instructor Guide
started printing, the changes are accepted, if the printer can handle them. If the job has
started printing, it is stopped and restarted from the beginning. If the job has finished,
the change is rejected.
Description
cancel request-id-list
cancel printer-list
cancel -u user-list
[printer-list]
Check status
Use lpstat to check status. There are many options. Several of the most useful ones
are shown in the table. Options can be combined to get the output you need. If the list
argument is omitted, lpstat reports on all of that type of object. If you have many
printers, omitting list may make the output of lpstat unreasonably long.
Option
Description
Reports the status of print requests. list can be
printers, classes, or request-ids. if -l is used,
additional status for each job is reported.
-o [list] [-l]
-p [list] [-D]
[-l]
-a [list]
-u [list]
-t [list]
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Summarize the System V user commands.
Details Let students know that we will not be going through all the options for these
commands. This is an overview to familiarize them with the commands.
Additional Information
Transition Statement Lets take time out for another review.
G-59
Instructor Guide
Let's Review 2
1. A _________ is a group of printers.
2. Use the _________ command to enable a printer to begin
accepting print requests.
3. Use the _________ command to enable a printer to begin
printing print requests.
4. AIX 5L includes two interface programs _________ and
_________.
5. If you want the print service to copy a file to the spool
directory, you should use the _________ option to the lp
command.
6. Use _________ to display status of outstanding print
requests.
7. The System V print log file is _________.
Copyright IBM Corporation 2005
AU1411.0
Notes:
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Another review
Details
Additional Information
Transition Statement Now that weve covered the basics, lets look a couple of
advanced topics, beginning with using filters.
G-61
Instructor Guide
Using Filters
Purpose:
Convert file content
Interpret special print modes
Handle printer faults
Filter types:
Slow filters run in background
Fast filters interact with printer
Using filters:
Filters must be registered
Printer content must be set
File content must be set
Managing filters:
Filter definition files:
/etc/lp/fd/*.fd
Registering a filter:
# lpfilter -f filter_name -F filter_definition_filename
Listing filters:
# lpfilter -f [ filter_name | all ] -l
Removing a filter:
# lpfilter -f filter_name -x
Copyright IBM Corporation 2005
AU1411.0
Notes:
Purpose
Well start by reviewing the purpose of using filters. Filters are used by the System V
print subsystem to perform three functions:
- Converting file content:
For example, converting a simple text file to PostScript so that it can be printed on a
PostScript printer.
- Interpreting special print modes requested by the user:
This could include print modes such as landscape page orientation, reverse page
order, and so forth.
- Detecting printer faults:
Printer faults include such things as printer out of paper or printer off line.
V3.1.0.1
Instructor Guide
AP
Filter types
There are two types of filters:
- Slow filters are filters that incur a lot of overhead and do not need to be connected to
the printer while they run.
- Fast filters interact directly with the printer. They can control the printer and receive
status back from the printer, Some fast filters also perform file conversion tasks like
slow filters.
Using filters
In order for filters to work correctly, a number of things need to be taken care of:
- Filters must be registered:
While the System V print subsystem includes a number of useful filters, the print
service will not use them until they are registered. Use lpfilter to register a filter.
- Printer content must be set:
The printer content types must be set correctly
(using lpadmin -I content_type_list) so that the print service knows what types
of files the printer can accept without filtering. If not set, printer content type defaults
to simple.
- File content must be set:
If a print job contains content other than simple, the file content must be set when
the print job is submitted (using lp -T content_type) so that the print service
knows what the files content type is. If not set, the print service assumes the file
content is simple.
Description
Command
Input types
Output types
Printer types
Printers
Normally, a filter would work with all printers that accept the
output type, however you can restrict which printers may use a
filter if this is desirable
G-63
Instructor Guide
Standard filters
The AIX 5L System V print subsystem includes a number of filters. Filter definitions for
these filters are /etc/lp/fd/*.fd.
Managing filters
Use the lpfilter command to register a filter. For example, the dpost filter is used to
convert troff files to PostScript. The dpost filter definition file is /etc/lp/fd/dpost.fd. To
register the dpost filter, enter:
# lpfilter -f dpost -F /etc/lp/fd/dpost.fd
Registered filter definitions are stored in the /etc/lp/filter.table file, however, you should
not directly edit this file. Use lpfilter to manage the registered filters.
If you wish to change how a filter is used, edit the filter definition file and re-enter the
lpfilter command.
To list a registered filter (for example to list the dpost filter):
# lpfilter -f dpost -l
To list all registered filters:
# lpfilter -f all -l
To remove a registered filter (for example to remove the dpost filter):
# lpfilter -f dpost -x
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe the purpose of print filters. Describe how to register, list and remove
print filters.
Details We start with a review of the purpose of filters and filter types.
Additional Information Why are filters necessary in UNIX printing? In PC-based
printing, printer device drivers provide a standard API and any application can output
directly to any printer installed in the system. In UNIX printing, each application must
provide their own printer-specific output. Print filters hide the printer-specific details from
the applications.
Transition Statement Next, lets look at another System V feature: printing using forms.
G-65
Instructor Guide
Using Forms
Registering forms with the print service
Requesting a form for a print job
Alerting the operator to mount a form
Mounting a form
Unmounting a form
Controlling access to forms
Displaying information
AU1411.0
Notes:
Introduction
A form is a preprinted sheet of paper which can be loaded into a printer in place of plain
paper. Some examples are company letterhead, checks, invoices, receipts, and so
forth.
The System V print subsystem facilitates printing to forms by providing the functions
shown in the visual. We summarize the procedures for using forms here.
Note: The print service does not position print output on a form; this is the responsibility
of the application.
V3.1.0.1
Instructor Guide
AP
character pitch, alignment pattern, and so forth. The alignment pattern is sample output
that can be used to correctly position the form when it is mounted. Once you have
created the definition file, register the form using:
# lpforms -f form_name -F form_definition_file
Description
Send alerts to user lp when form_name is
requested. alert_type can be:
mail: Send mail to user lp.
write: Send message to the terminal where lp is
logged in.
-A alert_type
-W interval
G-67
Instructor Guide
Mounting a form
Mounting a form lets the print service know that the specified form is now loaded onto
the printer. Any queued jobs using that form can now proceed. Use the following steps
to mount a form:
Step
Action
1.
2.
-o filebreak
3.
4.
5.
6.
Enable the printer. Queued jobs for this form will now be printed:
# enable printer_name
Unmounting a form
To unmount a form, follow these steps:
Step
Action
1.
2.
3.
4.
V3.1.0.1
Instructor Guide
AP
G-69
Instructor Guide
Instructor Notes:
Purpose Describe the process of using forms.
Details This provides an overview of using forms. Actually, really the only thing not
covered is the details of the form description file.
Additional Information
Transition Statement In the next visual, well take a look at the kinds of issues you
need to consider when adding a System V printer.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
This visual lists a number of issues which need to be considered when defining a local
System V printer.
Printer name
The printer name should make it easy for users to identify the printer. You can use any
name you wish, with the following restrictions:
- The name must be a valid file name for the file system you are using
- The name cannot begin with a dash (-), although a dash can be used in other
positions in the name
G-71
Instructor Guide
Printer device
If you are configuring a local printer, you must decide what printer device driver to use.
If AIX or your printer manufacturer does not provide a printer device specific to your
printer, you can probably use a printer device for a similar printer.
Printer type
In general, it is not critical that you find an exact match for your printer model, just that it
be a similar kind of printer.
Class
Do you want to include this printer in an existing printer class or define a new class?
Classes can give users flexibility. By printing to a class of printers, any of which meet
their requirements, they may be able to get their job printed more quickly.
Alerts
When there is a problem with a printer, how should the print service alert the print
administrator? Printer alerts are configured on a per printer basis using the -A flag to
lpadmin. Refer to the lpadmin man page for complete details.
Forms
Do you require any special forms? If so, consider these questions:
- How should the print service alert the print administrator?
- Do you need to control access to any forms?
Banner pages
The System V print subsystem allows you to control the printing of banner pages. The
default is to print a banner page with every print job. Users can request no banner page.
The print service rejects this request unless enabled to allow skipping the banner using
V3.1.0.1
Instructor Guide
AP
the -o nobanner option to lpadmin. The table summarizes the relevant command
options.
Option
lpadmin -o banner
lpadmin -o nobanner
lp -o nobanner
Description
Banners are required (default)
Users are allowed to request that the banner not be
printed
Request print job be printed without a banner
Access policy
Do you need to control access to a printer? The System V print subsystem allows you to
control access to printers using an allow-list, a deny-list, or both. These lists can be
created using the -u allow:user-list or -u deny:user-list options to lpadmin and
function similarly to the cron.allow and cron.deny files. Refer to the lpadmin man page
for complete details.
G-73
Instructor Guide
Instructor Notes:
Purpose Describe the planning process for defining a local system V printer.
Details This is mostly review, but a couple of topics have not been covered yet: alerts,
banner pages, and access policy.
Additional Information
Transition Statement The next three visuals provide an overview of network printing
using the System V print subsystem.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
This visual provides an overview of the network printing capabilities of the System V
print subsystem. More details about configuring a AIX system as a print server or print
client are provided in the next two visuals.
Print server
The System V print subsystem can be configured so that a locally attached printer on
your system (the print server) can be used to print requests from remote machines (the
print clients) which are running the LPD protocol as defined in Request for Comments
(RFC) 1179.
G-75
Instructor Guide
Print client
You can configure the System V print subsystem to print to any network destination that
supports LPD as defined in Request for Comments (RFC) 1179. A network destination
in this sense can be a:
- Printer (directly connected to the network) that is running LPD
- System (with locally attached printers) that is running LPD
lpNet
The lpNet daemon is used by both network printing clients and servers. lpNet is
automatically started by lpsched.
On client machines, lpsched sends the print request to lpNet for transmission to the
print server. No formatting or filtering is done on the client side.
On server machines, lpNet receives the remote print request and sends it to lpsched.
If the request can be printed, lpsched processes the print request as it would any local
request. Printer type, filtering for content and other formatting is all done on the server.
JetDirect-attached printers
The System V print subsystem also supports printing to printers that attach to the
network using the Hewlett-Packard JetDirect interface. Configuring the print subsystem
for JetDirect printers is not included in this class. Refer to Printing for Fun and Profit
under AIX 5L (Redbook) for additional information about this capability.
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe the network printing capabilities of the System V print subsystem.
Details
Additional Information We are only covering LPD remote printing. JetDirect is not
covered.
Transition Statement In the next visual, well discuss the steps to configure a network
print server.
G-77
Instructor Guide
AU1411.0
Notes:
Introduction
Configuring a network print server is done in two steps:
1. Registering the remote systems (clients) allowed to use the server
2. Granting or denying access to individual remote users or groups of remote users
V3.1.0.1
Instructor Guide
AP
lpsystem syntax
# lpsystem [-T timeout] [-R retry] [-y comment] system_name
# lpsystem -l system_name
# lpsystem -r system_name
The table explains the usage of the various options.
Option
system_name
-T timeout
Description
This parameter specifies the name or IP address of
the remote system. system_name can be * to allow
access from any system.
This option specifies the length of time the print
service will allow a network connection to be idle. If
idle time exceeds timeout, the connection is
dropped. It will be re-established if there are more
requests. timeout can be:
n: never timeout. This is the default.
0: timeout immediately.
N: timeout after N minutes.
This option specifies the length of time to wait to
re-establish a connection if the connection was
abnormally dropped. retry can be:
-R retry
-y comment
-l system_name
-r system_name
G-79
Instructor Guide
Syntax
# lpadmin -p printer -u allow:user_list | -u deny:user_list
The table shows the syntax for this usage of the lpadmin command.
Option
-p printer
-u allow
-u deny
user_list
Description
Specifies the name of the printer on the server.
This parameter specifies the users who are allowed
access.
This parameter specifies the users who are denied
access.
This is a comma or space separated (must be
quoted if space separated) list of users to allow or
deny. The list can include any of the following:
userID: a user on the local system
system_name!userID: a user on system_name
system_name!all: all users on system_name
all!userID: a user on all systems
all!all: all users on all systems
V3.1.0.1
Instructor Guide
AP
Instructor Notes:
Purpose Describe the process of configuring a network server.
Details Discuss the options to lpsystem and lpadmin.
Additional Information
Transition Statement Now, lets look at configuring a client.
G-81
Instructor Guide
AU1411.0
Notes:
Introduction
Configuring your system to print using a remote LPD printer is done in three steps:
1. Register remote system (the printer or print server) on the client
2. Define the printer queue on the client
3. accept and enable the printer queue on the client
Of course, the print server or network attached printer must already have been
configured to accept your requests.
V3.1.0.1
Instructor Guide
AP
Description
-p local_name
-s server_name
server_printer_name
G-83
Instructor Guide
Instructor Notes:
Purpose Describe how to configure a print client.
Details
Additional Information
Transition Statement The next two visuals provide a summary of the System V
commands. First the administrative commands.
V3.1.0.1
Instructor Guide
AP
Activates the named printers so they will print from the queue.
disable
cancel
lpadmin
lpsched
lpshut
AU1411.0
Notes:
Introduction
This visual provides a brief summary of all the System V administrative commands. A
summary of the options to lpadmin is included on the next page. Refer to the relevant
man page for complete information.
For a comparison of the commands for the System V print subsystem and the AIX print
subsystem, refer to:
Printing for Fun and Profit under AIX 5L (Redbook)
Appendix A. Print Tasks and Commands
G-85
Instructor Guide
lpadmin syntax
The most frequently used administrative command is lpadmin. The following table
summarizes the command syntax. Again, see the man page for a complete description.
Adding or changing a printer:
# lpadmin -p printer [options]
Removing a destination (printer or class):
# lpadmin -x destination
Option
Description
-p printer
-v device
-s server
[!server_printer_name]
-x destination
-T printer_type
-I content_type_list
V3.1.0.1
Instructor Guide
AP
Option
Description
-c class
-r class
-O {copy|nocopy}
-A alert_type
[-W minutes]
-u allow:user_list
-u deny:user_list
G-87
Instructor Guide
Instructor Notes:
Purpose Describe the various System V administrative commands.
Details Students can use these tables as a quick reference if they cant remember
which command to use.
Additional Information
Transition Statement The next visual provides a summary of user commands.
V3.1.0.1
Instructor Guide
AP
Description
cancel
lp
lpstat
AU1411.0
Notes:
Introduction
This visual provides a brief summary of the System V user commands. Refer to the
relevant man page for complete information.
cancel
The cancel command is used to cancel print jobs, as shown in the table. Regular users
can only cancel their own jobs.
lpstat
The lpstat command displays information about the current status of the line printer.
G-89
Instructor Guide
lp syntax
Use the lp command to submit jobs to the System V print service. There are many
options. The following table summarizes the most commonly used options.
Options can be entered in any order, however the files to be printed must occur at the
end of the command line.
# lp -d destination [options] files
Option
Description
-d destination
files
-c
-n number
-T content_type
-f form_name
-o options
-m
V3.1.0.1
Instructor Guide
AP
Option
Description
Print the job according to the modes in mode_list.
This option may only be used if there is a filter
available to handle the requested modes;
otherwise the print job is rejected. The allowed
modes are locally defined (in the filter definition
files). Modes can include such items as: reverse
order, landscape mode, print only selected page
numbers, and so forth.
-y mode_list
G-91
Instructor Guide
Instructor Notes:
Purpose Describe the various System V commands.
Details Students can use these tables as a quick reference if they cant remember
which command to use.
Additional Information
Transition Statement Checkpoint.
V3.1.0.1
Instructor Guide
AP
Checkpoint
1. List two advantages of the System V print subsystem.
___________________________________________
2. List two advantages of the AIX print subsystem.
___________________________________________
3. What command is used to switch from AIX to System V
printing? __________________
4. lpsched uses information in _________ and _________ to
screen print jobs.
5. The interface program uses commands in _________ to
initialize the printer.
6. _________ are used to convert file content.
7. Use the _________ command to manage filters.
8. _________ is used to create or modify a System V printer.
9. _________ is used to create a printer device.
Copyright IBM Corporation 2005
AU1411.0
Notes:
G-93
Instructor Guide
Instructor Notes:
Purpose Review the unit.
Details
Checkpoint Solutions
1.
2.
3.
6.
7.
8.
9.
Additional Information
Transition Statement Introduce the optional exercise.
V3.1.0.1
Instructor Guide
AP
AU1411.0
Notes:
Introduction
This optional exercise can be found in your Student Exercise Guide.
G-95
Instructor Guide
Instructor Notes:
Purpose Introduce the exercise.
Details
Additional Information
Transition Statement Summarize the unit.
V3.1.0.1
Instructor Guide
AP
Unit Summary
AIX 5L supports both the AIX print subsystem and the
System V subsystem
Either System V or AIX (not both) can be active at one time
The System V print subsystem provides compatibility with
printing solutions on many other UNIX variants
The System V print subsystem provides the capability of
supporting a wide range of printers and printing needs, but
system management is somewhat complex
AU1411.0
Notes:
G-97
Instructor Guide
Instructor Notes:
Purpose Summarize the unit.
Details
Additional Information
Transition Statement
V3.1.0.1
Instructor Guide
glos
Glossary
Note:
The entries in this glossary were developed a
number of years ago and indicate the use of various
terms at a particular point in UNIX history. Hence,
some of the definitions may not be applicable to
current UNIX implementations such as AIX 5L, and
some other statements in the entries may not be
current. However, this glossary still provides
valuable information regarding the historical use of
the terms listed here.
A
This glossary includes terms and definitions from:
The American National Standard Dictionary for
Information Systems, ANSI X3.172-1990,
copyright 1990 by the American National
Standards Institute (ANSI). Copies may be
purchased from the American National
Standards Institute, 11 West 42nd Street, New
York, New York 10036. Definitions are identified
by the symbol (A) after the definition.
The ANSI/EIA Standard 440-A, Fiber Optic
Terminology. Copies may be purchased from
the Electronic Industries Association, 2001
Pennsylvania Avenue, N.W., Washington, DC
20006. Definitions are identified by the symbol
(E) after the definition.
The Information Technology Vocabulary,
developed by Subcommittee 1, Joint Technical
Committee 1, of the International Organization
for Standardization and the International
Electrotechnical Commission (ISO/IEC
JTC1/SC1). Definitions of published parts of this
vocabulary are identified by the symbol (I) after
the definition; definitions taken from draft
international standards, committee drafts, and
working papers being developed by ISO/IEC
JTC1/SC1 are identified by the symbol (T) after
the definition, indicating that final agreement has
not yet been reached among the participating
National Bodies of SC1.
The Network Working Group Request for
Comments: 1208.
The following cross-references are used in this
glossary:
Contrast with: This refers to a term that has an
opposed or substantively different meaning.
Synonym for: This indicates that the term has the
same meaning as a preferred term, which is defined
in its proper place in the glossary.
Glossary
X-1
Instructor Guide
B
background (process) A process is in the
background when it is running independently of the
initiating terminal. It is specified by ending the
ordinary command with an ampersand (&). The
parent of the background process does not wait for
its death.
backup diskette A diskette containing information
copied from another diskette. It is used in case the
original information is unintentionally destroyed.
Berkeley Software Distribution Disseminating arm
of the UNIX operating system community at the
University of California at Berkeley; commonly
abbreviated BSD. Complete versions of the UNIX
operating system have been released by BSD for a
number of years; the latest is numbered 4.3. The
phrase Berkeley extensions refers to features and
functions, such as the C shell, that originated or
were refined at UC Berkeley and that are now
considered a necessary part of any fully configured
version of the UNIX operating system.
bit bucket The AIX file /dev/null is a special file
which will absorb all input written to it and return no
data (null or end of file) when read.
block A group of records that is recorded or
processed as a unit.
block device A device that transfers data in fixed
size blocks. In AIX, normally 512 or 1024 bytes.
block special file An interface to a device capable
of supporting a file system.
booting Starting the computer from scratch (power
off or system reset).
break key The terminal key used to unequivocally
interrupt the foreground process.
BSD Berkeley Software Distribution.
BSD 2.x - PDP-11 Research
BSD 4.x - VAX Research
BSD 4.3 - Current popular VAX version of UNIX.
button
1. A word, number, symbol, or picture on the
screen that can be selected. A button may
represent a command, file, window, or value, for
example.
2. A key on a mouse that is used to select buttons
on the display screen or to scroll the display
image.
byte The amount of storage required to represent
one character; a byte is 8 bits.
C
C The programming language in which the UNIX
operating system and most UNIX application
programs are written. The portability attributed to
UNIX operating systems is largely due to the fact
that C, unlike other higher level languages, permits
programmers to write systems-level code that will
work on any computer with a standard C compiler.
X-2
Instructor Guide
D
DASD Direct Access Storage Device. IBM's term for
a hard disk.
device driver A program that operates a specific
device, such as a printer, disk drive, or display.
device special file A file which passes data directly
to/from the device.
directory A type of file containing the names and
controlling information for other files or other
directories.
directory pathname The complete and unique
external description of a file giving the sequence of
connection from the root directory to the specified
directory or file.
diskette A thin, flexible magnetic plate that is
permanently sealed in a protective cover. It can be
used to store information copied from the disk.
diskette drive The mechanism used to read and
write information on diskettes.
display device An output unit that gives a visual
representation of data.
display screen The part of the display device that
displays information visually.
E
echo To simply report a stream of characters, either
as a message to the operator or a debugging tool to
see what the file name generation process is doing.
editor A program used to enter and modify
programs, text, and other types of documents.
environment A collection of values passed either to
a C program or a shell script file inherited from the
invoking process.
escape The backslash \ character specifies that
the single next character in a command is ordinary
text without special meaning.
Ethernet A baseband protocol, invented by the
XEROX Corporation, in common use as the local
area network for UNIX operating systems
interconnected via TCP/IP.
event One of the previous lines of input from the
terminal. Events are stored in the (Berkeley) History
file.
event identifier A code used to identify a specific
event.
execution permission For a file, the permission to
execute (run) code in the file. A text file must have
execute permission to be a shell script. For a
directory, the permission to search the directory.
F
field A contiguous group of characters delimited by
blanks. A field is the normal unit of text processed by
text processes like sort.
field separator The character used to separate one
field from the next; normally a blank or tab.
FIFO First In, First Out. In AIX, a FIFO is a
permanent, named pipe which allows two unrelated
processes to communicate. Only related processes
can use normal pipes.
file A collection of related data that is stored and
retrieved by an assigned name. In AIX, files are
grouped by directories.
file index Sixty-four bytes of information describing
a file. Information such as the type and size of the
file and the location on the physical device on which
the data in the file is stored is kept in the file index.
This index is the same as the AIX Operating System
i-node.
filename expansion or generation A procedure
used by the shell to generate a set of filenames
based on a specification using metacharacters,
which define a set of textual substitutions.
file system The collection of files and file
management structures on a physical or logical
mass storage device, such as a diskette or minidisk.
filter Data-manipulation commands (which, in UNIX
operating systems, amount to small programs) that
take input from one process and perform an
operation yielding new output. Filters include
editors, pattern-searchers, and commands that sort
or differentiate files, among others.
fixed disk A storage device made of one or more
flat, circular plates with magnetic surfaces on which
information can be stored.
fixed disk drive The mechanism used to read and
write information on a fixed disk.
flag See Options.
foreground (process) An AIX process which
interacts with the terminal. Its invocation is not
followed by an ampersand.
formatting The act of arranging text in a form
suitable for reading. The publishing equivalent to
compiling a program.
fsck A utility to check and repair a damaged file
structure. This normally results from a power failure
or hardware malfunction. It looks for blocks not
assigned to a file or the free list and puts them in the
free list. (The use of blocks not pointed at cannot be
identified.)
free list The set of all blocks not assigned to a file.
full path name The name of any directory or file
expressed as a string of directories and files
beginning with the root directory.
G
gateway A device that acts as a connector between
two physically separate networks. It has interfaces
Copyright IBM Corp. 1997, 2005
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Glossary
X-3
Instructor Guide
H
hardware The equipment, as opposed to the
programming, of a system.
header A record at the beginning of the file
specifying internal details about the file.
heterogeneous Descriptor applied to networks
composed of products from multiple vendors.
hierarchy A system of objects in which each object
belongs to a group. Groups belong to other groups.
Only the head does not belong to another group. In
AIX this object is called the Root Directory.
highlight To emphasize an area on the display
screen by any of several methods, such as
brightening the area or reversing the color of
characters within the area.
history A list of recently executed commands.
home (directory). 1. A directory associated with an
individual user.
home (directory). 2. Your current directory on login
or after issuing the cd command with no argument.
homogeneous Descriptor applied to networks
composed of products from a single vendor.
hypertext Term for on-line interactive
documentation of computer software; to be included
with AIX.
I
IEEE Institute of Electrical and Electronics
Engineers. A professional society active in
standards work, the IEEE is the official body for work
on the POSIX (Portable Operating System for
Computer Environments) open system interface
definition.
index See file index.
indirect block A file element which points at data
sectors or other indirect blocks.
init The initialization process of AIX. The ancestor of
all processes.
initial program load The process of loading the
system programs and preparing the system to run
jobs.
X-4
J
job A collection of activities.
job number An identifying number for a collection of
processes devolving from a terminal command.
K
kernel The part of an operating system that contains
programs that control how the computer does its
work, such as input/output, management and control
of hardware, and the scheduling of user tasks.
keyboard An input device consisting of various keys
allowing the user to input data, control cursor and
pointer locations, and to control the user/work
station dialogue.
kill To prematurely terminate a process.
kill character The character which erases an entire
line (usually @).
L
LAN Local Area Network. A facility, usually a
combination of wiring, transducers, adapter boards,
and software protocols, which interconnects
workstations and other computers located within a
department, building, or neighborhood. Token-Ring
and Ethernet are local area network products.
libc A basic set of C callable routines.
library In UNIX operating systems, a collection of
existing subroutines that allows programmers to
make use of work already done by other
programmers. UNIX operating systems often include
separate libraries for communications, window
management, string handling, math, and so forth.
Instructor Guide
M
mail The process of sending or receiving an
electronically delivered message within an AIX
system. The message or data so delivered.
make Programming tool included in most UNIX
operating systems that helps make a new program
out of a collection of existing subroutines and
utilities, by controlling the order in which those
programs are linked, compiled, and executed.
map The process of reassigning the meaning of a
terminal key. In general, the process of reassigning
the meaning of any key.
memory Storage on electronic memory such as
random access memory, read only memory, or
registers. See storage.
message Information displayed about an error or
system condition that may or may not require a user
response.
motd Message of the day. The login billboard
message.
MotifT The graphical user interface for OSF,
incorporating the X Window System. Behavior of this
interface is compatible with the IBM/Microsoft
Presentation Manager user interface for OS/2. Also
called OSF/Motif.
mount A logical (that is, not physical) attachment of
one file directory to another. remote mounting
allows files and directories that reside on physically
separate computer systems to be attached to a local
system.
mouse A device that allows you to select objects
and scroll the display screen by means of buttons.
N
named pipe See FIFO.
Network File System (NFST) A program developed
by SUN Microsystems, Inc. for sharing files among
systems connected via TCP/IP. IBM's AIX, VM, and
MVS operating systems support NFS.
NFST See Network File System.
NIST National Institute of Science and Technology
(formerly the National Bureau of Standards).
node An element within a communication network.
Computer
Terminal
Control Unit
null A term denoting emptiness or nonexistence.
null device A device used to obtain empty files or
dispose of unwanted data.
null string A character string containing zero
characters.
O
object-oriented programming Method of
programming in which sections of program code and
data are represented, used, and edited in the form of
objects, such as graphical elements, window
components, and so forth, rather than as strict
computer code. Through object-oriented
programming techniques, toolkits can be designed
that make programming much easier. Examples of
object-oriented programming languages include
Pareplace Systems, Inc.'s Smalltalk-80T, AT&T's
C++T, and Stepstone Inc.'s Objective-CR.
oem original equipment manufacturer. In the context
of AIX, OEM systems refer to the processors of a
heterogeneous computer network that are not made
or provided by IBM.
Open Software FoundationT (OSF) A non-profit
consortium of private companies, universities, and
research institutions formed to conduct open
technological evaluations of available components
of UNIX operating systems, for the purpose of
assembling selected elements into a complete
Glossary
X-5
Instructor Guide
P
packet switching The transmission of data in small,
discrete switching packets rather than in streams,
for the purpose of making more efficient use of the
physical data channels. Employed in some UNIX
system communications.
page To move forward or backward on screen full of
data through a file usually referring to an editor
function.
parallel processing A computing strategy in which
a single large task is separated into parts, each of
which then runs in parallel on separate processors.
parent The process emerging from a Fork with a
non#zero return code (the process ID of the child
process). A directory which points at a specified
directory.
password A secret character string used to verify
user identification during login.
PATH A variable which specifies which directories
are to be searched for programs and shell files.
path name A complete file name specifying all
directories leading to that file.
pattern-matching character Special characters
such as * or ? that can be used in a file specification
to match one or more characters. For example,
placing a ? in a file specification means that any
character can be in that position.
permission The composite of all modes associated
with a file.
pipes UNIX operating system routines that connect
the standard output of one process with the
standard input of another process. Pipes are central
to the function of UNIX operating systems, which
generally consist of numerous small programs
linked together into larger routines by pipes. The
piping of the list directory command to the word
count command is ls | wc. The passing of data by a
pipe does not (necessarily) involve a file. When the
first program generates enough data for the second
program to process, it is suspended and the second
program runs. When the second program runs out of
data it is suspended and the first one runs.
X-6
Q
quotation Temporarily cancelling the meaning of a
metacharacter to be used as a ordinary text
character. A backslash (\) quotes the next
character only.
R
raw I/O I/O conducted at a physical level.
read permission Allows reading (not execution or
writing) of a file.
recursive A recursive program calls itself or is
called by a subroutine which it calls.
redirection The use of other than standard input
(keyboard or pipe output) or standard output
(terminal display or pipe). Usually a file.
Copyright IBM Corp. 1997, 2005
Instructor Guide
S
scalability Desirable feature of computer systems
and applications. Refers to the capability to use the
same environment on many classes of computers,
from personal computers to supercomputers, to
accommodate growth or divergent environments,
without rewriting code or losing functionality.
SCCS Source Code Control System. A set of
programs for maintaining multiple versions of a file
using only edit commands to specify alternate
versions.
scope The field of an operation or definition. Global
scope means all objects in a set. Local scope means
a restriction to a subset of the objects.
screen See display screen.
scroll To move information vertically or horizontally
to bring into view information that is outside the
display screen or pane boundaries.
search and replace The act of finding a match to a
given character string and replacing each
occurrence with some other string.
search string The pattern used for matching in a
search operation.
sed Non-interactive stream editor used to do batch
editing. Often used as a tool within shell scripts.
server A provider of a service in a computer
network; for example, a mainframe computer with
large storage capacity may play the role of database
server for interactive terminals. See client.
setuid A permission which allows the access rights
of a program owner to control the access to a file.
The program can act as a filter for user data
requests.
shell The outermost (user interface) layer of UNIX
operating systems. Shell commands start and
control other processes, such as editors and
compilers; shells can be textual or visual. A series of
system commands can be collected together into a
shell script that executes like a batch (.BAT) file in
DOS.
shell program A program consisting of a sequence
of shell commands stored in an ordinary text file
Glossary
X-7
Instructor Guide
T
TCP Transmission Control Protocol. A facility for the
creation of reliable bytestreams (byte-by-byte,
end#to#end transmission) on top of unreliable
datagrams. The transmission layer of TCP/IP is
used to interconnect applications, such as FTP, so
that issues of re-transmission and blocking can be
subordinated in a standard way. See TCP/IP.
TCP/IP Transmission Control Protocol/Internet
Protocol. Pair of communications protocol
considered de facto standard in UNIX operating
system environments. IBM TCP/IP for VM and IBM
TCP/IP for MVS are licensed programs that provide
VM and MVS users with the capability of
participating in networks using the TCP/IP protocol
suite.
termcap A file containing the description of several
hundred terminals. For use in determining
communication protocol and available function.
termlib A set of C programs for using termcap.
tools Compact, well designed programs to perform
specific tasks. More complex processes are
performed by sequences of tools, often in the form
of pipelines which avoid the need for temporary files.
X-8
U
UNIX Operating System A multi-user, multi-tasking
interactive operating system created at AT&T Bell
Laboratories that has been widely used and
developed by universities, and that now is becoming
increasingly popular in a wide range of commercial
applications. See Kernel, Shell, Library, Pipes,
Filters.
user interface The component of the AIX Family
Definition that describes common user interface
functions for the AIX PS/2, AIX/RT, and AIX/370
operating systems.
/usr/grpR One of the oldest, and still active, user
groups for the UNIX operating systems. IBM is a
member of /usr/grp.
uucp A set of AIX utilities allowing
Autodial of remote systems
Transfer of files
Execution of commands on the remote system
Reasonable security.
V
vi Visual editor. A character editor with a very
powerful collection of editing commands optimized
for ASCII terminals; associated with BSD versions of
the UNIX operating system.
visual editor An optional editor provided with AIX in
which changes are made by modifying an image of
the file on the screen, rather than through the
exclusive use of commands.
W
wild card A metacharacter used to specify a set of
replacement characters and thus a set of file names.
For example "*" is any zero or more characters and
"?" is any one character.
window A rectangular area of the screen in which
the dialog between you and a given application is
displayed.
working directory The directory from which file
searches are begun if a complete pathname is not
specified. Controlled by the cd (change directory)
command.
workstation A device that includes a keyboard from
which an operator can send information to the
system, and a display screen on which an operator
can see the information sent to or received from the
computer.
write Sending data to an I/O device.
write permission Permission to modify a file or
directory.
Instructor Guide
X
X/OpenT An international consortium, including
many suppliers of computer systems, concerned
with the selection and adoption of open system
standards for computing applications. IBM is a
corporate sponsor of X/Open. See Common
Application Environment.
X Windows IBM's implementation of the X Window
System developed at the Massachusetts Institute of
Technology with the support of IBM and DECT, that
gives users windows into applications and
processes not located only or specifically on their
own console or computer system. X-Windows is a
powerful vehicle for distributing applications among
users on heterogeneous networks.
Y
yacc Yet Another Compiler# Compiler. For
producing new command interfaces.
Z
zeroeth argument The command name; the
argument before the first.
Glossary
X-9
Instructor Guide
V3.1.0.1
backpg
Back page