Friday, December 31, 2010

What is better LVM on RAID or RAID on LVM?

SkyHi @ Friday, December 31, 2010

QUESTION:

I currently have LVM on software RAID, but I'd like to ask you what you think it is better solution, maybe some pros and cons?



Edit: It is about software raid on lvm or lvm on software raid. I know than hardware raid is better if we are thinking about performance.

ANSWER:

1.You're current setup is like this:



<code>| / | /var | /usr | /home  |
--------------------------
| LVM Volume |
--------------------------
| RAID Volume |
--------------------------
| Disk 1 | Disk 2 | Disk 3 |
</code>


It's a much simpler setup with more flexibility. You can use all of the disks in the RAID volume and slice and dice them whatever way you like with LVM. The other way isn't even worth thinking about - it's ridiculously complicated and you lose the benefits of LVM at the filesystem level.



If you tried to RAID LVM volumes, you're left with a normal device without any of the LVM volume benefits (e.g. growing filesystems etc.)


2.have hardware raid and you can have lvm on top - best combination.

3.Your current setup is fine. This is the recommended way to do it.



Raid deals with keeping the bits secure/redundant/fast/whatever and LVM helps you present them in a esasy to use way.


REFERENCES
http://serverfault.com/questions/217666/what-is-better-lvm-on-raid-or-raid-on-lvm