[rhel7-branch 4/6] Add mdrun method to just start, not assemble, an array. (#1202877)
mulkieran
installerbot-noreply at redhat.com
Tue Jun 2 22:34:50 UTC 2015
From: mulhern <amulhern at redhat.com>
Related: rhbz#1090009
Related: rhbz#1202877
(cherry-picked from commit 56c623ce96a849c62e4cbab1f2dfa6ff62324424)
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devicelibs/mdraid.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/blivet/devicelibs/mdraid.py b/blivet/devicelibs/mdraid.py
index e9a8bcb..6197870 100644
--- a/blivet/devicelibs/mdraid.py
+++ b/blivet/devicelibs/mdraid.py
@@ -248,6 +248,20 @@ def mddeactivate(device):
except MDRaidError as msg:
raise MDRaidError("mddeactivate failed for %s: %s" % (device, msg))
+def mdrun(device):
+ """Start a possibly degraded array.
+
+ :param str device: the device to be started
+
+ :raises :class:`~.errors.MDRaidError`: on failure
+ """
+ args = ["--run", device]
+
+ try:
+ mdadm(args)
+ except MDRaidError as msg:
+ raise MDRaidError("mdrun failed for %s: %s" % (device, msg))
+
def process_UUIDS(info, UUID_keys):
""" Extract and convert expected UUIDs to canonical form.
Reassign canonicalized UUIDs to corresponding keys.
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/f42dd2d1e57810013362b327a06ed68fe83d8a19
More information about the anaconda-patches
mailing list