SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

snapmirrorresize

Resize SnapMirror Volumes

Resizing snapmirrored volumes comes in two ways, resize the target volume and resizing the source volume. Since the target volume has to be at least the size of the source volume that's the one we resize first.

Note that if you shrink the volume you'll need to shrink the source volume first.

Resize Target Volume

First a quick overview of the required commands:

snapmirror status
vol size <volumename>
snapmirror break <volumename>
vol options <volumename> fs_size_fixed off
vol size <volumename> +50g
vol options <volumename> fs_size_fixed on
snapmirror resync -S sourcefiler:<volumename> targetfiler:<volumename>

And this is an example with all output:

filer01a> snapmirror status
Snapmirror is on.
Source                                 Destination                         State          Lag        Status
...<cut>...
10.10.10.71:PRD_VOL_002                filer01a:TARGET_VOL_002             Snapmirrored   00:00:28   Transferring
...<cut>...

filer01a> vol size TARGET_VOL_002
Warning: Volume 'TARGET_VOL_002' 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 'TARGET_VOL_002' has size 235g.

filer01a> snapmirror break TARGET_VOL_002
snapmirror break: Destination TARGET_VOL_002 is now writable.
Volume size is being retained for potential snapmirror resync.  If you would like to grow the volume and do not expect to resync, set vol option fs_size_fixed to off.

filer01a> vol options TARGET_VOL_002 fs_size_fixed off

filer01a> vol size TARGET_VOL_002 +50g
vol size: Flexible volume 'TARGET_VOL_002' size set to 285g.

filer01a> vol options TARGET_VOL_002 fs_size_fixed on

filer01a> snapmirror resync -S 10.10.10.71:PRD_VOL_002 filer01a:TARGET_VOL_002
The resync base snapshot will be: filer01a(0151702878)_TARGET_VOL_002.12237
These older snapshots have already been deleted from the source
and will be deleted from the destination:
    filer01a(0151702878)_TARGET_VOL_002.12236
Are you sure you want to resync the volume? y
Volume TARGET_VOL_002 will be briefly unavailable before coming back online.
Revert to resync base snapshot was successful.
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.

After changing the size of the target volume it's time to change the size of the source volume.

Resize Source Volume

Changing the size of the source volume is quite easy, simply just change the size:

filer02a> vol size PRD_VOL_002
vol size: Flexible volume 'PRD_VOL_002' has size 235g.
filer02a> vol size PRD_VOL_002 +50g
vol size: Flexible volume 'PRD_VOL_002' size set to 285g.

Shrink Snapmirror Volumes

Shrinking the volumes is almost the same. Of course you need to keep in mind that your LUNs allow you to shrink the volume. Then on the source filer simply just resize the volume, the same way as with growing the volume:

filer02b> vol size PRD_VOL_002
vol size: Flexible volume 'PRD_VOL_002' has size 30g.
filer02b> vol size PRD_VOL_002 -5g
vol size: Flexible volume 'PRD_VOL_002' size set to 25g.

Then on the target it's a little bit different. Since you've already shrunk the source and that volume is replicated, the new size is also replicated. It just can't progress the change because of the size restriction on the volume. So you just follow the same steps as with growing the target volume, except you don't have to resize:

filer01b> snapmirror status
Snapmirror is on.
Source                                 Destination                         State          Lag        Status
...<cut>...
10.10.10.72:PRD_VOL_002                filer01b:TARGET_VOL_002             Snapmirrored   00:01:08   Transferring
...<cut>...

filer01b> vol size TARGET_VOL_002
Warning: Volume 'TARGET_VOL_002' 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 'TARGET_VOL_002' has size 30g.

filer01b> snapmirror break TARGET_VOL_002
snapmirror break: Destination TARGET_VOL_002 is now writable.
Volume size is being retained for potential snapmirror resync.  If you would like to grow the volume and do not expect to resync, set vol option fs_size_fixed to off.

filer01b> vol options TARGET_VOL_002 fs_size_fixed off
filer01b> vol options TARGET_VOL_002 fs_size_fixed on
filer01b> snapmirror resync -S 10.10.10.72:PRD_VOL_002 filer01b:TARGET_VOL_002
The resync base snapshot will be: filer01b(0151702703)_TARGET_VOL_002.20021
These older snapshots have already been deleted from the source
and will be deleted from the destination:
    filer01b(0151702703)_TARGET_VOL_002.20020
Are you sure you want to resync the volume? y
Volume TARGET_VOL_002 will be briefly unavailable before coming back online.
Revert to resync base snapshot was successful.
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.

Note that if you do try to resize you'll have to undo that, because the resize already happened:

filer01b> vol size TARGET_VOL_002 -5g
vol size: Flexible volume 'TARGET_VOL_002' size set to 20g.
filer01b> vol size TARGET_VOL_002 +5g
vol size: Flexible volume 'TARGET_VOL_002' size set to 25g.
You could leave a comment if you were logged in.
snapmirrorresize.txt · Last modified: 2021/09/24 00:25 (external edit)