[libvirt] [PATCH] Ignore thin pool LVM devices
Cole Robinson
crobinso at redhat.com
Tue Oct 8 16:55:43 UTC 2013
On 09/20/2013 10:38 PM, Dusty Mabe wrote:
>
> For BZ 924672 the problem stems from the fact that thin pool logical
> volume devices show up in /sbin/lvs output just like normal logical
> volumes do. Since the thin pool devices show up libvirt assumes they are
> just normal logical volumes and assumes there will be a corresponding
> /dev/vgname/lvname device that has been created. This is not the case and
> you will receive the following error when starting the storage pool:
>
> error: cannot stat file '/dev/vgvirt/thinpool': No such file or directory
>
> This patch modifies virStorageBackendLogicalMakeVol() to ignore thin pool
> backing devices.
>
>
> ---
> src/storage/storage_backend_logical.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
> index a1a37a1..74d26bd 100644
> --- a/src/storage/storage_backend_logical.c
> +++ b/src/storage/storage_backend_logical.c
> @@ -85,6 +85,10 @@ virStorageBackendLogicalMakeVol(virStoragePoolObjPtr pool,
> if (attrs[4] != 'a')
> return 0;
>
> + /* BZ 924672 - Skip thin pools(t) and thin pool data(T) */
> + if (attrs[0] == 't' || attrs[0] == 'T')
> + return 0;
> +
> /* See if we're only looking for a specific volume */
> if (data != NULL) {
> vol = data;
>
Patch seems reasonable to me, and there's been a handful of complains about
that bug. Can you tweak it a bit and resend?
- Full bug link in the commit log
- Example lvs output in the commit log just for reference to what you are
keying off of.
- Drop the bug reference from the code comment, but expand the comment a bit
to explain that we can't handle thinpool/thinvolume because their paths aren't
always in /dev (or whatever the explanation is)
I'll ACK after that.
Thanks,
Cole
More information about the libvir-list
mailing list