Linux: The Role of MD Software RAID


  • Service Provider

    Nearly every enterprise operating system, as well as hypervisor, of the last few decades has included an enterprise class software RAID system and Linux is no exception. On Linux this software RAID system is known as md which dates back to the 1990s.

    Originally standing for "mirror disk", the meaning of the name was later changed to "multiple device" to reflect the expanded and more versatile nature of the subsystem. Originally md was managed by a utility called mdctl which was replaced by the mdadm utility. The management by this mdadm utility is so common and so tightly associated with md that it is extremely common for people to confusingly refer to the software RAID layer itself as mdadm instead of md, confusing the management utility for the system that it manages.

    The md system is one of the most powerful and popular software RAID implementations in the industry and can provide RAID 0, 1, 4, 5, 6 and 10 levels natively. It is not only used traditionally in Linux servers but, by extension, in the vast variety of storage systems (NAS, SAN, DAS, etc.) that are built off of Linux and also is available on KVM and Xen virtualization products through their use of Linux as well. Software RAID is important for providing flexibility and protection options for an operating system.

    In a typical scenario, when used, the MD RAID layer sits directly on top of the physical devices and if LVM is used, LVM sits on top of MD. But, of course, because both md and LVM consume block devices (drive appearances) and expose block devices they can be used anywhere in the storage stack. So while uncommon, you can also see md RAID build on top of LVM LVs, for example.

    Also somewhat confusing is that md functionality has been integrated into LVM recently allowing the LVM management interface to manage md removing the need for the mdadm utility making it look like LVM itself is handling software RAID functionality in some cases when, in fact, it is simply managing md through the LVM management interface. And at this time, only limited md functionality is available through LVM.

    In modern systems where Linux is almost always virtualized on top of a hypervisor, the use of md and software RAID in the OS is becoming increasingly rare so md utility and knowledge are rapidly falling out of favour. But md remains useful and will remain an important system administration skill for a long time to come.

    The majority of use cases for md software RAID is building dedicated storage appliances based on Linux. On these systems, md software RAID is a totally valid competitor with hardware RAID.

    ZFS and, in the future BtrFS, implement their own software RAID functionality in addition to their own Logical Volume Manager functionality and so would not normally be used in conjunction with md RAID but in place of md RAID if software RAID was called for in the situation.

    Part of a series on Linux Systems Administration by Scott Alan Miller


  • Service Provider

    Of interesting side note, the Linux md RAID system also implements Intel Matrix RAID and DDF (Disk Data Format) software RAID formats commonly used by consumer FakeRAID systems. Because of this, Linux md can sometimes convert FakeRAID into enterprise md RAID if you really know what you are doing 🙂



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.