2

I have this setup on KVM Host:

virsh # pool-info --pool pool
Name:           pool
UUID:           bb13c37c-47fe-c4a9-78a4-9c8abc7524fe
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       1.64 TiB
Allocation:     712.00 GiB
Available:      963.12 GiB

virsh # vol-list --details --pool pool
Name                 Path                           Type     Capacity  Allocation
---------------------------------------------------------------------------------
volume1              /dev/pool/volume1              block  192.00 GiB  192.00 GiB
volume2              /dev/pool/volume2              block  192.00 GiB  192.00 GiB
volume3              /dev/pool/volume3              block  192.00 GiB  192.00 GiB
volume4              /dev/pool/volume4              block  136.00 GiB  136.00 GiB

virsh # vol-info --pool pool volume3
Name:           volume3
Type:           block
Capacity:       192.00 GiB
Allocation:     192.00 GiB

I have a VM running in volume3 and the disk is almost full. Before extending the disk on the VM I suppose I have to extend the underlying Volume.

But when I try to extend volume3 to 500GB I get the following error:

virsh # vol-resize volume3 --capacity 500G --pool pool --allocate
error: Failed to change size of volume 'volume3' to 500G

error: invalid argument: storageVolumeResize: unsupported flags (0x1)

When I try to extend the volume without allocating the space I get different error:

virsh vol-resize volume3 --capacity 500G --pool pool
error: Failed to change size of volume 'volume3' to 500G

error: this function is not supported by the connection driver: storage pool does not support changing of volume capacity

Any ideas?

EDIT: I also tried blockresize, no change:

virsh # blockresize volume3 /dev/pool/volume3 734003200
error: Failed to resize block device '/dev/pool/volume3'
error: internal error unable to execute QEMU command 'block_resize': An undefined error has occurred
  • 1
    Where does this storage come from? How is it provisioned? – Michael Hampton Jul 20 '15 at 15:31
3

First, you need to resize the block device using lvresize command, then you need to tell libvirt about the new size.

You should be able to do it this way:

$ lvresize -L 500G /dev/pool/volume3
$ virsh blockresize volumes3 --path /dev/pool/volume3 --size 500G

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.