EXTLINUX RAID1 intro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This[1] patch provides facility to utilise EXTLINUX under the RAID1.
Successfully tested in a two disc setup with a standalone /boot array
and as a part of the / array.
Grub is good reference, as always.

You can test via updates image[2].


poma


[1] 'bootloader-extlinux-mdraid1.diff' - attach.
[2] ftp://ftp.leeds.ac.uk/incoming/extlinux/updates-extlinux-mdraid1.img




diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index e23fb35..82cda97 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2127,8 +2127,11 @@ class EXTLINUX(BootLoader):
     stage1_device_types = ["disk"]
 
     # stage2 device requirements
+    stage2_device_types = ["partition", "mdarray"]
+    stage2_raid_levels = [mdraid.RAID1]
+    stage2_raid_member_types = ["partition"]
+    stage2_raid_metadata = ["0", "0.90", "1.0"]
     stage2_format_types = ["ext4", "ext3", "ext2"]
-    stage2_device_types = ["partition"]
     stage2_bootable = True
 
     packages = ["syslinux-extlinux"]
@@ -2209,6 +2212,28 @@ class EXTLINUX(BootLoader):
     # installation
     #
 
+    def install_targets(self):
+        targets = []
+        if self.stage2_device.type == "mdarray" and \
+           self.stage2_device.level == 1:
+            # make sure we have stage1 and stage2 installed with redundancy
+            # so that boot can succeed even in the event of failure or removal
+            # of some of the disks containing the member partitions of the
+            # /boot array
+            for stage2dev in self.stage2_device.parents:
+                if self.stage1_device.isDisk:
+                    # install to mbr
+                    if self.stage2_device.dependsOn(self.stage1_device):
+                        # if target disk contains any of /boot array's member
+                        # partitions, set up stage1 on each member's disk
+                        # and stage2 on each member partition
+                        stage1dev = stage2dev.disk
+                targets.append((stage1dev, stage2dev))
+        else:
+            targets.append((self.stage1_device, self.stage2_device))
+
+        return targets
+
     def install(self):
         backup = "%s/backup.b" % self._config_dir
         args = ["--install", self._config_dir]


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux