AIX Jumpstart Notes
AIX Jumpstart Notes
Day One 2 List and connect to a LPAR.......................................................................................................................2 List the managed system on the HMC.......................................................................................................2 List all LPARS on managed system..........................................................................................................2 List the name and states of the running systems........................................................................................2 Open a console...........................................................................................................................................2 SMIT (system management interface tool)................................................................................................2 OS Levels...................................................................................................................................................2 Packages.....................................................................................................................................................2 Fixes...........................................................................................................................................................3 SUMA........................................................................................................................................................3 System Config and devices........................................................................................................................3 Networking................................................................................................................................................4 System start up and shutdown....................................................................................................................5 Day Two 7 Logical Partitions.......................................................................................................................................7 AIX Installation.........................................................................................................................................7 LVM...........................................................................................................................................................7 Day Three..........................................................15 File systems..............................................................................................................................................15 Backups / Mksysb...................................................15 ODM........................................................................................................................................................16 Day 4 19 System initialization.................................................................................................................................19 System boot..............................................................................................................................................20 LVM Metadata.........................................................................................................................................20 Disk management recovery......................................................................................................................22 Dump facility...........................................................................................................................................23 Day 5 24 Install techniques.....................................................................................................................................24 Performance tools..................................................24 WPAR (system or application).......................................25 APPENDIX 25
Day One
List and connect to a LPAR vtmenu List the managed system on the HMC lssyscfg -r sys -F name:serial_num:state List all LPARS on managed system lssyscfg r sys F name lssyscfg -m sys154 -r lpar -F name:state List the name and states of the running systems lssyscfg -m sys154 -r lpar -F name state os_version lssyscfg -m sys154 -r lpar -F name:state Open a console mkvterm -m sys154 -p sys154_lpar3 SMIT (system management interface tool) * = Mandortory field + = Pick list (press F4) F6 tells you the command F9 to access a shell CTRL+D to get back to SMIT Check your home directory for the smit logs You can redirect smit output: smitty s <script file> -l <logfile> OS Levels oslevel s 6100-02-02-0849 Packages List packages lslpp -l rpm -qa Install a package (see page 3-19) installp aBd (apply only) installp acd (apply and commit) installp c (commit) rpm I installp acpgXYd . <package name> geninstall I acgXYd p d . <package name> Create a package bffcreate Uninstalling a package installp u or smit (see page 3-25 2
Recovery lppchk v (check see page 3-26) installp C (cleanup see page 3-26) Discover LPP filesets lslpp w /usr/bin/whois (what file set does this belong to) lslpp h bos.net.tcp.server (history of fileset) Fixes instfix (list the updates applied to a server) See page (3-8 & 3-23) emgr (interim fix management) Emergency fix package (see page 3-8 & 3-24) SUMA Service update management assistant used to download and install updates (see page 3-28) System Config and devices Print configuration prtconf As an example
o
* ent0 U8204.E8A.652B032-V4-C12-T1 Virtual I/O Ethernet Adapter (l-lan) U8204.E8A.652B032 = enclousure T1 = port V4 = parent bus C12 = card 12
List configuration lscfg v l ent0 (this will show mac addresses, wwn etc)
ent0 U8204.E8A.652B032-V4-C12-T1 Virtual I/O Ethernet Adapter (l-lan) Network Address.............0EB2FAE7D60C Displayable Message.........Virtual I/O Ethernet Adapter (l-lan) Hardware Location Code......U8204.E8A.652B032-V4-C12-T1
List
devices lsdev | grep ent or Cc disk lsdev C H | more Parent devices o lsdev -Cl ent0 -F parent o lsparent Cl ent0
Display DR slots lsslot Change a device chdev Make a device ready for use (defined = known about) 3
(available = can be used) mkdev Configure a device cfgmgr Unload a device driver rmdev rmdev l rmt0 (defined) rmdev dl rmt0 (deleted undefined) List attributes lsattr How much memory is assigned to LPAR: o lsattr -El mem0
ent_mem_cap goodsize size var_mem_weight I/O memory entitlement in Kbytes 1024 Amount of usable physical memory in Mbytes 1024 Total amount of physical memory in Mbytes Variable memory capacity weight False False False False
HDISK & HD HDISK is the actual disk drive (virtual or physical) HD is the volume Networking ent is the physical interface operates at layer 1 and layer 2 this has the MAC and MTU etc en and et uses layer 3
lsdev Cc if (see page 5-3) smit mktcpip (see page 5-5) ODM (object data manager see page 5-8) TCP/IP Startup (see page 5-10) Setting hostname: Permanent o chdev l inet0 a hostname=<new hostname> On the fly (gone after a reboot) o hostname<new hostname> Add an IP address to a interface Permanent o chdev l <dev> -a netaddr=<ip addr> -a netmask=<mask> -a state up On the fly (gone after reboot) o Ifconfig <dev> <ip> <mask> up Get all routes configured 4
lsattr El inet0
System start up and shutdown Start a managed system chsysstate m <managed system name> -r sys o on Booting LPAR bootlist m normal o (check the current boot list) bootlist m normal ent0 bserver=<ip address> client=<ip address> chsysstate m <managed system name> -r <lpar> -o on n <lpar> -f <profile name> -b <boot mode> Inittab Default run level 2 Run level for HACMP isA Run level 3 to 9 are user defined Updating inittab o mkitab o chitab o rmitab System resource controller ps -ef | grep src
o
0:00 /usr/sbin/srcmstr
ps -T 172200
PID TTY TIME CMD 172200 - 0:00 srcmstr 86270 - 0:00 |\--writesrv 147662 - 0:00 |\--dtlogin 163978 - 0:02 |\--sendmail 192726 - 0:00 |\--snmpmibd 200878 - 0:00 |\--sshd 315424 - 0:01 | \--sshd 434380 pts/0 0:00 | \--ksh 454710 pts/0 0:00 | \--ps 204934 - 0:00 |\--rpc.statd 217224 - 0:00 |\--rpc.lockd 233596 - 0:00 |\--biod 237756 - 0:00 |\--hostmibd 245904 - 0:00 |\--syslogd 249980 - 0:00 |\--aixmibd 254094 - 0:00 |\--portmap 262274 - 0:00 |\--inetd 323746 - 0:00 | \--rpc.ttdbserver 278690 - 0:00 |\--snmpdv3ne 291008 - 0:00 |\--ksh 168126 - 0:00 | \--ksh 319660 - 0:38 | \--java 422122 - 0:00 | \--pconsole_exec 295088 - 0:16 |\--java 303252 - 0:00 |\--qdaemon 331796 - 0:00 |\--IBM.DRMd 352456 - 0:08 |\--IBM.CSMAgentRMd 356526 - 0:05 |\--rmcd 368832 - 0:00 \--IBM.ServiceRMd
Subsystems o lssrc a o lssrc g tcpip o stopsrc s <subsystem> o startsrc s <subsystem> o refreshsrc s <subsystem>
Day Two
Logical Partitions See section 7 in the exercise book for an example on how to create an LPAR remember the number of Maximum number of virtual adapters. AIX Installation lpp_source is like a CD mksysb is a system backup using a IBM backup format, using restore you can extract files on an individual basis. smit eznim Configure as a NIM Master Configure as a NIM Client LVM LVM Commands: o smitty lvm SMIT OPTION List All Volume Groups Add a Volume Group Set Characteristics of a Volume Group List Contents of a Volume Group Remove a Volume Group Activate a Volume Group Deactivate a Volume Group Import a Volume Group Export a Volume Group Mirror a Volume Group Unmirror a Volume Group Synchronize LVM Mirrors Back Up a Volume Group Remake a Volume Group Preview Information about a Backup Verify the Readability of a Backup (Tape View the Backup Log List Files in a Volume Group Backup Restore Files in a Volume Group Backup
COMMAND LINE lsvg (-o) mkvg <vg name> chvg <vg name> lsvg <vg name> reducevg df <vg name> <hdisk> varyonvg <vg name> varyoffvg <vg name> importvg <vg name> deportvg <vg name> mirrorvg <vg name> <hdisk>
only)
BB = bad block relocation STALE PPs = mirrors not synced HOT SPARE = allocate a host spare to Raid 5 pool Volume groups Read the volume group descriptor area o readvgda <hdisk> Extend a VG o extendvg <vg name> <hdisk> <hdisk> 7
Logical volumes smit lv SMIT OPTION List All Logical Volumes by Volume Group Add a Logical Volume Set Characteristic of a Logical Volume Show Characteristics of a Logical Volume Remove a Logical Volume Copy a Logical Volume
COMMAND LINE lslv mklv y <volume name> -t <type> -c (copies) 1 <vg name> <size in LPs> <hdisks> chlv lslv <lv name> rmlv mklvcopy k <lv name> <number of copies> <hdisk>
Enable allocate each logical partition copy on a SEPARATE physical volume this will assist by making migration easier and use super strictness so all primary LP copies are on the same physical volume. Logical partitions to physical partitions o lslv m <lv name> Remove a lv o rmlv
Physical volumes smit pv SMIT OPTION List All Physical Volumes in System Add a Disk Change Characteristics of a Physical Volume List Contents of a Physical Volume Move Contents of a Physical Volume Exercise making a VG section 9 Section 9 Check the disk assignment lspv hdisk0 0002b0323725c902 rootvg hdisk1 none None hdisk2 none None hdisk3 none None Make a VG mkvg -f -s 64 -y brianvg hdisk1 lsvg brianvg
VOLUME GROUP: VG STATE: VG PERMISSION: MAX LVs: brianvg active read/write 256 VG IDENTIFIER: PP SIZE: TOTAL PPs: FREE PPs:
active
USED PPs: QUORUM: VG DESCRIPTORS: STALE PPs: AUTO ON: MAX PVs: AUTO SYNC: BB POLICY:
Extend the VG extendvg -f brianvg hdisk2 Check the disk assignment lspv hdisk0 0002b0323725c902 rootvg hdisk1 0002b032387eb769 brianvg hdisk2 0002b0323885d741 brianvg hdisk3 none None Remove hdisk2 from brianvg reducevg brianvg hdisk2 lspv hdisk0 0002b0323725c902 rootvg hdisk1 0002b032387eb769 brianvg hdisk2 0002b0323885d741 None hdisk3 none None
active active
Export the VG lsvg o (show all that online that is vary on) brianvg rootvg varyoff brianvg ksh: varyoff: not found. lsvg -o brianvg rootvg varyoffvg brianvg lsvg -o rootvg lspv hdisk0 0002b0323725c902 rootvg active hdisk1 0002b032387eb769 brianvg hdisk2 0002b0323885d741 None hdisk3 none None exportvg brianvg lspv hdisk0 0002b0323725c902 rootvg active hdisk1 0002b032387eb769 None hdisk 0002b0323885d741 None hdisk3 none None Import the VG {sys154_lpar3} / # lspv hdisk0 0002b0323725c902 active 9
rootvg
hdisk1 0002b032387eb769 active hdisk2 0002b0323885d741 hdisk3 none {sys154_lpar3} / # lsvg rootvg brianvg {sys154_lpar3} / # lsvg -o brianvg rootvg
Convert the VG to scaleable {sys154_lpar3} / # varyoffvg brianvg {sys154_lpar3} / # chvg G brianvg 0516-1224 chvg: WARNING, once this operation is completed, volume group brianvg cannot be imported into AIX 5.2 or lower versions. Continue (y/n) ? y 0516-1712 chvg: Volume group brianvg changed. brianvg can include up to 1024 physical volumes with 2097152 total physical partitions in the volume group. {sys154_lpar3} / # exportvg brianvg {sys154_lpar3} / # importvg -y convbrianvg hdisk1 synclvodm: No logical volumes in volume group convbrianvg. convbrianvg {sys154_lpar3} / # lsvg rootvg convbrianvg Extend scaleable VG extendvg -f convbrianvg hdisk2 hdisk3 {sys154_lpar3} / # lspv hdisk0 0002b0323725c902 active hdisk1 0002b032387eb769 active hdisk2 0002b0323885d741 active hdisk3 0002b03238cc8f31 active
Add a LV to scaleable VG {sys154_lpar3} / # mklv -y datalv1 -t jfs2 -c 1 convbrianvg 5 {sys154_lpar3} / # lsvg -l convbrianvg convbrianvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT datalv1 jfs2 5 5 1 closed/syncd Check the disk the LV was created on {sys154_lpar3} / # lslv -l datalv1 datalv1:N/A PV COPIES IN BAND hdisk1 005:000:000 100% 10
N/A
DISTRIBUTION 000:005:000:000:000
DISTRIBUTION 00..05..00..00..00
MOUNT N/A
Extend the LV {sys154_lpar3} / # extendlv datalv1 5 {sys154_lpar3} / # lspv -l hdisk1 hdisk1: LV NAME LPs PPs DISTRIBUTION POINT datalv1 10 10 00..10..00..00..00
MOUNT N/A
Create a mirror of the LV {sys154_lpar3} / # mklvcopy -k datalv1 2 hdisk3 {sys154_lpar3} / # lslv -l datalv1 datalv1:N/A PV COPIES IN BAND DISTRIBUTION hdisk1 010:000:000 100% 000:010:000:000:000 hdisk3 010:000:000 60% 000:006:004:000:000 {sys154_lpar3} / # lslv datalv1 LOGICAL VOLUME: datalv1 VOLUME GROUP: convbrianvg LV IDENTIFIER: 0002b0320000d9000000012b387eb791.1 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs2 WRITE VERIFY: off MAX LPs: 512 PP SIZE: 64 megabyte(s) COPIES: 2 SCHED POLICY: parallel LPs: 10 PPs: 20 STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: minimum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 1024 MOUNT POINT: N/A LABEL: None MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO DEVICESUBTYPE : DS_LVZ COPY 1 MIRROR POOL: None COPY 2 MIRROR POOL: None COPY 3 MIRROR POOL: None Create a RAID0 {sys154_lpar3} / # mklv -y stripelv -t jfs2 -S64K convbrianvg 24 hdisk1 hdisk2 hdisk3 {sys154_lpar3} / # lslv -l stripelv stripelv:N/A PV COPIES IN BAND DISTRIBUTION hdisk1 008:000:000 100% 000:008:000:000:000 hdisk2 008:000:000 75% 000:006:002:000:000 11
hdisk3 008:000:000 0% 006:000:002:000:000 {sys154_lpar3} / # lspv -l hdisk1 hdisk1: LV NAME LPs PPs DISTRIBUTION MOUNT POINT stripelv 8 8 00..08..00..00..00 N/A datalv1 10 10 00..10..00..00..00 N/A {sys154_lpar3} / # lspv -l hdisk2 hdisk2: LV NAME LPs PPs DISTRIBUTION MOUNT POINT stripelv 8 8 00..06..02..00..00 N/A {sys154_lpar3} / # lspv -l hdisk3 hdisk3: LV NAME LPs PPs DISTRIBUTION MOUNT POINT stripelv 8 8 06..00..02..00..00 N/A datalv1 10 10 00..06..04..00..00 N/A {sys154_lpar3} / # lslv -m stripelv stripelv:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0049 hdisk1 0002 0007 hdisk2 0003 0017 hdisk3 0004 0050 hdisk1 0005 0008 hdisk2 0006 0018 hdisk3 0007 0051 hdisk1 0008 0009 hdisk2 0009 0001 hdisk3 0010 0052 hdisk1 0011 0010 hdisk2 0012 0002 hdisk3 0013 0053 hdisk1 0014 0011 hdisk2 0015 0003 hdisk3 0016 0054 hdisk1 0017 0012 hdisk2 0018 0004 hdisk3 0019 0055 hdisk1 0020 0013 hdisk2 0021 0005 hdisk3 0022 0056 hdisk1 0023 0014 hdisk2 0024 0006 hdisk3 {sys154_lpar3} / # lslv stripelv LOGICAL VOLUME: stripelv VOLUME GROUP: convbrianvg LV IDENTIFIER: 0002b0320000d9000000012b387eb791.2 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs2 WRITE VERIFY: off 12
MAX LPs: 512 PP SIZE: megabyte(s) COPIES: 1 SCHED POLICY: LPs: 24 PPs: STALE PPs: 0 BB POLICY: INTER-POLICY: maximum RELOCATABLE: INTRA-POLICY: middle UPPER BOUND: MOUNT POINT: N/A LABEL: MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes (superstrict) Serialize IO ?: NO STRIPE WIDTH: 3 STRIPE SIZE: 64k DEVICESUBTYPE : DS_LVZ COPY 1 MIRROR POOL: None COPY 2 MIRROR POOL: None COPY 3 MIRROR POOL: None {sys154_lpar3} / # rmlv stripelv
Add another data LV {sys154_lpar3} / # mklv -y datalv2 -a e -t jfs2 convbrianvg 5 hdisk1 datalv2 {sys154_lpar3} / # lspv -l hdisk1 hdisk1: LV NAME LPs PPs DISTRIBUTION MOUNT POINT datalv2 5 5 05..00..00..00..00 N/A datalv1 10 10 00..10..00..00..00 N/A {sys154_lpar3} / # lslv -l datalv2 datalv2:N/A PV COPIES IN BAND DISTRIBUTION hdisk1 005:000:000 100% 005:000:000:000:000 Migrate a LV {sys154_lpar3} / # migratepv -l datalv2 hdisk1 hdisk2 {sys154_lpar3} / # lslv -l datalv2 datalv2:N/A PV COPIES IN BAND DISTRIBUTION hdisk2 005:000:000 100% 005:000:000:000:000 {sys154_lpar3} / # lspv -l hdisk2 hdisk2: LV NAME LPs PPs DISTRIBUTION MOUNT POINT datalv2 5 5 05..00..00..00..00 N/A Remove the mirrored datalv1 to create space {sys154_lpar3} / # rmlvcopy datalv1 1 hdisk1 {sys154_lpar3} / # lslv -l datalv1 datalv1:N/A PV COPIES IN BAND hdisk3 010:000:000 60% {sys154_lpar3} / # lspv -l hdisk1 {sys154_lpar3} / # lspv -l hdisk3 13
DISTRIBUTION 000:006:004:000:000
LPs 10
PPs 10
DISTRIBUTION 00..06..04..00..00
MOUNT N/A
Remove hdisk1 from the scaleable VG {sys154_lpar3} / # reducevg convbrianvg hdisk1 {sys154_lpar3} / # lspv hdisk0 0002b0323725c902 active hdisk1 0002b032387eb769 hdisk2 0002b0323885d741 active hdisk3 0002b03238cc8f31 active Mirror rootvg {sys154_lpar3} / # extendvg -f rootvg hdisk1 {sys154_lpar3} / # lspv hdisk0 0002b0323725c902 active hdisk1 0002b032387eb769 active hdisk2 0002b0323885d741 active hdisk3 0002b03238cc8f31 active {sys154_lpar3} / # mirrorvg rootvg hdisk1 Install boot image on hdisk1 {sys154_lpar3} / # bosboot -a -d /dev/hdisk1 o Update boot devices {sys154_lpar3} / # bootlist -m normal hdisk0 hdisk1 Unmirror rootvg {sys154_lpar3} / # unmirrorvg -c 1 rootvg hdisk1 o Update bootlist {sys154_lpar3} / # bootlist -m normal hdisk0 o Update the PV {sys154_lpar3} / # chpv -c hdisk1 Remove hdisk1 from rootvg {sys154_lpar3} / # reducevg rootvg hdisk1 {sys154_lpar3} / # lspv hdisk0 0002b0323725c902 active hdisk1 0002b032387eb769 hdisk2 0002b0323885d741 active hdisk3 0002b03238cc8f31 active
14
Day Three
File systems Look o 28 26 at inode numbers ls li -rw------- 1 root system 296 Sep 22 04:08 .TTauthority -rw------- 1 root system 425 Sep 22 04:07 .Xauthority
Examine indoes o istat .sh_history Inode 942 on device 10/4 File Protection: rw------Owner: 0(root) Group: 0(system) Link count: 1 Length 2116 bytes Last updated: Wed Sep 22 11:00:54 CEDT 2010 Last modified: Wed Sep 22 11:00:54 CEDT 2010 Last accessed: Wed Sep 22 11:00:54 CEDT 2010
When creating file systems ensure that you create the logical volume yourself otherwise you will have logical volume names of fslv00. chfs mklv t jfs2log y myj2logv rootvg 1 logform /dev/myj2loglv
Backups / Mksysb
Create a backup VG {sys154_lpar3} / # mkvg -f -y backupvg hdisk1 Create enhanced JFS2 o Create a lv in backupvg {sys154_lpar3} / # mklv -y backuplv -a e -t jfs2 backupvg 10 hdisk1 Create a log for backup fs {sys154_lpar3} / # mklv -y backuplog -t jfs2log backupvg 1 {sys154_lpar3} / # logform /dev/backuplog Create the file system and tie to log {sys154_lpar3} / # crfs -v jfs2 -d backuplv -m /backup -A yes -a logname=backuplog {sys154_lpar3} / # lspv -l hdisk1 hdisk1: LV NAME LPs PPs DISTRIBUTION MOUNT POINT backuplog 1 1 00..01..00..00..00 N/A backuplv 10 10 10..00..00..00..00 /backup 15
{sys154_lpar3} / # mount /backup {sys154_lpar3} / # lsfs /backup Name Nodename Mount Pt Options Auto Accounting /dev/backuplv -/backup yes no {sys154_lpar3} / # grep backup /etc/filesystems /backup: dev = /dev/backuplv log = /dev/backuplog
VFS jfs2
Size 327680 --
ODM Cfgmgr is ran at boot time and updates the customised devices (CuDv) using the predefined devices (PdDv). Predefined attribute (PdAt) customised attribute (CuAt). lsdev lsattr odmshow PdDv, CuDv, PdAt, CuAT odmshow odmcreate to create a table odmadd <file name> odmdrop delete a table odmchange odmdelete to delete an attribute odmget
List all support devices on the system lsdev P H List all disk devices attached to the system lsdev Cc disk -H Get the location of the devices lsdev -Cc disk -F "name status location physloc" List ODM object to describe hdisk0 odmget -q name=hdisk0 CuDv lscfg | grep hdisk0 Listing attributes lsattr El hdisk0 odmget q name=hdisk0 and attribute=pvid CuAt odmget CuAt | grep -p hdisk0 | grep -p pvid Obtaining major and minor numbers ls -l /dev/hdisk0 brw------1 root system odmget -q value3=hdisk0 CuDvDr 16
17,
List ODM for rootvg and get dependencies odmget -q name=rootvg CuDep odmget -q parent=rootvg CuDv Modifying an ODM attribute get o get o get o o use o the attributes for en1 lsattr -El en1 the maximum value that the remmtu can be set to lsattr -Rl en1 -a remmtu from the odm the values you can use for remmtu odmget -q name=en1 CuDv odmget -q "uniquetype=if/EN/en and attribute=remmtu" PdAt odmchange to alter the remmtu value odmget -q "uniquetype=if/EN/en and attribute=remmtu" PdAt > /tmp/odm-remmtu o vi /tmp/odm-remmtu o odmchange -o PdAt -q "uniquetype=if/EN/en AND attribute=remmtu" /tmp/odm-remmtu
1.1.
Error types P = permanent, performance or pending T = temporary I = informational U = unknown Error Classes H = hardware S = software O = operator U = undetermined Get error log attributes /usr/lib/errdemon -l Error Log Attributes -------------------------------------------Log File /var/adm/ras/errlog 17
Log Size Memory Buffer Size Duplicate Removal Duplicate Interval Duplicate Error Maximum
Sending mail to notify of errors: vi /tmp/notify.add errnotify: en_name="sample" en_persistenceflg=0 en_class="O" en_method="errpt -a -l $1 | mail -s ERRLOG root" change the ODM o odmadd /tmp/notify.add check the ODM o odmget -q "en_name=sample" errnotify send a message to check o errlogger test entry on the log o check with mail [t] List the paging device and how much is used lsps a vmo -a ioo -a
18
Day 4
System initialization What is the boot device Bootlist m normal o What disk has the boot block lspv l hdisk0 or LV NAME LPs PPs DISTRIBUTION hd5 2 2 02..00..00..00..00 lslv m hd5:N/A LP PP1 0001 0001 0002 0002 hd5 PV1 hdisk0 hdisk0 PP2 PV2 PP3 PV3
What is the logical volume of hd5 lsvg l rootvg rootvg: LV NAME TYPE LPs PPs hd5 boot 2 2
PVs 1
LV STATE closed/syncd
Identify a VGID lsvg rootvg VG IDENTIFIER: 0002b0320000d9000000012b3725c9da Get the first disk PVID lspv (16 bit) hdisk0 0002b0323725c902 rootvg active hdisk1 0002b032387eb769 backupvg active hdisk2 0002b0323885d741 convbrianvg active hdisk3 0002b03238cc8f31 convbrianvg active Use ODM to get the PVID from the class CuAt (32 bit) odmget -q "name=hdisk0 and attribute=pvid" CuAt CuAt: name = "hdisk0" attribute = "pvid" value = "0002b0323725c9020000000000000000" type = "R" generic = "D" rep = "s" nls_index = 11 Get the physical location of and Ethernet interface lscfg | grep ent Model Implementation: Multiple Processor, PCI bus
* ent1 * ent0 U8204.E8A.652B032-V4-C13-T1 Virtual I/O Ethernet Adapter (l-lan) U8204.E8A.652B032-V4-C12-T1 Virtual I/O Ethernet Adapter (l-lan)
19
Boot the server into sms mode chsysstate -m sys154 -r lpar -n sys154_lpar3 -o on -f normal -b sms Re-install a boot block bosboot -ad /dev/hdisk0 System boot Phase 1 if the system does not pass here then could be a boot image issue Process 1 (F05) rc.boot 1 (c06) restbase (548, 510) cfgmgr f (f = first run not a full cfgmgr) bootinfo b (511) Phase 2 rc.boot 2 (551) ipl_varyon (552, 554, 556, 517) fsck hd4 and mount hd4 (555, 557) fsck f hd2 and mount /usr (518 fsck hd9var and mount /var copy core and then unmount /var (518) swapon hd6 copy ram /dev files to disk mergedrv copy RAM ODM files to disk mount /var copy boot messages to alog Kernel removes RAMFS Phase 3 Read /etc/inittab and /sbin/rc.boot (553) fsck hd3 and mount /tmp syncvg rootvg & (517) cfgmgr p2 or cfgmgr p3 cfgcon and rc.dt boot (c31, c32, c33, c34) savebase syncd 60 errdemon turn off LEDs rm /etc/nologin chgstatus=3 CuDv Execute rest of inittab Fix a file system fsck y V <file system type> /dev/hdxx LVM Metadata If you see this error 20
varyonvg backupvg 0516-082 varyonvg: Unable to access a special device file. Execute redefinevg and synclvodm to build correct environment. redefinevg -d hdisk1 backupvg (each disk has a priv region) varyonvg backupvg
Creat VG, LV and FS mkvg -f -S -y lvmtestvg hdisk1 mklv -t jfs2 -y lvmtestlv lvmtestvg 4 crfs -v jfs2 -m /lvmtestfs -d lvmtestlv mount /lvmtestfs lsvg -l lvmtestvg | grep lvmtestfs
> /dev/null
More ODM commands odmdelete -o CuDv -q"parent=rootvg" >/dev/null 2>/dev/null odmdelete -o CuAt -q"attribute=type and name like hd*" >/dev/null 2>/dev/null odmdelete -o CuAt -q"attribute=lvserial_id and name like hd*" >/dev/null 2>/dev/ odmdelete -o CuAt -q "name=lvmtestlv" odmdelete -o CuDv -q "name=lvmtestlv" odmdelete -o CuAt -q "name=lvmtestlv" odmdelete -o CuDv -q "name=lvmtestlv" If you are in a situation where the type of the file system is not known this can help: {sys154_lpar3} / # lsvg -l lvmtestvg lvmtestvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT lvmtestlv ??? 4 4 1 open/syncd /lvmtestfs loglv00 jfs2log 1 1 1 open/syncd N/A {sys154_lpar3} / # umount /lvmtestfs {sys154_lpar3} / # varyoffvg lvmtestvg {sys154_lpar3} / # exportvg lvmtestvg {sys154_lpar3} / # importvg -y lvmtestvg hdisk1 lvmtestvg {sys154_lpar3} / # lsvg -l lvmtestvg lvmtestvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT lvmtestlv jfs2 4 4 1 closed/syncd /lvmtestfs loglv00 jfs2log 1 1 1 closed/syncd N/A Or we can run synclvodm rootvg
21
Replacement of a failed data disk mkvg f s 16 y datavg hdisk# crfs v jfs2 g datavg a size=1 m /myfs lspv extendvg datavg hdisk# migratepv (from) hdisk# (to) hdisk# reducevg datavg hdisk2 rmdev dl hdisk# cfgmgr Exporting and importing a VG umount /home/mars varyoffvg datavg exportvg datavg importvg y datavg hdisk# lsvg o mount /home/mars Quorums 22
Loss of a quorum when you varyon the VG may look like this varyonvg newvg PV Status: hdisk2 0002b0323885d741 PVACTIVE hdisk3 0002b03238cc8f31 PVMISSING errpt a Description Activation of a no quorum volume group with out 100% of the disks Probable Causes One or more physical volumes are not available and MISSINGPV_VARYON variable is on Detail Data MAJOR/MINOR DEVICE NUMBER 0022 0000 Bring back a removed device online mkdev l hdisk3 If the Vg does not come online you may need to use varyonvg f datavg mkdev -l hdisk# varyonvg newvg chpv -v a hdisk# Dump facility Livedump can dump a part of the system without the need for downtime this uses ras. livedumpstart dumpctrl core dumps are placed in /var/adm/ras sysdumpdev p (will be lost after reboot) sysdumpdev P (will be written in the ODM) dump device size is recommended 1GB for every 12GB sysdumpdev e (estimate the dump device size) sysdumpdev l (list the dump devices) dumpcheck will run automatically and check dump devices sysdumpstart (will cause a core dump) chdev l sys0 a autorestart=0 (auto reboot after a crash) sysdumpdev L (check to dee if there is a core dump) dmpuncompress -p /var/adm/ras/vmcore.0.BZ (uncompress dump) kdb /var/adm/ras/vmcore. o stat see dump codes page 18-19 see snap similar to explorer
23
Day 5
Install techniques Install a mksysb on a disk smit alt_clone alt_disk_mksysb Cloning a root disk smit alt_mksysb alt_disk_copy b update_all l /dev/cd0 d <new device> Removing alternate disk install Go back to original version o bootlist m normal hdisk0 o reboot o lsvg o alt_rootvg_op X (remove the VG) Go to new version o bootlist m normal hdisk0 o reboot o lsvg o alt_rootvg_op X old_rootvg Using multibos Check the free space multibos s -X Booting from new bos image bosboot m normal hdisk# blv# shutdown Fr Removing a multibos multibos -R
Performance tools
I/O iostat filemon fileplace
Processor ps sar tprof cuart lparstat -il mpstat All in one topas (-C all partitions) Virtual memory is physical ram plus paging space (paging space is disk) you do not want to use paging space. See page 20-12
APPENDIX
www.redbooks.ibm.com http://www.unixwerk.eu/aix/hmc-howto.html www.bullfreeware.com
25