Administering volume snapshots

 

335

 

Creating instant snapshots

 

 

 

 

 

VOLUME

INDEX

LENGTH

KSTATE

CONTEXT

svol_0

0

204800

ENABLED

-

svol_1

1

409600

ENABLED

-

svol_2

2

614400

ENABLED

-

A full-sized instant snapshot of a volume set can be created using a prepared volume set in which each volume is the same size as the corresponding volume in the parent volume set. Alternatively, you can use the nmirrors attribute to specify the number of plexes that are to be broken off provided that sufficient plexes exist for each volume in the volume set.

The following example shows how to prepare a source volume set, vset1, and an identical volume set, snapvset1, which is then used to create the snapshot:

#vxsnap -g mydg prepare vset1#vxsnap -g mydg prepare snapvset1#vxsnap -g mydg make source=vset1/snapvol=snapvset1

To create a full-sized third-mirror break-off snapshot, you must ensure that each volume in the source volume set contains sufficient plexes. The following example shows how to achieve this by using the vxsnap command to add the required number of plexes before breaking off the snapshot:

#vxsnap -g mydg prepare vset2#vxsnap -g mydg addmir vset2 nmirror=1#vxsnap -g mydg make source=vset2/newvol=snapvset2/nmirror=1

See Adding snapshot mirrors to a volume” on page 336 for more information about adding plexes to volumes or to volume sets.

To create a space-optimized instant snapshot of a volume set, the commands are again identical to those for a standalone volume as shown in these examples:

#vxsnap -g mydg prepare vset3#vxsnap -g mydg make source=vset3/newvol=snapvset3/ cachesize=20m#vxsnap -g mydg prepare vset4#vxsnap -g mydg make source=vset4/newvol=snapvset4/cache=mycobj

Here a new cache object is created for the volume set, vset3, and an existing cache object, mycobj, is used for vset4.

See Creating and administering volume sets” on page 361 for more information on creating and administering volume sets.