[PATCH] add multipath support

Guido Guenther agx at sigxcpu.org
Sat Mar 1 16:59:33 UTC 2008


---
 debian/patches/00list         |    1 +
 debian/patches/multipath.diff |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/multipath.diff

diff --git a/debian/patches/00list b/debian/patches/00list
index 838132a..86bc010 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -22,6 +22,7 @@ find-grub-dir.diff
 intelmac.diff
 crossreference_manpages.diff
 ext3_256byte_inode.diff
+multipath.diff
 
 # We aren't building amd64 binaries, see #244498
 #fix_amd64_compile.diff
diff --git a/debian/patches/multipath.diff b/debian/patches/multipath.diff
new file mode 100644
index 0000000..1eea385
--- /dev/null
+++ b/debian/patches/multipath.diff
@@ -0,0 +1,37 @@
+diff --git a/lib/device.c b/lib/device.c
+index 04a61f6..7e35b4a 100644
+--- a/lib/device.c
++++ b/lib/device.c
+@@ -1119,6 +1119,8 @@ write_to_partition (char **map, int drive, int partition,
+          (strncmp (dev, "/dev/cciss/", 11) == 0) ||
+          (strncmp (dev, "/dev/rd/", 8) == 0))
+         strcpy (dev + strlen(dev), "p");
++      else if (strncmp (dev, "/dev/mapper/mpath", 17) == 0)
++        strcpy (dev + strlen(dev), "-part");
+     }
+   sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
+   
+diff --git a/util/grub-install.in b/util/grub-install.in
+index c15bf46..18aab58 100644
+--- a/util/grub-install.in
++++ b/util/grub-install.in
+@@ -149,7 +149,8 @@ convert () {
+ 				  -e 's%\(fd[0-9]*\)$%\1%' \
+ 				  -e 's%/part[0-9]*$%/disc%' \
+ 				  -e 's%\(c[0-7]d[0-9]*\).*$%\1%' \
+-				  -e 's%\(e[0-9]\.[0-9]*\).*$%\1%'`
++				  -e 's%\(e[0-9]\.[0-9]*\).*$%\1%' \
++                                -e 's%\(/mapper/mpath[0-9]\+\)-part[0-9]\+$%\1%'`
+ 	tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+ 				  -e 's%.*d[0-9]*p%%' \
+ 				  -e 's%.*/fd[0-9]*$%%' \
+@@ -157,7 +158,8 @@ convert () {
+ 				  -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' \
+ 				  -e 's%.*c[0-7]d[0-9]*p*%%' \
+ 				  -e 's%.*e[0-9]\.[0-9]*p%%' \
+-				  -e 's%.*e[0-9]\.[0-9]*\$%%'`
++				  -e 's%.*e[0-9]\.[0-9]*\$%%' \
++                                -e 's%.*/mapper/mpath[0-9]\+-part\([0-9]\+\)$%\1%'`
+ 	;;
+     gnu*)
+ 	tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'`
-- 
1.5.4.3


--xHFwDpU9dbj6ez1V--





More information about the Pkg-grub-devel mailing list