Consistency Groups

InfiniSDK allows creating, adding/removing members and manipulating consistency groups.

Creating Consistency Groups

Consistency groups are created just like all InfiniSDK objects, through the create method:

>>> cg = system.cons_groups.create(pool=pool)

Adding and Removing Volumes

Use the ConsGroup.add_member() method to add members to a consistency group:

>>> cg.add_member(volume)

Use the ConsGroup.remove_member() method to remove members from a consistency group:

>>> cg.remove_member(volume)

Creating Snapshot Groups

You can create a snapshot group from a consistency group through the ConsGroup.create_snapshot() method:

>>> cg.add_member(volume) # snap group creation is not allowed for empty CGs
>>> sg = cg.create_snapshot()
>>> sg.get_parent() == cg
True

Restoring from Snapshot Group

Restoring a snapshot group is done with the ConsGroup.restore() method:

>>> cg.restore(sg)