-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Non destructive volume resize #952
Comments
It's actually possible to do an online resize with libvirt:
And this is detected immediately within the guest:
I'd love to see this possible via terraform-provider-libvirt too. |
I'd love to see this as well, would make life a lot more fun (also thanks for all the work you do on this project) |
@dmacvicar would you accept a PR for this issue? Being able to resize volumes non-destructively would be great. Libvirt already supports this via virStorageVolResize and virDomainBlockResize. It seems the former works on any volume not currently attached to a running domain while the latter supports resizing on a running domain (but presumably does not work on volumes not currently attached to a domain as it requires a reference to one). Is there any way to easily check if a volume is currently attached to a (and if yes, which) domain? Looping all domains to check if they have a specific volume attached will be very inefficient. |
Related to #1017 Lots of useful information in this issue! @merlinfvr are you interested in creating a PR for this? |
I think this could be done in the |
Hello there I've started to put together something at #1122 So far, it seems to work in simple and straightforward use cases. I'm pretty sure there is a number of additional checks and conditions that can, and should, be added. |
System Information
Linux distribution
Ubuntu 20.04/22.04
Terraform version
Provider and libvirt versions
Checklist
Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Terraform can detect state differences between an existing volume size and an expected new volume size but with the current libvirt provider, volumes are first deleted then re-created with the new size.
This is ok for reproductible and immutable environments but this is annying especially when you have big volumes or data you would like to avoid losing or restoring (repository mirroring, datasets, ...).
Libvirt enable resizing a volume without destrying/re-creating it, I can do it easily with virsh just like this :
Only conditions for that :
Steps to Reproduce Issue
Any VM with at least a volume
The text was updated successfully, but these errors were encountered: