ONTAP Rest API Discussions

Unable to create a volume (or volume clone) using REST API when using SVM management IP.

Shadari
1,561 Views

Hi folks,

If I use the REST API along with an SVM management IP, creating a volume or volume clone fails. It doesn't return an HTTP error, but in the "Events & Jobs" section, I see an error message indicating that an aggregate doesn't exist. However, issuing the same volume creation command using the cluster management IP works fine. Perhaps the SVM doesn't have visibility to the aggregate. Just a guess. 

REST command and error message on server:
------------------------------------
curl -u vsadmin:FAKE_PASSWORD -X POST --data {\"name\":\"vol_create_test_1\",\"size\":\"1000000000\",\"svm.name\":\"svm1\",\"aggregates.name\":[\"ONTAP912clst_VM_DISK_1\"]} -k https://172.20.2.55/api/storage/volumes
------------------------------------
"POST /api/storage/volumes/d535ab75-bc27-11ed-8613-00a0b8fd52c5","failure","Aggregate ONTAP912clst_VM_DISK_1 not found. Reason: entry doesn't exist. ","2023-03-06T14:04:38+00:00","2023-03-06T14:04:38+00:00"

1 ACCEPTED SOLUTION

Ontapforrum
1,546 Views

Don't know about the REST API (syntax error) thing, but I am just wondering is it b'cos of the fact that 'aggr' is not assigned to SVM as you guessed it ?

 

Is that aggregate assigned to the SVM ?

 

::> vserver show -fields aggr-list

 

Try to add that aggr to the SVM and try the command again?

::> vserver add-aggregates -vserver svm1 -aggregates ONTAP912clst_VM_DISK_1

View solution in original post

2 REPLIES 2

Ontapforrum
1,547 Views

Don't know about the REST API (syntax error) thing, but I am just wondering is it b'cos of the fact that 'aggr' is not assigned to SVM as you guessed it ?

 

Is that aggregate assigned to the SVM ?

 

::> vserver show -fields aggr-list

 

Try to add that aggr to the SVM and try the command again?

::> vserver add-aggregates -vserver svm1 -aggregates ONTAP912clst_VM_DISK_1

Shadari
1,543 Views

Ontapforrum, adding the aggregate to the SVM worked. Thanks for the advice.

Public