VERITAS FlashSnap Point-In-Time-Copy Solutions Administrator's Guide

Chapter 5, Decision Support
Creating a Replica Database on the Same Host
49
To set up a replica database to be used for decision support on the primary host:
1. If you have not already done so, prepare the host to use the snapshot volume that contains the
copy of the database tables. Set up any new database logs and configuration files that are
required to initialize the database.
2. Use the following command to make a full-sized snapshot, snapvol, of the tablespace volume
by breaking off plexes from the original volume:
# vxsnap -g volumedg make source=volume/newvol=snapvol/nmirror=N
The nmirror attribute specifies the number of mirrors, N, in the snapshot volume.
If the volume does not have any available plexes, or its layout does not support plex break-off,
use the procedure described in “Creating a Volume for Use as a Full-Sized Instant Snapshot
on page 23 to prepare an empty volume for the snapshot, and then use the following command
to create the snapshot:
# vxsnap -g volumedg make source=volume/snapvol=snapvol
If a database spans more than one volume, specify all the volumes and their snapshot volumes
as separate tuples on the same line, for example:
# vxsnap -g dbasedg make source=vol1/newvol=svol1/nmirror=2 \
source=vol2/newvol=svol2/nmirror=2 \
source=vol3/newvol=svol3/nmirror=2
If you want to save disk space, you can use the following command to create a
space-optimized snapshot instead:
# vxsnap -g volumedg make \
source=volume/newvol=snapvol/cache=cacheobject
The argument cacheobject is the name of a pre-existing cache that you have created in the disk
group for use with space-optimized snapshots. See “Creating a Shared Cache Object” on
page 24 for more information.
If several space-optimized snapshots are to be created at the same time, these can all specify
the same cache object as shown in this example:
# vxsnap -g dbasedg make source=vol1/newvol=svol1/cache=dbaseco \
source=vol2/newvol=svol2/cache=dbaseco \
source=vol3/newvol=svol3/cache=dbaseco
See the section “Creating a Share Cache Object” in the “Administering Volume Snapshots”
chapter of the VERITAS Volume Manager Administrators Guide for more information.
Note This step sets up the snapshot volumes, and starts tracking changes to the original
volumes. When you are ready to create the replica database, proceed to step 3.