]> xenbits.xensource.com Git - libvirt.git/commitdiff
mpath: Update path in CheckPool function
authorJohn Ferlan <jferlan@redhat.com>
Wed, 24 Jun 2015 11:46:47 +0000 (07:46 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 30 Jun 2015 12:47:02 +0000 (08:47 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1230664

Per the devmapper docs, use "/dev/mapper" or "/dev/dm-n" in order to
determine if a device is under control of DM Multipath.

So add "/dev/mapper" to the virFileExists, leaving the "/dev/mpath"
as a "legacy" option since it appears for a while it was the preferred
mechanism, but is no longer maintained

src/storage/storage_backend_mpath.c

index 971408a81722c7d7b5b579e1bc91dc481f2aaec1..ca9a62fbe6f97204919c3e0de877fe1e299d3628 100644 (file)
@@ -248,7 +248,8 @@ static int
 virStorageBackendMpathCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
                                 bool *isActive)
 {
-    *isActive = virFileExists("/dev/mpath");
+    *isActive = virFileExists("/dev/mapper") ||
+                virFileExists("/dev/mpath");
     return 0;
 }