AIX LVM Data migration
There are many validations that need to be done before executing the below steps/commands such as target disk compatibility with the server/server load/all target disks have the fully redundant paths/MPIO is configured as per current vendor best practice etc.
Our preferred way of doing any data migration from one set of disks to another is to mirror the disks and then break the mirror. We use mirrorvg to achieve this on AIX. There are other ways to migrate the data such as migratepv which can be used in certain cases. There are many other options that may be applicable for your environment. We can help identify best option for you and automate your migrations and fast track the project. Email us at intro@yarisolutions.com to find out how.
Data migration using mirrorvg :
Identify the volume groups you would like to migrate
Identify the source disks in use per VG and its size
Ask storage admins to allocate new disks for migration. Allocated space should be larger than the VG size
Add the allocated storage to each vg using extendvg vgname tgt-disk
use mirrorvg -S vgname tgt-disks (-S is to make the copy run in the background).
Check the mirror status using lsvg -p vgname and check for “stale pp’s.
Wait for copy to finish. Once stale PP’s in VG is 0, it means the copy is done.
Break the mirror using unmirrorvg vgname src-disk
Remove the src-disks from vg using vgreduce vgname src-disk
Delete the disks from lvm using rmdev
Repeat the process for each vg in the system that you are looking to migrate.
Ask storage admins to reclaim the source disks.
Clean up the server of all the dead paths/disks after reclaim if any.
Migratapv high level migration procedure :
Identify the volume groups you would like to migrate
Identify source disks per VG using lsvg -p vgname command.
For each VG request for target disks for equal or larger than src disks. For example if we are using 3x30G src disks request for 3x31G tgt disks.
Once storage has been allocated rescan for new disks using cfgmgr -v
Identify and map which target disks were allocated for which VG depending on the src disks
Add the target disks to VG using extendvg vgname tgt-disks command
use migratepv src-disk tgt-disk.
reducevg src-disk
Repeat steps 6, 7 and 8 for each source disks in VG.
Repeat steps 5 through 9 for each VG
Ask storage admin to reclaim all the src-disks
Clean up the server of all the dead paths/disks after reclaim.