mdadm or LVM for software raid?

Chris Murphy lists at colorremedies.com
Thu Mar 19 21:52:19 UTC 2015


On Thu, Mar 19, 2015 at 3:25 PM, Tom Horsley <horsley1953 at gmail.com> wrote:
> I see mdadm is one cryptic way to setup a software raid
> and I saw some note somewhere that says LVM also supports
> software raid1. Any reason one is better than the other
> (or does LVM not actually do raid and I misread something)?

It's mainly about which user space tool interface you prefer: mdadm or
lvm. But about as important is the workflow. If you have a pile of
drives, even mixed sizes, and your plan is to have multiple volumes
with different kinds of redundancies (some raid1, raid5, raid6, maybe
even raid0), and/or multiple volumes being created and destroyed with
some frequency, you will prefer LVM raid because you get to define the
raid level per LV.

mdadm has more user support on linux-raid@ so if you get stuck,
chances are you're going to find a lot more help for mdadm raid than
lvm raid.

Both mdadm and lvm use the kernel md driver on the backend. So it's
the user space tools, and hence the on-disk metadata that differs.
Performance should be about the same, any kernel md bugs would affect
both mdadm and lvm raids.


> My BIOS also has some sort of Intel raid helper hardware
> thing, but I can't imagine there would be a good reason
> to use it since all the data would become nearly inaccessible
> trash if I have to replace the motherboard :-).

Intel firmware RAID uses Intel IMSM metadata, which mdadm supports
directly. The firmware reads this metadata and assembles the RAID
right away such that it gets treated as a logical device in the
pre-boot environment. Once that's exited during boot, the kernel md
driver and mdadm take over. It is possible to assemble this type of
RAID without an Intel motherboard.

If all you care about is mirroring two drives in the simplest way
possible, this is certainly very simple, and it's also dual boot
compatible.



-- 
Chris Murphy


More information about the users mailing list