<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">On 21 mrt 2010, at 16:03, Richard W.M. Jones wrote:<br><br><blockquote type="cite">*snip*<br></blockquote><br><blockquote type="cite">And how about this situation:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">       fs1   fs2<br></blockquote><blockquote type="cite">        |     |<br></blockquote><blockquote type="cite">       LV1---LV2<br></blockquote><blockquote type="cite">           |<br></blockquote><blockquote type="cite">          VG<br></blockquote><blockquote type="cite">           |<br></blockquote><blockquote type="cite">        PV 100% full<br></blockquote><blockquote type="cite">        /dev/sda1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">User requests that /dev/sda1 is shrunk by some amount.  We need to<br></blockquote><blockquote type="cite">take that space from fs1 and fs2 (assuming they have free space).<br></blockquote><blockquote type="cite">Potentially there could be many different ways to achieve this.<br></blockquote><br>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 :)<br><br>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.<br><br>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.<br><br>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 :)<br><br>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).<br><br>This is all just my opinion of course :)<br><br>--<br>Dennis Krul <<a href="mailto:dennis@tilaa.nl">dennis@tilaa.nl</a>><br><br></body></html>