AIX Tip of the Week

Split Mirror Copy

Audience: AIX System Administrators

Date: September 4, 2001

As applications move toward 7x24 uptime, there is less downtime available for backups. This tip describes the split mirror backup technique which reduces downtime for backups to minutes, for even the largest The technique involves mirroring the data, to another disk, splitting off the copy, then backing up the copy in the background while the system is running production.

There are two basic ways to split a mirror copy. One way uses hardware commands (Shark Flash Copy or ssa_make_copy). The other uses AIX commands.

If using hardware commands, use the recreatevg command to redefine the disk definitions (PVID, LV, filesystem names). This is because a hardware copy duplicates all definitions, which would cause conflicts. The recreatevg command.resolves the conflicts by creating a new volume group with unique PVIDs, LV names and filesystem names. The recreatevg command is available in both AIX 4.3.3 and 5L, but the documentation is found only in AIX 5L:

http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds4/recreatevg.htm

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.


Bruce Spencer,
baspence@us.ibm.com