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 of the consistency group, the consistency group is in a state where it cannot be restored from any of its snapshot groups, because there is no snapshot group having a snapshot for each of the consistency group members. In the example in the following image, a consistency group has two members (1). 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 (3), creating a situation in which the snapshot group cannot restore the entire consistency group until the creation of a new snapshot group that contains a snapshot for each of the consistency group members (4).
Removing a member from a consistency group
Usually, the snapshot group contains the same number of snapshots as there are members in 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 the same number of snapshots as there are members in the consistency group.