api question

Status
Not open for further replies.

mir

Dabbler
Joined
May 29, 2017
Messages
21
Hi all,

I am trying to work with the api using documentation from http://api.freenas.org/resources/storage.html

Trying to create a zvol this way:
Request
POST https://freenas/api/v1.0/storage/volume/tank/zvols/
HTTP/1.1
Content-Type: application/json
{
"name": "test2",
"refer": "10M",
"used": "10M",
"volsize": 10485760
}
Response
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"name": "test2",
"refer": "10M",
"used": "10M",
"volsize": 10485760
}

But it only seems that name and volsize is used since used and refer are not used:
zfs get volsize,used,reservation tank/test2
NAME PROPERTY VALUE SOURCE
tank/test2 volsize 10M local
tank/test2 used 56K -
tank/test2 reservation none default

Above means that it is only possible to create sparse zvols through the api.

Is this a bug or a feature?
 
D

dlavigne

Guest
Sounds like a bug. When you create the report at bugs.freenas.org, please post the issue number here.
 
Status
Not open for further replies.
Top