1

Is there any overhead for LVM over RAID, and if yes, how much it impacts the performance?

Also, how reliable such setup is?

Regards.

SyRenity
  • 3,159
  • 11
  • 55
  • 79
  • I'm not with you sorry, LVM can act as a software RAID provider - do you mean you want to use LVM on top of another software RAID system? – Chopper3 Sep 23 '09 at 16:06
  • I would assume he's talking about setting up software RAID using md and then building a LVM on top of it. – Aaron Brown Sep 23 '09 at 17:39
  • Indeed, that what I meant back then. In the end I used only RAID, which surprisingly worked well for my usage scenario (DRBD + VM). – SyRenity Dec 28 '09 at 21:01

4 Answers4

5

The overhead of LVM on RAID is no more than the overhead of LVM on any other block device. By all accounts it is fairly minimal. If you're just planning to use a RAID 0 or RAID 1, you might want to think about doing striping or mirroring LVM instead. It's one less layer to manage and the LVM method provides more flexibility should you decide to change the way your data is laid out on disk in the future.

Kamil Kisiel
  • 11,946
  • 7
  • 46
  • 68
4

I have setup RAID with mdadm on many systems, and then put lvm on top of that. It performs fine for what I was expecting and has been reliable. I have never played around with using LVM by itself for striping or mirroring.

I don't know how up-to-date this information is, but from what I read on these pages, it appears that a mirror made with LVM is not entirely safe in the case of a power loss. A

Anybody can turn on barriers if they are willing to take the performance hit. Unless, of course, their filesystem is based on an LVM volume (as certain distributions do by default); it turns out that the device mapper code does not pass through or honor barriers.

Either way I do suggest that you put your system on a UPS if their will be any important data on the drive.

If you are really worried about performance it might be easier to just set up a test system both ways and see what works better.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • See http://serverfault.com/questions/279571/lvm-dangers-and-caveats for more coverage of LVM issues with write barriers and write caching - it is possible to run LVM safely when there is power loss, but some care is needed. – RichVel Jun 16 '11 at 13:40
3

I run quite a few servers with LVM on top of software RAID6 - for our workloads (NFS file serving, lots of largeish files) - it doesn't make much of a difference in performance - I've benchmarked it but can't recall the numbers off the top of my head.

Reliability wise, I haven't had any issues. You may need to adjust the filters in /etc/lvm/lvm.conf to include your mdX RAID devices and exclude your physical disks.

James
  • 7,553
  • 2
  • 24
  • 33
0

software raid using LVM does use CPU cycle compare with hardware raid, but i have not notice any problem with any of the server i manage. the flexibility of LVM will be much appreciated when you are doing stuff like patch update remotely. if you have hardware raid you will go into the datacenter to plug out on the the mirror and plug in after patching complete and system is verified. if you use LVM raid you can unmirror the volume patching using live upgrade for solaris or create a alternate boot for AIX and them mirror back when patching completed.

Robert
  • 241
  • 2
  • 4
  • 7