AIX Training Slides
AIX Training Slides
Installation and
Initial Configuration
Power on system
Press F5
Console and Language Definition
Select your console
Next:
Select the
Language
Installation and Maintenance Menu
At the Installation and Maintenance menu check all the
Installation settings
Installation Settings
Method of Installation
Change Method of Installation
Type the number of your choice and press Enter
2. Preservation Install
Preserves SOME of the existing data on the disk selected for the
installation
3.Migration Install
Upgrades the BOS to current release. Other (application) files and
configuration data will be spared
88 Help ?
99 Previous Menu
Begin
With default
settings
no
Verify default install
Change:
Method and settings Installation Method
yes Destination disks
Language
Default yes Desktop
Settings need to be
Changed?
TCB
64-bit kernel
no
Install from media
Perform customization
Configuration Assistant Menu
After the initial installation the configuration
assistant will start with the following option
Set or verify the system date and time
Set password for the administrator (root user)
Manage systems storage and paging space
Configure network communications (TCP/IP)
Configure a web server to run web based
system manager in a browser
Configure online documentation library services
Exit the configuration assistant
Exercise
Install the BOS
Configure storage and paging space
Configure TCPIP
Configure date and time
Familiarize yourself with other options
Use install_assist or configassist
Checkpoint
System
Flat Files Management
adduser
/etc/profile
/etc/qconfig
/etc/filesystems Front End Menus
/etc/rc
minidisks
/etc/passwd devices
AIX administration
Web-based
SMIT System
Manager
High-Level Commands
Low-Level Intermediate-Level
Commands Commands
System Object
System Kernel ASCII
Resource Data
Calls Services Files
Controller Manager
SMIT Log and Script Files
$HOME/smit.log
contains the every screen
(menu/selector/dialog) visited, the AIX commands
executed and the output from these commands
$HOME/smit.script
contains the commands executed by SMIT
(preceded by date and time of execution). This file
can be used directly as the shell script to perform
tasks multiple times
smit command
Smit [-options] [fastpath]
Invoke ASCII version
# smitty
Run no high level commands
# smit –x ( This will just log the entries but wont
run actual command)
Redirect the log file
# smit –s /home/team01/smit.script
Configuring the AIX V5L Documentation
Document Server contains
AIX softcopy documentation
Documentation Library Service
Web Server Software
Web browser software
Document Client
Web browser software
Configuring AIX V5L Online
Documentation
Configure TCP/IP
Install the Web server software
Configure and start the Web server software
Install the Web browser software
Install or mount the AIX documentation
Configure the Documentation Library Service
Install sysmgt.websm.framework
Run smit web_configure
Internet and Documentation Services
rmt0
rmt1
Device Configuration Database
Predefined Configuration Database
Customized Configuration Database
The attributes are managed by ODM
Run lsdev –P –H to see Predefined Devices
For example # lsdev –Pc tape
List all supported Devices “ lsdev –P” “smit devices > List
Devices > List All Supported Devices
List All defined Devices
CuDv (Customized Devices)
# lsdev –C –H
# lsattr –EH –l sys0
# lsattr -E –l sys0 –a realmem
Device States
Undefined – the device is supported device but is not
configured. It does not reside in the customized database
Defined – The device hash been added to the customized
database and is allocated a logical device. It is unavailable for
use
Available – The device resides in the customized database
To move defined tape device to an available state
# mkdev –l rmt0
To move an available device to defined state
# rmdev –l rmt0
To permanently remove an avaialble or defined tape device
# rmdev –dl rmt0
Self Configuring Devices
cfgmgr is a program that runs during the boot to
configure the device automatically.
The same command can be run any time when the
system is up to reconfigure the device configuration
database
Run smit devices to configure various hardware under
AIX
Device Addressing
Locations 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
Location Code Format for PCI Devices
AB-CD-EF-GH
AB 00 Resource attached to the processor
01 Resources attached to the ISA Bus
04 Resource attached to the PCI Bus
EF The connector ID
GH Port identifier, address, memory modules
device, FRU for the device
Location Code Example: Non SCSI
128-Port Asynchronous Controller
1
128-Port
Adapter
04-05-22-04
1
2
04-05 1 2
04-05-21-10
Location Code Format for SCSI Devices
AB-CD-EF-G,H
SCSI 04-01-00-6,0
Adapter
04-01
6
0
SCSI ID
Documenting Hardware Configuration
lsdev –CH
Provides name, status, location and
description of devices
lscfg –v
Provides details of all devices including
manufacturer, type and model number and part
numbers
lsattr –El sys0
Provides attributes for the name device (for
example sys0) Run command for all devices
Exercise: Devices
Configure tty device in the system
Observe location codes for all the devices in the system
Practice commands
Checkpoint
Is it possible to use SCSI ID 7 for a new tape device?
Find out the location code for the root disk and describe?
Summary
A physical device is the actual hardware attached to the
system. Alogical 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 remve device definitions, it is sometimes
necessary to use commands such mkdev, chdev and rmdev
The
Object
Data Manager
Descriptors: odmshow
# odmadd file
Changing Attributes Values Using
odmchange
# odmget –q :uniquetype=tape/scsi8mm and attribute=block_size” PdAt > file
# vi file
PdAt:
uniquetype = “tape/scsi/8mm”
attribute = “block_size”
deflt = “1024”
values = “0-245760,1”
width = “”
type = “R”
generic = “DU”
rep = “nr”
nls_index = 6
Modify default value to 1024
# odmchange –o PdAt –q”uniquetype=tape/scsi/8mm and attribute=block_size” file
Data Managed by the ODM
Devices Software
System SMIT
Resource ODM Menus
Controller
TCP/IP NIM
Error Log,
configuration
Dump
The ODM Managed Data
Device Configuration data
Software Vital Product Data
System Resource Controller Data
TCP/IP Configuration Data
Error Log and Dump information
NIM Information
SMIT Menus and commands
Data not managed by the ODM
Filesystem information
User/Security Information
Printer Queues and Queue devices
ODM Database Files
Predefined device PdDv, PdAt, PdCn
information
Customized device CuDV, CuAt, CuDep, CuDvDr,
information CuVPD, Config_Rules
inventory: history:
lpp_id = 38 lpp_id = 38
ver = 5
file_type = 0 rel = 1
format = 1 mod = 0
loc0 = “/etc/qconfig” fix = 0
loc1 = “” ptf = “”
state = 1
loc2 = “” time = 988820040
size = 0 comment = “”
Software States You Should Know About
Applied •Only possible for PTF or Updates
•Previous version stored stored in
/usr/lpp/pkg_name
•Rejecting update recovers to saved session
•Committing updates deletes previous version
Committed •Removing committed software is possible
•No return to previous version
Applying If installation was not successful:
Committed a) installp –C
Rejecting b) smit maintain_software
Deinstallin
g
Broken Cleanup failed
Remove software and reinstall
Predefined Devices
PdDv:
type = “8mm”
class = “tape”
subclass = “scsi”
prefix = “rmt”
…
base = 0
…
detectable = 1
…
led = 2418
setno = 54
msgno = 2
catalog = “devices.cat”
DvDr = “tape:”
Define = “/etc/methods/define”
Configure = “/etc/methods/cfgsctape”
Change = “ /etc/methods/chggen”
Unconfigure = “/etc/methods/ucfgdevice”
Undefine = “/etc/methods/undefine”
Start = “”
Stop = “”
uniquetype = “tape/scsi/8mm”
Predefined Attributes (PdAt)
PdAt:
Uniquetype = “tape/scsi/8mm”
attribute = “block_size”
deflt = “1024”
valures = “0-245760,1”
PdAt:
Uniquetype = “disk/scsi/1000mb”
attribute = “pvid”
deflt = “none”
valures = “”
PdAt:
Uniquetype = “tty/rs232/tty”
attribute = “term”
deflt = “dumb”
valures = “”
Customized Devices
CuDv:
name = “rmt0
status = 1
chgstatus = 2
ddins = “tape”
location = “04-C0-00-1,0”
parent = “scsi0”
connwhere = “1,0”
PdDvLn = “tape/scsi/8mm”
CuDv:
name= “tty0”
status = 1
chgstatus = 1
ddins =“”
location = “01-C0-00-00”
parent = “sa0
connwhere = “S1”
PdDvLn = “tty/rs232tty”
Customized Attributes (CuAt)
CuAt:
name = “tty0”
attribute = “login”
value = “enable’
CuAt:
name= “hdisk0”
attributes = “pvid”
value = “0016203392072a540000000000000000”
How ODM Classes Act Together
PdDv: CuDv:
type = “tty” Name = “tty”
class = “tty” Status = 1
subclass = “rs232” Chgstatus = 1
# mkdev –c tty –t tty –s rs232
perfix = “tty” Location = “01-C0-00-00”
Define = “/etc/methods/define” Parent =“sa0”
Configure = “/etc/methods/cfgtty” Connwhere = “s1”
Uniquetype = “tty/rs232/tty” PdDvLn = “tty/rs232/tty”
PdAt:
uniquetype = “tty/rs232/tty” CuAt:
name = “tty0”
attribute = “login” attribute = “login”
Deflt = “disable” value = “enable’
Values = “enable, disable”
# chdev –l tty0 –a login=enable CuAt:
PdAt:
name= “tty0”
uniquetype = “tty/rs232/tty” attribute = “term”
# chdev –l tty0 –a term=ibm3151
attribute = “login” value “ibm3151”
Deflt = “disable” type = “R”
Values = “enable, disable”
Additional Device Object Classes
PdCn: CuDvDr:
uniquetype = “adapter/pci/sym875” Resource = “devno”
Value1 = “22”
Connkey = “scsi” Value2 = “0”
Connwhere = “1,0” Value3 = “rmt0”
PdCn: CuDvDr:
uniquetype = “adapter/pci/sym875” Resource = “devno”
Value1 = “22”
Connkey = “scsi” Value2 = “1”
Connwhere = “2,0” Value3 = “rmt0.1”
CuVPD:
Name = “rmt”
CuDep: Vpd = “MFEXABYTE
Name = “rootvg” PN21F8842”
Dependency = “hd6”
CuDep:
Name = “datavg”
Dependency = “lv01”
Device Configuration Summary
Predefined Databases PdDv
PdCn PdAt
Customized Databases
CuDvDr CuVPD
Config_Rules
Configuration Manager
(cfgmgr)
Exercise: The ODM
Define the meaning of the most important ODM files
Work with the ODM command line interface
Describe how ODM classes are used from device
configuration commands
Checkpoint
1. In which ODM class do you find the physical ID’s of
your disks?
2. What is the difference between state defined and
available
Summary
The ODM is made from object classes, which are broken
into individual objects and descriptors
AIX offers a command line interface to work with ODM
files
The device information is held in the customized and the
predefined database (Cu*, Pd*)
Boot Process
Firmware
Boot Bootstrap
Devices code
(1) Diskette
(2) CD-ROM
(3) Internal disk RAM
RAM
hdisk0
Boot
Controller
Boot
Logical
Volume
Content of Boot Logical Volume
(hd5)
“Reduced”
Boot Commands
ODM
How to Fix a Corrupted BLV
Select Volume Group
That contains hd5
Boot from
Maintenance
CD, tape or
NIM
1. Access a Root Volume Group
# shutdown –Fr
Working with bootlist
# bootlist –m normal hdisk0 hdisk1 No “Service” Mode
# bootlist –m normal –o
on some models
hdisk0
hdisk1
e.g. model 140
# bootlist –m service cd0 rmt0 hdisk0
# diag
1 2 3
Save Default
Service Processors and Boot Failures
Boot failures!
553
Modem
Automatic transmittal of
Boot failure information
Modem
Service Processor
(BUMP) Remote
System
CMS Support
Let’s Review
Enter the command to list boot devices
T/F: You must have installed the bootlist to use SMS
AIX is loaded in hdisk0 but the boot list is set to boot
from hdisk1. Fix the problem?
What command is used to fix the BLV?
What scripts control the boot sequence
Accessing a SystemThat Will Not Boot
Choice [1[: 3
Maintenance
Choice [1]: 1
Working in Maintenance Mode
Access a root Volume Group
Choice: 1
Choice [99]:
Boot Problem Reference
AIX Message Guide and Contains:
Reference •Microchannel boot codes
•AIX boot codes
LED/LCD
Monitor display
F22
21A00001
103
102 Reset Or
105
Reset twice
Reset for for SRN
Crash code yyy-zzz
Configure base
Start init-process from BLV rc.boot 1 devices
rc.boot 1
ODM in hd5
restbase
548 510 RAM file system
le s ODM
Ru
g _
cfgmgr -f o nfi se=1
C ha
P
Devices to activate
bootinfo -b
511 rootvg are configured!
rc.boot 2 (Part1)
Failure LED
551 rc.boot 2
552 554
517 ipl_varyon
556 hd4: hd2:rootvg
hd9var: hd6
555 fsck –f /dev/hd4 / /usr /var
557 mount /usr
Copycore:
fsck –f /dev/hd2 If
dump,copy /
518 mount /usr var/adm/ras
Swapon /dev/hd6
rc.boot 2 (Part 2)
Copy RAMFS/dev to disk rootvg
hd4: hd2: hd9var: hd6
Copy RAMFS ODM to disk / /usr /var
mergdev
Umount /usr & /dev/hd4 dev etc
ODM
fsck –f /dev/hd3
mount /tmp
Here we work
With rootvg!
syncvg rootvg &
Config_Rules
Normal: cfgmgr –p2 /etc/objrepos:
Phase=2
Service: cfgmgr –p3 Phase=3 ODM
PdDv
PdAt Config_Rules
PdCn
cfgmgr
Customized Methods
Define
CuDv
Configure
CuAt Device load
Driver Change
CuDep
Unconfigur
CuDvDr unload e
Undefine
CuVPD
Config_Rules Object Class
Phase Seq Boot rule
1 1 0 /etc/methods/defsys
cfgmgr -f
1 2 0 /usr/lib/methods/deflvm
2 10 0 /etc/methods/defsys
2 10 0 /usr/lib/methods/deflvm cfgmgr –p2
2 15 0 /etc/methods/ptynode (Normal boot)
2 20 0 /etc/methods/startlift
3 10 0 /etc/methods/defsys
3 10 0 /usr/lib/methods/deflvm
cfgmgr –p3
3 15 0 /etc/methods/ptynode (Service boot)
3 20 0 /etc/methods/startlift
3 25 0 /etc/methods/starttty
Output of cfgmgr in the Boot alog
# alog –t boot –o
-------------------------------------------------------------
Attempting to configure device ‘sys0’
Invoking /usr/lib/methods/cfgsys_rspc –l sy0
Return code = 0
******* stdout *******
Bus0
*******no stderr *****
------------------------------------------------------------
Attempting to configure device ‘bus0’
Invoking /usr/lib/methods/cfgbus_pci bus0
Return code = 0
****** stdout *******
Bus1, scsi0
******* no stderr ****
-------------------------------------------------------------
Attempting to configure device ‘bus1’
Invoking /usr/lib/methods/cfgbus_isa bus1
Return code = 0
****** stdout *******
Fda0, ppa0, sa0, sioka0, kbd0
******* no stderr ****
/etc/inittab file
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
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/firstboot
srcmstr:2:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:2:wait:/etc/rc,tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:2:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1 # pb cleanup
qdaemon:2:wait:/usr/bin/startsrc -sqdaemon
writesrv:2:wait:/usr/bin/startsrc -swritesrv
uprintfd:2:respawn:/usr/sbin/uprintfd
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
pmd:2:wait:/usr/bin/pmd > /dev/console 2>&1 # Start PM daemon
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
dt:2:wait:/etc/rc.dt
cons:0123456789:respawn:/usr/sbin/getty /dev/console
System Hang Detection
System hangs
- High priority process
- Other
What does shdaemon do
- Monitors system’s ability to run processes
- Takes specified action if threshold is crossed
Actions
- Log Error in the Error Logging
- Display a warning message on the console
- Launch recovery login on a console
- Launch a command
- Automatically REBOOT system
Configuring shdaemon
# shconf –E –l prio
sh_pp enable Enable Process Priority Problem
pp_errlog enable Log Error in the Error Logging
pp_eto 2 Detection Time-out
pp_eprio 60 Process Priority
dt:2:wait:/etc/rc.dt
qdaemon:2:wait::/usr/bin/startsrc –sqdaemon
tty0:2:off:/usr/sbin/getty /dev/tty1
myid:2:once:/usr/local/bin/errlog.check
Review Questions
1. Which process isstarted by init process only one time? The init
process does not wait for the initialization of this process.
2. Which process is involved in print activities on an AIX system?
3. Which line is ignored by init process?
4. Which line determines that multiuser mode is the initial run
level of the system?
5. Where is the System Resource Controller started?
6. Which line controls network process?
7. Which component allows the execution of programs at a
certain date or time?
8. Which line executes a file /etc/firstboot if it exists?
9. Which script controls starting of the CDE deskop?
10. Which line is executed in all run levels
11. Which line takes care of varying on the volume groups,
activating paging spaces and mounting file systems that are to
be activated during boot?
Boot Problem Management
Check: LED: User Action:
File system full ? 553 Access the rootvg. Issue “df –k”.
Check if /tmp, /usr or / are full.
/etc/inittab? 553 Access the rootvg. Check /etc/inittab (empty, missing,
/etc/environment? or corrupt?). Check /etc/environment.
BLV corrupt ? 551, 555, Access the rootvg. Re-create the BLV:
557 # bosboot –ad /dev/hdiskx
JFS log corrupt ? 551, 552, Access rootvg before mounting the rootvg file systems.
554, 555, Re-create the JFS log:
556,557 # logform /dev/hd8
Run fsck afterwards.
Superblock corrupt? 552, 554, Run fsck against all rootvg filesystems, if fsck indicates
556 errors (not an AIX file system), repair the superblock.
rootvg locked 551 Access rootvg and unlock the rootvg:
# chvg –u rootvg
ODM files missing ? 523 - 534 ODM files are missing or inaccessible. Restore the
missing files from a system backup
Mount of /usr or /var failed 518 Check /etc/filesystem, Check network (remote mount),
file systems (fsck) and hardware
Summary
After the BLV is loaded into RAM, the rc.boot script is
executed three times to configure the system
During rc.boot 1 devices to varyon the rootvg are
configured
During rc.boot 2 rootvg is varied on
In rc.boot 3 the remaining devices are configured.
Process defined in /etc/inittab file are initiated by the
init process
System
Startup
and Shutdown
Maintenance Menu
•Maintenance menu
•Recover root pasword
•Fix machine that won’t boot
Diagnostics
•AIX Diagnostics
Starting System Management Services
Power on the system
Press F1 when icons appear and tones sound
System Management Services
PCI RS/6000 Start Up Process Overview
PowerOn
POST
INIT
Normal IPL
AIX Startup
ROS Hardware
Initialization
AIX
initialization
alog
User Boot Install
NIM
Applications Process Process
alog program
/var/adm/ras/bootlog
Use alog /var/adm/ras/BosMenu.log
Command /var/adm/ras/bosinst.data
To view .
logs
.
/var/adm/ras/errlog
•To view the boot log:
# alog –o –t boot
/etc/inittab
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
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/firstboot
srcmstr:2:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:2:wait:/etc/rc,tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:2:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1 # pb cleanup
qdaemon:2:wait:/usr/bin/startsrc -sqdaemon
writesrv:2:wait:/usr/bin/startsrc -swritesrv
uprintfd:2:respawn:/usr/sbin/uprintfd
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
pmd:2:wait:/usr/bin/pmd > /dev/console 2>&1 # Start PM daemon
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
dt:2:wait:/etc/rc.dt
cons:0123456789:respawn:/usr/sbin/getty /dev/console
System Resource Controller
•Providesa single interface to control subsystems
•Controls individual or groups of subsystems
Refresh a Subsystem
# refresh –s lpd
0513-095 The request forsubsystem refresh was completed successfully.
Stop a Subsystem
#stopsrc –s lpd
0513-044 The lpd subsystem was requested to stop.
Stopping Processes
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 May04 - 0:11 /etc/init
root 2626 1 0 May04 - 1:17 /usr/sbin/syncd 60
root 4136 1 0 May04 - 0:00 /usr/sbin/srcmstr
root 4964 4136 0 May04 - 0:00 /usr/sbin/inetd
root 6734 1 0 May04 - 0:02 /usr/sbin/cron
root 8022 4136 0 May04 - 0:00 /usr/sbin/qdaemon
root 9036 1 0 May04 - 0:00 /usr/sbin/uprintfd
root 9345 1 0 May04 - 0:02 /usr/bin/program
AIX
•Expansion Pack
•Bonus Pack
•LPP’s
•AIX Documentaion
bos.terminfo.print.data
Message Conventions:
LPP.msg[.lang].package.fileset
Bundles
A Bundle is a collection of packages and filesets suited for
a particular environment
Predefined system bundles in AIX 5.1 include:
- App-Dev
- CDE
- GNOME
- KDE
- Media-defined
- Netscape
- devices
- wsm_remote
Software Updates
# oslevel
5.1.0.0
Install Filesets
5.1.0.0
4.3.3.0 Commit
4.3.3.0 Applied
Or
Filesets
5.1.0.0 Reject
4.3.3.0
Committed
Install Committed
5.1.0.0
5.1.0.0
Software Installation and Maintenance
Install Software
Update Installed Software to Latest Level (Update
All)
Install Software Bundle
Update Software by Fix (APAR)
Install andUpdate from ALL available Software
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install andUpdate from ALL available Software
lslpp command
-L lists the installed software
-h shows the history of a software product
List Installed Software
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
IMNSearch.bld.DBCS 2.3.1.0 COMMITTED NetQuestion DBCS Buildtime
Modules
IMNSearch.bld.SBCS 2.3.1.0 COMMITTED NetQuestion SBCS Buildtime Modules
IMNSearch.msg.en_US.rte.com 2.3.1.0 COMMITTED Text Search Messages - U.S. English
IMNSearch.rte.DBCS 2.3.1.0 COMMITTED NetQuestion DBCS Search Engine
IMNSearch.rte.SBCS 2.3.1.0 COMMITTED NetQuestion SBCS Search Engine
IMNSearch.rte.client 2.3.1.0 COMMITTED Text Search Client
IMNSearch.rte.com 2.3.1.0 COMMITTED Text Search Client/Server
Shared Files
IMNSearch.rte.httpdlite 2.0.0.2 COMMITTED Lite NetQuestion Local Web
Server
IMNSearch.rte.server 2.3.1.0 COMMITTED Text Search Server
Software Maintenance Utilities
Software installation and Maintenance
3. Which of the following can you install as an entity?( select all that
apply)
a. Fileset
b. LPP
c. Package
d. Bundle
Partition 1 Partition 3
Partition 2
Free Size
Free Size
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
Benefits of the LVM
Volume
Group B PV2 PV3 PV4 PV5
Physical Volume
/dev/hdiskn
Physical PP1
Partitions PP2
4 MB is PP3
default size
PP4
1016 max
PP5
per PV
PPn
Volume Groups
PV4
New PVs:
•Add to existing
•Create new VG
VGDA VGDA
Max Size
Normal VG – 32 PVs
Big VG – 128 PVs
Volume Group Limits
•Normal Volume Groups (mkvg)
Number of disks: Max. Number of partitions/disk:
1 32512
2 16256
4 8128
8 4064
16 2032
32 1016
1 4 1 4
2 3 2 3
5 6 8 5 6 8
9 7 12 9 7 12
10 11 10 11
13 16 13
14 15 14 15
17 20 17 20
18 19 18 19
1 2 3 4 5 6 7 8 9 . . . . . n
/ (root)
home sbin lib lpp usr bin dev tftpboot var mnt etc tmp
/ / / /
/home:
dev = /dev/hd1
vol = “/home”
mount = true
check = true
vfs = jfs2
log = /dev/hd8
Mount
Mount: the glue that logically connects file systems to the
directory hierarchy.
File systems are associated with with devices represented
by special files /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
What to Where to
mount mount
Mounting file system
Mounting over an empty directory
Mounting over files and subdirectories
Listing File Systems
# lsfs
Volume Groups
Logical Volumes
Physical Volumes
Paging Space
PV PV
# lsvg
rootvg
payrollvg
#lsvg –o
rootvg
Listing Volume Group Information
List Contents of a Volume Group
Listing Volume Group Information
Physical Volumes
Listing Volume Group Information
Logical Volumes
Adding Volume Groups
# smit mkvg
Removing a volume Group
# smit reducevg
# /usr/sbin/lquerypv –M hdisk0
256
Of data2 Of data2
Of data1 Of data1
LV LV
LV LV
# varyonvg datavg
1 4 1 4
2 3 2 3
5 6 8 5 6 8
9 7 12 9 7 12
10 11 10 11
13 16 13
14 15 14 15
17 20 17 20
18 19 18 19
1 2 3 4 5 6 7 8 9 . . . . . n
Forced Synchronization
1 2 3 4 5 6 13 14 15 16 17 18 25 26 27 28 29 30
7 8 9 10 11 12 19 20 21 22 23 24 31 32 33 34 35 36
1 4 7 10 13 16 2 5 8 11 14 17 3 6 9 12 15 18
19 22 25 28 31 34 20 23 26 29 32 35 21 24 27 30 33 36
•Consecutive
stripe units are created on different physical volumes
•Striping increases read/write sequential throughput by evenly distributing partitions
among disks
•Stripe unit size is specified at creation time
Logical Volume Policies
Intra-physical volume allocation policy:
E M C M E
Inner Edge
Inner Middle
Center
Outer Middle
Outer Edge
Inter-physical volume allocation policy:
•Maximum number of PVs to use
•Range of PVs to use
SMIT Logical Volumes Menu
# smit lv
Logical Volumes
# lslv –m lv00
Lv00:/home/john
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0134 hdisk0
0002 0135 hdisk0
0003 0136 hdisk0
Add a Logical Volume
# smit mklv
Add a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes
[TOP] [Entry Fields]
Logical Volume NAME []
* Volume GROUP name rootvg
* Number of LOGICAL Partitions []
PHYSICAL VOLUME names []
Logical Volume TYPE []
POSITION on physical volume []
to use for allocation
Number of COPIES of each logical 1
partition
Mirror Write Consistency yes
Allocate each logical partition copy on yes
a SEPARATE physical volume?
[MORE..10]
Remove a Logical Volume
# smit rmlv
# lsvg –o | lsvg –i –l
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd6 paging 8 8 1 open/syncd N/A
hd5 boot 1 1 1 closed/sync N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs 1 1 1 open/syncd /var
Showing LV Characteristics 2
Show Characteristics of a Logical Volume
# lslv logvol01
LOGICAL VOLUME: logvol01 VOLUME GROUP: volg01
LV IDENTIFIER: 000bc6fdca261bbf.1
PERMISSION: read/write
VG STATE: active/complete
LV STATE: closed/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 16 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 2 PPs: 2
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: center UPPER BOUND: 2
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on
EACH LP COPY ON A SEPARATE PV ?: yes
Add/Remove a Logical Volume Copy
# smit mklvcopy
Add a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes
[TOP] [Entry Fields]
Logical Volume NAME [lv00]
* Volume GROUP name rootvg
* NEW Total number of logical partition [2] +
copies
PHYSICAL VOLUME names [] +
POSITION on physical volume [] +
MAXIMUM NUMBER of PHYSICAL [32] #
Volumes to use for allocation
Allocate each logical partition copy on yes +
a SEPARATE physical volume?
File containing ALLOCATION MAP []
SYNCHRONIZE the data in the new no +
logical partition copies
Reorganize a Volume Group
# smit reorgvg
1 4 1 4
2 3 2 3
5 6 8 5 6 8
9 7 12 9 7 12
10 11 10 11
13 13
14 15 14 15
17 20 17 20
18 19 18 19
Physical Partitios
Physical Volume
•Logical volumes
# lspv –l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MNT PT
hd1 12 12 00..00.00..12..00 /home
hd3 3 3 00..03..00..00..00 /tmp
hd2 29 29 00..00..17..12..00 /usr
hd4 13 13 00..00..13..00..00 /
hd8 1 1 00..00..01..00..00 N/A
hd6 8 8 00..00..00..08..00 N/A
hd5 1 1 01..00..00..00..00 N/A
Listing Physical Volume Information 3
Physical Partition Map
# lspv -p hdisk0
Add/Move contents of Physical Volumes
Add a disk:
The device caneither be added through SMIT or
it can be configured through configuration manager
when the system boots up
Move the contents of a Physical Volume:
migratepv [-l lvname ] sourcePV targetPV ..
I/O
Less Busy
Busy
Disk
Disk
inodes
•Superblock
•File system size and identification
•Free list, Fragment size, nbp
•Inodes
•File size, ownership,permissions,times
•Pointers to data blocks
•Blocks
•Data blocks – contain data
•Indirect blocks – contain pointers to data blocks
Structure of an Inode
•Contents of an inode Permissions
No. of links
Type offile
User ID
Group ID
File size
Address of blocks
Inode for file 1 Time modified
Time accessed
Time changed
Access control info.
Reserved other
•This information can be seen with ls -l
$ ls –li /home/team01
2132 drwxr-xr-x 2 team01 staff 512 May 2 14:33 c
2136 drwxr-xr-x 2 team01 staff 512 May 2 14:33 doc
2141 -rw-r--r-- 1 team01 staff 28 May 16 10:11 Manuals
File System Fragmentation
4096 bytes
No Fragmentation
2000 bytes
File Size = 2000 bytes
4096 bytes
Fragment Enabled
2000 bytes
File size = 2000 bytes 1024 1024 1024 1024
Fragment = 1024 bytes
File system
File system
INODES 4096
1
4096 4096
128 bytes 2
3 4*1024
4
5
6
Allocation Group Size
Disk blocks
inodes
16 MB
16 MB
16 MB
Grouping of related agsize
Inodes and disk blocks 16 MB
Disk blocks
inodes
64 MB
64 MB
Grouping of related 64 MB
agsize
Inodes and disk blocks 64 MB
JFS versus JFS2 File Systems
JFS JFS2
Maximum File Size 64 GB / 64 GB 4 Petabytes / 1 TB
Architectural/Tested
Maximum File System 1 TB / 1 TB 4 Petabytes / 1 TB
Size Architectural/Tested
Inode size 128 Bytes 512 Bytes
JFS2 uses extent based allocation for high performance and large size
File and File System Sizes
•Maximum Individual File Size Limits
OR
1025
1 1 Block 1026 32 Blocks
2 4 KB 1027 128 KB
3 :
4 :
:
1055
1023 1056
1024
1057
128 KB 1058
File 1059 32 Blocks
132MB 1060 128 KB
:
:
:
Exercise: Inodes and NBPI
1. If you are creating a JFS file system to store files that are
smaller than 512 bytes in size, what would you choose for the
following values
Fragment Size__________NBPI______________
Regular or Large-File enabled ______________
2. If you are creating a JFS file system intended to store files
intended to store files about 8K in size, what would you
choose for the following
Fragment Size ___________NBPI____________
Regular or Large-file enabled ___________
3. If you are creating a JFS F/S intended to store files about 2
MB in size, what would you choose for the following values?
Fragment Size ___________NBPI____________
Regular or Large-file enabled ___________
4. When should you use large file-enabled filesystems?
5. When should you use compressed file systems?
Journal Log
1
Write data
fsync ()
1) Inodes changes to log
3 2) COMMIT to log
3) Update inode 2
4) Sync log
INODES 4
Data
block
JFS LOG
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
# mount
# df -k
# df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 16384 8656 48% 1281 16% /
/dev/hd2 7045120 6170764 13% 31736 2% /usr
/dev/hd9var 16384 14416 13% 399 10% /var
/dev/hd3 16384 15792 4% 28 1% /tmp
/dev/hd1 16384 15764 4% 41 2% /home
/dev/lv00 655360 61168 91% 4528 3% /u
Options:
•Command syntax:
# fsck [-p | -y | -n] [-f] < file-system>
•Checks Journal LogChecks inodes, indirect blocks, data blocks, free lists
•Ifno file system name is specified, the fsck command will check all file
systems which have the check=true attribute set in the /etc/filesystems
•Orphan files are placed in the lost+found directory
Documenting File System Setup
4 KB 4 KB
Needs more
Than 8MB
Paging Space
Paging Space
Is a secondary storage area for over-committed memory
Holds inactive 4K “pages” on disk
Is not a substitute for a real memory
Sizing Paging Space
Created at installation up to twice the size of real
memory
Amount needed is dependent on applications
Monitor paging space : lsps –a
Running low on paging space is bad
#
ksh: cannot fork, no swap space
Paging Space Placement
Only one paging space per disk
Use disks with the least activity
Paging spaces roughly the same size
Do not extend the paging space to multiple PVs
Use multiple disk controllers
Total RAM
# cat /etc/swapspaces
hd6:
dev = /dev/hd6
paging00:
dev = /dev/paging00
Adding Paging Space
# smit mkps
Make inactive
# swapoff /dev/paging00
Page Space Physical Volume Volume Group/size %used Active Auto Type
hd6 hdisk0 rootvg/64 MB 43% yes yes lv
paging00 hdisk1 rootvg/64 MB 07% yes yes lv
paging01 hdisk1 rootvg/16 MB 89% yes yes lv
Physical Logical
Partitions Partitions
Physical Logical
Volume Volume
Volume
Group
Volume Group Limits
•Normal Volume Groups (mkvg)
Number of disks: Max. Number of partitions/disk:
1 32512
2 16256
4 8128
8 4064
16 2032
32 1016
Physical Logical
Partitions Partitions
Write data
Mirrored
Logical Application
Volume
LVM identifier
# lsvg rootvg
VOLUME GROUP:rootvg VG identifier:00008371c98a229d4c0000000000000e
# lspv
hdisk0 000083771b5969c35 rootvg
(32 bytes long)
# lslv hd4
LOGICAL VOLUME: hd4 VOLUME GROUP: rootvg
LV IDENTIFIER: 00008371c98a229d4c0000000000000e.4
# uname –m
000083714600
LVM Data on disk Control Blocks
Volume Group Descriptor Area (VGDA)
• Most important data structure of LVM
• Global to the volume group (same on each disk)
• One or two copies per disk
AIX Files
• /etc/vg/vgVGID Handle to the VGDA copy in memory
• /dev/hdiskX Special file for a disk
• /dev/VGname Special file for administrative access to a VG
• /dev/LVname Special for a logical volume
• /etc/filesystems Used by the mount command to associate LV
name, JFS log and mount point
Striping
LP1
1 4 7
1
2
3
Stripe
Units 4
5
2 5 8
LP2 6 Striped
7 Logical
8
Volume
9
3 6 9
LP3 Stream of
data
RAID Levels
RAID Implementatio Explaination
Level n
0 Striping Data is split into blocks. These blocks are
written to or read from a series of disks in
parallel. No data redundancy
1 Mirroring Data is split into blocks and duplicate
copies are kept on separate disks. If any
disk in the array fails, the mirrored data
can be used.
5 Striping with Data is split into blocks that are striped
distributed across the disks. For each block parity
parity information is written that allows the
reconstruction in case of a disk failure
Exercise: Basic LVM tasks
1. Using smit mklv, create mirrred LV with name mirrorlv. Make it
2 LPs
2. Use lslv –m to identify the PPs that have been assigned
3. Remove the mirrored LV
4. Create a unmirrored LV lvtmp1 and using smit chlv mirror
them.
5. Reorganize rootvg using reorgvg command
6. Use lspv –p check where the lvtmp1 resides now
7. Remove the lvtmp1
8. What is the maximum number of disks in a VG that would be
created by the following command?
# mkvg –B –t 4 hdisk11 hdisk99 homevg
Contents of the VGDA
Header Time Stamp •Updated when VG is changed
importvg
VGDA ODM
LVCB /etc/filesystems
Change, using Match IDs
Low-level By name
commands
mkvg
extendvg
mklv
crfs Update exportvg
chfs
rmlv
reducevg
…
ODM Entries for Physical Volumes
# odmget –q “name like hdisk?” CuDv
CuDv:
name = “hdisk0”
status = 1
chgstatus = 2
ddins = “scdisk”
location = “04-C0-00-2,0”
parent = “scsi0”
connwhere = “2,0”
PdDvLn = “disk/scsi/osdisk”
CuDv:
name = “hdisk1”
status = 1
chgstatus = 2
ddins = “scdisk”
location = “04-C0-00-2,0”
parent = “scsi0”
connwhere = “2,0”
PdDvLn = “disk/scsi/osdisk”
ODM Entries for Physical Volumes (Cont)
# ls –l /dev/hdisk*
brw------- 1 root system 12,1 08 Jan 06:56 /dev/hdisk0
brw------- 1 root system 12,2 08 Jan 06:56 /dev/hdisk1
ODM Entries for Volume Groups
# odmget –q “name=rootvg” CuDv
CuDv:
name = “rootvg
status = 0
chgstatus = 1
ddins = “”
location = “”
parent = “”
connwhere = “”
PdDvLn = “logical_volume/vgsubclass/vgtype”
#odmget –q “name=rootvg” CuAt
CuAt:
name=“rootvg”
attribute = “vgserial_id”
value = “0009301300004c00000000e63a42b585”
type = “R”
generic = “D”
rep = “s”
nls_index = 2
(continued on next slide)
ODM Entries for Volume Groups (Cont)
#odmget –q “name=rootvg” CuAt
…
CuAt:
name = “rootvg”
attribute = “pv”
value = “00008371d667a44b0000000000000000”
type = “R”
generic = “D”
rep = “s”
nls_index = 2
CuAt:
name = “rootvg”
attribute = “pv”
value = “00008371d1122667000000000000000”
type = “R”
generic = “D”
rep = “s”
nls_index = 2
ODM Entries for Logical Volumes
# odmget –q “name=hd2” CuDv
CuDv:
name = “hd2”
status = 0
chgstatus = 1
ddins = “”
location = “”
parent = “rootvg”
connwhere = “”
PdDvLn = “logical_volume/vsubclass/lvtype”
# odmget –q “name=hd2” CuAt
CuAt:
name = “hd2”
attribute = “lvserial_id”
value = “0009301300004c00000000e63a42b585.5”
type = “R”
generic = “D”
rep =“n”
nls_index = 648
ODM Entries for Logical Volumes (Cont)
# ls –l /dev/hd2
brw------- 1 root system 10,5 08 Jan 06:56 /dev/hd2
# varyoffvg homevg
Remove complete volume
# exportvg homevg Group from ODM
# importvg –y homevg hdiskX
hdisk0
Mirrored
Logical
Partitions
hdisk1
hdisk2
hdisk0
Mirrored
Logical
Partitions
hdisk1
hdisk2
Yes
Disk Mirrored? Procedure 1
Yes
Disk still
Working? Procedure 2
No
Volume Group Procedure 3
Lost?
g No n ro
rootv otvg
Yes
Procedure 4 Procedure 5
Procedure 1: Disk Mirrored
Fix:
Check bootlist (bootlist)
Re-create boot logical volume (bosboot)
Common disk replacement Errors 2
A disk is removed from ODM and from system, bur not
from the VG
# rmdev –l hdisk5 –d
• Recover files
“ I have just deleted file by mistake”
• Compare versions of files
“This problem was not there in old version”
• Recover system after disaster
• Restore archived data
• Shrink a file system
Type of Backup - AIX
• System Backup
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
Backup Strategy
System Backup
Full Backup
Incremental Backup
Incremental Backup
Backup Devices - Tape
4 mm DAT 8 mm DAT ½ inch cartridgeDLT
SDLT LTO STK 9840/9940
/dev/rmtx 1 No Yes
/dev/rmtx.1 1 No No
/dev/rmtx.2 1 Yes Yes
/dev/rmtx.3 1 Yes No
/dev/rmtx.4 2 No Yes
/dev/rmtx.5 2 No No
/dev/rmtx.6 2 Yes Yes
/dev/rmtx.7 2 Yes no
Backup Device – Read/Write Optical Drive
• Use with CD-ROM file system for read only operations
• Use with journal file systems for read/write operations
rootvg backup process - mksysb
• Backs up rootvg only
• Unmounted file systems are not backed up
• Bootable tape is created in backup format
• Provides facilities for a non-interactive
installations
• Saves system-created paging space definitions
• Saves logical volume policies
• There should be minimal user and application
activity
/image.data file for rootvg
image.data:
IMAGE_TYPE=bff
DATE_TIME=Wed Jan 9 15:07: IST 2004
UNAME_INFO=AIX sys2 1 5 000930134C00
PRODUCT_TAPE=no
USERVG_LIST=
OSLEVEL=4.3.3.0
logical_volume_policy:
SHRINK=no
EXACT_FIT=no
ils_data:
LANG=C
#Command used for source_disk_data:/usr/sbin/bootinfo
source_disk_data:(stanza is repeated for each disk in rootvg)
LOCATION=(disk location)
SIZE_MB=(size of disk in megabytes)
HDISKNAME=(disk name)
#Command used for lv_data: /usr/sbin/lslv
lv_data:(stanza for each logical volume in rootvg)
.
.
fs_data:(stanza for each MOUNTED filesystem in rootvg)
/bosinst.data. File for rootvg
control_flow:
CONSOLE =
INSTALL_METHOD = overwrite
PROMPT = yes
EXISTING_SYSTEM_OVERWRITE = no
INSTALL_X_IF_ADAPTER = yes
RUN_STARTUP = yes
RM_INST_ROOTS = no
ERROR_EXIT =
CUSTOMIZATION_FILE =
TCB = no
INSTALL_TYPE =
BUNDLES =
RECOVER_DEVICES = no
BOSINST_DEBUG = no
ACCEPT_LICNESES =
INSTALL_64BIT_KERNEL = no
INSTALL_CONFIGURATION = Default
DESKTOP = CDE
target_disk_data
LOCATION =
SIZE_MB =
HDISKNAME =
locale:
BOSINST_LANG =
CULTURAL_CONVENTION =
MESSAGES =
KEYBOARD =
rootvg Image Backup
Backup root Volume Group
Maintenance
1 Access A Root Volume Group
2 Copy a System Dump to Removable Media
3 Access Advanced Maintenance Functions
4 Install from a System Backup
-q media is ready
-p compress files which are less than 2GB
-v verbose – display filenames during backup
# cat listfile
/home/roy/file1
/home/roy/file1
/home/roy/file1
# backup –iqvf /dev/rmt0 <
listfile
# find /home/roy | backup –iqvf /dev/rmt0
Backup a File or a Directory
# smit backfile
Backup a File or Directory
# restore -s
# restore –s 4 –xvf /dev/rmt0.1 ./etc/inittanb