This procedure describes a method for migrating an AIX LPAR to a new target LPAR by leveraging rootvg clone and splitvg for datavg.
The approach involves creating clone copies of the root volume group (rootvg) and splitting the data volume group (datavg) to generate an independent clone that can be imported on the target LPAR.
This method is particularly useful when source and target LPARs share the same storage subsystem, allowing for a fast, minimal-downtime migration with an exact replica of the source environment. It ensures the target system can boot independently and applications can resume quickly after cutover.
Scope:
- Applicable when source and target LPARs share the same storage subsystem.
- Suitable for quick cloning or migration with minimal OS and data reconstruction.
- Performed in a controlled maintenance window to maintain data consistency.
- Access to HMC and both source and target LPARs.
- SAN connectivity between source and target LPARs.
- Sufficient free LUNs to mirror rootvg and split datavg.
- Scheduled downtime for applications and databases during split operations.
- Coordination with storage team for LUN mapping/unmapping.
1. Create Target LPAR
From HMC, create a new LPAR profile:
Assign CPU, memory, and network configuration.
Add virtual FC adapters (NPIV) or vSCSI as required.
2. Provide WWNs to Storage Team
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: Prepare and Map LUNs
Allocate LUNs equal in size to source rootvg and datavg.
Map these LUNs to both source and target LPARs for shared access.
4. Clone rootvg on Source LPAR
Identify new disks:
# lspv
Take the backup of /etc/filesystems file:
# cp -p /etc/filesystems /etc/filesystems_Backup_<DATE>
Clone rootvg:# alt_disk_copy -B -d <Disk Name>
Note the disk serial no. of cloned rootvg:
lscfg -vl <disk name> |grep "Serial Number"
Release the LUNs for rootvg Cloned one, PURE Storage disk):
# rmdev -Rdl <disk name>
Mirror datavg:# extendvg datavg <Disk Name>
# mirrorvg -S datavg <Disk Name>
Check the VG sync (mirror) status:
# lsvg <VG Name> --> See the value of "STALE PPs: should be 0"
5. Split datavg Using splitvg
During the maintenance window:
# splitvg -y datavg -c datavg_clone
Note the cloned VG disks (e.g., hdiskY, hdiskZ).
6. varyoffvg and export Volume Groups
After verification:
# varyoffvg <vg name>
# exportvg <vg name>
7. Unmap Cloned Disks from Source
Coordinate with storage team to unmap cloned rootvg and datavg disks from source LPAR.
Map these disks to the target LPAR.
8. Boot Target LPAR & Scan rootvg LUNs
Boot target LPAR via SMS menu or HMC:
SMS → Select Device → Boot from hdiskX (cloned rootvg)
Verify system:
# lsvg -o
# oslevel -s
Ask storage team to map additional LUNs for datavg.
Scan for new disks:
# cfgmgr -v
# lspv
9. Import datavg on Target LPAR
Import cloned data volume group:
# readvgda -v3 <Disk Name>
# importvg -y datavg <Disk Name>
Rename logical volumes or mount points if needed:
# chlv -n lv_old lv_new
# chfs -m /data/app /data_new/app
# mount -a
# df -g
10. Final Configuration and Validation
Update /etc/hosts with target IP and hostname.
Adjust network settings:
# chdev -l inet0 -a netaddr=<new_ip> -a netmask=<mask> -a gateway=<gateway>
Validate filesystem structure and data integrity.
11. Start Application and Database
- Start application and database services on the target LPAR.
- Verify operational status, data consistency, and application connectivity.
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.
- 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