Skip to content

Commit

Permalink
Add mdrun method to just start, not assemble, an array. (#1202877)
Browse files Browse the repository at this point in the history
Related: rhbz#1090009
Related: rhbz#1202877

(cherry-picked from commit 56c623c)

Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Jun 2, 2015
1 parent d066845 commit f42dd2d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions blivet/devicelibs/mdraid.py
Expand Up @@ -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.
Expand Down

0 comments on commit f42dd2d

Please sign in to comment.