IBM Aix
Transcript of IBM Aix
PCI RS/6000 Start up Process Overview
POST
Power On
Locate OS Bootstrap Image
Find AIX Boot Image
Load AIX Boot Image RAMDISK created
Configuration Manager Phase 1
INITNormal IPL
AIX Startup on itanium- based SystemIBM POWER processor Intel Itanium – based
processor
ROS
SMS / bootlist
BIOS / EFL
Setup EFI Boot Manager
•ROS / SOFTROS •EFI system partition boot.efi
•BLV •volume partition BLV
Hardware Initialization
Low level configuration
Load boot Image
AIX initialization
alog
User Applications Install ProcessBoot Process NIM
Alog program
/var/adm/ras/bootlog
/var/adm/ras/Bosmenus.log
/var/adm/ras/nosinst.data
.
.
/var/adm/ras/erriog
Use alog command to
view logs
To view the boot log:
#alog –o –t boot
System Resource Controller
Subsystem group spooler
Subsystem qdaemon writesrv ipd
Subserver qdaemon writesrv Ipd
•Provides a single interface to control subsystems
•Controls individual or groups of subsystems
System Resource Controller Syntax
# Lssrc –g spooler
Subsystem Group PID Status
Qdaemon Spooler 8022 active
Writesrv Spooler 9558 active
Lpd Spooler inoperative
# startsrc –s lpd
0513-059 The lpd Subsystem has been started. Subsystem PID is 12472.
# refresh –s lpd
0513-095 The request for subsystem refresh was completed successfully
# stopsrc –s lpd
0513 -044 The lpd Subsystem was requested to stop.
List SRC Status
Start a Subsystem
Refresh a Subsystem
Stop a Sybsystem
Device States
Predefined Database
Undefined Supported Device
Customized Database
Defined Not Usable
Available Ready for Use
MkdevOrcfgmgr
rmdev -dl
rmdev -dl
rmdev -l
Self-Configuring Devices
1.Who are you
2. Answer -CD – ROM-04 – C0-00 – 3,0
Device Driver
cfgmgr
ODM
Cd0
Defined
04-c0-00-3,0
4a) Load device driver4b) Make /dev/cd0 entry
Kernel /unix
Device Driver
22
ODM
Cd0
Available
04-c0-00-3,0
3.cd0 defined
5.Device available
# ls –l /dev/cd0Br—r—r– root System 22, 2 /dev/cd0
AB – CD – EF – G , H
AB – CD Identifies the bus and the adapter locationSame as with non SCSI devices
EF For a single SCSI bus -00For a dual SCSI bus Internal bus - 00 External bus – 00
G,H G – SCSI address ( SCSI ) of the deviceH = Logical unit number of the devices
Location Code Format for SCSI Devices
Location Code Example for SCSI Device
SCSI Devices (Disk, Tape, CD-ROM)
System Unit
SCSI Adapter
04-01
0
74
6
SCSI Bus
SCSI ID
04-01-00-4,0
04-01-00-6,0
Traditional UNIX Disk Storage
Partition 1
Partition 2
Free space
Partition 3
Free space
PROBLEMS:
•Fixed partitions
•Expanding size of the partition
•Limitation on size of a file system and a file
•Contguous data requirement
•Time and effort required in planning ahead
Logical volumes solve non – contiguous problems
Logical volumes can span disks
Dynamically increase logical volume size
Logical volumes can be mirrored
Hard disk easily added to a system
Logical volumes can be relocated
Volume group and logical volume statistics can be collected
These task can be performed dynamically!
Benefits of the LVM
Physical Storage
Volume Group A
Volume Group B
PV1
PV2 PV3 PV4 PV5
PP1
PP2
PP3PP4
PP5
PP.
PP.
PPn
Physical Partitions 4MB is Default size 1016 max per PV
Physical Volume /dev/hdiskn
Volume Groups
PV1
PV2
PV4
PV3
datavgrootvg
New PVs:
•Add to existing VGs
•Create new VG
Why create new volume groups?
•Separate user data from operating system files
•Disaster recovery
•Data portability
•Data integrity and security
Volume Group Descriptor Area
VGDA
VGDAVGDA
VGDA VGDA VGDA VGDA
VGDA VGDA
Three disk or more VGTwo disk VG
One disk VG
Max size
Normal VG-32 PVs
Big Vg-128 PVs
Number of disks: Max.number of partitions/disk
1 32512
2 16257
4 8128
8 4046
16 2032
32 1016
Big Volume Groups (mkvg- B)
Number of disks: Max.number of partitions/disk
1 130048
2 65024
4 32512
8 16256
16 8128
32 4064
64 2032
128 1016
Volume Group LimitsNormal Volume Groups (mkvg)
Mkvg -t
Uses of Logical Volumes
A logical volume may contains one of the following , and only one at a time:
Journaled or Enhanced journaled file system ( for example : / dev hd4
Paging space ( dev/hd6 )
Journal log ( /dev/hd8 )
Boot Logical Volume ( /dev/hd5 )
Nothing ( raw device )
What Is File System ?
A File System is Method of storing data Hierarchy of directories
Four types supported : Journaled File system ( jfs2 ) Enchanced Journaled File System ( jfs2 ) CD – ROM File System ( cdrfs ) Network File System ( nfs )
Different file systems are connected together via directories to form the veiw of files users see
Why Have File System ?
Can strategically place it on disk for improved performance Some tasks are performed more efficiently on a file system than on each directory within the file system, for example , back up, move, secure an entire file system Can limit disk usage of users by file system ( quotas ) Maintain integrity of the entire file system structure, for example ,if one file is corrupted ,the others are not affectedSpecial security situations Organize data and programs into groups for ease of the file management and better performance
home sbin lib lpp usr bin dev tftpboot var mnt etc tmp
Standard File Systems in AIX
hd1 hd2 hd9var hd3
Bin lib lpp share sbin Spool adm tmp
hd4
(root)
Listing Logical Volume Information
List all Logical Volumes by Volume Group:
# lsvg –l rootvg
LVNAME Type Lps PPs Pvs Lv STATE Mount Point
Hd6 paging 64 64 1 open/syncd N/A
Hd5 boot 1 1 1 Closed/syncd N/A
Hd8 jfslog 1 1 1 open/syncd N/A
Hd4 jfs 2 2 1 open/syncd /
Hd2 jfs 156 156 1 open/syncd /Usr
Hd9var jfs 1 1 1 open/syncd /var
Hd3 jfs 3 3 1 open/syncd /tmp
Hd1 jfs 1 1 1 open/syncd /home
1v00 jfs2 2 2 1 open/syncd /home/john
Volume Groups
Volume Group
PV PV
Physical Volume (PV)
Volume Group (VG)
Hard disk
Collection of related disks (PVs)
1st copy of data1 LV
2nd copy of data1 LV
1st copy of data2 LV
2nd copy of data2 LV
Hot Spare
Synchronization
Hot Spare
First Copy
Second Copy
Third Copy
Mirroring
Hdisk()
PP1
PP2
Hdisk1
PP1
PP2
Hdisk2
PP1
PP2
LP1
LP2
Lv00
Read Request
Copy 1Copy 2 Copy 3
Forced Synhronization
Synchronize the Read Partitions
Mirror Write Consistency
E M C M E
Logical Volume PoliciesIntra-physical volume allocation policy:
Ineer Edge
Ineer Middle
Center
Outer Middle (Middle)
Center Edge (Edge)
Inter-physical volume allocation policy:
•Maximum number of PVs to use
•Range of PVs to use
I/O
Busy Disk
Less Busy Disk
Move Physical Partitions
# migratelp hd3/1 hdisk 1/109
Migrating Physical Partitions
Structure of a Journaled File System
Data Blocks
Indirect Blocks
inodes
Superblock
• Superblock
1. File System size and identification
2. Free list, fragment size, nbpi
• Inodes
1. File size, ownership, permissions, times
2. Pointers to data blocks
• Blocks1. Data blocks –contain data2. Indirect blocks –contain pointers to data
blocks.
Permission no.of links type of file user ID group ID file size address of blocks time modified time accessed time changed access control info. Reserved other
Inode for file 1
Structure of an Inode
•Contents of an inode
File System Fragmentation
No Fragmentation
File size = 2000 bytes
Fragmentation Enabled
File size = 2000 bytes
Fragment size = 1024 bytes
4096 bytes
2000 bytes 2000 bytes
This free space cannot be used by another file
1024 1024 1024 1024
These free fragments can be used by other files
2000 bytes
Variable Number of Inodes With the default nbpi=4096 on inode will be created for every 4096 bytes of file system.
File System
File System
1
2
3
4
5
6
7
8
1
2
Using the value nbpi=1024 an inode will be created for every 1024 bytes of file system.
4096 4096 4096
4096 4096 4096
128 bytes
128 bytes
Allocation Group Size
Groupings of related inodes and disk blocks.
Groupings of related inodes and disk blocks.
16 MB
16 MB
16 MB
64 MB
64 MB
64 MB
inodes
inodesDisk blocks
Disk blocks
16 MB
64 MB
agsize
agsize
JFS vs.JFS2 File Systems
JFS JPS2
Maximum File Size Architectural /Tested
64 Gigabytes /64 Gigabytes 4 Petabytes / 1 Terabyte
Maximum File Size Architectural /Tested
1 Terabyte / 1 Terabyte 4 Petabytes / 1 Terabyte
Inode Size 128 Byters 512 Bytes
Number of inodes Fixed. Set at creation Dynamic
Fragments/ Block Size 512/4096 512/4096
Online defragmentation Yes Yes
Avaiable on itaum No Yes
Avaiable on POWER Yes, default Yes
Large File Enabled File Systems
1
2
3
4
.
1023
1024
1025
1026
1027
.
1055
1056
1057
1058
1059
.
File = 132 MD
(1024 * 4 KB blocks)+ (1024 * 128 KB blocks)= 132MB
4MB + 128MB = 132MB
File 132 MB
32 Blocks 128 KB
32 Blocks 128 KB
128 KB
1 Block 4 MB
Fsync()
1) Inode changes to log
2) COMMIT to log
3) Update inode
4) Sync log
Write data
inodes
Data block JFSLOG
3
1
4
2
No journaling of data blocks –only journals inode information (and indirect block information.)
Journal Log
Space Management
File system expand upon notice, not automaticallyTo keep from running in to problems :Monitor file system growth Determine cause Control growing filesManage file system space usageControl user disk usage Defragment file system
Control Growing Files
/var/adm/wtmp/var/spool/*/*$HOME/smit.log$HOME/smit/script$HOME/websm.log$HOME/websm.script/etc/security/failedlogin/var/adm/sulog
Skulker
The skulker command cleans up file system by removing unwanted or obsolete filesCandidate files include ( can use file aging as criteria ):
Those in /temp directory A.out file Core files Ed.hup files
Skuler is normally invokes daily by the cron command as part of the root’s crontab fileModify the skulker shell script to suit local needs for the removal of files
What is Paging Space?
RAM – 256 MD
RAM Usage
Operating System Database TCP/IP 8MB FREE
Operating System Database TCP/IP Application
4KB 4KB
Paging Space
Current applications Total =248 MB
RAM Usage
•Only one paging space per disk
•Use disks with the least activity
•Paging spaces roughly the same size
•Do not extend paging space to multiple PV’s
•Use multiple disk controllers
hd6 paging00Paging01
Paging Space Placement
AIX Product Offerings
AIX
Expansion Pack
Bonus Pack
LPPs
AIX Documentation
AIX Toolbox for Linux
LOO:
bos
Package: bos.INed
Package: bos.adt
Fileset:
Bos.INed
Fileset:
Bos.adt.lib
Fileset:
Bos.adt.prof
Collection of Packages Complete Product
Collection of Filesets
Smallest Unit Specific Function
Packaging Definitions
LPP Package Fileset Suffix
Bos.terminfo.print.data
Message Convention:
LPP.msg[.lang].package.fileset
Fileset Naming
5 . 1 . 0 . 0
Version Release Modification Fix
MIGRATION Smit update_all
Software Updates
Applied:
Fileset 4.3.3.0 (Old Version)
Applied fileset 5.1.0.0
Committed Fileset 5.1.0.0
Commit or Reject
Fileset 5.1.0.0 (New Version)
Fileset 4.3.3.0 (Old Version)
Install
Install
Committed
4.3.3.0
5.1.0.0
Software States
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 (befor/after upgrade)
•Long term archive
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
Types of BackupThree types of backup:
rootvg
Full backup
System backup
Incremental backup
Incremental backup
Backup Strategy
AIX Print Subsystem : Advantages
Powerful and flexible printer drivers System management tools Limits fields and option validation Easy printer customization Single step print device and queue creation Support for dial-in administration Customizable spooling subsystem
System V Print Subsystem: Advantages
Compattability of interface programs
Avilabilty of interface programs
Security
Support for forms
Standard PostScript filters
Long term strategy
File 1
File 2
File 3
File 4
File 1
File 2
File 3
File 4
/dev/Ip0
/dev/Ip1
Queue2
Queue1
:
Concepts of Queues
Spool
Directory
Virtual Printer
Defination
Ip Ipr qprt
enq
Queue
qdaemon
Backend
( piobe )
/ev/Ip0d
# qprt -Pps [ -c ] file Print Request
monitors
starts
submits file to prienter
Print Request
Copy of file ( if requested )
Printer Data Flow
/etc/qconfig queue configuration files
/var/spool/* spooling directories
/var/spool/lpd/qdir/* queue requests
/var/spool/qdaemon/* temporary enqueued files
/var/spool/ipd/stat/* line printer status information
/var/spool/lpd/pio/@local Virtual printer directories
System Files Associated with Printing
State DescriptionDEV_BUSY Printer is busy servicing other print requests
DEV_WAIT QUEUE IS WAITING FOR THE PRINTER
DOWN QUEUE IS DOWN AND NO JOBS WILL BE SERVICED FROM THIS QUEUE UNTIL IS BROUGHT UP
OPR_WAIT THE QUEUE IS WAITING FOR OPERATOR INTERVENTION
QUEUED JOB IS QUEUED AND WAITING
READY Everything is ready to receive a print request
RUNNING Print file is printing
UNKNOWN Problem with the queue – need to investiage further to determine cause
Queue Status