Symantec logo

Creating and managing third-mirror break-off snapshots

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.

See "Using a DCO and DCO volume with a RAID-5 volume" on page 262.

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

  1. To create the snapshot, you can either take some of the existing ACTIVE plexes in the volume, or you can use the following command to add new snapshot mirrors to the volume:

    # 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

  2. To create a third-mirror break-off snapshot, use the following form of the vxsnap make command.

# 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:

plex Specifies the plexes in the existing volume that are to be broken off. This attribute can only be used with plexes that are in the ACTIVE state.

nmirror Specifies how many plexes are to be broken off. This attribute can only be used with plexes that are in the SNAPDONE state. (Such plexes could have been added to the volume by using the vxsnap addmir command.)

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

  1. Use fsck (or some utility appropriate for the application running on the volume) to clean the temporary volume's contents. For example, you can use this command with a VxFS file system:

    # fsck -V vxfs /dev/vx/dsk/diskgroup/snapshot

The specified device must have a valid entry in the /etc/filesystems file.

  1. If you require a backup of the data in the snapshot, use an appropriate utility or operating system command to copy the contents of the snapshot to tape, or to some other backup medium.
  2. You now have the following choices of what to do with a third-mirror break-off snapshot: