PATCH - software raid for ppc on installation

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

 



Anaconda people-

The attached patch enables the setup of software RAID on IBM PowerPC
installations.  The functionality was overwhelmingly already present,
however a few things had to be enabled for this platform, and a few
additional sanity checks seemed a good idea...

The following changes were necessary and are represented in the attached
patch:
1) The prepbootFileSystem must have the PARTITION_BOOT flag and ppc must
be listed in the raidBootArches

2) All PReP partitions must be the first partition on their disc--not
'at least one of them', if you want to be able to automatically failover
to boot off of another disc.  This involved a little rearranging of
tricky little hack in autopart.py.  Somebody please sanity-check my
change here...it does what I want it to do, but I certainly don't want
to boondoggle someone else (ie another platform).  I think this should
be contained only to PPC, but have a look and see what you think.

3) Additionally, if you choose to RAID your /boot partition, the only
level that makes sense (to me anyway) is RAID1.  So I added a check in
the anaconda gui that ensures this.  Note that this will affect all
platforms, but this seems sensible to me.  I don't know of any
bootloaders that are able to read anything other than a mirrored RAID
filesystem.  Correct me here?

...

4) Additionally, this functionality also depends on a separate patch
I've submitted to the yaboot-devel list.  That patch will handle the
writing of yaboot to each and every PReP partition, as well as adding
the functionality needed for the bootloader to read filesystems marked
as "Linux RAID".


Questions?  Comments?


Dustin



--- anaconda-10.1.1.13/fsset.py.swraid	2004-12-14 15:25:04.000000000 -0600
+++ anaconda-10.1.1.13/fsset.py	2005-05-05 16:20:08.630956272 -0500
@@ -825,6 +825,7 @@
     def __init__(self):
         FileSystemType.__init__(self)
         self.partedFileSystemType = None
+        self.partedPartitionFlags = [ parted.PARTITION_BOOT ]
         self.checked = 0
         self.name = "PPC PReP Boot"
         self.maxSizeMB = 10
@@ -1064,6 +1065,8 @@
         format = "%s %s %s %s 0 0\n"
         mtab = ""
         for entry in self.entries:
+            if not entry.isMounted():
+                continue
             if entry.mountpoint:
                 # swap doesn't end up in the mtab
                 if entry.fsystem.getName() == "swap":
@@ -1178,7 +1181,7 @@
 
         f.close()
         
-    # return the "boot" devicce
+    # return the "boot" device
     def getBootDev(self):
 	mntDict = {}
         bootDev = None
--- anaconda-10.1.1.13/autopart.py.swraid	2005-05-05 16:11:03.448034400 -0500
+++ anaconda-10.1.1.13/autopart.py	2005-05-05 16:11:13.561961136 -0500
@@ -293,19 +293,21 @@
             continue
         if request.device:
             continue
-        if primOnly and not request.primary and not requests.isBootable(request):
+        if primOnly and not request.primary and not requests.isBootable(request) and request.fstype != fsset.fileSystemTypeGet("PPC PReP Boot"):
             continue
         if request.size == 0 and request.requestSize == 0:
             request.requestSize = 1
-        if requests.isBootable(request):
+        # FIXME: this is a hack to make sure prep boot is even more first
+        if request.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
             drives = getDriveList(request, diskset)
-            numDrives = 0 # allocate bootable requests first
-            # FIXME: this is a hack to make sure prep boot is even more first
-            if request.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
-                numDrives = -1
+            numDrives =  -1
         else:
-            drives = getDriveList(request, diskset)
-            numDrives = len(drives)
+            if requests.isBootable(request):
+                drives = getDriveList(request, diskset)
+                numDrives = 0 # allocate bootable requests first
+            else:
+                drives = getDriveList(request, diskset)
+                numDrives = len(drives)
         if not todo.has_key(numDrives):
             todo[numDrives] = [ request ]
         else:
--- anaconda-10.1.1.13/raid.py.swraid	2004-05-19 18:07:02.000000000 -0500
+++ anaconda-10.1.1.13/raid.py	2005-05-05 16:21:07.093985824 -0500
@@ -25,7 +25,7 @@
 
 # these arches can have their /boot on RAID and not have their
 # boot loader blow up
-raidBootArches = [ "i386", "x86_64" ]
+raidBootArches = [ "i386", "x86_64", "ppc", "ppc64" ]
 
 def scanForRaid(drives):
     """Scans for raid devices on drives.
--- anaconda-10.1.1.13/iw/raid_dialog_gui.py.swraid	2005-05-05 16:20:23.490960376 -0500
+++ anaconda-10.1.1.13/iw/raid_dialog_gui.py	2005-05-05 16:20:37.420972384 -0500
@@ -216,6 +216,11 @@
 		if not queryNoFormatPreExisting(self.intf):
 		    continue
 
+            if (request.mountpoint == "/boot" and request.raidlevel != "RAID1"):
+                self.intf.messageWindow(_("Boot RAID Error"),
+                                        _("Only RAID1 is allowed for /boot."))
+                continue
+
 	    # everything ok, break out
 	    break
 

Attachment: signature.asc
Description: This is a digitally signed message part


[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