Resizing Ephemeral Disk

Asked by Jake Warner

Hello all,

I just tried to resize one of my instances to a smaller flavor and found that the ephemeral disk was never resized.

[root@controller ~]# nova flavor-list|grep small
| 9cc4156f-b4ac-47a4-a782-0c4f1c3dd20a | m1.small | 1024 | 20 | 20 | | 1 | 1.0 | True | {} |
| e8e0e0eb-20e2-4491-8c7c-d63d447a2236 | m1.small.double | 1024 | 20 | 40 | | 1 | 1.0 | True | {} |

When resizing from m1.small.double to m1.small, /dev/vdb is still 40GB. Is this an error or does Nova not resize these intentionally?

If Nova doesn't, is there anyway I can force it to resize? If it won't resize down, will it resize up at least?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jake Warner (6-jake) said :
#1

Turns out that it'll resize up, just not down. Is there anyway I can force it to resize down (or do it manually)?

Revision history for this message
Patrick Vinas (patrickvinas) said :
#2

On your compute node, the disk image is stored at /var/lib/nova/instances/<instance id>/disk (or whatever your state_path option specifies in your nova.conf). You could try resizing that image with "sudo kvm-img resize ... ". Make sure to power down the VM first - and you may have to update the database manually, to keep your disk usage reporting (and quota usage) accurate.

Can you help with this problem?

Provide an answer of your own, or ask Jake Warner for more information if necessary.

To post a message you must log in.