After creating a snapplan, the next steps are to validate the snapplan parameters and check whether the snapshot volumes have been configured correctly for creating snapshots. If validation is successful, the snapplan is copied to the repository. The snapplan is validated using the db2ed_vmchecksnap command with the -o validate option.
Consider the following prerequisites and notes before validating a snapplan:
To validate a snapplan
Change directories to the working directory your snapplan is stored in:
$ cd /working_directory
Validate the snapplan using the db2ed_vmchecksnap command:
$ /opt/VRTS/bin/db2ed_vmchecksnap -D DB2DATABASE \ -f SNAPPLAN -o validate
In an HA environment, you must modify the default snapplan, use the virtual host name defined for the resource group for the PRIMARY_HOST and/or SECONDARY_HOST, and run validation.
In the following example, a snapplan, snap1, is validated for a snapshot image in a single-host configuration. The primary host is host1 and the working directory is /export/snap_dir.
$ cd /export/snap_dir
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap1 -o validate$
SNAPSHOT_MODE is online_snapshot
PRIMARY_HOST is host1
SECONDARY_HOST is host1
The version of PRIMARY_DG-PRODdg is 140.
SNAPSHOT_DG is SNAP_PRODdg
SNAPSHOT_PLAN_FOR is database
Examining DB2 volume and disk layout for snapshot
Volume prodvol1 on PRODdg is ready for snapshot. Original plex and DCO log for prodvol1 is on PRODdg1.
Snapshot plex and DCO log for prodvol2 is on PRODdg2.
Volume prodvol2 on PRODdg is ready for snapshot. Original plex and DCO log for prodvol2 is on PRODdg1.
Snapshot plex and DCO log for prodvol2 is on PRODdg2.
SNAP_PRODdg for snapshot will include: PRODdg2
ALLOW_REVERSE_RESYNC is NO
The snapplan snap1 has been created.
In the following example, a snapplan, snap2, is validated for a snapshot image in a two-host configuration. The primary host is host1, the secondary host is host2, and the working directory is /export/snap_dir.
$ cd /export/snap_dir
$ /opt/VRTS/bin/db2ed_vmchecksnap -D PROD -f snap2 -o validate
SNAPSHOT_MODE is online_snapshot PRIMARY_HOST is host1 SECONDARY_HOST is host2 The version of PRIMARY_DG-PRODdg is 140. SNAPSHOT_DG is SNAP_PRODdg SNAPSHOT_PLAN_FOR is database Examining DB2 volume and disk layout for snapshot. Volume prodvol1 on PRODdg is ready for snapshot. Original plex and DCO log for arch is on PRODdg1. Snapshot plex and DCO log for arch is on PRODdg2. Volume prodvol2 on PRODdg is ready for snapshot. Original plex and DCO log for prod_db is on PRODdg1. Snapshot plex and DCO log for prod_db is on PRODdg2. SNAP_PRODdg for snapshot will include: PRODdg2 ALLOW_REVERSE_RESYNC is NO The snapplan snap2 has been created.