-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for shrinking a VDO volume #49
Comments
While it is possible to implement this in VDO, it is quite a lot of work and is not currently on our road map. What is you use case? |
Desktop and laptop systems. It is quite common for users to decide they need to repartition their storage in various ways. For instance, they might need to expand the EFI System Partition or |
I do agree with this suggestion. Maybe it could be great to first develop the ability to shrink a VDODataLV and, in a second development, the ability to shrink a VDOPoolLV |
Given the decoupling of the logical address range and the physical storage size that VDO provides, they’re two separate questions. Shrinking the data LV isn’t hard, in fact:
(Yes, I have a volume group “vdo1” containing a logical volume “vdo0”, due in part to some silliness with the historical way our test infrastructure was set up and how it interacts with the newfangled LVM support.)
Shrinking the logical size of the LV doesn’t reduce the logical address space of the VDO device -- we don’t currently support that -- but it shouldn’t be impossible to add. It also probably wouldn’t gain much over simply doing a discard/trim over the range in question. It’s shrinking the physical storage that’s hard, though as noted there are a few use cases where it might be handy on rare but important occasions: Repartitioning the underlying disk. Temporarily adding disk space due to running out of space, and then removing the extra disk after doing some cleanup. Nothing that’s likely to happen every day, but not unheard of either. Since there’s no mapping from physical storage regions back to the logical addresses using them, you potentially have to scan the entire logical address map looking for anything that maps into the physical region you want to get rid of, and relocate those blocks and update both the logical address map and the deduplication index. (Going through the normal write path might be the easiest way to do those updates.) Also, after a system crash mid-way through, we don’t want to be left in some weird state where we’ve got more blocks allocated than before and don’t know to automatically fix it (presumably by finishing the scanning and relocating process), so some state should probably be recorded in such a way that VDO can automatically recover to whatever degree is necessary on startup. Maybe the scan and relocation should be completed but not the resizing? Depends how things are designed, and maybe the context… |
It would be nice to be able to shrink a VDO volume. Online (as in ext4) would be ideal, but even offline would be useful.
The text was updated successfully, but these errors were encountered: