Symantec logo

Preparing to create instant and break-off snapshots

 To prepare a volume for the creation of instant and break-off snapshots

  1. Use the following commands to see if the volume is associated with a version 20 data change object (DCO) and DCO volume that allow instant snapshots and Persistent FastResync to be used with the volume, and to check that FastResync is enabled on the volume:

    # vxprint -g volumedg -F%instant volume

    # vxprint -g volumedg -F%fastresync volume

    If both commands return a value of on, the volume can be used for instant snapshot operations, and you should skip to step 3. Otherwise continue with step 2.

  2. To prepare a volume for instant snapshots, use the following command:

    # vxsnap [-g diskgroup] prepare volume [regionsize=size] \

      [ndcomirs=number] [alloc=storage_attributes]

    It is only necessary to run the vxsnap prepare command on a volume if it does not already have a version 20 DCO volume (for example, if you have run the vxsnap unprepare command on the volume).

    See "Creating a volume with a version 20 DCO volume" on page 245.

    See "Preparing a volume for DRL and instant snapshots" on page 268.

    See "Removing support for DRL and instant snapshots from a volume" on page 272.

    For example, to prepare the volume, myvol, in the disk group, mydg, use the following command:

    # vxsnap -g mydg prepare myvol regionsize=128k ndcomirs=2 \

      alloc=mydg10,mydg11

    This example creates a DCO object and redundant DCO volume with two plexes located on disks mydg10 and mydg11, and associates them with myvol. The region size is also increased to 128KB from the default size of 64KB. The region size must be a power of 2, and be greater than or equal to 16KB. A smaller value requires more disk space for the change maps, but the finer granularity provides faster resynchronization.

  3. If you need to create several space-optimized instant snapshots for the volumes in a disk group, you may find it more convenient to create a single shared cache object in the disk group rather than a separate cache object for each snapshot.

    See "Creating a shared cache object" on page 312.

For full-sized instant snapshots and linked break-off snapshots, you must prepare a volume that is to be used as the snapshot volume. This volume must be the same size as the data volume for which the snapshot is being created, and it must also have the same region size.

See "Creating a volume for use as a full-sized instant or linked break-off snapshot" on page 314.

Creating a shared cache object

 To create a shared cache object

  1. Decide on the following characteristics that you want to allocate to the cache volume that underlies the cache object:
  2. Having decided on its characteristics, use the vxassist command to create the volume that is to be used for the cache volume. The following example creates a mirrored cache volume, cachevol, with size 1GB in the disk group, mydg, on the disks mydg16 and mydg17:

    # vxassist -g mydg make cachevol 1g layout=mirror \

      init=active mydg16 mydg17

    The attribute init=active is specified to make the cache volume immediately available for use.

  3. Use the vxmake cache command to create a cache object on top of the cache volume that you created in the previous step:

    # vxmake [-g diskgroup] cache cache_object \

      cachevolname=volume [regionsize=size] [autogrow=on] \

      [highwatermark=hwmk] [autogrowby=agbvalue] \

      [maxautogrow=maxagbvalue]]

    If the region size, regionsize, is specified, it must be a power of 2, and be greater than or equal to 16KB (16k). If not specified, the region size of the cache is set to 64KB.

    All space-optimized snapshots that share the cache must have a region size that is equal to or an integer multiple of the region size set on the cache. Snapshot creation also fails if the original volume's region size is smaller than the cache's region size.

    If the region size of a space-optimized snapshot differs from the region size of the cache, this can degrade the system's performance compared to the case where the region sizes are the same.

    If the cache is to be allowed to grow in size as required, specify autogrow=on. By default, the ability to automatically grow the cache is turned off.

    In the following example, the cache object, cobjmydg, is created over the cache volume, cachevol, the region size of the cache is set to 32KB, and the autogrow feature is enabled:

    # vxmake -g mydg cache cobjmydg cachevolname=cachevol \

      regionsize=32k autogrow=on

  4. Having created the cache object, use the following command to enable it:

    # vxcache [-g diskgroup] start cache_object

    For example to start the cache object, cobjmydg:

    # vxcache -g mydg start cobjmydg

See "Removing a cache" on page 336.

Creating a volume for use as a full-sized instant or linked break-off snapshot

 To create an empty volume for use by a full-sized instant snapshot or a linked break-off snapshot

  1. Use the vxprint command on the original volume to find the required size for the snapshot volume.

    # LEN='vxprint [-g diskgroup] -F%len volume'

    The command as shown assumes that you are using a Bourne-type shell such as sh, ksh or bash. You may need to modify the command for other shells such as csh or tcsh.

  2. Use the vxprint command on the original volume to discover the name of its DCO:

    # DCONAME='vxprint [-g diskgroup] -F%dco_name volume'

  3. Use the vxprint command on the DCO to discover its region size (in blocks):

    # RSZ='vxprint [-g diskgroup] -F%regionsz $DCONAME'

  4. Use the vxassist command to create a volume, snapvol, of the required size and redundancy, together with a version 20 DCO volume with the correct region size:

    # vxassist [-g diskgroup] make snapvol $LEN \

      [layout=mirror nmirror=number] logtype=dco drl=off \

      dcoversion=20 [ndcomirror=number] regionsz=$RSZ \

      init=active [storage_attributes]

    Specify the same number of DCO mirrors (ndcomirror) as the number of mirrors in the volume (nmirror). The init=active attribute is used to make the volume available immediately. You can use storage attributes to specify which disks should be used for the volume.

    As an alternative to creating the snapshot volume and its DCO volume in a single step, you can first create the volume, and then prepare it for instant snapshot operations as shown here:

    # vxassist [-g diskgroup] make snapvol $LEN \

      [layout=mirror nmirror=number] init=active \

      [storage_attributes]

    # vxsnap [-g diskgroup] prepare snapvol [ndcomirs=number] \

      regionsize=$RSZ [storage_attributes]