[libvirt] [PATCH 3/3]: Implement logical stopPool and deletePool more fully

Chris Lalancette clalance at redhat.com
Fri Sep 19 08:37:30 UTC 2008

This patch does a few things.

1)  Clean up a bunch of comments which I believe are no longer valid, or just
slightly wrong

2)  Enable the stopPool command for the logical backend.  The comment in the
code worries about a situation where you try to "stop" the logical volume that
your rootfs is on, for example.  However, that situation is already taken care
of by the LVM tools; if the logical volume you try to stop is active, it will
throw an error saying that the LV is in use, and won't stop it.  Therefore, it
should be pretty safe to try to stop logical volumes; it will fail for ones that
are in use, but will stop volumes that have been properly torn down ahead of time.

3)  In deletePool, remove the -f from the vgremove command.  Besides the fact
that we probably don't usually want to force things, the -f option doesn't exist
prior to F-9, so this would fail on F-8, RHEL-5, etc.

4)  In deletePool, implement pvremove of all source devices.  Note that this
should also be relatively safe; it will only pvremove devices that we had
previously pvcreate'd in createPool, which means they were all under control of
libvirt.  It will not pvremove devices on an LVM that you previously created,
but were just scanning with libvirt.

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-lvm-3-stop-pool.patch
Type: text/x-patch
Size: 3012 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080919/670deed3/attachment-0001.bin>

More information about the libvir-list mailing list