mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Ignore thin pool LVM devices.
This should resolve: https://bugzilla.redhat.com/show_bug.cgi?id=924672 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. Libvirt incorrectly assumes they are just normal logical volumes and that they will have a corresponding /dev/vgname/lvname device that has been created by udev and tries to use this device. To illustrate here is an example of the /dev/vgname/ directory and the lvs output for a normal lv, thin lv, and thin pool: LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lv vgguests -wi-a---- 1.00g pool vgguests twi-a-tz- 11.00g 0.00 thinlv vgguests Vwi-a-tz- 1.00g pool 0.00 total 0 lrwxrwxrwx. 1 root root 7 Oct 8 19:35 lv -> ../dm-7 lrwxrwxrwx. 1 root root 7 Oct 8 19:37 thinlv -> ../dm-6 This patch modifies virStorageBackendLogicalMakeVol() to ignore thin pool devices.
This commit is contained in:
parent
da716da3e4
commit
4132dede06
@ -85,6 +85,14 @@ virStorageBackendLogicalMakeVol(virStoragePoolObjPtr pool,
|
||||
if (attrs[4] != 'a')
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Skip thin pools(t). These show up in normal lvs output
|
||||
* but do not have a corresponding /dev/$vg/$lv device that
|
||||
* is created by udev. This breaks assumptions in later code.
|
||||
*/
|
||||
if (attrs[0] == 't')
|
||||
return 0;
|
||||
|
||||
/* See if we're only looking for a specific volume */
|
||||
if (data != NULL) {
|
||||
vol = data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user