Skip to main content
A newer release of this product is available.

Application consistency-groups endpoint overview

Contributors

Overview

A consistency group is a group of volumes that supports capabilities such as creating a snapshot of all of its member volumes at the same point-in-time with a write-fence, thus ensuring a consistent image of the volumes at that time.

Applications with datasets scoped to a single volume can have its contents saved to a Snapshot copy, replicated, or cloned in a crash-consistent manner implicitly with corresponding native ONTAP volume-granular operations. Applications with datasets spanning a group of multiple volumes must have such operations performed on the group. Typically, by first fencing writes to all the volumes in the group, flushing any writes pending in queues, executing the intended operation, that is, take Snapshot copy of every volume in the group and when that is complete, unfence and resume writes. A consistency group is the conventional mechanism for providing such group semantics.

Consistency group APIs

The following APIs are used to perform operations related to consistency groups:

– GET /api/application/consistency-groups

– POST /api/application/consistency-groups

– GET /api/application/consistency-groups/{uuid}

– PATCH /api/application/consistency-groups/{uuid}

– DELETE /api/application/consistency-groups/{uuid}

Examples

Retrieving all consistency groups of an SVM

# The API:
/api/application/consistency-groups

# The call:
curl -X GET "https://netapp-cluster.netapp.com/api/application/consistency-groups?svm.name=vs1" -H "accept: application/hal+json"

# The response:
{
"records": [
  {
    "uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
    "name": "vol1",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
    "name": "parent_cg",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b22c85-0a82-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b270b1-0a82-11ec-a449-005056bbcf9f",
    "name": "child_1",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b270b1-0a82-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b270c3-0a82-11ec-a449-005056bbcf9f",
    "name": "child_2",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b270c3-0a82-11ec-a449-005056bbcf9f"
      }
    }
  }
],
"num_records": 4,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups"
  }
}
}

Retrieving details of all consistency groups of an SVM

Retrieving details of the consistency groups for a specified SVM. These details are considered to be performant and will return within 1 second when 40 records or less are requested.

curl -X GET -k -u admin:netapp1! "https://netapp-cluster.netapp.com/api/application/consistency-groups?svm.name=vs1&fields=*&max_records=40"

#### Response:
{
"records": [
  {
    "uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
    "name": "vol1",
    "svm": {
      "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
      "name": "vs1",
      "_links": {
        "self": {
          "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
        }
      }
    },
    "space": {
      "size": 108003328,
      "available": 107704320,
      "used": 299008
    },
    "replicated": false,
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
    "name": "parent_cg",
    "svm": {
      "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
      "name": "vs1",
      "_links": {
        "self": {
          "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
        }
      }
    },
    "snapshot_policy": {
      "name": "default-1weekly",
      "uuid": "a30bd0fe-067d-11ec-a449-005056bbcf9f",
      "_links": {
        "self": {
          "href": "/api/storage/snapshot-policies/a30bd0fe-067d-11ec-a449-005056bbcf9f"
        }
      }
    },
    "consistency_groups": [
      {
        "uuid": "c1b270b1-0a82-11ec-a449-005056bbcf9f",
        "name": "child_1",
        "space": {
          "size": 41943040,
          "available": 39346176,
          "used": 499712
        },
        "_links": {
          "self": {
            "href": "/api/application/consistency-groups/c1b270b1-0a82-11ec-a449-005056bbcf9f"
          }
        }
      },
      {
        "uuid": "c1b270c3-0a82-11ec-a449-005056bbcf9f",
        "name": "child_2",
        "space": {
          "size": 41943040,
          "available": 39350272,
          "used": 495616
        },
        "_links": {
          "self": {
            "href": "/api/application/consistency-groups/c1b270c3-0a82-11ec-a449-005056bbcf9f"
          }
        }
      }
    ],
    "space": {
      "size": 83886080,
      "available": 78696448,
      "used": 995328
    },
    "replicated": false,
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b22c85-0a82-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b270b1-0a82-11ec-a449-005056bbcf9f",
    "name": "child_1",
    "parent_consistency_group": {
      "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
      "name": "parent_cg",
      "_links": {
        "self": {
          "href": "/api/application/consistency-groups/c1b22c85-0a82-11ec-a449-005056bbcf9f"
        }
      }
    },
    "svm": {
      "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
      "name": "vs1",
      "_links": {
        "self": {
          "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
        }
      }
    },
    "snapshot_policy": {
      "name": "default",
      "uuid": "a30b60a4-067d-11ec-a449-005056bbcf9f",
      "_links": {
        "self": {
          "href": "/api/storage/snapshot-policies/a30b60a4-067d-11ec-a449-005056bbcf9f"
        }
      }
    },
    "space": {
      "size": 41943040,
      "available": 39346176,
      "used": 499712
    },
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b270b1-0a82-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b270c3-0a82-11ec-a449-005056bbcf9f",
    "name": "child_2",
    "parent_consistency_group": {
      "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
      "name": "parent_cg",
      "_links": {
        "self": {
          "href": "/api/application/consistency-groups/c1b22c85-0a82-11ec-a449-005056bbcf9f"
        }
      }
    },
    "svm": {
      "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
      "name": "vs1",
      "_links": {
        "self": {
          "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
        }
      }
    },
    "snapshot_policy": {
      "name": "default",
      "uuid": "a30b60a4-067d-11ec-a449-005056bbcf9f",
      "_links": {
        "self": {
          "href": "/api/storage/snapshot-policies/a30b60a4-067d-11ec-a449-005056bbcf9f"
        }
      }
    },
    "space": {
      "size": 41943040,
      "available": 39350272,
      "used": 495616
    },
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b270c3-0a82-11ec-a449-005056bbcf9f"
      }
    }
  }
],
"num_records": 4,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups?svm.name=vs1&fields=*&max_records=40"
  }
}
}

Retrieving details of non-nested consistency groups

Retrieves details of the consistency groups without nested consistency groups, or only the parent consistency group for a number of consistency groups of a specified SVM.

curl -X GET -k -u admin:netapp1! "https://netapp-cluster.netapp.com/api/application/consistency-groups?svm.name=vs1&parent_consistency_group.uuid=null"

#### Response:
{
"records": [
  {
    "uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
    "name": "vol1",
    "svm": {
      "name": "vs1"
    },
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f"
      }
    }
  },
  {
    "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
    "name": "parent_cg",
    "svm": {
      "name": "vs1"
    },
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/c1b22c85-0a82-11ec-a449-005056bbcf9f"
      }
    }
  }
],
"num_records": 2,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups?svm.name=vs1&parent_consistency_group.uuid=null"
  }
}
}

Creating a single consistency group with a new SAN volume

Provisions an application with one consistency group, each with one new SAN volumes, with one LUN, an igroup and no explicit Snapshot copy policy, FabricPool tiering policy, storage service, and QoS policy specification. The igroup to map a LUN to is specified at LUN-granularity.

curl -X POST -k -u admin:netapp1! https://netapp-cluster.netapp.com/api/application/consistency-groups?return_records=true -d '{ "svm": { "name": "vs1" }, "luns": [ { "name": "/vol/vol1/lun1", "space": { "size": "100mb" }, "os_type": "linux", "lun_maps": [ { "igroup": { "name": "igroup1", "initiators": [ { "name": "iqn.2021-07.com.netapp.englab.gdl:scspr2429998001" } ] } } ] } ] }'

#### Response:
{
"num_records": 1,
"records": [
  {
    "uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
    "name": "vol1",
    "svm": {
    "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
    "name": "vs1",
    "_links": {
      "self": {
        "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
      }
    }
    },
    "luns": [
    {
      "lun_maps": [
        {
          "igroup": {
            "name": "igroup1",
            "initiators": [
              {
                "name": "iqn.2021-07.com.netapp.englab.gdl:scspr2429998001"
              }
            ]
          }
        }
      ],
      "name": "/vol/vol1/lun1",
      "os_type": "linux",
      "space": {
        "size": 104857600
      }
    }
    ]
  }
],
"job": {
  "uuid": "6f4907ae-0a7f-11ec-a449-005056bbcf9f",
  "_links": {
    "self": {
    "href": "/api/cluster/jobs/6f4907ae-0a7f-11ec-a449-005056bbcf9f"
    }
  }
}
}

Creating an Application with two consistency groups with existing SAN volumes

Provisions an application with two consistency groups, each with two existing SAN volumes, a Snapshot copy policy at application-granularity, and a distinct consistency group granular Snapshot copy policy.

curl -X POST -k -u admin:netapp1! https://netapp-cluster.netapp.com/api/application/consistency-groups?return_records=true -d '{ "svm": { "name": "vs1" }, "name": "parent_cg", "snapshot_policy": { "name": "default-1weekly" }, "consistency_groups": [ { "name": "child_1", "snapshot_policy": { "name": "default" }, "volumes": [ { "name": "existing_vol1", "provisioning_options": { "action": "add" } }, { "name": "existing_vol2", "provisioning_options": { "action": "add" } } ] }, { "name": "child_2", "snapshot_policy": { "name": "default" }, "volumes": [ { "name": "existing_vol3", "provisioning_options": { "action": "add" } }, { "name": "existing_vol4", "provisioning_options": { "action": "add" } } ] } ] }'

#### Response:
{
"num_records": 1,
"records": [
  {
    "uuid": "c1b22c85-0a82-11ec-a449-005056bbcf9f",
    "name": "parent_cg",
    "svm": {
      "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
      "name": "vs1",
      "_links": {
        "self": {
          "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
        }
      }
    },
    "snapshot_policy": {
      "name": "default-1weekly"
    },
    "consistency_groups": [
      {
        "uuid": "c1b270b1-0a82-11ec-a449-005056bbcf9f",
        "name": "child_1",
        "snapshot_policy": {
          "name": "default"
        },
        "volumes": [
          {
            "name": "existing_vol1"
          },
          {
            "name": "existing_vol2"
          }
        ]
      },
      {
        "uuid": "c1b270c3-0a82-11ec-a449-005056bbcf9f",
        "name": "child_2",
        "snapshot_policy": {
          "name": "default"
        },
        "volumes": [
          {
            "name": "existing_vol3"
          },
          {
            "name": "existing_vol4"
          }
        ]
      }
    ]
  }
],
"job": {
  "uuid": "c1b272b9-0a82-11ec-a449-005056bbcf9f",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/c1b272b9-0a82-11ec-a449-005056bbcf9f"
    }
  }
}
}

Retrieving specific details of an existing consistency group

Retrieves the details of an existing consistency group.

curl -X GET -k -u admin:netapp1! https://netapp-cluster.netapp.com/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f

#### Response:
{
"uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
"name": "vol1",
"svm": {
  "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
  "name": "vs1",
  "_links": {
    "self": {
      "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
    }
  }
},
"space": {
  "size": 108003328,
  "available": 107724800,
  "used": 278528
},
"replicated": false,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f"
  }
}
}

Retrieving all details of an existing consistency group

Retrieves all details of an existing consistency group. These details are not considered to be performant and are not guaranteed to return within one second.

curl -X GET -k -u admin:netapp1! https://netapp-cluster.netapp.com/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f?fields=**

#### Response:
{
"uuid": "6f48d798-0a7f-11ec-a449-005056bbcf9f",
"name": "vol1",
"svm": {
  "uuid": "4853f97a-0a63-11ec-a449-005056bbcf9f",
  "name": "vs1",
  "_links": {
    "self": {
      "href": "/api/svm/svms/4853f97a-0a63-11ec-a449-005056bbcf9f"
    }
  }
},
"qos": {
  "policy": {
    "uuid": "b7189398-e572-48ab-8f69-82cd46580812",
    "name": "extreme-fixed",
    "_links": {
      "self": {
        "href": "/api/storage/qos/policies/b7189398-e572-48ab-8f69-82cd46580812"
      }
    }
  }
},
"tiering": {
  "policy": "none"
},
"create_time": "2021-08-31T13:18:24-04:00",
"volumes": [
  {
    "uuid": "6f516c6c-0a7f-11ec-a449-005056bbcf9f",
    "qos": {
      "policy": {
        "uuid": "b7189398-e572-48ab-8f69-82cd46580812",
        "name": "extreme-fixed",
        "_links": {
          "self": {
            "href": "/api/storage/qos/policies/b7189398-e572-48ab-8f69-82cd46580812"
          }
        }
      }
    },
    "tiering": {
      "policy": "none"
    },
    "comment": "",
    "create_time": "2021-08-31T13:18:22-04:00",
    "name": "vol1",
    "snapshot_policy": {
      "name": "default",
      "uuid": "a30b60a4-067d-11ec-a449-005056bbcf9f"
    },
    "space": {
      "size": 108003328,
      "available": 107569152,
      "used": 434176,
      "snapshot": {
        "used": 151552,
        "reserve_percent": 0,
        "autodelete_enabled": false
      }
    },
    "activity_tracking": {
      "supported": false,
      "unsupported_reason": {
        "message": "Volume activity tracking is not supported on volumes that contain LUNs.",
        "code": "124518405"
      },
      "state": "off"
    },
    "_links": {
      "self": {
        "href": "/api/storage/volumes/6f516c6c-0a7f-11ec-a449-005056bbcf9f"
      }
    }
  }
],
"luns": [
  {
    "uuid": "6f51748a-0a7f-11ec-a449-005056bbcf9f",
    "location": {
      "logical_unit": "lun1",
      "node": {
        "name": "johnhil-vsim1",
        "uuid": "6eb682f2-067d-11ec-a449-005056bbcf9f",
        "_links": {
          "self": {
            "href": "/api/cluster/nodes/6eb682f2-067d-11ec-a449-005056bbcf9f"
          }
        }
      },
      "volume": {
        "uuid": "6f516c6c-0a7f-11ec-a449-005056bbcf9f",
        "name": "vol1",
        "_links": {
          "self": {
            "href": "/api/storage/volumes/6f516c6c-0a7f-11ec-a449-005056bbcf9f"
          }
        }
      }
    },
    "lun_maps": [
      {
        "igroup": {
          "uuid": "6f4a4b86-0a7f-11ec-a449-005056bbcf9f",
          "name": "igroup1",
          "os_type": "linux",
          "protocol": "mixed",
          "initiators": [
            {
              "name": "iqn.2021-07.com.netapp.englab.gdl:scspr2429998001"
            }
          ],
          "_links": {
            "self": {
              "href": "/api/protocols/san/igroups/6f4a4b86-0a7f-11ec-a449-005056bbcf9f"
            }
          }
        },
        "logical_unit_number": 0
      }
    ],
    "name": "/vol/vol1/lun1",
    "auto_delete": false,
    "class": "regular",
    "create_time": "2021-08-31T13:18:24-04:00",
    "os_type": "linux",
    "serial_number": "wIqM6]RfQK3t",
    "space": {
      "size": 104857600,
      "used": 0,
      "guarantee": {
        "requested": false,
        "reserved": false
      }
    },
    "status": {
      "container_state": "online",
      "mapped": true,
      "read_only": false,
      "state": "online"
    },
    "_links": {
      "self": {
        "href": "/api/storage/luns/6f51748a-0a7f-11ec-a449-005056bbcf9f"
      }
    }
  }
],
"space": {
  "size": 108003328,
  "available": 107569152,
  "used": 434176
},
"replicated": false,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f?fields=**"
  }
}
}

Adding LUNs to an existing volume in an existing consistency group

Adds two NVMe namespaces to an existing volume in an existing consistency group, creates a new subsystem, and binds the new namespaces to it.

curl -X PATCH -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f' -d '{ "luns": [ { "name": "/vol/vol1/new_luns", "provisioning_options": { "count": 2, "action": "create" }, "space": { "size": "100mb" }, "os_type": "linux", "lun_maps": [ { "igroup": { "name": "igroup2", "initiators": [ { "name": "01:02:03:04:05:06:07:01" } ] } } ] } ] }'

#### Response:
{
"job": {
  "uuid": "5306ea44-0a87-11ec-a449-005056bbcf9f",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/5306ea44-0a87-11ec-a449-005056bbcf9f"
    }
  }
}
}

Restoring a consistency group to the contents of an existing snapshot

Restores an existing consistency group to the contents of an existing snapshot of the consistency group.

curl -X PATCH -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/6f51748a-0a7f-11ec-a449-005056bbcf9f' -d '{ "restore_to": { "snapshot": { "uuid": "92c6c770-17a1-11eb-b141-005056acd498"} } }' -H "Accept: Application/hal+json"

#### Response:
{
"job": {
  "uuid": "8907bd9e-1463-11eb-a719-005056ac70af",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/8907bd9e-1463-11eb-a719-005056ac70af"
    }
  }
}
}

Deleting a consistency group

Deletes a consistency group, where all storage originally associated with that consistency group remains in place.

curl -X DELETE -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/6f48d798-0a7f-11ec-a449-005056bbcf9f'

#### Response:
{
}