Re: [PATCH 2/2] Make sure we use 1.0 mdraid metadata when the set is used for boot (#584596)

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

 



Hi,

On 04/22/2010 08:01 PM, David Lehman wrote:
A couple of comments, inline...


Thanks for the review.

On Thu, 2010-04-22 at 19:27 +0200, Hans de Goede wrote:
---
  storage/devices.py    |   39 ++++++++++++++++++++++++++++-----------
  storage/devicetree.py |    5 +++--
  2 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index a990708..95b0b50 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2455,6 +2455,10 @@ class MDRaidArrayDevice(StorageDevice):
          self.chunkSize = 64.0 / 1024.0          # chunk size in MB
          self.superBlockSize = 128.0 / 1024.0    # superblock size in MB

+        self.createMetadataVer = "1.1"
+        # bitmaps are not meaningful on raid0 according to mdadm-3.0.3
+        self.createBitmap = self.level != 0
+

There is already an unused "bitmap" attribute that could serve this
purpose or else be removed.


I opted for removing it.

          # For container members probe size now, as we cannot determine it
          # when teared down.
          if self.parents and self.parents[0].type == "mdcontainer":
@@ -2814,6 +2818,28 @@ class MDRaidArrayDevice(StorageDevice):
          if recursive:
              self.teardownParents(recursive=recursive)

+    def preCommitFixup(self, *args, **kwargs):
+        """ Determine create parameters for this set """
+        mountpoints = kwargs.pop("mountpoints")
+        log_method_call(self, self.name, mountpoints)
+
+        if "/boot" in mountpoints:
+            bootmountpoint = "/boot"
+        else:
+            bootmountpoint = "/"
+
+        # If we are used to boot from we cannot use 1.1 metadata
+        if getattr(self.format, "mountpoint", None) == bootmountpoint or \
+           getattr(self.format, "mountpoint", None) == "/boot/efi" or \
+           self.format.type == "prepboot":
+            self.createMetadataVer = "1.0"
+
+        # Bitmaps are not useful for swap and small partitions
+        if getattr(self.format, "mountpoint", None) == "/boot" or \
+           getattr(self.format, "mountpoint", None) == "/boot/efi" or \
+           self.format.type == "swap":
+            self.createBitmap = False

If bitmaps aren't useful for "small" devices we should define "small"
and do some math instead of checking the mountpoint.

Oh good one, now why didn't I think of that myself ? New version coming up.

What do you think about this patch and F-13 branch I'm a bit undecided myself
I know fedora users do mdraid 1 installs, and if they choose to not have
a separate /boot this will bite them, otoh we could just do a release note
telling them to create a separate /boot.

Regards,

Hans

_______________________________________________
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