[PATCH] Ignore thin pool LVM devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]