Tuesday, May 13, 2008

AIX alternative split mirror copy for backup

The AIX alternative to split a mirror copy uses either the splitlvcopy or chfs command. The splitlvcopy is used for raw partitions, and the chfs command is used for filesystems. To illustrate, the following example assumes we want to make a split mirror copy of the "datalv". The copy will be located on hdisk2, with a LV name of "lv_copy"

1. Define a mirror copy of "datalv" on "hdisk2"

mklvcopy datalv 2 hdisk2

2. Synchronize (copy) the data to the mirror

syncvg -l -P6 datalv

3. Verify copy is complete (ie no "stale" partitions)

lslv datalv

5. Stop application/database

6 Split off the hdisk2 mirror copy.

For raw partitions: splitlvcopy -y lv_copy datalv 1 hdisk2
For JFS filesystems: chfs -a splitcopy=/data_copy -a copy=2 /data

Note: to use "chfs," the JFSLOG must be mirrored. If not, you'll see the error:
"jfs_syscall: A system call received a parameter that is not valid "

7. Restart application/database

8. Backup data

The downtime associated with the split mirror copy is in Steps 5-7. Depending on the size of the data, the typical downtime is 5-30 minutes. All other steps can done while running production.