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

[PATCH 1/4] Give MD BIOS RAID arrays there own type



Before the whole disk formatting changes MD BIOS RAID arrays used to have
their own type of "partitionable mdarray". And we check for the normal
"mdarray" type in various places (mostly to do with mdraid /boot handling where
I'm seeing a traceback qtm), and when the type matches mdarray the code
assumes a regular mdarray.

So this code restores MD BIOS RAID arrays having their own type, so as to
not trigger all these checks meant for regular mdraid arrays.
---
 storage/__init__.py |    2 +-
 storage/devices.py  |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 5ab8399..adb9f81 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -2122,7 +2122,7 @@ class FSSet(object):
         """ Return the contents of mdadm.conf. """
         retval = None
         arrays = self.devicetree.getDevicesByType("mdarray")
-        arrays.extend(self.devicetree.getDevicesByType("partitionable mdarray"))
+        arrays.extend(self.devicetree.getDevicesByType("mdbiosraidarray"))
         arrays.extend(self.devicetree.getDevicesByType("mdcontainer"))
         # Sort it, this not only looks nicer, but this will also put
         # containers (which get md0, md1, etc.) before their members
diff --git a/storage/devices.py b/storage/devices.py
index 5852352..f2ff639 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2384,6 +2384,7 @@ class MDRaidArrayDevice(StorageDevice):
         # when teared down.
         if self.parents and self.parents[0].type == "mdcontainer":
             self._size = self.currentSize
+            self._type = "mdbiosraidarray"
 
         # FIXME: Bitmap is more complicated than this.
         # It can be internal or external. External requires a filename.
-- 
1.6.5.2


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