Unlike other types of snapshot, the reattachment operation for linked break-off snapshot volumes does not return the plexes of the snapshot volume to the parent volume. The link relationship is re-established that makes the snapshot volume a mirror of the parent volume, and this allows the snapshot data to be resynchronized. However, the snapshot volume is only readopted by its parent volume if they are both in the same disk group.
To reattach a linked break-off snapshot volume, use the following form of the vxsnap
reattach
command:
# vxsnap [-g
snapdiskgroup] reattach
snapvolume
|
snapvolume_set \
source=
volume
|
volume_set
[sourcedg=
diskgroup
]
The sourcedg
attribute must be used to specify the data volume's disk group if this is different from the snapshot volume's disk group, snapdiskgroup.
It is possible to reattach a volume to an unrelated volume provided that their sizes and region sizes are compatible.
For example the following command reattaches the snapshot volume, prepsnap
, in the disk group, snapdg
, to the volume, myvol
, in the disk group, mydg
:
# vxsnap -g snapdg reattach prepsnap source=myvol sourcedg=mydg
After resynchronization of the snapshot volume is complete, the link is placed in the ACTIVE
state. You can use the vxsnap
snapwait
command (but not vxsnap
syncwait
) to wait for the resynchronization of the reattached volume to complete, as shown here:
# vxsnap -g snapdg snapwait myvol mirvol=prepsnap