I've written previously about using snapshots on XtremIO, however things have changed a little with XtremIO X2 so it's time for an update.
Previously when taking a snapshot you could elect to take either a "read-only" or "read-write" snapshot. The result was basically the same, with the obvious difference that the snapshot volumes in one were read-only, whilst the others were read-write.
In X2 these terms have changed, and we now have a "Protection Copy" (equivalent of a read-only snapshot), and a "Repurpose Copy" (read-write snapshot). To some extent this is just a name change, however there have also been related changes to the management concepts for these snapshots in order to both simply them as well as make them more flexible.
Other than the new names, the biggest change with X2 is the introduction of a new grouping concept, the "Linked Consistency Group". The existing groupings of "Consistency Group" and "Snapshot Set" still exist, although the use of the latter has changed a little.
In X2, these three concepts are used as follows :
- Consistency Group - A manually created group of volume (or potentially snapshots) that is used as the SOURCE of a snapshot operation. This is basically the same as previously, although a few operations have changed to add more flexibility.
- Linked Consistency Group - A system-created group of snapshots that is the result of a "Repurpose Copy" operation (ie, a read-write snapshot).
- Snapshot Set - A system-created group of snapshots that is the result of a "Protection Copy" operation (ie, a read-only snapshot).
So basically the difference from X1 is that when creating a read-write (Repurpose) copy, instead of a Snapshots Set being created, you now get a Linked Consistency Group. This Linked Consistency Group functions basically the same as a standard Consistency Group, with the "Linked" part of the name referring to the fact that there is a relationship between it and the CG from which it was created which allows refer operations to occur between them.
Creating a read-only (Protection) copy still creates a snapshots set, which allows you to manage these separately from copies that you intend to actively use.
Refreshing snapshots remains mostly unchanged, except that most refresh operations now will be between Consistency Groups (rather than Snapshot Sets). It is still possible to refresh from a Snapshot Set (when going from a read-only Protection Copy to a CG), however in the GUI you'll need to click on "Enable Advanced Mode" to see that as an option.
Restoring snapshots remains unchanged, however as this is sometimes a misunderstood concept it's worth restating how "restore" works.
Restore is basically a limited version of Refresh. Where Refresh allows you to refresh from any copy of a snapshot, Restore only allows you to restore from a copy that is both :
- Read Only (ie, a "Protection Copy"), AND
- A direct snapshot from the volume being restored
Having these additional restrictions allows you to know that what you're restoring is an immutable (unchanged) copy of the volume that you're restoring to - not something that has potentially been modified (as a read-write snapshot could have been), or that is actually a copy of a different snapshot that has itself been modified.
If you need to "restore" from something that doesn't meet these rules (eg, maybe you accidentally took a read-write Repurpose Copy when you meant to take a read-only Protection Copy), then you can still do it - you just need to instead use a 'Refresh' operation which will give exactly the same result, but without the additional restrictions.
Adding Volumes to a Consistency Group
Adding volumes to an existing CG has changed significantly from X1, based on customer request. In X1, you could easily add a volume to a CG, however there was no way to create the equivalent snapshot other than refreshing the snapshot set - which might not be what you wanted to do at that stage.
In X2, we've made adding the snapshot to the Linked CG a manual operation, which gives you to flexibility to do it whenever you want. Thus to add a new volume to a CG the steps are :
- Add the volume itself to the CG. In the GUI this can be done from the CG screen by selecting the CG and then going to Manage -> Add/Remove Volumes
- Select the Linked Consistency Group that you want to add a snapshot of the volume to, and then go to Manage -> Add Paired Volume
- Select the Reference Consistency Group. ie, the one you added the new volume to above
- Select the new volume that you added to that reference CG
- Select 'Create New Pair Volume'. This will automatically create the new snapshot volume for you. If you'd prefer, you could have created the snapshot manually first, and then used "Pair Existing Volume" instead - but in most cases that just added extra effort for no benefit!
- If required, map the newly created snapshot to the host that the Linked CG is mapped to so that it's available once you do a refresh.
Note that it's not possible to add a new volume to a Snapshot Set (ie, a Protection Copy) - and there's no need to do so! Snapshot sets are a point in time copy, so adding a new volume simply isn't needed. When the next Protection Copy is taken, it will automatically include all of the volumes in the CG at that time, which will include the new volume.
I generally don't recommend doing Snapshot operations from the CLI - it's easier to use the GUI, or better to use the RestAPI if you're automating something - however for completeness there are a number of new snapshot commands in the CLI that replace the old commands. (The old commands still exist, but should not be used with X2 - they are only there for backwards compatibility!). These commands include :
Rest API Changes
The Rest API has also been changed fairly significantly - more on that in a future post...