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

[libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool



Signed-off-by: Vasiliy Tolstov <v tolstov selfip ru>
---
 src/storage/storage_backend_logical.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 67f70e551729..0c34476de38e 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -811,6 +811,25 @@ virStorageBackendLogicalRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
 
     virWaitForDevices();
 
+    cmd = virCommandNewArgList("vgchange",
+                               "-aay",
+                               pool->def->source.name,
+                               NULL);
+    if (virCommandRun(cmd, NULL) < 0)
+        goto cleanup;
+
+    virCommandFree(cmd);
+
+    cmd = virCommandNewArgList("vgchange",
+                               "--refresh",
+                               pool->def->source.name,
+                               NULL);
+    if (virCommandRun(cmd, NULL) < 0)
+        goto cleanup;
+
+    virCommandFree(cmd);
+
+
     /* Get list of all logical volumes */
     if (virStorageBackendLogicalFindLVs(pool, NULL) < 0)
         goto cleanup;
-- 
2.9.3


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