[PATCH 2/2][anaconda] Update kickstart md array name specification to not use minors. (#965299)
David Lehman
dlehman at redhat.com
Wed Jun 12 17:26:23 UTC 2013
For preexisting or new arrays you can use --device=<name> where name is
not "md%d", but something that can be found in /dev/md/. For preexisting
arrays you can also use --device=LABEL=<label> or --device=UUID=<uuid> to
specify arrays by filesystem label or uuid or md uuid. The label/uuid
piece is needed for v0 metadata arrays, which cannot have a persistent
name.
---
pyanaconda/kickstart.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 168dc28..660330a 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1045,9 +1045,13 @@ class Raid(commands.raid.F18_Raid):
class RaidData(commands.raid.F18_RaidData):
def execute(self, storage, ksdata, instClass):
raidmems = []
- devicename = "md%d" % self.device
-
devicetree = storage.devicetree
+ devicename = self.device
+ if self.preexist:
+ device = devicetree.resolveDevice(devicename)
+ if device:
+ devicename = device.name
+
kwargs = {}
storage.doAutoPart = False
--
1.8.1.4
More information about the anaconda-patches
mailing list