Edit: This is still relevant.
Originally posted July 5, 2011 on AIXchange
Both Anthony English and I (go here) have recently written articles about migrating data from one storage subsystem to another. Take the time to read them so you can add more tools to your bag of tricks.
I’ve done quite a few migrations lately, and my preferred procedure is pretty simple. Assuming I’m adding new disk (hdisk1) to my existing disk (hdisk0), I like is to add the new LUN or hdisk to the volume group, using:
extendvg rootvg hdisk1
Then I run:
mirrorvg –S hdisk0 hdisk1
After the mirror completes and I verify that the logical volumes have changed from stale to synced and the mirror is taking place in rootvg, I run:
bosboot –ad hdisk1
bootlist –m normal hdisk1
Then I verify my bootlist by running:
bootlist –m normal –o
Then I unmirror the volume group by running:
unmirrorvg datavg hdiskX
chpv –c hdiskX
reducevg rootvg hdisk0
rmdev –dl hdisk0
Finally, I can remove the mappings, adapters, backing devices or whatever I used in the VIOS to present the LUN to the client.
Were I mirroring some datavg, obviously I’d skip the bosboot and bootlist and chpv commands, but the rest would be the same. Read the two articles and you’ll find other methods you can use, like migratepv (to migrate either the entire physical volume or just one logical volume at a time) or mklvcopy.
As far as data migrations go on AIX, do you have a preference? Do you like to run sync right away? Or do you- as Anthony suggests in his piece–wait until a less busy time? Share your thoughts in Comments.
One quick thing regarding last week’s post: Anthony English pointed out in the comments that you need to run oem_setup_env and become root first. Then you can run the bosboot and bootlist commands on your VIO servers if you’re going to be messing with those commands as root. I’d neglected to mention that I wasn’t running these commands as padmin. I made an assumption, and we all know what happens when you assume.