[blivet][rhel7-branch] Make sure to add hyperPAV aliases to dasd.conf (#1031589)

Samantha N. Bueno sbueno+anaconda at redhat.com
Thu Jun 11 16:06:12 UTC 2015


HyperPAV aliases enable improved I/O efficiency by allowing parallel
access to a real DASD through a base subchannel (device) and multiple
aliases.

Unfortunately, while the kernel recognizes such devices, they don't
seem to generate any actual udev events so that blivet picks them up;
nor do these aliases have a device node. Thus, if they are used at all
during installation, they are not brought online after rebooting, since
they are on the device ignore list. They are not removed from the device
ignore list since there is no entry in dasd.conf, so this patch loops
through all DASD devices in sysfs and adds all detected aliases to dasd.conf.

Resolves: rhbz#1031589
---
 blivet/devicelibs/dasd.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/blivet/devicelibs/dasd.py b/blivet/devicelibs/dasd.py
index 73284e8..cf00b55 100644
--- a/blivet/devicelibs/dasd.py
+++ b/blivet/devicelibs/dasd.py
@@ -184,3 +184,18 @@ def write_dasd_conf(disks, root):
         for dasd in sorted(disks, key=lambda d: d.name):
             fields = [dasd.busid] + dasd.getOpts()
             f.write("%s\n" % " ".join(fields),)
+
+    # check for hyper PAV aliases; they need to get added to dasd.conf as well
+    sysfs = "/sys/bus/ccw/drivers/dasd-eckd"
+    # this does catch every DASD, even non-aliases, but we're only going to be
+    # checking for a very specific flag, so there won't be any duplicate entries
+    # in dasd.conf
+    devs = [d for d in os.listdir(sysfs) if d.startswith("0.0")]
+    with open(os.path.realpath(root + "/etc/dasd.conf"), "a") as f:
+        for d in devs:
+            aliasfile = "%s/%s/alias" % (sysfs, d)
+            with open(aliasfile, "r") as falias:
+                alias = falias.read().strip()
+
+            if alias:
+                f.write("%s\n" % d)
-- 
1.9.3



More information about the anaconda-patches mailing list