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

Re: [PATCH 2/4] Add dracutSetupString methods to all relevant device classes



ACK.

On 12/22/2009 09:43 PM, Hans de Goede wrote:
We want to move to using dracut in such a way that the initrd only
activates the minimum of storage needed to bring up the root fs. This
requires us to tell it exactly what storage to activate.
---
  storage/devices.py |   14 ++++++++++++++
  1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 1065a68..b71b669 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1555,6 +1555,9 @@ class LUKSDevice(DMCryptDevice):
          """ This device's backing device. """
          return self.parents[0]

+    def dracutSetupString(self):
+        return "rd_LUKS_UUID=luks-%s" % self.format.uuid
+

  class LVMVolumeGroupDevice(DMDevice):
      """ An LVM Volume Group
@@ -1964,6 +1967,9 @@ class LVMVolumeGroupDevice(DMDevice):
          """
          return len(self.pvs) == self.pvCount or not self.exists

+    def dracutSetupString(self):
+        return "rd_LVM_VG=%s" % self.name
+

  class LVMLogicalVolumeDevice(DMDevice):
      """ An LVM Logical Volume """
@@ -2682,6 +2688,10 @@ class MDRaidArrayDevice(StorageDevice):
      def model(self):
          return "RAID%d Array" % self.level

+    def dracutSetupString(self):
+        return "rd_MD_UUID=%s" % self.uuid
+
+
  class DMRaidArrayDevice(DMDevice):
      """ A dmraid (device-mapper RAID) device """
      _type = "dm-raid array"
@@ -2786,6 +2796,10 @@ class DMRaidArrayDevice(DMDevice):
          # Even if teared down we still want to show up in storage.disks
          return True

+    def dracutSetupString(self):
+        return "rd_DM_UUID=%s" % self.name
+
+
  class _MultipathDeviceNameGenerator:
      def __init__(self):
          self.number = 0


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