Home > Veritas Storage Foundation™ Volume Manager Manual Pages
VXSNAP (1M) |
Maintenance Commands |
vxsnap [-g diskgroup] addmir {volume|volset} [nmirror=N] [attributes ...]
vxsnap
[-b]
[-g diskgroup]
addmir
{volume|volset}
mirvol={mirror_volume|mirror_volset}
[mirdg=diskgroup]
[attributes ...]
vxsnap [-f] [-g diskgroup] dis {volume|volset}
vxsnap
[-g diskgroup]
[-B] [-l] [-v] [-x]
list [{volume|volset}]
vxsnap
[-g diskgroup]
[-o optarg[,optarg]...]
make
snapshot_tuple [snapshot_tuple]...
[alloc=storage_attributes]
[comment=\"comment\"]
vxsnap
-d description_file
[-g diskgroup]
[-o optarg[,optarg]...]
make
[alloc=storage_attributes]
[comment=\"comment\"]
vxsnap [-g diskgroup] [-o optarg[,optarg]...] make -
vxsnap
[-g diskgroup]
prepare
{volume|volset}
[regionsize=size]
[drl={yes|no|sequential}]
[ndcomirs=number]
[attribute ...]
vxsnap
[-g diskgroup]
[{-e | -m |
-n [-B]
[-l] [-v] [-x]}]
print [{volume|volset}]
vxsnap
[-f]
[-g diskgroup]
reattach
{snapvol|snapvolset}
source={volume|volset}
[nmirror=number]
[sourcedg=diskgroup]
vxsnap
[-g diskgroup]
[-o optarg[,optarg]...]
refresh
{snapvol|snapvolset}
source={volume|volset}
[[{snapvol|snapvolset} source={volume|volset}]...]
[syncing=yes|no]
vxsnap
[-g diskgroup]
[-o optarg[,optarg]...]
restore
{volume|volset}
source={snapvol|snapvolset}
[{volume|volset} source={snapvol|snapvolset}]...
[destroy=yes|no]
[syncing=yes|no]
[nmirror=number]
vxsnap [-g diskgroup] rmmir {volume|volset}
vxsnap
[-g diskgroup]
rmmir {volume|volset}
mirvol={mirror_volume|mirror_volset}
[mirdg=diskgroup]
vxsnap
[-g diskgroup]
snapwait
{volume|volset}
{plex=plex1[,plex2]... |
nmirror=N |
mirvol={mirror_volume|mirror_volset} |
nmirvol=N}
[mirdg=diskgroup]
vxsnap [-f] [-g diskgroup] split {volume|volset}
vxsnap [-g diskgroup] syncpause {volume|volset}
vxsnap [-g diskgroup] syncresume {volume|volset}
vxsnap
[-b]
[-g diskgroup]
[-o optarg[,optarg]...]
[-t tasktag]
syncstart
{volume|volset}
vxsnap [-g diskgroup] syncstop {volume|volset}
vxsnap [-g diskgroup] syncwait {volume|volset}
vxsnap [-g diskgroup] unprepare {volume|volset}
Full-sized instant snapshots, like traditional third-mirror snapshots, requires as much storage space for each of their plexes as a plex in the parent volume. Unlike traditional snapshots, however, instant snapshots are immediately available for use on being created. Synchronization of the snapshot volume can be performed in the background, or deferred until synchronization is necessary to dissociate the snapshot volume from its parent volume, or to move it into a separate disk group for off-host processing.
Space-optimized instant snapshots are also immediately available for use on being created, but they are typically configured to use a fraction of the storage space that is required by full-sized instant snapshots.
The number of mirrors to be added may be specified by using the nmirror attribute. The default number is 1.
This command also adds an equal number of mirrors to the DCO volume, and creates an association between each data mirror and a DCO mirror. When a data mirror is broken off to take a snapshot, the corresponding DCO mirror accompanies it. You can use storage attributes to control the allocation of disk space to the mirrors.
The newly created data plexes remain in the SNAPATT state until they have been fully synchronized from the original data plexes. Synchronization is carried out as a background task if the -b option is specified. Once the data plexes have been fully synchronized, they are placed in the SNAPDONE state. The state of the DCO plexes is DCOSNP until they are associated with the DCO of the original volume.
Alternatively, the name of a suitably sized volume or volume set that is to be used as a snapshot volume can be specified using the mirvol attribute. This establishes a link between the data volume and the snapshot volume. If the snapshot volume exists in a different disk group, this disk group is specified using the mirdg attribute. Note that the snapshot is not ready for use until synchronization is complete.
The state of the link can be viewed by using the vxprint command. This state must change from ATTACHING to ACTIVE before the snapshot can be created. If the -b option was specified, you can use the vxsnap snapwait to wait for the link to the snapshot volume or snapshot volume set to become ACTIVE. The vxsnap make command can then be run to create a break-off snapshot volume or volume set.
The volume (and mirvol, if specified) must have been prepared using vxnap prepare for this command to succeed.
This operation fails if the snapshot volume has any unsynchronized child snapshots immediately below it in a snapshot hierarchy.
Note: A snapshot volume must be dissociated from its snapshot hierarchy before it can be deleted by using a command such as vxedit rm.
Note: When applied to a volume set or to a component volume of a volume set, this operation can result in inconsistencies in the snapshot hierarchy in the case of a system crash or hardware failure. If the operation is applied to a volume set, the -f (force) option must be specified.
Each snapshot that is to be created is defined by a snapshot tuple, snapshot_tuple. A tuple consists of a number of attribute=value fields. Within each tuple, the fields are separated by slashes (/).
The following attributes can be defined for snapshot tuples. All attributes are optional except where specified.
- alloc=storage_attributes
- Specifies a comma-separated list of storage attributes (disks, controllers, enclosures, trays and sites) from which storage for the snapshot volume (and any required cache object) is to be allocated.
See the vxassist(1M) manual page for more information about storage attributes. (Note that such attributes are silently ignored if they do not apply or are not required.)
- autogrow={yes|no}
- Specifies whether the dedicated (non-shared) cache that is associated with a space-optimized snapshot can be grown automatically when extra space is required. The default value is no.
This attribute does not apply to full-sized instant snapshots.
See the vxcached(1M) manual page for more information on the operation of the autogrow feature.
- cache=cache_object
- Specifies the name of the cache object to be used by a space-optimized snapshot. The named cache object can be one shared between several space-optimized snapshots within the same disk group, or it can be a cache object that is dedicated for use by a single snapshot.
Note: The cache object must already exist.
Note: This attribute is not required for Intelligent Storage Provisioning (ISP) volumes as both space-optimized snapshots and their cache volume must be pre-prepared. In addition, this attribute cannot be specified with the cachesize attribute.
- cachesize=size
- Specifies the size of the cache to be created for use by a space-optimized snapshot. The minimum cache size is approximately 10m (10MB) plus 1MB for each 256KB of the region size.
Note: This attribute is not supported for ISP volumes nor for full-sized instant snapshots, and it cannot be specified with the cache attribute.
- comment=\"comment\"
- Associates a description with the snapshot volume.
The double quotation marks around the comment string must be escaped with backslashes to protect them from the shell. The comment itself must not contain double quotation marks.
- infrontof=frontvol
- Places a volume in front of the specified volume, frontvol, in a snapshot cascade.
Note: Snapshot cascades improve write performance for applications that take regular online snapshots of volumes. They are not suitable for use where the snapshots may be dissociated from the snapshot hierarchy.
- ncachemirror=number
- Specifies the degree of redundancy to be configured in the cache volume that underlies the cache object. By default, an unmirrored cache volume is created (ncachemirror=1).
This attribute does not apply to full-sized instant snapshots. It cannot be specified with the cache attribute.
- newvol={snapvol|snapvolset}
- new={snapvol|snapvolset}
- Specifies the name of the new space-optimized or full-sized break-off snapshot volume that is to be created. If not specified, the snapshot is assigned a name of the form SNAP%d-%v, where %d is a unique serial number, and %v is the name of the original volume. You can use the -o name="pattern" option to specify a different format to use for new snapshot volumes.
new is an alias for newvol.
Note: For a full-sized break-off snapshot volume, either the plex or the nmirror attribute must also be specified.
Note: This attribute is not supported for ISP volumes, and it cannot be specified with the snapvol attribute.
- nmirror=number
- nmirrors=number
- Specifies the degree of redundancy to be configured in a snapshot volume by the make operation. By default, an unmirrored snapshot volume is created (nmirror=1).
This attribute is also used to specify the number of snapshot mirrors that are to be added to a volume in the addmir operation. By default, one snapshot mirror is added to a volume (nmirror=1).
If the newvol attribute is specified to the make operation instead of the snapvol attribute, nmirror specifies the number of plexes in the original volume that are to be broken off for use as snapshot plexes.
nmirrors is an alias for nmirror.
Note: The original volume must have a mirror or mirror-stripe layout, or it must be a RAID-5 volume that has been converted to a layered layout by running the vxsnap prepare command. The volume must also have a sufficient number of plexes available that are in the SNAPDONE state (see the description of vxsnap addmir).
This attribute only applies to full-sized break-off mirror snapshots. It can also be used when creating snapshots of volume sets. It cannot be specified with the plex attribute.
- plex=plex[,plex...]
- Specifies one or more plexes in the original volume that are to be used as snapshot plexes.
Note: The data in the plexes must already be synchronized, and the plexes must be in the ACTIVE state.
This attribute applies only to full-sized break-off snapshots. It cannot be specified with the nmirror attribute.
- snapdg=diskgroup
- Specifies the disk group that contains a linked break-off snapshot volume if this is different from the diskgroup containing the data volume. This attribute applies only to linked break-off snapshot volumes or volume sets that have been linked to the data volume using the addmir operation with the mirvol attribute specified.
- snapvol=volume
- snap=volume
- Specifies a volume that is to be used as a full-sized snapshot of the source volume. (For ISP volumes, this attribute is also used to specify a prepared space-optimized snapshot.) The specified volume must have the same length as the source volume. The region size of the DCO volume of the snapshot volume must also be the same as that of the DCO volume of the source volume.
snap is an alias for snapvol.
This attribute applies only to full-sized snapshots that are created on a pre-prepared volume, and to linked break-off snapshots that are created from mirrors that have been added by using the mirvol with the addmir operation. It cannot be specified with the newvol attribute.
- source=volume
- Specifies the name of the volume for which the snapshot is being taken.
- syncing={off|no|on|yes}
- sync={off|no|on|yes}
- Specifies whether synchronization is to be started for a full-sized instant snapshot (default value is on).
sync is an alias for syncing.
The value off is equivalent to no, and on is equivalent to yes.
Note: An instant snapshot must be fully synchronized before the dis or split operations can be performed on it, or before it can be moved into a separate disk group. To reduce system overhead, synchronization may be disabled if the snapshot volume is to remain dependent on the original volume in the same disk group.
This attribute applies only to full-sized instant snapshots.
To summarize, the following options must be specified for the different types of instant snapshot:
- Space-optimized on a newly created cache (non-ISP volumes only): source, cachesize, and newvol or new.
- Space-optimized on a pre-prepared cache: source, cache, newvol or new (non-ISP volumes only), and snapvol or snap (ISP volumes only).
- Full-sized break-off (non-ISP volumes only): source, newvol or new, and nmirror or plex.
- Full-sized on a pre-prepared volume: source, and snapvol or snap.
The autogrow option applies only to space-optimized snapshots, and the ncachemirror option applies only to space-optimized snapshots for which a cache is created at the same time.
The syncing option applies only to full-sized instant snapshots.
The alloc, comment and infrontof attributes may optionally be specified for all instant snapshots.
The following global attributes may be specified at the end of the command and are applied to all snapshots that are to be created:
- alloc=attributes
- Specifies a comma-separated list of storage attributes (disks, controllers, enclosures, trays and sites) from which storage for the snapshot volumes (and any required cache objects) is to be allocated.
- comment=\"comment\"
- Associates a description with all the snapshot volumes.
The double quotation marks around the comment string must be escaped with backslashes to protect them from the shell. The comment itself must not contain double quotation marks.
The make command also enables FastResync on the snapshot, and sets the instant flag to indicate that it is ready for access. For full-sized instant snapshots, the incomplete flag is also set to indicate that the snapshot has not been fully synchronized with its parent volume. The incomplete flag is unset when synchronization (if any) is complete. You can check for these flags using the vxprint command as shown here:
diskgroupvxprint -g-F %instantvolumevxprint -gdiskgroup-F %incompletevolume
The returned value indicates whether the flag is set (on) or not set (off).
If the argument to make is a dash character (-), snapshot tuple arguments and other attributes are read from the standard input.
Note: If an old-style DRL log or DCO is present on the volume, the operation fails. These must be removed from the volume before instant snapshots can be used.
If the volume is RAID-5, it is converted into a layered volume with mirroring at the top layer and the original RAID-5 volume in the lower layer. This volume cannot be resized nor can its layout be changed unless the unprepare operation is used to convert it back to a non-layered RAID-5 volume.
The size of DCO volume is determined by the size of each volume region that is mapped by a single bit in a FastResync map, and by the number of mirrors in the DCO volume. By default, each mirror requires space for 32 per-volume maps plus an accumulator and DRL log that require an additional amount of space that is equivalent to 3 per-volume maps.
The number of mirrors in the DCO volume may be specified by the ndcomirs attribute. For non-layered volumes, the default number of DCO mirrors is set to the lesser of the number of data plexes in the parent volume or 2. For layered volumes, the default number of DCO mirrors is set to 2.
Note: It is recommended that you give the DCO volume the same level of redundancy as the parent volume.
The default region size is 64k (64KB). If a different region size is specified by using the regionsize attribute, this must be a power of 2 and greater than or equal to 16k.
The value of the drl attribute specifies how DRL is to be applied to the volume:
- no
- DRL is not enabled on the volume.
- sequential
- Sequential DRL is enabled on the volume.
- yes
- DRL is enabled on the volume.
The instant flag is set on the volume to indicate that the volume can be used for instant snapshot operations.
Other attributes can include storage attributes as used with the vxassist command.
When applied to a volume (or volume set), details of all its snapshots are output. For a snapshot, details of its parent are also displayed.
If no argument is specified, the command displays snapshot-related information for all volumes in a disk group with the default format (equivalent to specifying the -e option).
The reattach operation can also be used to re-establish the link between a snapshot volume and the data volume that was previously created using the mirvol attribute to the vxsnap addmir command. If the source data volume is in a different disk group from the snapshot volume, this disk group can be specified using the sourcedg attribute.
Note: The reattach operation is permitted between unrelated volumes provided that their sizes are compatible.
Note: The reattach operation is not supported for space-optimized snapshots.
Caution: For ISP volumes, this operation requires the -f (force) option to be specified as it violates the intent of the volume. The operation has the side effect of moving the disks underlying the snapshot to the storage pool in which the source volume is located. The operation fails if the snapshot and the source volume are in different pools, but the snapshot volume does not have exclusive use of the underlying disks.
The plexes of the snapshot volume are put into the SNAPTMP state while they are being synchronized, and are set to the ACTIVE state when synchronization is complete.
By default, all the plexes of the snapshot volume are reattached. The nmirror attribute can be used to return a subset of the plexes in the snapshot volume.
Note: The snapshot volume must be closed (for example, it must not be mounted as a file system, or be accessed by a database or other application) before running this command. However, the snapshot volume may be re-opened immediately after running this command.
Note: The refresh operation is permitted between unrelated volumes provided that their sizes are compatible.
Note: This operation is not permitted between unrelated volumes.
By default, full synchronization is started unless the syncing=no attribute is specified.
If the destroy attribute is set to yes, the snap volume is removed when the synchronization is complete, and its plexes are attached to the parent volume. By default, the destroy attribute is set to no, which preserves the snapshot volume. Only non-destructive restoration is possible for space-optimized snapshots as these do not have complete plexes.
The incomplete and restore flags are set on the volume while it is being restored.
Note: The volume must be closed (for example, it must not be mounted as a file system, or be accessed by a database or other application) before running this command. However, the volume may be re-opened immediately after running this command, before synchronization is complete.
If the addmir operation was used to link a separate volume for use as a linked break-off snapshot, this volume can be unlinked by specifying its name to the mirvol attribute. If different from the disk group containing the data volume, the disk group containing the snapshot volume is specified using the mirdg attribute.
The command fails if no such mirror exists, or if the specified volume has not been prepared for use with instant snapshots.
The plex attribute specifies which plexes to wait for becoming SNAPDONE. This attribute cannot be used with volume sets.
The nmirror attribute specifies how many plexes to wait for becoming SNAPDONE. When used with volume sets, each component volume must have N SNAPDONE plexes.
The mirvol attribute specifies which linked volume or volume set to wait for becoming ACTIVE.
The nmirvol attribute specifies how many linked volumes or volume sets to wait for to becoming ACTIVE. When used with volume sets, all the component volumes in a volume set must be in the ACTIVE state.
The mirdg attribute specifies the disk group containing the snapshot volume if this is different from the disk group containing the data volume.
Note: This operation is not supported for space-optimized snapshots.
The specified volume and its descendents form an independent snapshot hierarchy. This requires that synchronization of the volume is complete.
As a result of this operation, the volume is dissociated from its parent. The operation fails if the volume is dependent on its parent.
Note: When applied to a volume set or to a component volume of a volume set, this operation can result in inconsistencies in the snapshot hierarchy in the case of a system crash or hardware failure. If the operation is applied to a volume set, the -f (force) option must be specified.
Resynchronization must not have been started earlier by the make command (by specifying syncing=yes), or stopped by the syncstop command.
The command returns immediately if synchronization is in progress, or if synchronization is already complete (that is, the incomplete flag is not set).
Note: The vxtask command can be used to pause, resume, or stop the synchronization operation.
This command cannot be used to wait for reattached plexes to be resynchronized. Use the snapwait operation for this purpose.
The command fails for a space-optimized snapshot, or for a snapshot on which synchronization is not in progress.
If the volume is part of a snapshot hierarchy, the operation fails. Use the dis operation to remove the volume from the snapshot hierarchy before using this command.
If the volume was originally a RAID-5 volume that was converted to a layered volume by the prepare command, the layout reverts to non-layered RAID-5.
This is the default option to vxsnap print, and corresponds to the standard output format from previous releases.
The following object types may be displayed:
- compvol
- Component volume of a volume set.
- plex
- Plex.
- vol
- Volume.
- vset
- Volume set.
The following snapshot types may be displayed:
- detmir
- Detached snapshot plex.
- detvol
- Detached snapshot mirror volume.
- fullinst
- Full-sized instant snapshot.
- mirbrk
- Plex break-off snapshot.
- mirvol
- Snapshot mirror volume that was added using the addmir operation with the mirvol attribute specified.
- snapmir
- Snapshot plex that was added using the addmir operation.
- spaceopt
- Space-optimized snapshot.
- volbrk
- Break-off snapshot that was created on a pre-prepared mirvol.
The -B, -l, -v and -x options can be used to change the information displayed by the -n option.
- iosize=size
- Specifies the size of each I/O request that is to be used when synchronizing the regions of the volume. This option may be specified with the addmir, make, refresh, restore and syncstart operations. The specified value is rounded to a multiple of the volume's region size. The default value is 1m (1MB).
- name="pattern"
- Specifies a format template for naming new snapshot volumes. This option may be used with the make operation. The pattern consists of characters and one or more of the following specifiers:
- %%
- Single percent character.
- %d
- Unique serialization number expressed as a decimal integer.
- %g
- Disk group name.
- %m
- Mirror's original name.
- %s
- Serialization string expressed as a sequence of one or more lower case letters.
- %S
- Serialization string expressed as a sequence of one or more upper case letters.
- %v
- Volume name.
- %x
- Unique serialization number expressed as a lower-case hexadecimal integer.
- %X
- Unique serialization number expressed as an upper case hexadecimal integer.
- site=sitename
- When used with the make operation, specifies that snapshots are to be taken for the named site of all volumes on which the allsites=on attribute is set.
Full-sized break-off snapshot volumes are created for all volumes in the disk group that have a complete plex available at the named site. For this reason, it is not necessary to use the source, snapvol or newvol commands to specify the source volume or the target volume in the snapshot tuple. Instead, the -o name=pattern option is used to generate names for the snapshot volumes.
The site:sitename2 storage allocation attribute can be used to specify storage at a different site.
- slow=iodelay
- Specifies the delay in milliseconds between synchronizing successive sets of regions as specified by the value of iosize. This can be used to change the impact of synchronization on system performance. This option may be specified with the make, refresh, restore and syncstart operations. The default value of iodelay is 0 milliseconds (no delay).
LEN=`vxprint -g mydg -F%len volx` vxassist -g mydg -b make fsssvolx $LEN layout=mirror nmirror=2 DCOVOL=`vxprint -g mydg -F%dconame volx` RSZ=`vxprint -g mydg -F%regionsz $DCOVOL` vxsnap -g mydg prepare volume regionsize=$RSZ ndcomirs=2
The vxprint commands are used to discover the length of the original volume, the name of its DCO volume, and the region size of that DCO volume. The vxassist command is used to create a new volume with the required redundancy. Finally, the vxsnap prepare command sets up a DCO volume with the correct region size on the newly created volume.
Having performed the previous steps, the full-sized instant snapshot can be created (this example also starts synchronization using an I/O size of 10MB):
vxsnap -g mydg -o iosize=10m make source=volx/snapvol=fsssvolx/sync=yes
Add 2 mirror plexes to the volume vol1 for use as break-off snapshots:
vxsnap -g mydg addmir vol1 nmirror=2
Remove one snapshot mirror plex from the volume vol1:
vxsnap -g mydg rmmir vol1
Create full-sized instant snapshots of volumes vol1, vol2 and vol3 with specified names by breaking off one plex from each original volume:
vxsnap -g mydg make source=vol1/newvol=snapvol1/nmirror=1 \ source=vol2/newvol=snapvol2/nmirror=1 \ source=vol3/newvol=snapvol3/nmirror=1
Create a space-optimized snapshot, sossvolx, of the volume, volx, and also set up a 1GB growable cache for use by the snapshot:
vxsnap -g mydg make \ source=volx/newvol=sossvolx/cachesize=1g/autogrow=yes
Use the vxassist command to create a 20GB cache volume, mydgcvol, with 2 mirrors:
vxassist -g mydg -b make mydgcvol 20g layout=mirror nmirror=2
Use the vxmake command to set the region size of mydgcvol to 32KB, and to associate the volume with the cache object, mydgcache, for use by space-optimized snapshots in the disk group, mydg:
vxmake -g mydg cache mydgcache cachevolname=mydgcvol regionsize=32k
Use the vxcache command to start the cache:
vxcache -g mydg start mydgcache
Create space-optimized snapshots of volumes vol1, vol2 and vol3 with a mixture of default and specified names. Default snapshot names are assigned using the specified template. Each snapshot shares the prepared cache, mydgcache:
vxsnap -g mydg -o name="so%v-%d" make \ source=vol1/cache=mydgcache \ source=vol2/newvol=sosnapvol2/cache=mydgcache \ source=vol3/cache=mydgcache
Create a space-optimized snapshot, sossvoly, of the volume, voly, on the cache, mydgcache:
vxsnap -g mydg make \ source=voly/newvol=sossvoly/cache=mydgcache
Create a space-optimized snapshot, sos2voly, of the volume, voly, and place this in front of snapshot, sossvoly, to create a snapshot cascade:
vxsnap -g mydg make \ source=voly/newvol=sos2voly/infrontof=sossvoly/cache=mydgcache
To create an ISP space-optimized snapshot, first use the vxassist command to prepare the cache volume (if this does not already exist), then prepare the snapshot by using the cachevolume attribute with the vxassist command, and finally use the vxsnap command to take the snapshot:
vxassist -g mydg -o intent make mycache 1g \ rules="mirror 2" type=cachevolume vxassist -g mydg -o intent make sosmyvol 10g \ type=snapshot cachevolume=mycache vxsnap -g mydg make source=myvol/snapvol=sosmyvol
Refresh the contents of the full-sized snapshot, snapvol1, and the spaced-optimized snapshot, sosnapvol2, from their original volumes, using an I/O size of 5MB:
vxsnap -g mydg -o iosize=5m refresh snapvol1 sosnapvol2
Synchronize the contents of the full-sized snapshot volume, snapvol2, from its original volume using an I/O size of 10MB, wait for the synchronization to complete, and then turn snapvol2 into an independent volume:
vxsnap -g mydg -b -o iosize=10m syncstart snapvol2 vxsnap -g mydg syncwait snapvol2 vxsnap -g mydg dis snapvol2
Reattach the full-sized snapshot, snapvol1, to its original volume:
vxsnap -g mydg reattach snapvol1 source=vol1
Restore vol3 from the full-sized snapshot volume, snapvol3, using an I/O size of 2MB, and remove the snapshot volume when restoration is complete:
vxsnap -g mydg -o iosize=2m restore vol3 source=snapvol3 destroy=yes
Add the prepared volume, prepsnap, in the disk group, mysnapdg, to the volume vol4 for use as a linked break-off snapshot:
vxsnap -g mydg -b addmir vol4 mirvol=prepsnap mirdg=mysnapdg
Wait for synchronization of the linked volume, prepsnap, from the previous example, to complete (note that the mirror disk group must also be specified):
vxsnap -g mydg snapwait vol4 mirvol=prepsnap mirdg=mysnapdg
Take a snapshot of vol4, using the linked break-off snapshot volume, prepsnap, in the disk group, mysnapdg:
vxsnap -g mydg make source=vol4/snapvol=prepsnap/snapdg=mysnapdg
Reattach the link between the volumes, prepsnap and vol4:
If the linked break-off snapshot is created in the same disk group as its parent volume, the previous four commands can be simplified as follows:vxsnap -g mysnapdg reattach prepsnap source=vol4 sourcedg=mydg
vxsnap -g mydg -b addmir vol4 mirvol=prepsnap vxsnap -g mydg snapwait vol4 mirvol=prepsnap vxsnap -g mydg make source=vol4/snapvol=prepsnap vxsnap -g mydg reattach prepsnap source=vol4
If FastResync is turned off, the addmir, dis (for leaf nodes only), make (for break-off snapshots only), print, reattach, rmmir, and split operations are permitted. The reattach operation requires a full resynchronization.
The refresh and restore operations, and the creation using make of full-sized or space-optimized instant snapshots are not permitted if FastResync is turned off.
A volume that is a member of a snapshot hierarchy must be dissociated from the hierarchy before FastResync can be enabled or disabled on the volume (using the vxvol set fastresync=on command).
When using the vxsnap prepare or vxassist make commands to make a volume ready for instant snapshot operations, if the specified region size exceeds half the value of the tunable voliomem_maxpool_sz, the operation succeeds but gives a warning such as the following (for a system where voliomem_maxpool_sz is set to 12MB):
Specified region-size is larger than the limit on the system (voliomem_maxpool_sz/2=6144k).
vxsnap make operations to create full-sized or space-optimized instant snapshots, and refresh and restore operations on such volumes fail as they might potentially hang the system. Such volumes can be used only for breakoff-type snapshot operations using the reattach and make operations.
To make the volumes usable for instant snapshot operations, use vxsnap unprepare on the volume, and then use vxsnap prepare to re-prepare the volume with a region size that is less than half the size of voliomem_maxpool_sz (in this example, 1MB):
vxsnap -g mydg -f unprepare vol1 vxsnap -g mydg prepare vol1 regionsize=1M
The prepare and addmir operations require an additional license when applied to a RAID-5 volume.
The instant snapshot and space-optimized snapshot operations are intended eventually to replace the traditionally third-mirror snapshot operations that are provided by the vxassist and vxplex commands.
Volume sets can be used in place of volumes with the following vxsnap operations on instant volume snapshots: addmir, dis, make, prepare, reattach, refresh, restore, rmmir, split, syncpause, syncresume, syncstart, syncstop, syncwait and unprepare.
A full-sized snapshot of a volume set must itself be a volume set. See the vxvset(1M) manual page for more information about administering volume sets.
The value of the volpagemod_max_memsz tunable affects the performance of the instant snapshots feature. See the vxtune(1M) manual page and the Veritas Volume Manager Administrator's Guide for details.
Veritas Volume Manager Administrator's Guide
Last updated: 31 Aug 2008
Copyright ©2009 Symantec Corporation
All rights reserved.