[blivet/f21/master] Add more arguments to mpathconf (#1154347)

Vratislav Podzimek vpodzime at redhat.com
Thu Nov 13 07:52:49 UTC 2014


On Wed, 2014-11-12 at 16:19 -0500, 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.
> ---
>  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)
Applied to libblockdev's mpath plugin as well:
https://github.com/vpodzime/libblockdev/commit/4aa3b79faecb8c84b857abe3a386239a573470a5

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list