POST – Create a Volume
Use the POST method to initialize volume.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/Systems/1/Storage/{Id}/Volumes
Request body
Field | Type | Description | ||
---|---|---|---|---|
Name Note 1 | String | The new name with at most 15 characters. | ||
RAIDType Note 1 | String | RAID TYPEs that the RAID controller and current env support. | ||
CapacityBytes Note 2 | String | At least 1048576. | ||
ReadCachePolicy | String | "Off" or "ReadAhead" | ||
WriteCachePolicy | String | “WriteThrough”, "UnprotectedWriteBack" or "ProtectedWriteBack" | ||
Oem/Lenovo/IOPolicy | String | “DirectIO” or “CachedIO” | ||
Oem/Lenovo/AccessPolicy | String | “ReadWrite”, “ReadOnly” or “Blocked” | ||
Oem/Lenovo/DriveCachePolicy | String | “Unchanged”, “Disable” or “Enable” |
Note 1: This property is mandatory and should not be an empty string when creating a volume.
Note 2: It will be converted to a unit of megabyte at backend, so the property in GET operation may be different with the input value in POST operation. The minimum of the value is 1048576 (1MB = 1024 * 1024).
Response
The response returns the created volumes information.
Status code
HTTP Status Code | Error Message ID |
---|---|
201 | Created |
500 | InternalError |
Example
The following example is POST body
{
"Name": "VD_4",
"RAIDType": "RAID0"
}
The following example JSON response is returned.
{
"@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot2/Volumes/23",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ReadCachePolicy@Redfish.AllowableValues": [
"Off",
"ReadAhead"
],
"WriteCachePolicy@Redfish.AllowableValues": [
"WriteThrough",
"UnprotectedWriteBack",
"ProtectedWriteBack"
],
"Oem": {
"Lenovo": {}
},
"@odata.type": "#Volume.v1_4_1.Volume",
"Links": {
"Drives": []
},
"Description": "This resource is used to represent a volume for a Redfish implementation.",
"@odata.etag": "\"4eebd9cca6bc25aae12\"",
"Actions": {
"#Volume.Initialize": {
"target": "/redfish/v1/Systems/1/Storage/RAID_Slot2/Volumes/23/Actions/Volume.Initialize",
"title": "Initialize",
"InitializeType@Redfish.AllowableValues": [
"Fast"
]
}
},
"AccessCapabilities": []
}