Skip to content

Resize volume

POST
/api/v1/volume/resize/{id}
curl --request POST \
--url https://console.cloudlogics.com/api/v1/volume/resize/8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2 \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "size": "example" }'

Extend a volume to a larger size. Cinder cannot shrink a volume, so the new size must be greater than the current one. The block device grows, not the filesystem on it: extend the filesystem inside the guest afterwards (e.g. resize2fs). Only data volumes can be resized; a virtual machine’s root disk is refused.

id
required
string

Volume ID

Resize volume request

Media typeapplication/json
object
size

Size is the new size in GB. A volume can only be extended, so it must be larger than the volume’s current size.

string
Examplegenerated
{
"size": "example"
}

Volume resized

Media typeapplication/json
string
Examplegenerated
example

Bad request

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Volume not found in this project

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Volume is attached and cannot be extended

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Internal server error

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}