diff --git a/pyanaconda/storage/devicelibs/mdraid.py b/pyanaconda/storage/devicelibs/mdraid.py
index d310ea4..4e39c7c 100644
--- a/pyanaconda/storage/devicelibs/mdraid.py
+++ b/pyanaconda/storage/devicelibs/mdraid.py
@@ -32,6 +32,7 @@ import logging
 log = logging.getLogger("storage")
 
 # raidlevels constants
+LINEAR = -99
 RAID10 = 10
 RAID6 = 6
 RAID5 = 5
@@ -39,90 +40,95 @@ RAID4 = 4
 RAID1 = 1
 RAID0 = 0
 
-def getRaidLevels():
-    mdstat_descriptors = {
-        RAID10: ("[RAID10]", "[raid10]"),
-        RAID6: ("[RAID6]", "[raid6]"),
-        RAID5: ("[RAID5]", "[raid5]"),
-        RAID4: ("[RAID4]", "[raid4]"),
-        RAID1: ("[RAID1]", "[raid1]"),
-        RAID0: ("[RAID0]", "[raid0]"),
-    }
+# constants for the raid_level_map dict
+RAID_LEVEL_NAME = 0
+RAID_LEVEL_MIN_MEMBERS = 1
+RAID_LEVEL_HAS_SPARES = 2
+RAID_LEVEL_ALIAS = 3
+
+raid_level_map = { RAID0: ("RAID0", 2, False, "stripe"),
+                   RAID1: ("RAID1", 2, True, "mirror"),
+                   RAID4: ("RAID4", 3, True, None),
+                   RAID5: ("RAID5", 3, True, None),
+                   RAID6: ("RAID6", 4, True, None),
+                   RAID10: ("RAID10", 2, True, None),
+                   LINEAR: ("LINEAR", 1, False, None) }
+
+def get_available_raid_levels():
     avail = []
     try:
         f = open("/proc/mdstat", "r")
     except IOError:
         pass
     else:
-        for l in f.readlines():
-            if not l.startswith("Personalities"):
+        for line in f.readlines():
+            if not line.startswith("Personalities"):
                 continue
 
-            lst = l.split()
-
-            for level in mdstat_descriptors:
-                for d in mdstat_descriptors[level]:
-                    if d in lst:
-                        avail.append(level)
-                        break
+            # strip off brackets and make case uniform for each personality
+            personalities = [l[1:-1].upper() for l in line.split()]
+            for level in raid_level_map.keys():
+                if raid_level_map[level][RAID_LEVEL_NAME] in personalities:
+                    avail.append(level)
+                    break
 
         f.close()
 
-    avail.sort()
     return avail
 
-raid_levels = getRaidLevels()
+raid_levels = get_available_raid_levels()
 
-def raidLevel(descriptor):
-    for level in raid_levels:
-        if isRaid(level, descriptor):
-            return level
-    else:
-        raise ValueError, "invalid raid level descriptor %s" % descriptor
-
-def isRaid(raid, raidlevel):
-    """Return whether raidlevel is a valid descriptor of raid"""
-    raid_descriptors = {RAID10: ("RAID10", "raid10", "10", 10),
-                        RAID6: ("RAID6", "raid6", "6", 6),
-                        RAID5: ("RAID5", "raid5", "5", 5),
-                        RAID4: ("RAID4", "raid4", "4", 4),
-                        RAID1: ("mirror", "RAID1", "raid1", "1", 1),
-                        RAID0: ("stripe", "RAID0", "raid0", "0", 0)}
-
-    if raid in raid_descriptors:
-        return raidlevel in raid_descriptors[raid]
+def get_raid_name_from_level(raid_level, alias=False):
+    """Return the name for raid level"""
+    try:
+        level_data = raid_level_map[raid_level]
+    except KeyError:
+        raise ValueError("invalid raid level %d" % raid_level)
+
+    if alias and level_data[RAID_LEVEL_ALIAS]:
+        name = level_data[RAID_LEVEL_ALIAS]
     else:
-        raise ValueError, "invalid raid level %d" % raid
+        name = level_data[RAID_LEVEL_NAME]
 
-def get_raid_min_members(raidlevel):
-    """Return the minimum number of raid members required for raid level"""
-    raid_min_members = {RAID10: 2,
-                        RAID6: 4,
-                        RAID5: 3,
-                        RAID4: 3,
-                        RAID1: 2,
-                        RAID0: 2}
+    return name
+
+def get_raid_level_from_name(raid_name):
+    """Return the numeric level for raid level name"""
+    level = None
+    for numeric, data in raid_level_map.items():
+        names = [data[RAID_LEVEL_NAME].lower(), str(numeric)]
+        if data[RAID_LEVEL_ALIAS]:
+            names.append(data[RAID_LEVEL_ALIAS].lower())
+
+        if raid_name.lower() in names:
+            level = numeric
 
-    for raid, min_members in raid_min_members.items():
-        if isRaid(raid, raidlevel):
-            return min_members
+    if level is None:
+        raise ValueError("invalid raid level name %s" % raid_name)
 
-    raise ValueError, "invalid raid level %d" % raidlevel
+    return level
 
-def get_raid_max_spares(raidlevel, nummembers):
+def get_raid_min_members(raid_level):
+    """Return the minimum number of raid members required for raid level"""
+    try:
+        level_data = raid_level_map[raid_level]
+    except KeyError:
+        raise ValueError("invalid raid level %d" % raid_level)
+
+    return level_data[RAID_LEVEL_MIN_MEMBERS]
+
+def get_raid_max_spares(raid_level, num_members):
     """Return the maximum number of raid spares for raidlevel."""
-    raid_max_spares = {RAID10: lambda: max(0, nummembers - get_raid_min_members(RAID10)),
-                       RAID6: lambda: max(0, nummembers - get_raid_min_members(RAID6)),
-                       RAID5: lambda: max(0, nummembers - get_raid_min_members(RAID5)),
-                       RAID4: lambda: max(0, nummembers - get_raid_min_members(RAID4)),
-                       RAID1: lambda: max(0, nummembers - get_raid_min_members(RAID1)),
-                       RAID0: lambda: 0}
-
-    for raid, max_spares_func in raid_max_spares.items():
-        if isRaid(raid, raidlevel):
-            return max_spares_func()
-
-    raise ValueError, "invalid raid level %d" % raidlevel
+    try:
+        level_data = raid_level_map[raid_level]
+    except KeyError:
+        raise ValueError("invalid raid level %d" % raid_level)
+
+    max_spares = 0
+    if level_data[RAID_LEVEL_HAS_SPARES]:
+        max_spares = num_members - level_data[RAID_LEVEL_MIN_MEMBERS]
+
+    return max_spares
 
 def mdadm(args, progress=None):
     ret = iutil.execWithPulseProgress("mdadm", args,
diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index eac7eb7..c23e00d 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -2659,19 +2659,23 @@ class MDRaidArrayDevice(StorageDevice):
         self.level = level
         if level == "container":
             self._type = "mdcontainer"
-        elif level is not None:
-            self.level = mdraid.raidLevel(level)
+        else:
+            self.level = mdraid.get_raid_level_from_name(level)
 
-        if self.growable and self.level != 0:
+        if self.growable and self.level != mdraid.RAID0:
             raise ValueError("Only RAID0 arrays can contain growable members")
 
         # For new arrays check if we have enough members
-        if (not exists and parents and
-                len(parents) < mdraid.get_raid_min_members(self.level)):
-            raise ValueError, P_("A RAID%(raidLevel)d set requires at least %(minMembers)d member",
-                                 "A RAID%(raidLevel)d set requires at least %(minMembers)d members",
-                                 mdraid.get_raid_min_members(self.level)) % \
-                                 {"raidLevel": self.level, "minMembers": mdraid.get_raid_min_members(self.level)}
+        if not exists and parents:
+            min_members = mdraid.get_raid_min_members(self.level)
+            if len(parents) < min_members:
+                raise ValueError(P_("A RAID%(raidLevel)d set requires at "
+                                    "least %(minMembers)d member",
+                                    "A RAID%(raidLevel)d set requires at "
+                                    "least %(minMembers)d members",
+                                    min_members)
+                                 % {"raidLevel": self.level,
+                                    "minMembers": min_members})
 
         self.uuid = uuid
         self._totalDevices = numeric_type(totalDevices)
@@ -2686,7 +2690,7 @@ class MDRaidArrayDevice(StorageDevice):
             self.metadataVersion = metadataVersion
 
         # bitmaps are not meaningful on raid0 according to mdadm-3.0.3
-        self.createBitmap = self.level != 0
+        self.createBitmap = self.level != mdraid.RAID0
 
         # For container members probe size now, as we cannot determine it
         # when teared down.
@@ -2742,6 +2746,9 @@ class MDRaidArrayDevice(StorageDevice):
             elif self.level == mdraid.RAID10:
                 size = (self.memberDevices / 2.0) * smallestMemberSize
                 size -= size % self.chunkSize
+            elif self.level == mdraid.LINEAR:
+                size = sum([m.size for m in self.devices])
+                size -= size % self.chunkSize
             log.debug("non-existant RAID %s size == %s" % (self.level, size))
         else:
             size = self.partedDevice.getSize()
@@ -2751,19 +2758,16 @@ class MDRaidArrayDevice(StorageDevice):
 
     @property
     def description(self):
-        if self.level == mdraid.RAID0:
-            levelstr = "stripe"
-        elif self.level == mdraid.RAID1:
-            levelstr = "mirror"
-        else:
-            levelstr = "raid%s" % self.level
-
         if self.type == "mdcontainer":
-            return "BIOS RAID container"
+            desc = "BIOS RAID container"
         elif self.type == "mdbiosraidarray":
-            return "BIOS RAID set (%s)" % levelstr
+            levelstr = mdraid.get_raid_name_from_level(self.level, alias=True)
+            desc = "BIOS RAID set (%s)" % levelstr
         else:
-            return "MDRAID set (%s)" % levelstr
+            levelstr = mdraid.get_raid_name_from_level(self.level, alias=True)
+            desc = "MDRAID set (%s)" % levelstr
+
+        return desc
 
     def __repr__(self):
         s = StorageDevice.__repr__(self)
