ONTAP Discussions

SnapMirror resync clarification

KemDatacenter
8,973 Views

What's the proper way to break and resync SnapMirror relationship in System Manager? Particularly, does it make any difference from where you actually break it (on source or destination) and from where you then resync it?

This question rose up when I broke SnapMirror on the destination, then run resync from the desination and got this message: "SnapMirror resync of destination_vol to source_filer:source_volume". Does this "to" mean that the filer actually did a reverse resync? Or it simply means that the destination volume was synchronized "to" the state of the source volume.

It just looks a bit confusing.

1 ACCEPTED SOLUTION

obrakmann
8,973 Views

That's a misunderstanding on your part. The fs_size_fixed option means that you cannot change the size file system inside the volume. You can change the size of the volume itself however.  To understand what I mean, take any of your snapmirrored volume and run "vol status -b" on it.  It shows three columns: the volume name, the size of the volume in 4k blocks and the size of the contained file system in 4k blocks. The value for both the volume and file system columns will probably be the same.

Now try to grow the volume using the vol resize command, and run "vol status -b" again.  Notice that the two columns now have two different values: the one in the file system column is the same as before (because the fs_size_fixed option is turned on), and the one in the volume column is larger than before.

If you grew the source volume as well (where the fs_size_fixed option is not set and thus the vol resize command resizes _both_ the volume as well as the file system within), running the snapmirror update command will update the destination's file system size to match the source.

View solution in original post

11 REPLIES 11

aborzenkov
8,895 Views

Particularly, does it make any difference from where you actually break it (on source or destination) and from where you then resync it?

Yes. You break and resync on destination (you can reverse SnapMirror relationship by resyncing from previous destination to previous source).

This question rose up when I broke SnapMirror on the destination, then run resync from the desination and got this message: "SnapMirror resync of destination_vol to source_filer:source_volume". Does this "to" mean that the filer actually did a reverse resync?

Well, you said "resync from the destination", which sounds very much like reversing SnapMirror direction.

KemDatacenter
8,895 Views

What I'm trying to do, is just to break the relationship, resize the destination volume and restore the relationship. Are you saying, that if I run resync from destination, then SnapMirror reverses replication and starts to send data from the destination to the source?

aborzenkov
8,896 Views

It is probably language confusion.

If you execute “snapmirror resync” command on destination, snapmirror direction will be from source to destination.

But “resync from destination” can also be interpreted as direction is from destination to source. This is perfectly valid and is used to reverse SnapMirror direction.

“snapmirror resync” is always executed on a system, that will become destination after command is completed.

KemDatacenter
8,896 Views

“snapmirror resync” is always executed on a system, that will become destination after command is completed.

I would argue that, because in System Manager you have 'resync' as well as 'reverse resync' on the source. However, you have only 'resync' on the destination and 'reverse resync' is grayed out.

So my guess is that if you run 'resync' on either side, then the normal source to destination resync is executed. And if you run 'reverse resync' on the source (you can't do that on the destination for some reason), then the data is replicated in reverse way: from the destination to the source.

Does that make sense?

obrakmann
8,895 Views

To resize a snapmirrored volume, you don't need to break the mirror.

If you want to grow the source volume:

     1) resize the destination volume first

     2) then resize the source volume

     3) run snapmirror update

     4) run vol status -b on the destination volume to confirm that volume size and filesystem size are the same

If you want to shrink the source volume:

     1) resize the source volume

     2) run snapmirror update

     3) resize the destination volume

     4) run vol status -b on the destination volume to confirm that volume size and filesystem size are the same

PS: With Ontap 8.2, all this will be done automagically.

KemDatacenter
8,895 Views

All SnapMirrored volumes by default have fs_size_fixed option turned on. You can't resize it. And you can't change the option to off without breaking the mirror. DOT 8.1.

obrakmann
8,974 Views

That's a misunderstanding on your part. The fs_size_fixed option means that you cannot change the size file system inside the volume. You can change the size of the volume itself however.  To understand what I mean, take any of your snapmirrored volume and run "vol status -b" on it.  It shows three columns: the volume name, the size of the volume in 4k blocks and the size of the contained file system in 4k blocks. The value for both the volume and file system columns will probably be the same.

Now try to grow the volume using the vol resize command, and run "vol status -b" again.  Notice that the two columns now have two different values: the one in the file system column is the same as before (because the fs_size_fixed option is turned on), and the one in the volume column is larger than before.

If you grew the source volume as well (where the fs_size_fixed option is not set and thus the vol resize command resizes _both_ the volume as well as the file system within), running the snapmirror update command will update the destination's file system size to match the source.

KemDatacenter
8,895 Views

No way! I'll keep that in mind and try next time. But it's the most tricky thing I've heard of recently.

KemDatacenter
8,895 Views

Can you also further explain the System Manager behavior. There is resync option on the source and destination and reverse resync on the source. Am I understanding correctly that if you run resync either on the source filer or on the destination filer it will resync from the source to the destination. And if you choose reverse resync, then only in this case it will actually resync from the destination to the source.

obrakmann
6,044 Views

I don't usually use the Systems Manager (I'm mostly a CLI-only guy), but I just tried it on our playground.

Results:  The resync option does a normal resync _without_ changing the direction of the mirror.  It does not matter whether you execute the resync on the source or the destination (as opposed to the CLI, where the node that you execute the resync on becomes the destination).

The reverse reysnc option re-establishes the mirror _with_ a change of direction, ie. the former source becomes the destination and vice versa.  Again, it does not matter whether you do it on the source or destination.

The dialog box that appears and asks for confirmation should make it pretty clear what happens.

During the resync, a new relationship will be created (with the direction reversed).  The original relationship will remain in the broken-off state, and can probably be removed in most circumstances (depends on why you're reversing in the first place).

Tested with Systems Manager 2.2rc1.

KemDatacenter
6,044 Views

That's what I expected. Thank you for the insights.

Public