What is a consistency group
A consistency group is a group of volumes that maintain write-order fidelity.
The consistency group allows to take snapshots of all of its volumes at the same point-in-time, thus ensuring a consistent image of the volumes at that time. The consistency group is typically used when a single application spans multiple volumes and there is a need to create a point-in-time copy of these volumes. From the application perspective, point-in-time backups of the entire application are crucial for maintaining data integrity.
- Upon creation, the consistency group is associated with a pool.
- All of the volumes of a consistency group reside in the same pool.
- The consistency group can be moved between pools, but individual members cannot move between pools independently.
- When a consistency group moves, all of its members and their snapshots move with it.
Creating a snapshot group
Upon creating a snapshot group, a snapshot is created for each of the consistency group's datasets (volumes). All of these snapshots are taken at the same point-in-time and are grouped in a snapshot group. The snapshot group depicts the consistency group at a specific point in time. Restoring the consistency group from one of its snapshot groups returns the members to this point in time. The following image shows a consistency group along with its snapshot group.
The consistency group can be restored from its snapshot group (subject to specific constraints - see further down this page). Upon a restore, any of the consistency group's datasets is restored from its matching snapshot.
The consistency group and its members all belong to the same pool.
Adding a member to a consistency group
Following an addition of a member to a consistency group and prior to taking another snapshot group, the consistency group is in a state where, if it needs to be restored from one of its snapshot group, the snapshot group does not have a snapshot for each of the consistency group members. In the example that is provided in the following image, a consistency group (1) has two members. A snapshot group is created, in which there are two snapshots, one for each of the consistency group's members (2). A new member is added to the consistency group, creating a situation in which the snapshot group cannot restore the entire consistency group, if asked to do so (3). Upon the creation of a new snapshot group, it contains a snapshot for each of the consistency group members (4).
Removing a member from a consistency group
Usually, the snapshot group contains snapshots in a number that matches the number of members of the consistency group (see 1 in the image below). When a member is removed from a consistency group, the snapshot groups all have a superfluous member (2). The snapshot groups are adjusted - by removing the no longer needed snapshot - so they again have a number of snapshots that matches the number of members in the consistency group.