Break-off snapshots are suitable for write-intensive volumes, such as database redo logs.
To turn one or more existing plexes in a volume into a break-off instant snapshot volume, the volume must be a non-layered volume with a mirror or mirror-stripe layout, or a RAID-5 volume that you have converted to a special layered volume and then mirrored. The plexes in a volume with a stripe-mirror layout are mirrored at the subvolume level, and cannot be broken off.
The attributes for a snapshot are specified as a tuple to the vxsnap make command. This command accepts multiple tuples. One tuple is required for each snapshot that is being created. Each element of a tuple is separated from the next by a slash character (/). Tuples are separated by white space.
To create and manage a third-mirror break-off snapshot
# vxsnap [-b] [-g diskgroup] addmir volume [nmirror=N] \ [alloc=storage_attributes]
By default, the vxsnap addmir command adds one snapshot mirror to a volume unless you use the nmirror attribute to specify a different number of mirrors. The mirrors remain in the SNAPATT state until they are fully synchronized. The -b option can be used to perform the synchronization in the background. Once synchronized, the mirrors are placed in the SNAPDONE state.
For example, the following command adds 2 mirrors to the volume, vol1, on disks mydg10 and mydg11:
# vxsnap -g mydg addmir vol1 nmirror=2 alloc=mydg10,mydg11
If you specify the -b option to the vxsnap addmir command, you can use the vxsnap snapwait command to wait for synchronization of the snapshot plexes to complete, as shown in this example:
# vxsnap -g mydg snapwait vol1 nmirror=2
# vxsnap [-g diskgroup] make source=volume[/newvol=snapvol]\ {/plex=plex1[,plex2,...]|/nmirror=number]}
Either of the following attributes may be specified to create the new snapshot volume, snapvol, by breaking off one or more existing plexes in the original volume:
Snapshots that are created from one or more ACTIVE or SNAPDONE plexes in the volume are already synchronized by definition.
For backup purposes, a snapshot volume with one plex should be sufficient.
For example, to create the instant snapshot volume, snap2myvol, of the volume, myvol, in the disk group, mydg, from a single existing plex in the volume, use the following command:
# vxsnap -g mydg make source=myvol/newvol=snap2myvol/nmirror=1
The next example shows how to create a mirrored snapshot from two existing plexes in the volume:
# vxsnap -g mydg make source=myvol/newvol=snap2myvol/plex=myvol-03,myvol-04
You now have the following options:
Refresh the contents of the snapshot. This creates a new point-in-time image of the original volume ready for another backup. If synchronization was already in progress on the snapshot, this operation may result in large portions of the snapshot having to be resynchronized.
Reattach some or all of the plexes of the snapshot volume with the original volume.
Restore the contents of the original volume from the snapshot volume. You can choose whether none, a subset, or all of the plexes of the snapshot volume are returned to the original volume as a result of the operation.
Dissociate the snapshot volume entirely from the original volume. This may be useful if you want to use the copy for other purposes such as testing or report generation. If desired, you can delete the dissociated volume.
If the snapshot is part of a snapshot hierarchy, you can also choose to split this hierarchy from its parent volumes.