SnapProtect Backup - ZFS Mirror

When using ZFS mirrored pool, by default snapshots are taken for all the mirrored disks, provided all the disks in the zpool are from the same storage array.

However, if the disks in the mirror are from different storage array, you can take snapshot of the disk corresponding to one array and perform the SnapProtect backup.

For example, in the following Zpool mirror setup, c3t13d0 and c314d0 are from one array and c3t6d0 and c3t7d0 are from another array:

zpool status –v testnew

pool: testnew

state: ONLINE

scan: scrub repaired 0 in 0h0m with 0 errors on Wed Dec 12 18:54:30 2012

config:

NAME         STATE     READ     WRITE     CKSUM

testnew      ONLINE     0         0         0

mirror-0     ONLINE     0         0         0

c3t13d0      ONLINE     0         0         0

c3t6d0       ONLINE     0         0         0

mirror-1     ONLINE     0         0         0

c3t14d0      ONLINE     0         0         0

c3t7d0       ONLINE     0         0         0

Enabling SnapProtect Backup of ZFS mirrored disks from one Array

Use the following steps to enable SnapProtect backup of ZFS mirrored disks from one array:

  1. Retrieve the Array initiator ID of the disk

root@dbsolaris # pwd

/opt/calypso/Base

root@dbsolaris # . ../galaxy_vm

root@dbsolaris # ./CvDeviceTreeTest

1. Get all devices of selected type

2. Get device information

3. Get device partitions

4. Get device Serial

5. Get Array Initiator Id For Disk

q. Quit

Please select: 5

Enter device name (q-back to main menu): > /dev/dsk/c6t500A098199FAB9F7d2s4

Parent CvDevice for /dev/dsk/c6t500A098199FAB9F7d2s4 is /dev/dsk/c6t500A098199FAB9F7d2s4

For device '/dev/dsk/c6t500A098199FAB9F7d2s4' result is:

Code:0

Error:: Type is 1(DISK_SCSI)

Device path '/dev/dsk/c6t500A098199FAB9F7d2s4'

Interfaces:

=CvDeviceScsiIface supported

=CvDevicePartIface not supported

Children count is 0

rawLogicalDiskName:[/dev/rdsk/c6t500A098199FAB9F7d2s2]

500a098089fab9f7

Got FC WWN

500a098089fab9f7 <== “Array initiator id”\

  1. From the CommCell Browser, right-click the <Client >and select Properties.
  2. Click the Registry Key Settings tab.
  3. Click Add.
  4. In the Name box, type ArrayInitiatorIdList.
  5. In the Location box, select iDataAgent.
  6. In the Type box, select Value.
  7. In the Value box, type the array initiator id for the disk. eg.,500a098089fab9f7.

Reverting a ZFS mirrored snapshot

Reverting a snapshot on any single zfs filesystem will revert the entire zpool and all the zfs file systems under it. If the SnapProtect backup job is run using the registry key ArrayInitiatorIDList, during revert, snaps from only one side of the mirror would be present.

Use the following steps to revert a zfs mirrored snapshot:

  1. Export the original( source ) zpool on the system if it is present.
  2. From the CommCell Browser, right-click the <Client >and select Properties.
  3. Click the Registry Key Settings tab.
  4. Click Add.
  5. In the Name box, type RevertOneSideOfMirror.
  6. In the Location box, select iDataAgent.
  7. In the Type box, select Value
  8. In the Value box, type Y and click OK.
  9. Click OK.
  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click the subclient and click List Snaps.
  3. Right-click the snapshot that you wish to delete and click Use hardware revert capability if available.
  4. Enter the confirmation text string, confirm.
  5. Click OK.

    After the revert operation, the reverted zpool would be in a degraded state, since it is imported/created using only one side of the mirror.

If the revert operation is done without enabling the RevertOneSideOfMirror registry key, the revert operation may succeed, but the zpool would be inconsistent. Hence, it is highly recommended that you set this key before performing the revert operation.