Upgrading an AIX LPAR to a New OS Version using nim bosinst

super-mario-mushroom

How to upgrade an LPAR to a new version of AIX using a mksysb

Checklist

LPAR Information

Hostname
IP
Subnet and Gateway
Frame
Current Paging Space
Volume Groups
Free Disk Space
Memory
Disk Type (JFS)
File Systems

VIO Information

Current New New
Vio Servers
Vhost
Controller Id
Backing Device
VTD
Client Device
Disk Size

Backup SSH Files

  • copy ssh file to new location
     cp –r /etc/ssh /etc/ssh.backup 

Map disks from VIO

  • If new disks are being allocated for additional storage or JFS to JFS2 Conversion, you will need to map the disk through the VIO server
  • Once storage is allocated through SVC, login to VIO server
  • detect new hard ware
     cfgdev 
  • confirm LUN ID with disks allocated by storage team
     lsdev –dev hdiskx –vpd 
  • create virtual device on NIM
     mkvdev –vdev hdiskx –vadapter vhostx –dev [vtd] 
  • view all devices mapped with specified vhost
     lsmap –vadapter vhostx 

Confirm Disks on LPAR

    • review attributes
       cfgmgr 
       lsattr –El hdiskx 
    • In order to maximize consistency between redundant VIO servers, I prefer an hcheck interval of 60 and a vscsi1 path priority of 2
 chdev -l [hdiskx] -a hcheck_interval=60

chpath -l [hdiskx] -p vscsi0 -a priority=2
 

Backup rootvg

  •  mount –o soft [nim server]:[mksysb image location] [mount point] 
  •  /usr/bin/mksysb –i –X –p [full path including new mksysb image name] 1>[log file] 2> [err log file] 

Backup inittab, disable all non-OS processes from booting up to ensure minimum reboot time

  •  cp /etc/inittab /etc/inittab.backup 
  • add : to comment out in inittab.  This is important because you will initiate multiple reboots and starting up all the processes and applications can be both a waste of time and may not shut down properly (if you force a shut down etc).  It is also important to note that you DO NOT want to simply restore the inittab after installation as the os upgrade may have added entries to the inittab.  The backup is simply a precaution, and you always want to only uncomment out what you added in
     vi /etc/inittab 

Check for currently running processes not owned by root

  •  ps –ef 

From NIM, ensure LPAR ready for BOS installation

  • Smit nim_bosinst -> rte install -> Version Images/Spot

i.      Accept Licenses -> Yes

ii.      Initiate Reboot -> No

iii.      Accept Licenses -> Yes

  • Ensure Client State is Ready for Installation
     lsnim –l [hostname] 

Re-Boot LPAR from HMC

  • Shutdown LPAR (I like to do this from the HMC sending an OS level shutdown to ensure all processes closed nicely
  • Activate Profile -> Open Terminal -> Advanced -> Boot Mode -> SMS Mode

Upgrade AIX on LPAR

  • 2) Remote IPL -> 1) Ethernet -> 1) IPv4 -> 1) BOOTP -> 1) IP Parameters *Populate if necessary* ESC) Back -> 3) Ping Test -> 1) Run *If failed reconfirm IP or contact networking*
  • 5) Boot Option -> 1) Select install/boot order -> 6) Network -> 1) BOOTP -> 1) LAN -> 2) Normal Boot -> 1) Yes

On Boot

1) Enter -> 2) Custom Settings -> Ensure Enterprise Edition selected

  • At ~3% you will need to confirm settings etc.

Once Booted

  • Confirm updated successfully
     oslevel –s 
  • Check error reports
     bootlist –om normal 
     errpt | more 
  • Check JFS or JFS2 
     lsvg –l [vg] 

Restore SSH Key

  •  mv /etc/ssh /etc/ssh.old 
  •  mv /etc/ssh.backup /etc/ssh 

If running JFS2 Conversion

  • If splitting rootvg over 2 disks, install bos.alt_disk_*7.1.1.0
  • Copy old rootvg to new JFS2 disk
     alt_disk_copy –T –d hdiskx 
  • Set new rootvg
     alt_rootvg_opt –X 
  • confirm boot device
     bootlist –om normal 

If creating additional VG

  • smit vg -> Add VG -> Scalable
    • Change PP Size
    • Physical Location
  • confirm creation
     lsvg 

Create jfs2log LV on datavg

  • make LV
     mklv –t jfs2log datavg 1 
  • format LV
     logform /dev/loglv0x 

If migrating file systems off of rootvg to new VG

  • Backup /etc/filesystems
    •  cp /etc/filesystems /etc/filesystems.backup 
  • unmount
     unmount [file system] 

    **Subdirectories must be mounted first**

  • copy LV to new VG
     cplv –v [destination vg] [lv name] 
  • update file system file
     chfs –a dev=/dev/[lv] –a log=/dev/[new jfs2 log] [file system] 
  • mount newly created file system
     mount [file system] 
  • remove old LV
     rmlv [old lv] 
  • Repeat for chosen file systems

If migrating rootvg to new disk

  • list disks
     lspv 
  • allow VG access to new disk
     extendvg rootvg [new disk] 
  • mirror disks
     mirrorvg rootvg [new disk] 
  • add boot information to new disk
     bosboot –ad [new disk] 
  • set system to boot from new disk
     bootlist –m normal [new disk] 
  • clear boot record from old disk
  •  chpv –c [old disk] 
  • unmirror
     unmirrorvg rootvg [old disk] 
  • remove vg off old disk
     reduce rootvg [old disk] 
  • remove old disk
     rmdev –dl [old disk] 
  • confirm old disk removed
     lspv 
  • confirm boot device
     bootlist –om normal 


Create paging space (usually 1:1.5 memory)

  • check current paging space
     lsps –a 
  • check amount of memory
     lsattr –El  mem0 
  • smit lv -> Paging
    • Either add space to rootvg paging space or create new LV on new VG
  • confirm added page space
     lsps –a 

If you are left with disks no longer needed, delete from LPAR

  • list disks
     lspv 
  • delete record of disk from LPAR
     rmdev –dl [disk] 
  • delete VG from ODM
     exportvg [vg] 

If you are left with disks no longer needed, delete them from VIO servers

  • double check LUN ID of old disks
     lsdev –dev hdiskx –vpd 
  •  lsmap –vadapter vhostx 
  • remove VTD
     rmdev –dev [vtd] 
  • remove backing device
     rmdev –dev hdiskx 
  • Send email to Storage to confirm disk ready for retrieval


Tags:  , , , ,

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>