This document describes the procedure to perform a logical migration of an existing AIX LPAR to a new target LPAR when direct storage mapping or SAN-based cloning is not possible.
In this method, the target LPAR is rebuilt using mksysb (system backup) for the root volume group (rootvg) and savevg for application/data volume groups (datavg). The approach ensures that the target system is functionally equivalent to the source environment, while allowing migration across different storage subsystems.
The migration leverages NIM (Network Installation Manager) to deploy the system image and preserves network and system configurations, ensuring controlled cutover with minimal downtime.
Objective:
- Rebuild the target LPAR using mksysb and savevg backups from the source LPAR.
- Restore AIX OS and application/data volumes (datavg) on a different storage subsystem.
- Enable the target LPAR to be functionally identical to the source system.
- Ensure a controlled cutover with minimal downtime.
- Migration of AIX OS and application/data from source to target LPAR.
- Source and target reside on different storage subsystems.
- Utilizes NIM for network-based system restoration.
- Final validation and cutover ensure production readiness.
- Access to HMC for creating target LPAR profile.
- NIM master server configured and reachable from both source and target.
- Network connectivity between source, target, and NIM server.
- Sufficient storage allocated on the target LPAR for rootvg and datavg.
- Valid mksysb and savevg backups from the source system.
- Application and database owners available for stop/start coordination.
1. Create Target LPAR
From HMC, create a new LPAR profile with:
Same CPU and memory as source (or per requirements).
Virtual FC adapters for SAN connectivity (NPIV if applicable).
Virtual Ethernet adapters for network access.
From HMC, create a new LPAR profile with:
Same CPU and memory as source (or per requirements).
Virtual FC adapters for SAN connectivity (NPIV if applicable).
Virtual Ethernet adapters for network access.
2. Provide WWNs to Storage Team
Capture and share target LPAR WWPNs with storage team.
Verify WWPN login:
# chnportlogin -m <manage_system> -o login -p <LPAR>
# lsnportlogin -m <manage_system> --filter "lpar_names=<LPAR>"
Capture and share target LPAR WWPNs with storage team.
Verify WWPN login:
# chnportlogin -m <manage_system> -o login -p <LPAR>
# lsnportlogin -m <manage_system> --filter "lpar_names=<LPAR>"
3. Storage Team: Allocate New LUNs
Allocate LUNs for:
rootvg – OS/system files
datavg – application/data volume group
LUNs must be equal to or larger than source disks.
Allocate LUNs for:
rootvg – OS/system files
datavg – application/data volume group
LUNs must be equal to or larger than source disks.
4. Create mksysb Backup on Source LPAR
# mksysb -ieX /backup/$(hostname)_$(date +%Y%m%d)
# lsmksysb -lf /backup/$(hostname)_$(date +%Y%m%d)
Creates full system backup including OS and rootvg.
# mksysb -ieX /backup/$(hostname)_$(date +%Y%m%d)
# lsmksysb -lf /backup/$(hostname)_$(date +%Y%m%d)
Creates full system backup including OS and rootvg.
5. Transfer mksysb to NIM Server
# scp /backup/<hostname>_<date>.mksysb nimserver:/export/mksysb/
# scp /backup/<hostname>_<date>.mksysb nimserver:/export/mksysb/
6. Define NIM Resources
On NIM master, define:
# nim -o define -t mksysb -a server=master -a location=/export/mksysb/<file> mksysb_<hostname>
# nim -o define -t spot -a source=mksysb_<hostname> spot_<hostname>
# nim -o define -t lpp_source -a server=master -a location=/export/lpp_source lpp_7300-03-01
# nim -o define -t client -a platform=chrp -a if1="net_<network> <target_ip> <target_hostname>" -a netboot_kernel=mp target_lpar
On NIM master, define:
# nim -o define -t mksysb -a server=master -a location=/export/mksysb/<file> mksysb_<hostname>
# nim -o define -t spot -a source=mksysb_<hostname> spot_<hostname>
# nim -o define -t lpp_source -a server=master -a location=/export/lpp_source lpp_7300-03-01
# nim -o define -t client -a platform=chrp -a if1="net_<network> <target_ip> <target_hostname>" -a netboot_kernel=mp target_lpar
7. Restore mksysb to Target LPAR
Boot target LPAR via SMS menu (network boot).
Start installation from NIM:
# nim -o bos_inst -a source=mksysb -a spot=spot_<hostname> -a mksysb=mksysb_<hostname> -a lpp_source=lpp_7300-03-01 -a accept_licenses=yes -a preserve_res=yes target_lpar
After completion, the target system has the same AIX OS configuration as the source.
Reference: Building AIX LPAR using mksysb
Start installation from NIM:
# nim -o bos_inst -a source=mksysb -a spot=spot_<hostname> -a mksysb=mksysb_<hostname> -a lpp_source=lpp_7300-03-01 -a accept_licenses=yes -a preserve_res=yes target_lpar
After completion, the target system has the same AIX OS configuration as the source.
Reference: Building AIX LPAR using mksysb
8. Update Host and Network Configuration
# hostname <new_hostname>
# chdev -l inet0 -a hostname=<new_hostname>
# chdev -l en0 -a netaddr=<new_ip> -a netmask=<mask> -a gateway=<gateway>
Edit /etc/hosts and /etc/resolv.conf as needed.
Verify connectivity:
# ping <gateway>
# hostname <new_hostname>
# chdev -l inet0 -a hostname=<new_hostname>
# chdev -l en0 -a netaddr=<new_ip> -a netmask=<mask> -a gateway=<gateway>
Edit /etc/hosts and /etc/resolv.conf as needed.
Verify connectivity:
# ping <gateway>
9. Restore datavg Using savevg Backup
On source LPAR:
# savevg -i -f /backup/datavg_$(date +%Y%m%d).backup datavg
Transfer or NFS-mount backup on target:
# mount nimserver:/export/backup /mnt
# restvg -f /mnt/datavg_<date>.backup hdiskY hdiskZ
Verify restoration:
# lsvg
# lsvg -p datavg
# df -g
On source LPAR:
# savevg -i -f /backup/datavg_$(date +%Y%m%d).backup datavg
Transfer or NFS-mount backup on target:
# mount nimserver:/export/backup /mnt
# restvg -f /mnt/datavg_<date>.backup hdiskY hdiskZ
Verify restoration:
# lsvg
# lsvg -p datavg
# df -g
10. Application and Database Cutover
Stop database and applications on source LPAR.
Shutdown source cleanly:
# shutdown -F
Update DNS to point to target LPAR IP.
Start applications and database on target.
Stop database and applications on source LPAR.
Shutdown source cleanly:
# shutdown -F
Update DNS to point to target LPAR IP.
Start applications and database on target.
11. Post-Migration Validation
Verify system and application readiness:
# lsvg -o
# df -g
# errpt -a | more
# oslevel -s
# bootlist -om normal
# lsdev -Cc disk
Ensure all file systems are mounted and applications/databases are running correctly.
Verify system and application readiness:
# lsvg -o
# df -g
# errpt -a | more
# oslevel -s
# bootlist -om normal
# lsdev -Cc disk
Ensure all file systems are mounted and applications/databases are running correctly.
Fallback / Rollback Plan — Logical Migration (AIX LPAR):
Purpose:
To restore operations to the original source LPAR in case of a failure during migration or if post-migration validation on the target LPAR identifies critical issues. This ensures rapid restoration of services with minimal downtime and data loss.
Fallback Procedure:
1. Shutdown Target LPAR
Stop all applications and database services gracefully on the target LPAR.
Shutdown the LPAR:
# shutdown -F
Confirm the LPAR is powered off via HMC or CLI:
# lssyscfg -r lpar -m <managed_system> -F name,state
2. Revert DNS Configuration
Update DNS records to point back to the source LPAR IP address.
Confirm that clients and network services will resolve to the original source.
3. Start Source LPAR
Power on the source LPAR from HMC or CLI:
# chsysstate -r lpar -m <managed_system> -o on -n <source_LPAR>
Verify the system boots successfully and rootvg disks are accessible.
4. Mount Filesystems
Ensure all volume groups and filesystems are mounted:
# mount -a
# df -g
5. Start Database and Applications
- Start database and application services on the source LPAR.
- Validate application and database accessibility to confirm full service restoration.
Notes:
- Keep the target LPAR powered off until the issue is resolved to avoid conflicts with IPs, DNS, or shared storage.
- Document any errors observed on the target LPAR for post-mortem analysis.
- After successful rollback, the migration plan can be revisited and corrected before re-attempt.
No comments:
Post a Comment