REST Create Volume
This command will create 2TB volume with replica 1 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": 1, "compression": "false", "projectName": "default", "acl": {"values": ["ALLOW_NONE"]}}' https://localhost:443/api/v2/projects/default/volumes | jqSample Output
{ "state": "Creating", "protectionState": "Unknown", "replicaCount": 1, "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?