bsr uses Generation Identifiers (GI) to identify the generation of replication data. It is used in bsr internal mechanism for the following purposes.

Generation Identifiers

bsr considers that new data generation has started in the following cases and creates a new GI.

So, if the resource is in a Connected state and the disk status of both nodes is UpToDate, then the current GI of both nodes is the same. The opposite is also true. all new data generation is identified by an 8-byte universally unique identifier (UUID). The least significant bit of the UUID represents the role of the node, Primary is set to 1, Secondary is set to 0.

GI tuple

bsr basically manages current and past data generation information in local resource metadata as four (Tuple).

All four are collectively called "generation identifier tuple" or "GI tuple" for short.

GI change process

Start a new GI

bsr modifies the local GI in the following ways for the two cases mentioned above.

  1. Create a new UUID to identify new data. This UUID becomes the new Current UUID for the Primary node.

  2. The old UUID now means generation to track the bitmap change, so it will be the new Bitmap UUID for the Primary node.

  3. In the Secondary node, there is no change in the GI tuple.

UUID is newly created when write I/O occurs to the volume. Therefore, the more accurate condition in which the GI is generated requires that the volume write I/O occurs in addition to the existing condition such as disconnection.

Begin resync

There is no change in the GI tuple when resynchronization begins.

End resync

When resynchronization is complete, the synchronization source rotates the bitmap uuid, and the synchronization target receives and reflects the entire set of GI tuples from the synchronization source.

GI status identification

When a connection is established between nodes, the two nodes exchange the currently available GI, and perform appropriate actions accordingly. There are several actions here.