Skip Navigation Links | |
Exit Print View | |
Oracle® ZFS Storage Appliance RESTful Application Programming Interface |
Chapter 2 Working with the API
Chapter 3 Alert Service Commands
Chapter 8 Problem Service Commands
This command creates a new LUN. You must supply a size or a cloning source for the new LUN .
|
Request Parameters:
name - The LUN name must be supplied to create a new LUN.
volume properties – Any of the properties listed in LUN properties or project properties can be set as initial values.
Example Request:
POST /api/storage/v1/pools/gold/projects/proj-01/luns HTTP/1.1 Host: zfs-storage.example.com Accept: application/json Request JSON: { name : "vol-001", // Volume name (required) size : 500000, // New Volume size blocksize : 8192, // New Volume block size sparse : true, // New Volume sparse data flag initiatorgroup : 'default', // Initiator group name targetgroup : 'default', // Target group name lunnumber : 'auto', // Volume LUN number status : 'online', // Initial Status ('online', 'offline') fixednumber : false, "source": { "snapshot_id" : "76b8950a-8594-4e5b-8dce-0dfa9c696358", "snapshot": "/pool-001/local/proj-001/snap-001" } }
Successful creation returns HTTP Status 201 (Created) with the Location header containing the URI of the new LUN. The body contains all of the LUN properties in JSON format.
Example Results:
HTTP/1.1 201 Created Content-Type: application/json Location: http://zfs-storage.example.com:215 /pools/gold/projects/proj-01/luns/vol-001 { “lun”: { "name": "vol-001", ... } }