![]() |
< Previous | Next > |
Product: Storage Foundation Guides | |
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide |
Creating Multiple Instant Snapshots![]() To make it easier to create snapshots of several volumes at the same time, the vxsnap make command accepts multiple tuples that define the source and snapshot volumes names as their arguments. For example, to create three instant snapshots, each with the same redundancy, the following form of the command can be used: # vxsnap [-g diskgroup] make \ source=vol1/snapvol=snapvol1 \ source=vol2/snapvol=snapvol2 \ source=vol3/snapvol=snapvol3 The specified source volumes (vol1, vol2 and so on) may be the same volume or different volumes. The vxsnap make command allows the snapshots to be of different types as shown here: # vxsnap [-g diskgroup] make \ source=vol1/snapvol=snapvol1 \ source=vol2/snapvol=snapvol2 In this example, snapvol1 is a full-sized snapshot, and snapvol2 is a space-optimized snapshot. Adding a Snapshot to a Cascaded Snapshot HierarchyTo create a snapshot and push it onto a snapshot hierarchy between the original volume and an existing snapshot volume, specify the name of the existing snapshot volume as the value of the infrontof attribute to the vxsnap make command. The following example, shows how to place the space-optimized snapshot, thurs_bu, of the volume, dbvol, in front of the earlier snapshot, wed_bu: # vxsnap -g dbdg make source=dbvol/snapvol=thurs_bu/\ infrontof=wed_bu/cache=dbdgcache Similarly, the next snapshot that is taken, fri_bu, is placed in front of thurs_bu: # vxsnap -g dbdg make source=dbvol/snapvol=fri_bu/\ infrontof=thurs_bu/cache=dbdgcache For more information on the application of cascaded snapshots, see the VERITAS Volume Manager Administrator's Guide. Refreshing an Instant Snapshot (vxsnap refresh)Refreshing an instant snapshot replaces it with another point-in-time copy of a parent volume. To refresh one or more snapshots and make them immediately available for use, use the following command: # vxsnap [-g diskgroup] refresh snapvol [source=vol] \ [[snapvol2 source=vol2]...] [sync=yes|no] If the source volume is not specified, the immediate parent of the snapshot is used. For full-sized instant snapshots, resynchronization is started by default. To disable resynchronization, specify the syncing=no attribute. This attribute is not supported for space-optimized snapshots. ![]() It is possible to refresh a volume from an unrelated volume provided that their sizes are compatible. You can use the vxsnap syncwait command to wait for the synchronization of the snapshot volume to be completed, as shown here: # vxsnap [-g diskgroup] syncwait snapvol See Controlling Instant Snapshot Synchronization for more information. Attaching Plexes of an Instant Snapshot (vxsnap reattach)![]() This operation is not supported for space-optimized instant snapshots. Using the following command, some or all plexes of an instant snapshot may be attached to the specified source volume, or to a source volume in the snapshot hierarchy above the snapshot volume: # vxsnap -f [-g diskgroup] reattach snapvol source=vol \ [nmirror=number] ![]() By default, all the plexes are attached, which results in the removal of the snapshot. If required, the number of plexes to be attached may be specified as the value assigned to the nmirror attribute. ![]() Only the plexes of a snapshot volume that was set up using ISP may be attached. If the snapshot volume and the source volume lie in different storage pools, the underlying disks of the snapshot volume are moved to the source volume's storage pool. However, if other objects in the snapshot volume's storage pool are also configured on these disks, the reattach command fails. For example the following command attaches one plex from the snapshot volume, snapmyvol, to the volume, myvol: # vxsnap -g mydg -f reattach snapmyvol source=myvol nmirror=1 Restoring a Volume from an Instant Snapshot (vxsnap restore)On occasion, it may be desirable to reinstate the contents of a volume from a backup or modified replica within a snapshot volume. The following command may be used to restore a volume: # vxsnap [-g diskgroup] restore [nmirrors=number] vol \ [source=snapvol] [destroy=yes|no] For a full instant snapshot, some or all of its plexes may be reattached to the parent volume or to a specified source volume in the snapshot hierarchy above the snapshot volume. If destroy=yes is specified, all the plexes of the snapshot are reattached and the snapshot volume is removed. For a space-optimized instant snapshot, the cached data is used to restore the contents of the specified volume. The snapshot itself remains unchanged by the operation. ![]() It is not possible to restore a volume from an unrelated volume. The destroy and nmirror attributes are not supported for space-optimized instant snapshots. The following example demonstrates how to restore the volume, myvol, from the space-optimized snapshot, snap3myvol. # vxsnap -g mydg restore myvol source=snap3myvol Dissociating an Instant Snapshot (vxsnap dis)The following command breaks the association between a snapshot volume, snapvol, and its parent volume, so that the snapshot may be used as an independent volume: # vxsnap [-f] [-g diskgroup] dis snapvol This operation fails if the snapshot, snapvol, has a snapshot hierarchy below it that contains unsynchronized snapshots. If this happens, the dependent snapshots must be fully synchronized from snapvol. When no dependent snapshots remain, snapvol may be dissociated. The snapshot hierarchy is then adopted by snapvol's parent volume. ![]() The following command dissociates the snapshot, snap2myvol, from its parent volume: # vxsnap -g mydg dis snap2myvol ![]() Removing an Instant SnapshotWhen you have dissociated a full-sized instant snapshot, you can use the vxvoladm command to delete it altogether, as shown in this example: # vxvoladm -g mydg remove volume snap2myvol You can also use this command to remove a space-optimized instant snapshot from its cache. For details of how to remove a cache, see Removing a Cache. Splitting an Instant Snapshot Hierarchy (vxsnap split)![]() The following command breaks the association between a snapshot hierarchy that has the snapshot volume, snapvol, at its head, and its parent volume, so that the snapshot hierarchy may be used independently of the parent volume: # vxsnap [-f] [-g diskgroup] split snapvol ![]() The following command splits the snapshot hierarchy under snap2myvol from its parent volume: # vxsnap -g mydg split snap2myvol ![]() Displaying Instant Snapshot Information (vxsnap print)The vxsnap print command may be used to display information about the snapshots that are associated with a volume. # vxsnap [-g diskgroup] print [vol] This command shows the percentage progress of the synchronization of a snapshot or volume. If no volume is specified, information about the snapshots for all the volumes in a disk group is displayed. The following example shows a volume, vol1, which has a full-sized snapshot, snapvol1 whose contents have not been synchronized with vol1: # vxsnap -g mydg print NAME SNAPOBJECT TYPE PARENT SNAPSHOT %DIRTY %VALID vol1 -- volume -- -- -- 100 snapvol1_snp1 volume -- snapvol1 1.30 -- snapvol1 vol1_snp1 volume vol1 -- 1.30 1.30 The %DIRTY value for snapvol1 shows that its contents have changed by 1.30% when compared with the contents of vol1. As snapvol1 has not been synchronized with vol1, the %VALID value is the same as the %DIRTY value. If the snapshot were partly synchronized, the %VALID value would lie between the %DIRTY value and 100%. If the snapshot were fully synchronized, the %VALID value would be 100%. The snapshot could then be made independent or moved into another disk group. Controlling Instant Snapshot Synchronization![]() By default, synchronization is enabled for the vxsnap refresh and restore operation on instant snapshots. Otherwise, synchronization is disabled unless you specify the sync=yes attribute to the vxsnap command.
The following table shows the commands that are provided for controlling the synchronization manually.
Improving the Performance of Snapshot SynchronizationTwo optional arguments to the -o option are provided to help optimize the performance of synchronization when using the make, refresh, restore and syncstart operations: iosize=size Specifies the size of each I/O request that is used when synchronizing the regions of a volume. Specifying a larger size causes synchronization to complete sooner, but with greater impact on the performance of other processes that are accessing the volume. The default size of 1m (1MB) is suggested as the minimum value for high-performance array and controller hardware. The specified value is rounded to a multiple of the volume's region size. 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. The default value of iodelay is 0 milliseconds (no delay). Increasing this value slows down synchronization, and reduces the competition for I/O bandwidth with other processes that may be accessing the volume. Options may be combined as shown in the following examples: # vxsnap -g mydg -o iosize=2m,slow=100 make \ source=myvol/snapvol=snap2myvol/syncing=on # vxsnap -g mydg -o iosize=10m,slow=250 syncstart snap2myvol ![]() |
^ Return to Top | < Previous | Next > |
Product: Storage Foundation Guides | |
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide | |
VERITAS Software Corporation
www.veritas.com |