Skip to main content

Create volume using CIFS

Contributors netapp-ranuk

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

Note 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.

1. Choose the CIFS configuration

A CIFS server configuration must be defined for your working environment.

Perform the workflow Get CIFS server configurations to access the configuration parameters.

2. Select the working environment

Perform the workflow Get working environments and choose the publicId and the svmName values for the workingEnvironmentId (working environment) and the svmName (SVM name) parameters.

3. Select the aggregate

Perform the workflow Get aggregates and choose the name for the aggregateName value.

Note 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.

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.

5. Create the volume

HTTP method Path

POST

/occm/api/onprem/volumes

curl example
curl --location --request POST '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
Input

The JSON input example includes the minimum list of input parameters, including:

  • <WORKING_ENV_ID> (workingEnvironmentId)

  • <SVM_NAME> (svmName)

  • <AGGR_NAME> (aggregateName)

If an aggregate name does not exist, you can set the createAggregateIfNotFound query parameter to true which allows the aggregate not-found condition.

JSON input example
{
    "workingEnvironmentId": "OnPremWorkingEnvironment-i7by5ABd",
    "aggregateName": "aggr2",
    "name": "vol3",
    "size": {
        "size": "100",
        "unit": "GB"
    },
    "snapshotPolicyName": "default",
    "svmName": "svm_onpremwe",
    "enableCompression": true,
    "enableDeduplication": true,
    "enableThinProvisioning": true,
    "verifyNameUniqueness": true,
    "volumeTags": [],
    "shareInfo": {
    "accessControl": {
       "permission": "full_control",
        "users": [
                    "Everyone"
                 ],
        "users": "Everyone;"
    },
    "shareName": "vol3Cifs_share"
  }
}
Output

None