block device isn't resized after swap to larger volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Alex Xu |
Bug Description
libvirt support swap volume. But if the new volume is larger than the old one, the block device isn't resized. The instance can't see the extra space.
$ nova show vm3
+------
| Property | Value |
+------
| OS-DCF:diskConfig | AUTO |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2014-07-
| flavor | m1.nano (42) |
| hostId | c8e8cab21e9e22d
| id | ccda09b7-
| image | cirros-
| key_name | - |
| metadata | {} |
| name | vm3 |
| net1 network | 10.0.0.66 |
| os-extended-
| progress | 0 |
| security_groups | sg1, default |
| status | ACTIVE |
| tenant_id | fdbb1e8f23eb40c
| updated | 2014-07-
| user_id | 158d3c971e244f4
+------
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 13097504-
| 756d0869-
| f0da7609-
+------
Then login guest OS:
$ sudo fdisk -l
.....
Disk /dev/vdc: 1073 MB, 1073741824 bytes
9 heads, 8 sectors/track, 29127 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd6091017
Device Boot Start End Blocks Id System
/dev/vdc1 2048 2097151 1047552 83 Linux
Swap the volume to larger one.
$ nova volume-update vm3 756d0869-
vm3 attached with the vol3
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 13097504-
| 756d0869-
| f0da7609-
+------
Check the guest again:
$ sudo fdisk -l
....
Disk /dev/vdc: 1073 MB, 1073741824 bytes
9 heads, 8 sectors/track, 29127 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd6091017
Device Boot Start End Blocks Id System
/dev/vdc1 2048 2097151 1047552 83 Linux
The device size isn't changed.
Changed in nova: | |
assignee: | nobody → Alex Xu (xuhj) |
tags: | added: libvirt |
description: | updated |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/106698
Review: https:/