When I was building out the PernixData/SnapMirror script, I was playing around with the ‘Set-PrnxAccelerationPolicy’ command. What I noticed that there wasn’t any ‘Get-PrnxAccelerationPolicy’. A quick tweet and I got response from the PernixData product management, Bala Narasimhan. He pointed me to a command that you can run that will give you some feedback and you can figure this out pretty easily. This command is only available within FVP 1.5.
The first thing we need to do is pull up the lab. I have two datastores and a VM that are being accelerated in both write-through and write-back to demonstrate the differences.
We’re going to run the following commands to list out the policy. Per Bala, we’re not going to see ‘Write-Back’ or ‘Write-through’ in the output. We’ll see a number returned. The numbers represent the policy being applied.
As you can see we’re getting the ‘cachePolicy’ value of 3 and of 7. These values represent:
3 – Write-Through
7 – Write-Back
Thanks again Bala for the quick help!
I wanted to toss up a script I’ve been working on in my lab that would automate the transition of SnapMirror volumes on a NetApp array from using Write Back caching with PernixData’s FVP, to Write Through so you can properly take snapshots of the underlying volumes for replication purposes. This is just a v1.0 script and I’m sure I’ll modify it more going forward but I wanted to give people a place to start.
- You’re accelerating entire datastores and not individual VMs.
- The naming schemes between LUNs in vCenter and Volumes on the NetApp Filer are close.
- You’ll need the DataONTAP Powershell Toolkit 3.1 from NetApp. Its community driven but you’ll still need a NetApp login to download it. It should be free to sign up. Here’s a link to it.
- You’ll need to do some credential and password building first, the instructions are in the comments of the script.
- You’ll need to be running FVP version 1.5.
What this script does:
- Pulls the SnapMirror information from a NetApp Controller, specifically Source and Destination information based on ‘Idle’ and ‘LagTimeTS’ status. The ‘LagTimeTS’ timer is adjustable so you can focus in on SnapMirrors that have a distinct schedule based on lag time and aren’t currently in a transferring state.
- Takes the name of the volumes in question and passes them through to the PernixData Management Server for transitioning from Write Back to Write Through and waiting an adjustable amount of time for the volume to change to Write Through and cache to de-stage back to the array.
- Performs a SnapMirrorUpdate of the same volumes originally pulled and waits for an adjustable amount of time for the snapshots to take place
- Resets the datastores back into Write Back with 1 Network peer (adjustable).
Comments and suggestions are always welcomed. I’m always open to learning how to make it more efficient and I’m sure there are several ways to tackle this.
You can download the script from here.