From: John Ferlan Date: Wed, 24 Jun 2015 11:46:47 +0000 (-0400) Subject: mpath: Update path in CheckPool function X-Git-Tag: v1.2.17-rc2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbad00189958db304295519842b28342a005a3bc;p=thirdparty%2Flibvirt.git mpath: Update path in CheckPool function 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 --- diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c index 971408a817..ca9a62fbe6 100644 --- a/src/storage/storage_backend_mpath.c +++ b/src/storage/storage_backend_mpath.c @@ -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; }