test veritas logo


vxrvg(1M)

NAME

vxrvg - perform Veritas Volume Manager operations on RVGs

SYNOPSIS

vxrvg [-f] [-g diskgroup] -c checkpoint checkdelete rvg

vxrvg [-f] [-g diskgroup] checkend rvg

vxrvg [-f] [-g diskgroup] -c checkpoint checkstart rvg

vxrvg [-g diskgroup] cplist rvg

vxrvg [-g diskgroup] {-F [-r]|-M|-N} makeprimary rvg [rlink]

vxrvg [-g diskgroup] makesecondary rvg [rlink]

vxrvg [-g diskgroup] switchpri rvg [rlink]

vxrvg [-f] [-g diskgroup] recover rvg

vxrvg [-g diskgroup] resync rvg

vxrvg [-g diskgroup] [-f] [-p] [-P prefix | -a] snapback rvg

vxrvg [-g diskgroup] [-P prefix] [-o keepcache] snapdestroy rvg

vxrvg [-g diskgroup] snapprint rvg

vxrvg [-g diskgroup] [-P prefix] snaprefresh rvg

vxrvg [-g diskgroup] [-f] [-P prefix] snaprestore rvg

vxrvg [-g diskgroup] [-P prefix] [-F | -S] snapshot rvg
    [instantfull=volume/vset_list] [instantso=volume/vset_list]
    [plexbreakoff=volume/vset_list] [exclude=volume/vset_list]
    [plexprefix=plex_prefix]
    [cache=cachename | cachesize=size]
    [syncing={yes|no}] [comment="comment"]

vxrvg [-f] [-g diskgroup] start rvg

vxrvg [-f] [-g diskgroup] stop rvg

vxrvg [-1] [-g diskgroup] getdatavols rvg

vxrvg [-1] [-g diskgroup] getrlinks rvg

vxrvg [-g diskgroup] [-z] [-i interval]
    [-t timestamp_freq] [-C count] stats rvg

vxrvg [-g diskgroup] upgrade rvg

vxrvg [-g diskgroup] getfailedvols rvg

DESCRIPTION

The vxrvg utility performs Veritas Volume Manager (VxVM) operations on replicated volume groups (RVGs) that consist of VxVM volumes.

Each operation can be applied to only one diskgroup at a time. The rvg operand is used to determine a default local disk group, according to the standard disk group selection rules described in vxdg(1M). A local disk group can be specified using the -g diskgroup option.

KEYWORDS

checkdelete
  Deletes the specified Primary checkpoint. The required -c option specifies the checkpoint string that is marked in the SRL volume, and which needs to be deleted. After using the Primary checkpoints to synchronize the Secondary, they can be deleted by using the vxrvg -c checkpoint checkdelete rvg command.
checkend Marks the storage replicator log (SRL) volume associated with the specified RVG, rvg. Use this command only after you have finished copying all of the data volume data to a secondary site (see vxrvg checkstart).
checkstart Marks the SRL volume associated with the specified RVG, rvg. Any writes to any of the data volumes subsequent to the checkstart are logged in the SRL volume until a subsequent vxrvg checkend is executed. The required -c option specifies a checkpoint string which is associated with the start and end marks in the SRL volume. Use this command before copying all of the data volume data to the secondary sites.
The checkstart/checkend marks indicate the series of updates which the secondary must receive for it to become consistent. The secondary is inconsistent while these updates are in the process of being transmitted to it. This means that the secondary is not a valid candidate for a primary migration during this period.
cplist Displays information about all existing checkpoints that are associated with the specified RVG, rvg, including their name, size, and percentage of SRL used. If SRL usage reaches 100%, the checkpoint overflows and becomes unusable, as indicated by the output message "<Checkpoint overflowed>." Note that only primary checkpoints (created using vxrvg -c checkpoint checkstart on the primary) are associated with an RVG. Secondary checkpoints (created using vxrlink -c checkpoint pause on the secondary) are associated with the RLINK, and can be listed using vxrlink cplist.
makeprimary
  Converts a secondary RVG, rvg, to a primary RVG. In the event that the primary site fails, this command can be used to perform a failover using the -F or -N options. For a planned migration, the -M (migrate) option should be used. One of the options -F, -M, or -N must be specified with this command. The -r option may be specified with the -F option to perform an automatic resync of the RVG after a failover.
makesecondary
  Converts a primary RVG, rvg, to a secondary RVG. Note that all applications must be shut down and all data volumes must be closed.
switchpri Depending on the argument specified, the RLINK attached to the Secondary switches from the RLINK between the Primary and the Secondary to the RLINK between the Bunker Primary and the Secondary, or vice-versa. switchpri preserves the state of the RLINK while switching from the currently attached RLINK to the RLINK to be attached, specified as the argument. If no argument is provided, switchpri switches to the RLINK pointing to the Primary.
recover Recovers the specified RVG, rvg, after rebooting the system.
resync Starts replay of a DCM that is active due to SRL overflow or failback logging. Replay occurs for all RLINKs on which the dcm_logging flag is set. If any of these RLINKs are disconnected or paused, resynchronization is delayed until this condition clears. Detaching a disconnected or paused RLINK clears the dcm_logging flag, and allows resynchronization to proceed on any remaining RLINKs.
snapback Reattaches snapshot volumes to their original volumes in the specified RVG, rvg. This operation is similar to the vxassist snapback command for traditional (third-mirror breakoff) snapshots, and to the vxsnap reattach command for full-sized instant snapshots.
Note: When performing a snapback operation on plex-breakoff snapshots, the vxrvg snapback command reattaches the plexes in the SNAPDONE state if the plexes were added using the vxsnap addmir command. Otherwise, it reattaches the plexes in the ACTIVE state.
To reattach snapshot volumes, specify either the -P prefix option to reattach the set of snapshot volumes (one for each volume in the RVG) that has the specified prefix, or the -a option to reattach all snapshot volumes (multiple snapshot volumes for each volume in an RVG). Otherwise, vxrvg returns an error. If only one set of snapshots exists for the volumes in the RVG, neither option need be specified.
Snapshot volumes are usually reattached in a serial manner (one after another), which can take a long time if the snapshot volumes are large. The -p option can be used to reattach snapshots volumes in parallel. This is faster that reattaching them serially.
Note: The snapback operation can only be used with regular plex-breakoff snapshots, full-sized instant snapshots, and instant plex-breakoff snapshots. It cannot be used with space-optimized instant snapshots.
snapdestroy
  Destroys (completely deletes) snapshot volumes and volume sets. By default, this command deletes any cache object (used by space-optimized instant snapshots) together with the instant snapshots that have the specified prefix. To preserve a shared cache object, specify the -o keepcache option.
Note: The cache object is not destroyed if any other space-optimized instant snapshots are configured on it.
snapprint Displays information on the relationships between the data volumes/vsets of an RVG and any corresponding snapshots.
snaprefresh
  Refreshes existing snapshot volumes from all volumes in the specified RVG. This creates new point-in-time images for the snapshots, and the snapshots are immediately available for use with their new contents. Use the -P option to select the snapshot volume names that begin with the specified prefix for the refresh operation. If no prefix is specified, the prefix SNAP is used.
Note: Any applications that are running on the snapshot volumes must be closed before using this command.
snaprestore
  Restores the contents of all data volumes in the specified RVG from the corresponding snapshot volumes. The volume is immediately available with its restored contents. The -P option can be used to restrict the restore operation to snapshot volume names that begin with the specified prefix.
Note: The RVG must be stopped before proceeding with the restore operation.
This command restores data on the Primary as well as on the Secondary host. When this command is used to restore the data on the Primary RVG volumes, it deletes all existing checkpoints.
On the Primary, if the RLINKs are active and the volumes do not have DCM logs, the restore operation succeeds only if the -f (force) option is also specified. This detaches the Primary RLINK.
On the Secondary, this command can be used only if the RLINKs are detached, or if the attached RLINKs are in the fail state.
When the restore operation is in progress, the RVG is put into DCM logging mode. The changes that are applied to the volume on the Primary, as part of the restore operation, are not replicated on the Secondary until the vxrvg resync command is run.
Note: This operation can only be used with instant snapshots.
snapshot Creates snapshot volumes for all volumes in the specified RVG, rvg. This operation is similar to the vxassist snapshot command for traditional (third-mirror breakoff) snapshots, and to the vxsnap make command for instant snapshots.
The traditional snapshot operation takes an attached temporary mirror, and creates a new volume with the broken-off mirror as its plex. The vxassist snapstart command is normally used to create the snapshot plex.
Instant snapshot operations create full-sized or space-optimized instant snapshots. Full-sized instant snapshots may be created by plex breakoff, or by using a volume that you created earlier.
Full-sized instant snapshot volumes should be created using a naming convention such as prefix-data_volume_name. If you do not specify a prefix, the naming convention is SNAP-data_volume_name. For the data volumes associated to the volume set, snapshot volumes and snapshot volume set should be created with similar naming convention.
Note: Make sure that the original volumes and any required snapshot volumes (for full-sized instant snapshots that are created in this way) have been prepared before creating instant snapshots. For more information, see the vxsnap(1M) manual page.
If volumes are not prepared in advance, the default behavior of the snapshot operation is to create traditional snapshots.
For plex-breakoff snapshots, the plexprefix attribute can be used to specify the specific plexes that are to be used as snapshot plexes. If this is done, plexes should be created using a naming convention such as plex_prefix-data_volume_name. If the plexprefix attribute is not specified, a plex in the SNAPDONE state is chosen for the snapshot operation.
Note: When creating instant plex-breakoff snapshots, it is recommended that the vxsnap addmir command is used to add the plexes. For more information on creating the mirrored plexes, see the vxsnap(1M) manual page.
You can use the -P option to specify the prefix that is used for the creation of snapshot volumes. For example, a data volume named hr_dv01 might have snapshot volumes named june-hr_dv01, july-hr_dv01 and so on.
For space-optimized instant snapshots, a common (shared) cache object can be created before creating the snapshots.
Alternatively, a separate cache object can be created for each snapshot by specifying the cachesize attribute to the vxrvg snapshot command.
Note: The second method creates a cache object for the snapshots that cannot be preserved by specifying the -o keepcache option to the snapdestroy operation.
When creating instant snapshots the following attributes may be specified to the vxrvg snapshot operation:
cache=cachename
  Specifies the name of a cache object (created in advance) that can be shared between several space-optimized instant snapshots. The snapshots are created on this cache object.
This attribute can only be specified when creating instant space-optimized snapshots using the -S option or the instantso attribute.
This attribute cannot be specified in conjunction with cachesize.
cachesize=size
  Specifies the size of the cache object that is to be used by a space-optimized instant snapshot. This attribute creates a separate cache object with a cache volume of the specified size for each space-optimized snapshot.
This attribute can only be specified when creating instant space-optimized snapshots using the -S option or the instantso attribute.
This attribute cannot be specified in conjunction with cache.
comment="comment"
  Associates a description (having a maximum length of 40 characters) with the snapshot volume.
exclude=volume/vset_list
  Specifies a comma separated list of volumes and volume sets for which no snapshots are to be created.
Note: Component volume of the volume vset cannot be specified in the exclude list.
instantfull=volume/vset_list
  Specifies a comma-separated list of volumes and volume sets for which full-sized instant snapshots are to be created. This attribute cannot be used with the -F option.
Note: Component volume of the volume vset cannot be specified in the instantfull list.
instantso=volume/vset_list
  Specifies a comma-separated list of volumes and volume sets for which space-optimized instant snapshots are to be created. This attribute cannot be used with the -S option.
Note: Component volume of the volume vset cannot be specified in the instantso list.
plexbreakoff=volume/vset_list
  Specifies a comma-separated list of volumes and volume sets for which full-sized plex-breakoff instant snapshots are to be created.
Note: Component volume of the volume vset cannot be specified in the plexbreakoff list.
plexprefix=plex_prefix
  Specifies a prefix for the plexes that are to be used for creating the plex-breakoff snapshots as defined by plexbreakoff. The -F and -S options may not be specified with this attribute.
syncing={yes|no}
  Specifies whether the snapshot volumes for full-sized instant snapshots must be synchronized. If set to yes (the default), the volumes are synchronized in the background. The synchronization can be stopped or started as required. This attribute is not valid for space-optimized instant snapshots.
start Starts the specified RVG, rvg. This enables I/O accesses to the associated data volumes. The data and SRL volumes must be ACTIVE. The RVG is set to the ACTIVE state.
stop Stops the specified RVG, rvg. This disables I/O accesses to the associated data volumes. The RVG is set to the CLEAN state.
getdatavols
  Displays names of all data volumes that are associated with the specified RVG, rvg.
getrlinks Displays names of all rlinks that are associated with the specified RVG, rvg.
stats Displays application statistics for the given RVG, rvg. This is only valid on the primary. The -i interval option allows the stats command to be executed at the given interval. The -t timestamp_freq option displays the system date at the given frequency. The -C count option displays the stats the specified number of times. The -z option resets the stats for the given RVG. The values displayed are:
Read/Write Conflicts
  Number of times that the application attempted to read from a data block that was currently being written to.
Maximum Concurrency
  Maximum number of threads writing at any point in time.
Average Concurrency
  Average number of threads performing writes.
Maximum Write-Size
  Maximum write size (in 512-byte blocks) observed on any data volume in the RVG.
Average Write-Size
  Average write size reported in 512-byte blocks.
upgrade Upgrade the RVG to the latest RVG version. The replication which is using the secondary logging is supported only from RVG version 40 onwards. vxprint -Vl displays the current RVG version.
getfailedvols
  Displays information about all failed data volumes that are associated with the specified RVG, rvg, including the data volume names, the percentage of the SRL used after the volume failure, and whether the volume is recoverable. The state of the failed volume is stored in the SRL. If the SRL usage reaches 100%, that information is overwritten and therefore the failed volume cannot be recovered. The output displays "<Volume is not recoverable>".

OPTIONS

-1 Displays the output in one column. This option can only be used with either the getdatavols or getrlinks keywords.
-a Specifies that the snapback operation is to reattach all snapshot volumes that are associated with volumes in the specified RVG.
-c checkpoint
  Required with the checkstart and checkdelete keywords. The checkpoint string is associated with the checkstart and checkend marks in the SRL volume (see vxrvg checkstart). It can be printed with vxprint -l rvg, but is overwritten in the RVG record by a subsequent vxrvg checkstart command (although it persists in the SRL volume until entries written to the SRL volume eventually wrap around and overwrite it).
-f For the checkstart, checkdelete, checkend, recover, start and stop keywords, this option forces the operation to be performed even if the RVG is in use by another utility.
For the checkdelete keyword, this option allows a checkpoint to be deleted even if the checkend operation has not finished.
For the start keyword, this option allows an RVG to be started in PASSTHRU mode.
For the stop keyword, this option allows an RVG to be stopped even if it is open or mounted.
For the snaprestore keyword, this option forces the operation to be performed when the RLINKs are active, but have not been enabled for DCM logging.
-F When specified with the makeprimary operation, enables failback logging during a failover.
When specified with the snapshot operation, full-sized instant snapshots are created.
-g diskgroup Specifies the local diskgroup for the operation either by name or by disk group ID (see vxdg(1M) for more information on disk groups).
-i interval Executes the stats command every interval seconds.
-t timestamp_freq
  With the stats command, displays the system date every timestamp_freq seconds.
-C count Executes the stats command count times.
-z count Used with the stats command to reset the stats for a given RVG.
-M Performs a controlled migration from a secondary RVG to a primary RVG. This option is only used with the makeprimary keyword.
-N Disables failback logging when performing a failover. This option is only used with the makeprimary keyword.
-o keepcache Preserves the cache object when used with the snapdestroy keyword.
-p Allows the snapback operation to reattach snapshots to their original volumes in parallel.
-P prefix With the snapshot operation, assigns names to created snapshot volumes with the format prefix-volume_name, where volume_name is the name of the original volume.
With the snapback operation, reattaches only those snapshot volumes that have names beginning with the specified prefix.
-r Uses vxrvg resync to perform an automatic resynchronization of the RVG after a failover. This option may only be specified with the -F option to the makeprimary keyword.
-S When specified with the snapshot operation, space-optimized instant snapshots are created.

EXIT CODES

The vxrvg utility exits with a non-zero status if the attempted operation fails. A non-zero exit code is not a complete indicator of the problems encountered, but rather denotes the first condition that prevented further execution of the utility.

See vxintro(1M) for a list of standard exit codes.

SEE ALSO

vxassist(1M), vxdg(1M), vxedit(1M), vxintro(1M), vxmake(1M), vxprint(1M), vxrlink(1M), vxsnap(1M), vxvol(1M)


VxVM 7.3.1 vxrvg(1M)