The patch to nash fixes mkrootdev when the rootdev is specified by LABEL on the
kernel command line, and the root device is multipathed.  Without this patch a
slave will be chosen.  This patch makes mkrootdev skip all devices that match
the label which have device mapper holders.

The patch to mkinitrd fixes install-to-multipath for devices with non-default 
hardware handlers specified in /etc/multipath.conf.

--- mkinitrd-5.1.19.6/nash/block.c.orig	2009-10-28 11:15:18.000000000 -0400
+++ mkinitrd-5.1.19.6/nash/block.c	2009-10-28 11:15:28.000000000 -0400
@@ -466,6 +466,35 @@
         blkid_tag_iterate titer;
         const char *type, *data;
         char *dmname = NULL, *name = NULL;
+		DIR * dir;
+		char *dirname;
+		char *holders;
+		struct dirent * entry;
+		int is_slave = 0;
+
+		/* If this blockdev is a slave of another device-mapper blockdev then skip
+		 * it.  This is so that if we look up by LABEL when using device-mapper-multipath
+		 * we get the master and not the slave.
+		 * It is safe to skip device-mapper slaves since they cannot be mounted directly.
+		 */
+		dirname = strdup(dev->sysfs_path);
+		asprintf(&holders, "%s/holders", dirname);
+		while ((dir = opendir(holders)) && !is_slave) {
+			char *tmp;
+			while ((entry = readdir(dir)) && !is_slave)
+				if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, ".."))
+					is_slave = 1;
+			closedir(dir);
+			asprintf(&tmp, "%s/..", dirname);
+			free(dirname);
+			free(holders);
+			dirname = tmp;
+			asprintf(&holders, "%s/holders", dirname);
+		}
+		free(dirname);
+		free(holders);
+		if (is_slave)
+			continue;
 
         if (!strncmp(dev->dev_path, "/dev/fd", 7))
             continue;
 
--- mkinitrd-5.1.19.6/mkinitrd.orig	2010-03-04 10:42:26.000000000 +0000
+++ mkinitrd-5.1.19.6/mkinitrd	2010-03-04 10:56:04.101748000 +0000
@@ -1554,8 +1554,10 @@ if [ -n "$testdm" -a -x /sbin/dmsetup -a
         # If we use dm-multipath devices, include the needed modules
         if [ "$use_multipath" == "1" ]; then
             find_scsi_dh_modules
-            findmodule -dm-multipath
-            findmodule -dm-round-robin
+            findmodule dm-multipath
+            findmodule dm-round-robin
+            findmodule scsi_dh_emc
+            findmodule scsi_dh_rdac
             if [ "$use_emc" == "1" ]; then
                 findmodule -dm-emc
             fi
