On 21 mrt 2010, at 16:03, Richard W.M. Jones wrote:
*snip*
And how about this situation:
fs1 fs2
| |
LV1---LV2
|
VG
|
PV 100% full
/dev/sda1
User requests that /dev/sda1 is shrunk by some amount. We need to
take that space from fs1 and fs2 (assuming they have free space).
Potentially there could be many different ways to achieve this.
I think that, in the case of LVM, you should just concentrate on resizing the PV's and the partitions they're on. That probably makes things a lot easier :)
If the user wants to expand an image, then simply resize the partition and run pvextend. Or alternatively add a new partition, run pvcreate and add it to the volume group.
If a user wants to shrink an image, he simply needs to ensure enough free space is available within the VG for the virt-resize operation to succeed.
The only use case that causes problems is if the user has all VG space consumed by filesystems that cannot be unmounted for shrinking the filesystem (read: root). But in that case there is little point in using LVM anyway :)
I'd say that resizing LV's and their filesystems too is a 'nice to have' feature, but not absolutely required (in most cases anyway).
This is all just my opinion of course :)
--
Dennis Krul <dennis@tilaa.nl>