How to check the status of a disk resize with the API?

Linode Staff

I've been trying to auto-resize a Linode plan using the API. Up to now I've been doing it manually in three steps, one by one.

  1. Shutdown Linode
  2. Resize Linode disk
  3. Resize Linode plan

To automate these 3 steps under one single script, I need to add some wait time or some flag specifically between step 2 and 3, since the disk resize takes some time. Like, don't go to step 3 until step 2 is complete.

Is there a way I can check the status of a disk resize to see if it's complete or still in progress?

1 Reply

You can check the disk's state via the "status" field.

Status while resize is in progress:

curl -sH "Authorization: Bearer $TOKEN" \$linodeID/disks/$diskID/ | jq .status
"not ready"

Status when resize is complete:

curl -sH "Authorization: Bearer $TOKEN" \$linodeID/disks/$diskID/ | jq .status

Then for information on the progress of shutdown and resize jobs, check the status of the Linode instance.

curl -sH "Authorization: Bearer $TOKEN" \$linodeID | jq .status

# resizing plan
curl -sH "Authorization: Bearer $TOKEN" \$linodeID | jq .status


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct