[Libguestfs] [PATCH 0/4] Fixes for virt-resize
Richard W.M. Jones
rjones at redhat.com
Mon Sep 27 16:47:51 UTC 2010
On Mon, Sep 27, 2010 at 05:14:08PM +0100, Richard W.M. Jones wrote:
> I'm still doing testing on these, but the patches seem good
> enough to review.
I should note that this won't necessarily let you do a resize:
><fs> pvresize-size /dev/sda2 6G
libguestfs: error: pvresize_size: /dev/vda2: /dev/vda2: cannot resize to 191 extents as later ones are allocated.
It turns out that pvresize won't "defrag" physical extents, therefore
it is a matter of luck whether you can shrink a PV.
Reading around the issue it seems you can manually move PEs using
pvmove, lvdisplay, guesswork and luck. There might be scope for a
"pvdefrag" command in libguestfs at some point ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
More information about the Libguestfs
mailing list