Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having learned a bit about LVM mirroring, I thought about replacing the current RAID-1 scheme I'm using to gain some flexibility.

Problem is that according to what I found on the Internet, LVM is:

  1. Slower then RAID-1, at least in reading (as only single volume being used for reading).
  2. Non-reliable on power interrupts, and requires disk cache disabling for prevention of data loss.

Also it seems, at least to several setup guides I read (, that one actually requires a 3rd disk for storing the LVM log. This makes the setup completely unusable on 2 disks installations, and lowers the amount of used mirror disks on higher amount of disks.

Can anyone comment the above facts, and let me know his experience of using LVM mirroring?


share|improve this question
up vote 4 down vote accepted

I've never used LVM mirroring, but the info you've dug up seems reasonable from what I know of LVM. I'd stick with MD RAID-1, myself.

share|improve this answer

Write cache disabling is always required if you want to minimise the chances of data loss when you have a power cut. It doesn't matter if you have md RAID, LVM, or nothing at all. Your drive can have 16 - 64 MB in the cache on a modern device, and it will dissapear.

Unless you value speed over correctness, I'd switch write caching off on drives.

Barriers are a kernel techniue to try and improve the chances of data getting to disk. Up until 2.6.29 LVMs ignored them. Now LVM honours barriers (if and only if you have a linear target and a new enough kernel) so if you want the flexibility of LVM and barrier support your best bet is barrier-on-md RAID.

share|improve this answer

LVM mirrors are for replication of a logical volume to a different physical volume. It's essentially meant to "move the data to a different disk". The mirror is then broken and the old location of the data freed for use; the existing data is utilized at the new location instead.

RAID mirrors are for providing a safeguard against single-drive hardware failures. It's essentially meant to "keep your data from being lost if a disk dies".

Stick with RAID over LVM mirroring for your purposes.

share|improve this answer

one actually requires a 3rd disk for storing the LVM log

In one setup I partitioned a disk into one main physical volume and another tiny physical volume for the LVM log. If I ever lost that disk I would of course lose the mirror log, but that's OK because when the volume degraded to unmirrored it would no longer need the log.

share|improve this answer

New versions of LVM can use the same raid implementations from MD.

Browsing the history, raid4/5/6 seems to appeared in the kernel in 2.6.38 and raid0/1 sometimes between that and 3.1

Supported also from RHEL 6.1 (raid0/raid1) and from RHEL 6.3 (raid4/5/6)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.