[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM RAID5 with missing disk?



On 04/12/14 12:51 PM, Dan Ritter wrote:
On Thu, Dec 04, 2014 at 02:13:59PM +0100, mad wrote:
Hi!

I wanted to create a RAID5 with lvm. The basic setup is something like

lvcreate --type raid5 -i 2 -L 1G -n my_lv my_vg

which would mean 3 physical drives would be used in this RAID5. But can
I specify that one drive is missing as it is possible with mdadm?
I don't think so, no. You can create your RAID with mdadm and
put LVM on top of that.

In general I strongly recommend against using RAID5. RAID1, 10,
or 6 are all better options if your data's availability is
important to you.

-dsr-

Sorry, but there are good reasons to use RAID 5 and better reasons to NOT use RAID 10. RAID 1 and RAID 5 are both immune to single disk failures in their most common configurations (1 or more data disks with 1 parity disk). RAID 10 is also immune to single disk failure but uses half the disks for parity.

If you are concerned about availability, with 4 disks (the simplest RAID 10 configuration) RAID 6 gives you the same data capacity with immunity to two disk failures and can increase capacity by 50% simply by adding another disk. You need 6 disks to get the same capacity with RAID 10 while with 6 disks, RAID 6 will give you double the capacity of 4 disks or get you immunity to 3 disks failing.

Moreover, while a RAID 10 array can sometimes survive 2 disk failures, if it's the wrong 2, you are screwed. For example if A+B are mirrored by C+D, RAID 10 won't survive an A & C fail or a B & D fail, but will survive A & D or B & C failing.

RAID 0 and RAID 10 are used only when write performance is important. Read performance is generally better with any type of RAID. Since in most cases you are doing a lot more reads than writes, you are unlikely to notice much difference between RAID varieties. If you need RAID 10, you probably also need some high-performance hardware RAID controllers.

Of course, I don't know your situation, but for me, data integrity is important but so is capacity, so I use with RAID 5. I have the luxury of being take the server offline or shut down the GUI on my workstation, both of which use RAID 5, so that an array rebuild can proceed rapidly.

Just don't ignore smartctl errors. When you get a failing disk, replace it immediately.



Reply to: