I am hoping somebody with Flashcopy experience on AIX may be able to help. We have had a few issues with the scripts we have been running to import Flashcopies of our databases to our P series host nightly to dump to tape; mostly centering around repository sizing which I have pretty much resolved.
I am struggling with a couple of legacy issues though. First of all we need to add some more disk (LUNS) from the array, and I am concerned about conflicts with pvids on the scripted Flashcopies.
Currently our import/export runs something like this :
Import:
- Recreate Flashcopy with SMcli(FAStT700)
- LUN Mapping with SMcli(FAStT700)
- hot_add (AIX cfgmgr) to import the disk devices to the host
- chdev -l hdisk -a pv=clear (AIX) to clear the source LVM data structures from the FC's
- recreatevg (AIX) to recreate the Flashcopy Volume Group
- mount filesystems
Export:
- umount filesystems (AIX)
- varyoffvg (AIX) varyoff the FC volume group
- exportvg (AIX) export the FC volume group
- rmdev -l hdisk -d (AIX) completely remove the FC devices from the ODM
- Remove LUN mapping with SMcli(FAStT700)
- Disable the Flashcopy with SMcli (FAStT700)
Problem is as we completely remove the FC pvs from AIX each time, they only keep the same pvids each time for scripting purposes because we never add any other volumes to the system.
Somebody on another forum suggested that we should only remove the FCs from AIX using rmdev -l hdisk (no -d flag) in order that they remain defined in the ODM. That theory seems to work; but unfortunately when re-importing the volumes as soon as you run 'chdev -l hdisk -a pv=clear'I can not get the 'defined' volumes to switch back to 'available', and subsequently re-running hot_add (cfgmgr) just brings the FCs on line with new pvids, leaving the original ones as 'defined'.
I have tried throwing a 'chdev -l hdisk -a pv=yes' into the equation and even a 'mkdev -l hdisk' into the mix in various orders but nothing seems to work. Has anybody got any ideas how I can effectively 'hardcode' the FC pvids in the ODM and reuse the same ones each time ?
The other issues we have experienced are failures due to either 'chdev -l hdisk -a pv=clear' fails; or corrupt jfs superblocks when mounting the imported volumes on the host, requiring an fsck or re-running the snapshot.
We shut down the database prior to recreating the FCs to quiesce i/o; but I was wondering if additionally we should be (a) running a synch call prior to recreating the FCs to flush the disk buffers and (b) running a full fsck prior to mounting the volumes as a matter of course.
Does anybody have any ideas/experience here ?
Sorry for the long post - but I'm an HP guy historically and I'm just getting to grips with this Flashcopy stuff; and unfortunately IBM won't ratify our 'home grown' scripts under our support agreement.
I will not duplicate this posting at this time but if anybody thinks it would be better in the AIX forum please let me know.