Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   Stop using --update=super-minor when starting md arrays. (http://www.linux-archive.org/ubuntu-user/499655-stop-using-update-super-minor-when-starting-md-arrays.html)

David Lehman 03-10-2011 02:52 PM

Stop using --update=super-minor when starting md arrays.
 
It is only supported for the decreasingly common v0 metadata,
plus it's probably better not to rename people's arrays based on
the order in which we find their member partitions.
---
pyanaconda/storage/devicelibs/mdraid.py | 9 +--------
pyanaconda/storage/devices.py | 5 -----
2 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/pyanaconda/storage/devicelibs/mdraid.py b/pyanaconda/storage/devicelibs/mdraid.py
index 08f58d1..d310ea4 100644
--- a/pyanaconda/storage/devicelibs/mdraid.py
+++ b/pyanaconda/storage/devicelibs/mdraid.py
@@ -167,8 +167,7 @@ def mdadd(device):
except MDRaidError as msg:
raise MDRaidError("mdadd failed for %s: %s" % (device, msg))

-def mdactivate(device, members=[], super_minor=None, update_super_minor=False,
- uuid=None):
+def mdactivate(device, members=[], super_minor=None, uuid=None):
if super_minor is None and not uuid:
raise ValueError("mdactivate requires either a uuid or a super-minor")

@@ -179,13 +178,7 @@ def mdactivate(device, members=[], super_minor=None, update_super_minor=False,
else:
identifier = ""

- if update_super_minor:
- extra_args = ["--update=super-minor"]
- else:
- extra_args = [ ]
-
args = ["--assemble", device, identifier, "--run", "--auto=md"]
- args += extra_args
args += members

try:
diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 0b6903b..4026afa 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -2902,14 +2902,9 @@ class MDRaidArrayDevice(StorageDevice):
member.setup(orig=orig)
disks.append(member.path)

- update_super_minor = True
- if self.type == "mdcontainer" or self.type == "mdbiosraidarray":
- update_super_minor = False
-
mdraid.mdactivate(self.path,
members=disks,
super_minor=self.minor,
- update_super_minor=update_super_minor,
uuid=self.uuid)

def teardown(self, recursive=None):
--
1.7.3.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 01:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.