RAID devices are virtual devices created from two or more real
block devices. This allows multiple devices (typically disk
drives or partitions thereof) to be combined into a single device
to hold (for example) a single filesystem. Some RAID levels
include redundancy and so can survive some degree of device
failure.
Linux Software RAID devices are implemented through the md
(Multiple Devices) device driver.
Currently, Linux supports LINEAR
md devices, RAID0
(striping),
RAID1
(mirroring), RAID4
, RAID5
, RAID6
, RAID10
, MULTIPATH
,
FAULTY
, and CONTAINER
.
MULTIPATH
is not a Software RAID mechanism, but does involve
multiple devices: each device is a path to one common physical
storage device. New installations should not use md/multipath as
it is not well supported and has no ongoing development. Use the
Device Mapper based multipath-tools instead.
FAULTY
is also not true RAID, and it only involves one device.
It provides a layer over a true device that can be used to inject
faults.
CONTAINER
is different again. A CONTAINER
is a collection of
devices that are managed as a set. This is similar to the set of
devices connected to a hardware RAID controller. The set of
devices may contain a number of different RAID arrays each
utilising some (or all) of the blocks from a number of the
devices in the set. For example, two devices in a 5-device set
might form a RAID1 using the whole devices. The remaining three
might have a RAID5 over the first half of each device, and a
RAID0 over the second half.
With a CONTAINER
, there is one set of metadata that describes all
of the arrays in the container. So when mdadm creates a
CONTAINER
device, the device just represents the metadata. Other
normal arrays (RAID1 etc) can be created inside the container.