REST Create Volume
This command will create a 2TB volume with a 3x replica named “vol1” in the default project.
To create a volume, use the POST method command for this URL: /api/v2/volumes.
This POST method command includes many parameters that are passed to the curl utility. In the following example, the text wraps across multiple lines but it is still a single "curl -x POST" command.
Sample Command
curl -s -X POST --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $LIGHTOS_JWT" -d '{"name": "vol1", "size": "2Tib", "replicaCount": 3, "compression": "false", "projectName": "default", "acl": {"values": ["ALLOW_NONE"]}}' https://localhost:443/api/v2/projects/default/volumes | jqSample Output
x
{"state": "Creating","protectionState": "Unknown","replicaCount": 3,"nodeList": [],"UUID": "26be61ba-faa6-4156-bd09-4c8a32d37b39","nsid": 0,"acl": {"values": ["ALLOW_NONE"]},"compression": "false","size": "2199023255552","name": "vol1","rebuildProgress": "","statistics": {"logicalUsedStorage": "0","physicalUsedStorage": "0","compressionRatio": 0},"IPAcl": {"values": ["ALLOW_ANY"]},"ETag": "","connectedHosts": [],"sectorSize": 4096,"projectName": "default"}Was this page helpful?