Update a storage pool
Update various storage pool related settings. Renaming a storage pool can be achieved by changing the label, and filesystem auto expansion can be controlled. Access to the storage pool can also be enabled or denied.
Access can only be enabled if partial access to the storage pool is already possible – partial access may be due to one or more of the system drives that hosts the storage pool having access granted, but not all of them.
Access can only be denied if there are no filesystems on the storage pool. Access to the associated system drives is also denied at the same time, if access is successfully denied to the storage pool.
The filesystem expansion setting allows or denies the auto-expansion of file systems hosted by the storage pool if they have not been individually confined.
This API call replaces Rename a storage pool for version 8 and incorporates the rename functionality.
PATCH <base_URI>/v8/storage/storage-pools/{storagePoolId}
Name | Type | Required | Values | Description |
storagePoolId | URI_PARAM | Y | string/number | Specifies either the storage pool object ID or HNAS storage pool ID to rename. |
label | BODY | N | string | Storage pool label. |
allowFilesystemExpansion | BODY | N | boolean | Allows or disallows filesystems hosted on the storage pool to automatically expand if not confined. |
enableAccess | BODY | N | boolean | Enables or disabled access to the storage pool. |
Code | Data | Description |
204 | No data | Storage pool parameters have been successfully updated. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 204 indicates that the API did not complete successfully.
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/storage-pools/3530353739333031303130363332303038383a3a3a -d '{"label":"sp-test1"}' -X PATCH
HTTP/1.1 204 No Content
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/storage-pools/505793010106320088 -X PATCH -d '{"allowFilesystemExpansion":true}' -X PATCH
HTTP/1.1 204 No Content
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/storage-pools/3533303938393336373131303036383230333a3a3a3a3a3a303a3a3a4f49445f24232140255f56 -d '{"enableAccess":false}' -X PATCH
HTTP/1.1 204 No Content