[PATCH] Allow use of a single path if multipath activation fails. (#1054806)

Vratislav Podzimek vpodzime at redhat.com
Tue Feb 25 10:25:43 UTC 2014


On Mon, 2014-02-24 at 15:55 -0600, David Lehman wrote:
> If multipath loses the race to claim the member disks and something
> like lvm activates devices on one of the members, allow direct use
> of that member and ignore the others. This allows configuration to
> continue, but without the benefits of multipath.
> ---
>  blivet/devicetree.py | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index 8a79f14..e47793b 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -1027,6 +1027,20 @@ class DeviceTree(object):
>                  # make sure any device we found is an md device
>                  device = None
>  
> +        # If multipath loses the race to claim the member disks they can have
> +        # stuff like lvm activated on the member, in which case we just ignore
> +        # the other members completely. In this case the user will have to
> +        # convert to using multipath after installation.
> +        if udev_device_is_disk(info) and not device:
> +            serial = udev_device_get_serial(info)
> +            path = "/dev/%s" % info["DEVNAME"]
> +            if serial and self.getDevicesBySerial(serial) and \
> +               not devicelibs.mpath.is_multipath_member(path):
> +                log.warning("ignoring apparent multipath member %s ; it "
> +                            "looks as if multipath lost the race to claim it"
> +                            % name)
> +                return
> +
>          if device and device.isDisk and \
>             devicelibs.mpath.is_multipath_member(device.path):
>              # mark as multipath_member also when repopulating devicetree
ACK for the rhel7-branch

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list