Hello Toasters,
This is just a little procedure that I figured out by trial
and error.
I needed to migrate some snapmirror destination volumes on
a nearstore to other aggregates on the same nearstore. With
a few modifications, this procedure will also work when
moving a volume to a different nearstore filer.
To avoid load on the primary storage filer I ran the
full snapmirror copy (snapmirror initialize) locally
on the nearstore filer. However, this left me with a
snapmirror snapshot that was not deleted automatically
and required deletion by hand.
Here is the procedure. Assume oldvol on a nearstore filer
is being snapmirrored from a primary storage filer. You want
to move oldvol to a different aggregate on the nearstore.
On the nearstore (destination) filer do this:
vol create newvol newaggr XXXXg
vol restrict newvol
Now do the full snapmirror locally:
snapmirror initialize -S oldvol newvol
You may want to comment out your snapmirror.conf line
for oldvol to avoid numerous logged errors if a scheduled
snapmirror (from primary) of oldvol fails due to oldvol
being busy.
When the full copy is done, replace oldvol with newvol.
vol offline oldvol
vol destroy oldvol
vol rename newvol oldvol
Un-comment your snapmirror.conf line for oldvol and wait
a bit for the filer to notice the change. Then snapmirror
update from primary storage:
snapmirror update oldvol
Yes, this actually works.
You want to update so that another snapmirror snapshot
is created in oldvol. In addition to this snapshot you
have a previous snapmirror snapshot that is locked and
will not be deleted automatically.
snap list -n oldvol
The locked snapshot is marked "(snapmirror)". You need
to delete it by hand, but you cannot do this without
breaking the mirror:
snapmirror break oldvol
snap delete oldvol lockedsnapshotname
Also delete this same snapshot from the source volume.
Run this on the primary filer:
snap delete oldvol lockedsnapshotname
Now re-establish the mirror on the nearstore:
snapmirror resync oldvol
And you're done.
Steve Losen scl(a)virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support