VMFS Snapshots and the FlashArray Part V: How to snapshot a VMFS on the FlashArray

This is part 5 of this 7 part series. Questions around managing VMFS snapshots have been cropping up a lot lately and I realized I didn’t have a lot of specific Pure Storage and VMware resignaturing information out there. Especially around scripting all of this and the various options to do this. So I put a long series out here about how to do all of this.

The series being:

  1. Mounting an unresolved VMFS
  2. Why not force mount?
  3. Why might a VMFS resignature operation fail?
  4. How to correlate a VMFS and a FlashArray volume
  5. How to snapshot a VMFS on the FlashArray
  6. How to mount a VMFS FlashArray snapshot
  7. Restoring a single VM from a FlashArray snapshot

What is a FlashArray Snapshot?

I don’t need to reinvent the wheel on describing how our snapshots work, so instead just take a look at this short white paper:

http://info.purestorage.com/rs/purestorage/images/Pure_Storage_Whitepaper_FlashRecover_Snapshots.pdf

How to create a snapshot

Let me overview the most common ways:

  1. FlashArray GUI
  2. FlashArray CLI
  3. FlashArray REST API
  4. VMware Web Client Plugin
  5. FlashArray PowerShell SDK
  6. Commvault IntelliSnap Technology

There are other application-centric options (VSS provider etc), but since I am VMware focused I am going to stick to ones directly related to VMware or all-purpose options. Furthermore, I am running on the assumption that at this point you know what volume you want to snapshot. For correlation help, check out the earlier post on how to do that.

Lastly, anytime you create a snapshot, you can either give it a name suffix or not. If you do not give it a name, the suffix will be a number that increments as a new snapshot is created. Also, a snapshot suffix must be between 1 and 63 characters (alphanumeric or a ‘-‘) in length and begin and end with a letter or number. The suffix must include at least one letter.

Commvault I am not going to get into here, but if you want more information, check out my post on that here.

FlashArray GUI

Most common option I suppose. Our GUI runs on the FlashArray controllers, so it is built-in and always there. Login by supplying the IP or FQDN of the FlashArray in a web browser. Go to the storage tab, find your volume, click it and then click the snapshots sub-tab.

snapshotcreatgui

Click the gear icon and choose “Create Snapshot”. Then optionally supply a name and click “Create”. You’re done!

createsnapgui

FlashArray CLI

To do this with the FlashArray CLI, SSH into the IP or FQDN of your FlashArray. This service runs directly on the controllers.

The command is:

 purevol snap <volume> --suffix <suffix>

So either:

 purevol snap FlashArrayVMFS01

or

purevol snap FlashArrayVMFS01 --suffix test

clidcreatesnap

FlashArray REST API

The next option, and the option that open everything else up, is the REST API. Another service that runs directly on the FlashArray. So the target is going to be your FlashArray IP or FQDN once again, in http form. The root URL will be like:

https://<FQDN>/api/<API version>/

So like:

https://csg-fa405-1.csgvmw.local/api/1.4/

Authenticating is a token-based exchange (see details here). Let us run on the assumption your have authenticated your session now. Now, you can use many, many things to run REST API calls, I like to use the handy Chrome REST Client.

So the base URL to create a snapshot would be (version can vary):

POST https://csg-fa405-1.csgvmw.local/api/1.6/volume

The next part is the body, which needs to be formatted as JSON. If I want to snapshot my volume FlashArrayVMFS01, with a suffix of resttest, it would be like:

{
      "snap": true,
      "source": [
      "FlashArrayVMFS01"
      ],
      "suffix": "resttest"
}

To do more volumes at once, enter in more than one in the square brackets, comma separated.

If you didn’t know you can get our REST API guide from your FlashArray GUI help menu:

resthelp

FlashArray Plugin for the VMware vSphere Web Client

Another option to create snapshots is through the vSphere Web Client and the Pure Storage Plugin. This is a great way to do it in-context to a datastore, so you don’t need to really figure out what volume you need to snapshot, instead just the datastore.

There are two main ways to snapshot a datastore in the web client, anywhere you can right click a datastore object:

plugindatastoreinside plugindatastorelist

Etc. Etc.

Or you can click on the datastore object and look at the related objects tab. There is a sub-tab called FlashArray Snapshots.

snapshotlistplugin

Click on the little camera icon to create one, or the actions drop down.

Another option is to click on a host, a cluster or a datastore cluster. This allows you to snapshot one or more VMFS volumes at once (that belong to that object) from one or more FlashArrays. You can select or deselect all or just a subset. The example below is a datastore cluster.

dscluster1
dscluster

One note though, creating multiple snapshots in this way is not write-consistent across all of the snapshots. You need to use a Protection Group for this.

PowerShell SDK

The last option is the Pure Storage FlashArray PowerShell SDK. While I like the FlashArray CLI, it’s very simple to use and all, PowerShell is by far my preferred option. The large cooperative PowerShell partner ecosystem makes it very flexible. Creating a snapshot is quite simple with this too:

New-PfaVolumeSnapshots -Array $Array -Sources FlashArrayVMFS01 -suffix poshtest

You can enter in more than one volume too if you want comma separated. Like REST, you do need to authenticate first.

5 Replies to “VMFS Snapshots and the FlashArray Part V: How to snapshot a VMFS on the FlashArray”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.