Package: lilo
Version: 22.8-8.3

The attached patch turns off the error "Inconsistent Raid version
information" for Version 1.0 md RAID mirror pairs. It also corrects
the error message as the version information is just incompatible not
inconsistent.

No other charges are required as 1.0 devices have the same layout
as v0.90 devices except that they work with drives in excess of 2TB.
It does not update for version 1.2 raid superblocks, this would require
a much more complex patch.

With the following lilo.conf the standard debian initrd and kernel boot
off of an LVM logical drive on an MD raid1 array consisting of two
whole disk devices (/dev/sda & /dev/sdb). With this patch the array
can use version 1.0 superblocks so these devices can be the new 3TB
Seagate drives.

boot=/dev/md0
raid-extra-boot=mbr-only
map=/boot/map
delay=20

default=Linux
append="quiet root=/dev/mapper/vg0-root"
image=/vmlinuz
        label=Linux
        read-only
        initrd=/initrd.img



--
Rob.                          (Robert de Bath <robert$ @ debath.co.uk>)
                                             <http://www.debath.co.uk/>
Index: lilo-22.8/geometry.c
===================================================================
--- lilo-22.8.orig/geometry.c   2010-09-25 17:38:55.315820444 +0100
+++ lilo-22.8/geometry.c        2010-09-25 17:39:16.016827136 +0100
@@ -1116,9 +1116,19 @@
        
        if (ioctl(md_fd,GET_ARRAY_INFO,&md_array_info) < 0)
            die("Unable to get RAID info on %s", mdxxx);
-       if ((md_array_info.major_version != md_version_info.major) &&
-               (md_array_info.minor_version != md_version_info.minor))
-           die("Inconsistent Raid version information on %s", mdxxx);
+        if (md_version_info.major != 0 || md_version_info.minor != 90 ||
+            ((md_array_info.major_version != 0 ||
+                md_array_info.minor_version != 90) &&
+             (md_array_info.major_version != 1 ||
+                md_array_info.minor_version != 0))
+            ) {
+            die("Incompatible Raid version information on %s   (RV=%d.%d 
GAI=%d.%d)",
+                mdxxx,
+                (int)md_version_info.major,
+                (int)md_version_info.minor,
+                (int)md_array_info.major_version,
+                (int)md_array_info.minor_version);
+            }
        if (md_array_info.level != 1)
            die("Only RAID1 devices are supported for boot images");
        raid_limit = md_array_info.raid_disks + md_array_info.spare_disks;
Index: lilo-22.8/raid.c
===================================================================
--- lilo-22.8.orig/raid.c       2010-09-25 17:38:55.327820457 +0100
+++ lilo-22.8/raid.c    2010-09-25 17:44:33.408833700 +0100
@@ -157,10 +157,14 @@
         if (verbose >= 4) printf("GET_ARRAY_INFO version = %d.%d\n",
                 (int)md_array_info.major_version,
                 (int)md_array_info.minor_version);
-       if ((md_array_info.major_version != md_version_info.major) &&
-               (md_array_info.minor_version != md_version_info.minor)) {
-           die("Inconsistent Raid version information on %s   (RV=%d.%d 
GAI=%d.%d)",
-               boot,
+        if (md_version_info.major != 0 || md_version_info.minor != 90 ||
+            ((md_array_info.major_version != 0 ||
+                md_array_info.minor_version != 90) &&
+             (md_array_info.major_version != 1 ||
+                md_array_info.minor_version != 0))
+            ) {
+            die("Incompatible Raid version information on %s   (RV=%d.%d 
GAI=%d.%d)",
+                boot,
                 (int)md_version_info.major,
                 (int)md_version_info.minor,
                 (int)md_array_info.major_version,

Reply via email to