Linux – Redundancy: LVM+mdadm or LVM internal RAID

linuxlvmmdadmsoftware-raid

The task is to create LVM storage for virtual machine images. So LVM will be used in any case.

There are two ways LVM providing redundancy:

  1. block mirroring

    lvcreate -m 1 –mirrorlog mirrored -n logical_volume -L 50G vg0

  2. internal RAID mechanism

    lvcreate –type=raid1 -n logical_volume -L 50G vg0

Second way should provide reading performance boost.

As alternative we can create raid1 with mdadm and use Linux Soft Raid device as physical volume for LVM.

Which way is better and why?

Best Answer

mdadm raid is better for raid1 and on top of that you can put lvm for flexibility. Lvm has problems when a disk goes bad, mdadm is the tried and proved solution for raid1.

Related Topic