summaryrefslogtreecommitdiffstats
path: root/storage/devicelibs
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-04-08 13:20:39 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-04-08 16:09:11 +0200
commit94a7e7ca831cc3a65a15ffd9a290baf065176477 (patch)
tree45cb0dd8ee23e9219c4eefbcc25aac8d18f7f1d3 /storage/devicelibs
parentb33d511a9ffce008421fb52c2010ae05c920813c (diff)
downloadanaconda-94a7e7ca831cc3a65a15ffd9a290baf065176477.tar.gz
anaconda-94a7e7ca831cc3a65a15ffd9a290baf065176477.tar.xz
anaconda-94a7e7ca831cc3a65a15ffd9a290baf065176477.zip
Fix processing of --level and --device options of ks raid commands.
* We get RAID1 from ks parser, mdadm accepts only lowercase level specifiers of this form. * We get int device number (e.g. 0) from ks option --device (e.g. md0). Though this might require rather changes in pykickstart, especially when mdadm 3.0 allows creating of arbitrary device names in /dev/md. * mdadm --create --level option is changed to comply strictly to documentation (e.g. "--level=raid0", though "--level raid0" works too)
Diffstat (limited to 'storage/devicelibs')
-rw-r--r--storage/devicelibs/mdraid.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py
index 7d6ace2f4..6cbaa68cb 100644
--- a/storage/devicelibs/mdraid.py
+++ b/storage/devicelibs/mdraid.py
@@ -104,7 +104,7 @@ def get_raid_max_spares(raidlevel, nummembers):
raise ValueError, "invalid raid level %d" % raidlevel
def mdcreate(device, level, disks, spares=0):
- argv = ["--create", device, "--run", "--level", str(level)]
+ argv = ["--create", device, "--run", "--level=%s" % level]
raid_devs = len(disks) - spares
argv.append("--raid-devices=%d" % raid_devs)
if spares: