Friday, March 25, 2016

NetApp CDOT SnapMirror Throttle Script

I ran into an issue with SnapProtect resetting my SnapMirror throttles to unlimited every time it would initiate a Aux Copy; saturating the 1Gbps link between two datacenters.  I tried a script provided by NetApp Professional services that did not work.  I have created the following script that is working for me.

UPDATE - 23 JAN 2017: I ran into an issue with the script managing uninitialized SnapMirror relationships; so I have updated the script to include logic for addressing this issue.

2 comments:

  1. This looks good for what I need, but I am not a programmer. Is there a simple way to modify this so that I set the throttle during my production time and backup window and then have it open it wide during the night and weekends. Am trying to seed my DR box before shipping to another data center and have multi tb to seed over.

    ReplyDelete
    Replies
    1. My apologies for not replying sooner; to answer your question.

      I currently have a scheduled task on a server that runs this script every minute. The easiest way to tackle your challenge is to create two copies of this script, one for production time and one for your backup windows. Create a scheduled task to run the prod script during the hours of production and the second script for the backup window during that time. (https://technet.microsoft.com/en-us/library/cc748993(v=ws.11).aspx).

      The only thing you would need to change in each of the scripts is the first number in line 22 ([Int]$throttle = 56250 * 1024), which is what defines the max throughput for the SnapMirrors. 56250 = 500Mbps; so if you want production hours to only use 100Mbps then change 56250 to 12500, and if you want your backup window throttle to use only 400Mbps then change 56250 to 50000. Every 100Mbps equals 12500.

      I also never set my throttle to be more than 80% the total bandwidth of the line the SnapMirrors are going over (1Gpbs, I would never allow the max throttle setting to go over 800Mbps).

      I hope this helps, let me know if you have any other questions.

      Delete