Skip to main content

Create a volume using NFS

Contributors netapp-ranuk

You can use this workflow to create a volume accessed through the NFS protocol.

Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:

Create a volume using NFS for single node

You can use this workflow to create a volume using NFS protocol for a single node working environment.

1. Select a working environment

Perform the workflow Create working environments and choose the publicId value for the workingEnvironmentId parameter in the JSON input.

2. Select the rules

Choose values for the exportPolicyInfo→rules→ruleAccessControl and exportPolicyInfo→rules→superUser parameters.

3. Create a volume

HTTP method Path

POST

/occm/api/azure/vsa/volumes

curl example
curl --location --request POST 'https://cloudmanager.cloud.netapp.com/occm/api/azure/vsa/volumes' --header 'Content-Type: application/json' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --d @JSONinput
Input

The JSON input example includes the minimum list of input parameters.

JSON input example
{
  "workingEnvironmentId": "vsaworkingenvironment-sfrf3wvj",
  "svmName": "svm_zivgcp01we02",
  "aggregateName": "ziv01agg01",
  "name": "zivagg01vol01",
  "size": {
    "size": 100,
    "unit": "GB"
  },
  "snapshotPolicyName": "default",
  "enableThinProvisioning": true,
  "enableCompression": true,
  "enableDeduplication": true,
  "maxNumOfDisksApprovedToAdd": 0,
  "exportPolicyInfo": {
    "name": "rule",
    "policyType": "custom",
    "ips": ["x.0.0.0"],
    "nfsVersion": [
      "nfs3",
      "nfs4"
      ],
    "rules": [
      {
        "index": 1,
        "ruleAccessControl": "readwrite",
        "ips":  ["1.2.3.4"],
        "nfsVersion": [
          "nfs3",
          "nfs4"
          ],
        "superUser": True
      }
    ]
 }
}
Output

None

Create a volume using NFS for high availability pair

You can use this workflow to create a volume using NFS protocol for an HA working environment.

1. Select a working environment

Perform the workflow Create working environments and choose the publicId value for the workingEnvironmentId parameter in the JSON input.

2. Select rules

Choose values for the exportPolicyInfo→rules→ruleAccessControl and exportPolicyInfo→rules→superUser parameters.

3. Create a volume

HTTP method Path

POST

/occm/api/azure/ha/volumes

curl example
curl --location --request POST 'https://cloudmanager.cloud.netapp.com/occm/api/azure/ha/volumes' --header 'Content-Type: application/json' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --d @JSONinput
Input

The JSON input example includes the minimum list of input parameters.

JSON input example
{
  "workingEnvironmentId": "vsaworkingenvironment-sfrf3wvj",
  "svmName": "svm_zivgcp01we02",
  "aggregateName": "ziv01agg01",
  "name": "zivagg01vol01",
  "size": {
    "size": 100,
    "unit": "GB"
  },
  "snapshotPolicyName": "default",
  "enableThinProvisioning": true,
  "enableCompression": true,
  "enableDeduplication": true,
  "maxNumOfDisksApprovedToAdd": 0,
  "exportPolicyInfo": {
    "name": "rule",
    "policyType": "custom",
    "ips": ["x.0.0.0"],
    "nfsVersion": [
      "nfs3",
      "nfs4"
      ],
    "rules": [
      {
        "index": 1,
        "ruleAccessControl": "readwrite",
        "ips":  ["1.2.3.4"],
        "nfsVersion": [
          "nfs3",
          "nfs4"
          ],
        "superUser": True
      }
    ]
 }
}
Output

None