On 11/12/2014 03:19 PM, David Shea wrote:
Setting find_multipaths to yes will keep multipath from creating a
multipath device unless one of the following conditions is met:
- two non-blacklisted paths have the same wwid
- a path has the same wwid as a previously created multipath device
- the user forced the creation of a device
In other words, only create a multipath device if there is a device with
multiple paths. This would be helpful.
We already do this via lorax, but I forgot at that time that lorax only
affects non-live media. This should work without anyone having to go
figure out how to change it for live media. ACK.
---
blivet/devicelibs/mpath.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/devicelibs/mpath.py b/blivet/devicelibs/mpath.py
index 3f108a3..7bacc52 100644
--- a/blivet/devicelibs/mpath.py
+++ b/blivet/devicelibs/mpath.py
@@ -25,5 +25,7 @@ def set_friendly_names(enabled=True):
else:
val = "n"
- cmd = ["mpathconf", "--user_friendly_names", val,
"--with_multipathd", "y"]
+ # --find_multipaths is important to keep multipath from making up multipath devices
+ # that aren't really multipath
+ cmd = ["mpathconf", "--find_multipaths", "y",
"--user_friendly_names", val, "--with_multipathd", "y"]
return (util.run_program(cmd) == 0)