Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Administrator's Guide   

Preparing a Volume for DRL and Instant Snapshots


Note   Note    This procedure describes how to add a version 20 data change object (DCO) and DCO volume to a volume that you previously created in a disk group with a version number of 110 or greater. If you are creating a new volume in a disk group with a version number of 110 or greater, you can specify the co-creation of a DCO and DCO volume and enable DRL as described in Creating a Volume with a Version 20 DCO Volume. If the volume was created in a release prior to VxVM 4.0, use the procedure in Upgrading Existing Volumes to Use Version 20 DCOs.

You need a full VxVM license and a VERITAS FlashSnapTM or FastResync license to use the DRL and FastResync features. Even if you do not have a license, you can configure a DCO object and DCO volume so that snap objects are associated with the original and snapshot volumes. For more information about snap objects, see How Persistent FastResync Works with Snapshots. See Determining the DCO Version Number for details of how to determine the version number of a volume's DCO.

Use the following command to add a version 20 DCO and DCO volume to a volume:


vxsnap [-g diskgroup] prepare volume [ndcomirs=number] \ 
   [regionsize=size] [drl=on|sequential|off] \
   [storage_attribute ...]

The ndcomirs attribute specifies the number of DCO plexes that are created in the DCO volume. It is recommended that you configure as many DCO plexes as there are data and snapshot plexes in the volume. The DCO plexes are used to set up a DCO volume for any snapshot volume that you subsequently create from the snapshot plexes. For example, specify ndcomirs=5 for a volume with 3 data plexes and 2 snapshot plexes.

The value of the regionsize attribute specifies the size of the tracked regions in the volume. A write to a region is tracked by setting a bit in the change map. The default value is 64k (64KB). A smaller value requires more disk space for the change maps, but the finer granularity provides faster resynchronization.

To enable DRL logging on the volume, specify drl=on (this is the default setting). If sequential DRL is required, specify drl=sequential. If DRL is not required, specify drl=off.

You can also specify vxassist-style storage attributes to define the disks that can and/or cannot be used for the plexes of the DCO volume. See Specifying Storage for Version 20 DCO Plexes for details.


Note   Note    The vxsnap prepare command automatically enables Persistent FastResync on the volume. Persistent FastResync is also set automatically on any snapshots that are generated from a volume on which this feature is enabled.

If the volume is a RAID-5 volume, it is converted to a layered volume that can be used with instant snapshots and Persistent FastResync. See Using a DCO and DCO Volume with a RAID-5 Volume for details.

By default, a version 20 DCO volume contains 32 per-volume maps. If you require more maps than this, you can use the vxsnap addmap command to add more maps. See the vxsnap(1M) manual page for details of this command.

Specifying Storage for Version 20 DCO Plexes

If the disks that contain volumes and their snapshots are to be moved into different disk groups, you must ensure that the disks that contain their DCO plexes can accompany them. You can use storage attributes to specify which disks to use for the DCO plexes. (If you do not want to use dirty region logging (DRL) with a volume, you can specify the same disks as those on which the volume is configured, assuming that space is available on the disks). For example, to add a DCO object and mirrored DCO volume with plexes on disk05 and disk06 to the volume, myvol, use the following command:


vxsnap -g mydg prepare myvol ndcomirs=2 disk05 disk06

To view the details of the DCO object and DCO volume that are associated with a volume, use the vxprint command. The following is example vxprint -vh output for the volume named vol1 (the TUTIL0 and PUTIL0 columns are omitted for clarity):


TY   NAME        ASSOC       KSTATE      LENGTH      PLOFFS     STATE      ...
v   vol1        fsgen       ENABLED      1024      -     ACTIVE
pl   vol1-01        vol1       ENABLED      1024      -     ACTIVE
sd   disk01-01        vol1-01       ENABLED      1024      0     -
pl   foo-02        vol1       ENABLED      1024      -     ACTIVE
sd   disk02-01        vol1-02       ENABLED      1024      0     -
dc   vol1_dco        vol1       -      -      -     -
v   vol1_dcl        gen       ENABLED      132      -     ACTIVE
pl   vol1_dcl-01        vol1_dcl       ENABLED      132      -     ACTIVE
sd   disk03-01        vol1_dcl-01       ENABLED      132      0     -
pl   vol1_dcl-02        vol1_dcl       ENABLED      132      -     ACTIVE
sd   disk04-01        vol1_dcl-02       ENABLED      132      0     -

In this output, the DCO object is shown as vol1_dco, and the DCO volume as vol1_dcl with 2 plexes, vol1_dcl-01 and vol1_dcl-02.

If required, you can use the vxassist move command to relocate DCO plexes to different disks. For example, the following command moves the plexes of the DCO volume, vol1_dcl, for volume vol1 from disk03 and disk04 to disk07 and disk08:


vxassist -g mydg move vol1_dcl !disk03 !disk04 disk07 disk08

For more information, see Moving DCO Volumes Between Disk Groups, and the vxassist(1M) and vxsnap(1M) manual pages.

Using a DCO and DCO Volume with a RAID-5 Volume

The procedure in the previous section can be used to add a DCO and DCO volume to a RAID-5 volume. This allows you to use Persistent FastResync on the volume for fast resynchronization of snapshots on returning them to their original volume. However, the procedure has the side effect of converting the RAID-5 volume into a special type of layered volume. You can create space-optimized instant snapshots of such a volume, and you can add mirrors that may be broken off as full-sized instant snapshots. You cannot relayout or resize such a volume unless you convert it back to a pure RAID-5 volume.

To convert a volume back to a RAID-5 volume, remove any snapshot plexes from the volume, and dissociate the DCO and DCO volume from the layered volume using the procedure described in Removing Support for DRL and Instant Snapshots from a Volume. You can then perform relayout and resize operations on the resulting non-layered RAID-5 volume.

To allow Persistent FastResync to be used with the RAID-5 volume again, re-associate the DCO and DCO volume as described in Preparing a Volume for DRL and Instant Snapshots.


Note   Note    Dissociating a DCO and DCO volume disables FastResync on the volume. A full resynchronization of any remaining snapshots is required when they are snapped back.

Determining the DCO Version Number

The instant snapshot and DRL-enabled DCO features require that a version 20 DCO be associated with a volume, rather than an earlier version 0 DCO.

To find out the version number of a DCO that is associated with a volume:

  1. Use the vxprint command on the volume to discover the name of its DCO:
    DCONAME='vxprint [-g diskgroup] -F%dco_name volume'
  2. Use the vxprint command on the DCO to determine its version number:
    vxprint [-g diskgroup] -F%version $DCONAME

Determining if DRL is Enabled on a Volume

To determine if DRL (configured using a version 20 DCO volume) is enabled on a volume:

  1. Use the vxprint command on the volume to discover the name of its DCO:
    DCONAME='vxprint [-g diskgroup] -F%dco_name volume'
  2. To determine if DRL is enabled on the volume, use the following command with the volume's DCO:
    vxprint [-g diskgroup] -F%drl $DCONAME

    DRL is enabled if this command displays on.

  3. If DRL is enabled, use this command with the DCO to determine if sequential DRL is enabled:
    vxprint [-g diskgroup] -F%sequentialdrl $DCONAME

    Sequential DRL is enabled if this command displays on.

Alternatively, you can use this command with the volume:


vxprint [-g diskgroup] -F%log_type volume

This displays the logging type as REGION for DRL, DRLSEQ for sequential DRL, or NONE if DRL is not enabled.


Note   Note    If the number of active mirrors in the volume is less than 2, DRL logging is not performed even if DRL is enabled on the volume. To find out if DRL logging is active, see Determining if DRL Logging is Active on a Volume.

Determining if DRL Logging is Active on a Volume

To determine if DRL logging is active on a mirrored volume:

  1. Use the following vxprint commands to discover the name of the volume's DCO volume:
    DCONAME='vxprint [-g diskgroup] -F%dco_name volume'
    DCOVOL='vxprint [-g diskgroup] -F%parent_vol $DCONAME'
  2. Use the vxprint command on the DCO volume to find out if DRL logging is active:
    vxprint [-g diskgroup] -F%drllogging $DCOVOL

    This command returns on if DRL logging is enabled.

Disabling and Re-enabling DRL

To disable DRL (configured using a version 20 DCO volume) on a volume, enter the following command:


vxvol [-g diskgroup] set drl=off volume

To re-enable DRL on a volume, enter this command:


vxvol [-g diskgroup] set drl=on volume

To re-enable sequential DRL on a volume, enter:


vxvol [-g diskgroup] set drl=sequential volume

You can use these commands to change the DRL policy on a volume by first disabling and then re-enabling DRL as required. DRL is automatically disabled if a data change map (DCM, used with VERITAS Volume Replicator) is attached to a volume.

Removing Support for DRL and Instant Snapshots from a Volume

To remove support for DRL and instant snapshot operation from a volume, use the following command to remove the DCO and DCO volume that are associated with the volume:


vxsnap [-g diskgroup] unprepare volume

This command also has the effect of disabling FastResync tracking on the volume.


Note   Note    This command fails if the volume is part of a snapshot hierarchy.
 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com