Create a volume using NFS
You can use this workflow to create a volume accessed through the NFS protocol.
If the properties aggregateName and maxNumOfDisksApprovedToAdd are not provided on the REST API call, the response will fail with a suggested name for the aggregate and the number of disks needed to fulfill the request.
|
Step 1. Select the working environment
Perform the workflow Get working environments and choose the publicId
and the svmName
values for the workingEnvironmentId
and the svmName
parameters.
Step 2. Select the aggregate
Perform the workflow Get aggregates and choose the name
value of the aggregate for the aggregateName
parameter.
If aggregate name does not exist and the createAggregateIfNotFound query parameter is set true , the create volume request is allowed if the named aggregate is not found.
|
Step 3. Select the network
Choose the desired value for the exportPolicyInfo
parameter. You need to specify your internal network IP for the ips
parameter that can access a volume.
Step 4. Choose the size for the disk
Choose the size value for the size:size
parameter. The size:unit
must be one of the following: TB
, GB
, MB
, KB
, or Byte
.
Step 5. Create the volume
You can issue a REST API call to create a volume.
This REST API call uses the following method and endpoint.
HTTP method | Path |
---|---|
POST |
/occm/api/onprem/volumes |
curl --request POST \
--location "https://cloudmanager.cloud.netapp.com/occm/api/onprem/volumes" \
--header "Content-Type: application/json" \
--header "x-agent-id: <AGENT_ID>" \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--d @JSONinput
The JSON input example includes the minimum list of parameters.
Parameter | Type | Required | Description |
---|---|---|---|
<SVM_NAME> |
Query |
Yes |
Identifies the SVM name |
|
Query |
Yes |
Identifies the working environment ID |
<AGGR_NAME> |
Query |
Yes |
Identifies the aggregate |
If aggregate name does not exist, you can set the createAggregateIfNotFound
query parameter to true
which allows the aggregate not-found condition.
{
"workingEnvironmentId": "OnPremWorkingEnvironment-xxx",
"aggregateName": "aggr2",
"name": "vol3",
"size": {
"size": "100",
"unit": "GB"
},
"snapshotPolicyName": "default",
"svmName": "svm_dfr",
"enableCompression": true,
"enableDeduplication": true,
"enableThinProvisioning": true,
"verifyNameUniqueness": true,
"volumeTags": [],
"exportPolicyInfo": {
"policyType": "custom",
"rules": [
{
"index": 1,
"ruleAccessControl": "readwrite",
"ips": [
"0.0.0.0/0"
],
"nfsVersion": [
"nfs3",
"nfs4"
],
"superUser": true
}
]
}
}
None