Migrating a Versioned WPAR to AIX 7.2Versioned AIX 5.3 Workload Partitions will reach End of Service (EOS), April 2019. As of this month, June 2018, that’s only 8 months away. Not long at all.
http
Back in 2013, IBMer Nigel Griffiths published a “how to” video on YouTube that described the process of migrating a Versioned WPAR (VWPAR) from AIX 5.2 or 5.3 to AIX 7.1. You can watch it here:
Migrating Versioned Workload Partitions for AIX 5.2/5.3 to AIX7 http
The migration process uses the migwpar utility to migrate the VWPAR OS.
http
For example, to migrate my AIX 5.3 VWPAR to AIX 7.2 TL2 SP2, I ran the following command from the Global environment (7200-02-02-1810). After several minutes, by VWPAR was no longer a VWPAR, but a native AIX 7.2 System WPAR.
# lswpar -L | grep OSt OSty … # migwpar -d /mnt -C aix53wpar … # lswpar -L | grep OSt OSty
Refer to this link for OStype meanings: http
The migration process requires an outage for the VWPAR. I’ve documented the entire process, here:
MIGRATION
0. Backup the VWPAR. I can use this backup should I need to back out the migration and return the VWPAR to its original state.
# savewpar -f /wpa
# ls -ltr /wpa -rw-r--r-- 1 root system 1747916800 Jun 17 18:04 /wpa
1. Mount the AIX 7.2 lpp_source directory on the NIM master, via NFS.
# mount nim: /nim
2. Extend the / and /usr file systems by 1G. This is required to work-around an issue, where the migwpar process fails to automatically extend file systems, as required, even though there’s sufficient space in rootvg to do so.
# clogin aix53wpar # chfs -a size=+1G / # chfs -a size=+1G /usr # exit
3. Stop the VWPAR.
# clogin aix53wpar * Welcome to AIX Version 5.3! root@aix53wpar / # shutdown -Fh
SHUTDOWN PROGRAM Sun Jun 24 14:39:54 CDT 2018 Stopping The LWI Nonstop Profile... Waiting for The LWI Nonstop Profile to exit... Waiting for The LWI Nonstop Profile to exit... Waiting for The LWI Nonstop Profile to exit... Stopped The LWI Nonstop Profile.
Wait for '....Halt completed....' before stopping. Error reporting has stopped. Advanced Accounting has stopped... Process accounting has stopped. nfs_clean: Stopping NFS/NIS Daemons 0513-004 The Subsystem or Group, nfsd, is currently inoperative. 0513-044 The biod Subsystem was requested to stop. 0513-044 The rpc.lockd Subsystem was requested to stop. 0513-044 The rpc.statd Subsystem was requested to stop. 0513-004 The Subsystem or Group, gssd, is currently inoperative. 0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative. 0513-004 The Subsystem or Group, rpc.mountd, is currently inoperative. 0513-004 The Subsystem or Group, ypbind, is currently inoperative. 0513-044 The platform_agent Subsystem was requested to stop. 0513-044 The cimsys Subsystem was requested to stop. 0513-044 The muxatmd Subsystem was requested to stop. 0513-044 The nimsh Subsystem was requested to stop. 0513-044 The qdaemon Subsystem was requested to stop. 0513-044 The writesrv Subsystem was requested to stop. 0513-044 The ctrmc Subsystem was requested to stop. 0513-044 The IBM.ServiceRM Subsystem was requested to stop. 0513-044 The IBM.CSMAgentRM Subsystem was requested to stop. All processes currently running will now be killed... Unmounting the file systems...
....Halt completed.... #
4. Migrate the VWPAR to AIX 7.2. The –d flag specifies the location of the install images (AIX 7.2 lpp_source) and the –C flag indicates a migration is to take place.
# migwpar -d /mnt -C aix53wpar Shared /usr WPAR list: none Detached WPAR list: aix53wpar WPAR aix53wpar mount point: /wpars/aix53wpar Mounting all workload partition file systems. Unmounting all workload partition file systems. Starting workload partition 'aix53wpar'. Mounting all workload partition file systems. Loading workload partition. Exporting workload partition devices. Exporting workload partition kernel extensions. New volume on /mnt Cluster 51200 bytes (100 blocks). Volume number 1 Date of backup: Sun Apr 17 09:05:38 2016 Files backed up by name User BUILD files archived: 2541 Saving system configuration files. Checking for initial required migration space. Setting up for base operating system restore. / Restoring base operating system. Merging system configuration files. ....etc…. Filesets processed: 9 of 792 (Total time: 9 secs).
installp: APPLYING software for: perl.libext 2.4.0.0
. . . . . << Copyright notice for perl.libext >> . . . . . . . Licensed Materials - Property of IBM
5765CD200 Copyright International Business Machines Corp. 2004, 2015.
All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. . . . . . << End of copyright notice for perl.libext >>. . . .
Filesets processed: 10 of 792 (Total time: 9 secs).
installp: APPLYING software for: openssl.man.en_US 1.0.1.515
... rsct rsct rsct rsct
inst inst inst inst inst …. inst inst inst inst inst Known Recommended Maintenance Levels ---- Restoring device ODM database … Installation Summary ---- Name ---- vwpa vwpa vwpa … aix53wpar WPAR successfully migrated. Refer to /var **** Warning chwpar: 0960-096 /dev/fslv00 is already mounted for writing over /wpars/aix53wpar.
**** Stopping workload partition 'aix53wpar'. Stopping workload partition subsystem 'cor_aix53wpar'. 0513-004 The Subsystem or Group, cor_aix53wpar, is currently inoperative. Shutting down all workload partition processes. Unmounting all workload partition file systems.
Cleaning up ... #
5. Start the WPAR. Verify it is now running AIX 7.2.
# startwpar -v aix53wpar Starting workload partition 'aix53wpar'. Mounting all workload partition file systems. Mounting '/wpars/aix53wpar'. Mounting '/wp Mounting '/wp Mounting '/wp Loading workload partition. Exporting workload partition devices. Exporting workload partition kernel extensions. Starting workload partition subsystem 'cor_aix53wpar'. 0513-059 The cor_aix53wpar Subsystem has been started. Subsystem PID is 6488376. Verifying workload partition startup. Return Status = SUCCESS.
# clogin aix53wpar root@aix53wpar / # oslevel –s 7200-02-02-1810
Migration activity is logged to /var/adm/ras e.g.
# ls -ltr /var -rw-r--r-- 1 root system 354534 Jun 20 00:55 /var
In the log file you’ll notice several bogus error messages,
none of which appear to harm the migration. But they look very ugly!
I’ve uploaded an example log file, from a real migration, here: http
Of course, you’d need to test your applications at this point. Regression testing is very important at this stage. You need to ensure that your app’s, that were happily running on AIX 5.3, will now run on AIX 7.2. Good luck with that!
If I needed to back out from the migration, one way to do that would be to restore the VWPAR from the backup I created prior to the migration. The process, to recover my rootvg VWPAR, would be as follows.
BACK OUT
1. Confirm which disks are currently exported (to the WPAR). Stop the WPAR.
# lsdev -xc disk | grep Exp hdisk1 Exported Virtual SCSI Disk Drive hdisk3 Exported Virtual SCSI Disk Drive
# lswpar -D | grep disk Name Device Name Type Virtual Device RootVG Status … aix53wpar hdisk3 disk aix53wpar hdisk1 disk
# clogin aix53wpar * Welcome to AIX Version 5.3! root@aix53wpar / # shutdown -Fh
SHUTDOWN PROGRAM Sun Jun 24 14:39:54 CDT 2018 Stopping The LWI Nonstop Profile... Waiting for The LWI Nonstop Profile to exit... Waiting for The LWI Nonstop Profile to exit... Waiting for The LWI Nonstop Profile to exit... Stopped The LWI Nonstop Profile.
Wait for '....Halt completed....' before stopping. Error reporting has stopped. Advanced Accounting has stopped... Process accounting has stopped. nfs_clean: Stopping NFS/NIS Daemons 0513-004 The Subsystem or Group, nfsd, is currently inoperative. 0513-044 The biod Subsystem was requested to stop. 0513-044 The rpc.lockd Subsystem was requested to stop. 0513-044 The rpc.statd Subsystem was requested to stop. 0513-004 The Subsystem or Group, gssd, is currently inoperative. 0513-004 The Subsystem or Group, nfsrgyd, is currently inoperative. 0513-004 The Subsystem or Group, rpc.mountd, is currently inoperative. 0513-004 The Subsystem or Group, ypbind, is currently inoperative. 0513-044 The platform_agent Subsystem was requested to stop. 0513-044 The cimsys Subsystem was requested to stop. 0513-044 The muxatmd Subsystem was requested to stop. 0513-044 The nimsh Subsystem was requested to stop. 0513-044 The qdaemon Subsystem was requested to stop. 0513-044 The writesrv Subsystem was requested to stop. 0513-044 The ctrmc Subsystem was requested to stop. 0513-044 The IBM.ServiceRM Subsystem was requested to stop. 0513-044 The IBM.CSMAgentRM Subsystem was requested to stop. All processes currently running will now be killed... Unmounting the file systems...
....Halt completed.... #
2. Make the disks available in the Global. Both for VWPAR rootvg and datavg disks.
# mkdev –l hdisk1 ; mkdev –l hdisk3
# lsdev -Cc disk hdisk0 Available Virtual SCSI Disk Drive hdisk1 Available Virtual SCSI Disk Drive hdisk2 Available Virtual SCSI Disk Drive hdisk3 Available Virtual SCSI Disk Drive hdisk4 Available Virtual SCSI Disk Drive
3. Remove the WPAR.
# rmwpar aix53wpar rmwpar: Removing file system /wpa rmwpar: Removing file system /wpa rmwpar: Removing file system /wpa rmlv: Logical volume fslv01 is removed. rmwpar: Removing file system /wpars/aix53wpar. rmlv: Logical volume fslv00 is removed.
4. Restore the VWPAR from backup.
# restwpar –f /wpa aix53wpar New volume on /wpa Cluster 51200 bytes (100 blocks). Volume number 1 Date of backup: Sun Jun 17 18:03:12 CDT 2018 Files backed up by name User root x 2650 ./.s x 6514 ./.s x 187899 ./.s total size: 197063 files restored: 3 Creating workload partition's rootvg. Please wait... mkwpar: Creating file systems... / ATTENTION: Logical volume 'hd4' is not unique. Renaming to 'wlv0'. Creating logical volume 'wlv0' specified in image.data Creating file system '/' specified in image.data /proc /home ATTENTION: Logical volume 'hd1' is not unique. Renaming to 'wlv1'. Creating logical volume 'wlv1' specified in image.data Creating file system '/home' specified in image.data /opt ATTENTION: Logical volume 'hd10opt' is not unique. Renaming to 'wlv2'. Creating logical volume 'wlv2' specified in image.data Creating file system '/opt' specified in image.data /tmp ATTENTION: Logical volume 'hd3' is not unique. Renaming to 'wlv3'. Creating logical volume 'wlv3' specified in image.data Creating file system '/tmp' specified in image.data /usr ATTENTION: Logical volume 'hd2' is not unique. Renaming to 'wlv4'. Creating logical volume 'wlv4' specified in image.data Creating file system '/usr' specified in image.data …etc… bos. bos. bos. bos. bos. bos. bos. bos. mcr. rsct rsct wio. rsct devi rsct rsct rsct rsct rsct rsct Finished populating scratch file systems. Workload partition aix53wpar created successfully. mkwpar: 0960-390 To start the workload partition, execute the following as root: startwpar [-v] aix53wpar #
5. Start the VWPAR. Verify the correct AIX version and level is displayed.
# startwpar aix53wpar Starting workload partition 'aix53wpar'. Mounting all workload partition file systems. Loading workload partition. Exporting workload partition devices. hdisk3 Defined hdisk1 Defined Exporting workload partition kernel extensions. Starting workload partition subsystem 'cor_aix53wpar'. 0513-059 The cor_aix53wpar Subsystem has been started. Subsystem PID is 17105328. Verifying workload partition startup. #
# clogin aix53wpar * Welcome to AIX Version 5.3! root@aix53wpar / # oslevel -s 5300-12-09-1341
6. Manually import the data volume group and mount file systems. This is a bug and should not be required. But for now, we need to perform this step manually, after a restore.
root@aix53wpar / # lspv hdisk0 00f9 hdisk1 00f9
root@aix53wpar / # importvg -y datavg hdisk0 datavg
root@aix53wpar / # mount /wpardata root@aix53wpar / # ls -tlr /wpardata total 8 drwxr-xr-x 2 root system 256 Dec 06 2017 lost+found -rw-r--r-- 1 root system 2192 Dec 06 2017 out
|