ONTAP Discussions

How to resize a snapmirror volume?

marcconeley
33,221 Views

Hi Everyone,

Can someone point me to instructions on how to resize a SnapMirror volume?

We have a 600Gb volume that we are mirroring from a FAS2020 in SiteA, to a FAS2020 in SiteB for backup.

Today I had to resize the primary volume in SiteA as it was running low on space. However, when I try to resize the mirror of this volume in SiteB it gives an error because the volume is "read only".

I've heard that the correct way of doing this is disabling the mirror, change the read-only state on the SiteB mirror via the command line, resize the volume, mark it read-only again and then restart SnapMirror - any ideas on how to actually achieve this would be great!

(and there I was thinking I'd quickly resize both volumes and "hey presto" everything would take care of itself! ).

Thanks,

Marc

40 REPLIES 40

emilianoh
8,075 Views

Hi All,

I had the same Issue, but the thing here, than I need help is the following:

I could resize the snapmirror destination just like you said guys before. The question is in this case the volume have A-SIS, enable. I resized the volume from 2200gb to 2000gb. But into the aggregate the volume is still showing 2243gb,

Please see please the command line:

Aggregate 'aggr05'

    Total space    WAFL reserve    Snap reserve    Usable space       BSR NVLOG           A-SIS
           11TB          1156GB             0KB            10TB             0KB           384KB

Space allocated to volumes in the aggregate

Volume                          Allocated            Used       Guarantee

vol_pcs02                          2233GB          1543GB          volume

The other thing that I See is:

phchbs-s3758> vol size vol_pcs02
Warning: Volume 'vol_pcs02' has fs_size_fixed option set.  The file system
size may differ from the volume size.

See 'vol status -b' for more detail.
vol size: Flexible volume 'vol_pcs02' has size 2200g. The older "VALUE"

And If I execute a df, it shows:

phchbs-s3758> df -h vol_pcs02
Filesystem               total       used      avail capacity  Mounted on
/vol/vol_pcs02/         1940GB     1492GB      447GB      77%  /vol/vol_pcs02/
/vol/vol_pcs02/.snapshot       60GB       60GB        0GB     100%  /vol/vol_pcs02/.snapshot

shaunjurr
8,075 Views

Hi,

Most of this is unnecessary.  Just make sure that the size of the volume snapmirror is larger (in blocks) and just update the mirror. If, for example, the source needs to go from 30GB to 35GB, then just resize the destination to 36GB.  You'll get a warning that you won't see the change because it is read-only, but this is just to tell you that the results won't be immediate.

When the update is finished, the destination size will look like it is the same size as the source.

keithsanderson
8,074 Views

Hi Chris

Is there a reason why the re-sync option is not available in filerview and it can only be done from the command line?  I notice that you say not to restrict the Volume - can you do this when the Volume is online or do you change it to offline?  After quiesing and breaking the mirror, the volume changes to an online state.

Thanks.

JASONWHITE
7,285 Views

I had a question regarding the comment from Chris for the fs_size_fixed option. I see on our destination filer that that option is on. I have already increased the vol size to 3TB on the destination but the size didn't increase. Can I change the fs option on the destination filer to allow it to increase?

Quote from Chris.

This whole thing can be a little tedious and quickly gets a bit annoying if you grow your volumes regularly. Can I recommend that you thin provision your SnapMirror destination volumes? Set the volume size to the maximum space you have in your aggregate, but set the space guarantee to "none". Then when you do a SnapMirror initialize (or indeed resync it if it already exists), this setting is over-written and the size is fixed (fs_size_fixed) using SnapMirror. As the source volume grows, the destination will also grow.

AMANSINGH13
7,285 Views

Yes, you have to change the fs_size_fixed  to  off

shaunjurr
8,222 Views

Hi,

Basically, your instincts were totally correct.  Just resize the destination to be a little larger than the source (in blocks).  You won't see the volume actually change size visibly (that is without the -b option on 'vol size') until the next snapmirror update is completed.

It is unfortunate that you got so much incorrect help in this thread.  I've administered up to 600 active snapmirror sessions and re-sync'ing is rarely necessary, even when moving volumes.

Try to check with the docs next time, but basically, if you understand a little of how snapmirror works with snapshots, things get a lot easier.

brassneck
8,222 Views

So.. anyone from NetApp care to comment on this thread?

I've always followed the 'Kranz Method' (Thanks for the blog Chris btw 🙂 - wish I'd read that thin prov idea too, that's elegant) - I'm not a full time storage admin, and the whole break / resize / resync makes me a little nervous everytime .. I've been assured you can't resync the wrong way once it's initialised in one direction but hey, it's a computer ...

The KB article is also more or less the same procedure. That's canon, surely.

But Shuanjurrs real world experience of simply resizing destination to larger, then resizing source and waiting for the next mirror makes a lot of sense to me. It'd be great to know if this was supported and maybe issue an updated KB article, even if there are caveats regarding OnTap versions, size of destination volumes etc.

BSCHNITZER
8,222 Views

Most people are possibly running 7.x or newer, which do not require a snapmirror quiesce/break/resync procedure. You should be able to expand target vol size a bit larger than the source; and perform a snapmirror update (*not resync*) to see the expanded FS size on target.

Totally different ball game if you are running an older version prior to 7.x.

gavin_meadows
8,222 Views

I had a Snapmirror source vol autogrow and had to resize the destination. 

The snapmirror schedule is managed via SME and triggered after a snapshot is taken but as the destination vol was smaller the snapmirrors didnt occur. (snapmirror state was SNAPMIRRORED and status IDLE - but with a few days lag)

I decided to increase the source vol further still and increase the destination vol to make it slightly bigger then the source vol to allow for any future auto growth of the source vol.

I increased the destination vol first and then the source vol.

As soon as i did this and checked "snapmirror status" this status was 'TRANSFERRING)' with no intervention from me and no snapshots/snapmirrors initiated from SME.

when this transfer completed the 'new' size of the destnation vol was visable and the scheduled snapmirrors have been running happily since.

DOT version is 8.0.2

dburkland
7,701 Views

That is interesting, I'll have to give this a try in my lab. If I could skip the quiesce/break/resync process that would be nice

BSCHNITZER
7,701 Views

Yep, that is because Snapmirror will automatically try to restart a transfer after a scheduled incremental update has been interrupted. On the retry if it finds that the target has space, it will transfer without needing a "snap mirror update" command.

sAP

AMANSINGH13
8,222 Views

Thin provision the destination volumes and keep the autosize option on so it can be used whenever needed.

ANILPAWAR1988
7,432 Views

Hello,

I have 2000k snapmirror volumes which I need to size increase, there are any essay way to do this becoz if I will go with one by one step like snamirror quiesce  and break then volume size increase. These things little bit painful for me.

So please suggest me good way to do this..

AMANSINGH13
7,432 Views

vol size  <snapmirrorvol>  +500g or whtever size you want to do.

You dont need to quiesce and break the vols.

Are you saying you have  2000, 000  # of snapmirror volumes?

you can always get a list for snapmirror status | awk  {print $2}'

for this list you can do

for i in `cat snapmirrorlist`;do vol size  $i  +500g;done

This is for snaps on same Filer. if they are different you need to get more creative

ANILPAWAR1988
7,432 Views

Getting below messages

Warning: Volume 'vol01' is a replica.  This will not change the

file system size in the replica, which is set from the replica source.

The new volume size will be used to set the upper limit on replica

transfers into this volume.

vol size: Flexible volume 'vol01' size limit set to 1001g

===============================================

Can I have to change file system size of snapmirror volumes?

AMANSINGH13
7,433 Views

Thats fine, it just saying when source pushes more data I will adjust.

ANILPAWAR1988
7,433 Views

Thanks..

aborzenkov
7,432 Views

File system size will be automatically changed next time you update SnapMirror destination.

SagarSant
6,216 Views

Hi Aman,

 

I have a bit different issue, my destination vol is under restricted state and the snapmirror status says transfering with a lag time more than 450 hrs., when I checked found that the souce vol is having 25TB size and destination is 19TB total and used, but when I performed 'vol size vol_name' on destination it seems to have the same 25TB (which offcourse increased by our admin) so the question is:

1. if I have the enough space why its not getting transfered completely? 

2. When I try to abort the snapmirror it says, I need to clear the checkpoint using -h cmd under abort. Again this not possible with me as I cannot initiate the snapmirror after this. Any Comment or fix?

3. The destination vol is restricted due to which the quiesce or break cmd will not work. So how to get this done?

Ultimate goal is to resume the snapmirror without lag and clear the delta for sync.

 

Thanks,

Sagar

Public