Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By the definition definition of RAID 5, it requires minimum of 3 disks (excluding spare disk) for its configuration. RAID-5 is nothing but RAID-0 with distributed block level parity.
Now, if I try to create RAID 5 with the following command:
It still goes ahead and creates a RAID 5 with just two disks.
That means it is using one disk of writing data & other for parity. Is this right? Shouldn't mdadm fail, when we provide only 2 disks to create RAID-5?
Though it keeps intact other raid-5 configuration. Say, if I have spare disk & any one of the 2 disk is gone bad the spare disk is added to raid to maintain its clean status.
Just want to know whether mdadm should fail of not, while creating RAID-5 with 2 disk. If no, then the very definition of RAID-5 is contradicted.
I think Raid 5 need minimum 3 disks. if any one fail it start write the parity in the memory. It is applicable for harware-raid controller while that time the performence will go down while you reboot again in the boot up again it will start to regenerate parity. i think for sw/raid also it's doing the same thing only.
Quote:
Originally Posted by amitpardesi
Hi,
I am using mdadm to emulate s/w raid on my system.
I am trying to create a RAID 5 configuration on my system. I have 4 disks, each of X GB, with me. I can create a raid 5 by the following command:
By the definition definition of RAID 5, it requires minimum of 3 disks (excluding spare disk) for its configuration. RAID-5 is nothing but RAID-0 with distributed block level parity.
Now, if I try to create RAID 5 with the following command:
It still goes ahead and creates a RAID 5 with just two disks.
That means it is using one disk of writing data & other for parity. Is this right? Shouldn't mdadm fail, when we provide only 2 disks to create RAID-5?
Though it keeps intact other raid-5 configuration. Say, if I have spare disk & any one of the 2 disk is gone bad the spare disk is added to raid to maintain its clean status.
Just want to know whether mdadm should fail of not, while creating RAID-5 with 2 disk. If no, then the very definition of RAID-5 is contradicted.
In reality, the first command creates a raid 6 array, which does not really make sense when you have 4 drives total. if that setup gives you the space you need, it is probably safer to use raid10, for better redundancy. raid5 basically combines the speed of striping with the security of mirroring. unless your drives are old and likely to fail soon, (and if so, why do you use them for trusted storage) there is probably no need to keep a hot spare.
did you try to create a 2-disk raid5 array, or is it a question. my guess is that mdadm would either create a degraded 3-drive array or fail.
with only 2 drives you do NOT have a RAID 5 array, no matter whether mdadm complained or not.
If you want to have fault tolerance and only have 2 drives then setup a RAID 1 array.
Normally the array will be started after it is assembled. However if
--scan is not given and insufficient drives were listed to start a com-
plete (non-degraded) array, then the array is not started (to guard
against usage errors). To insist that the array be started in this
case (as may work for RAID1, 4, 5 or 6), give the --run flag.
Thanks everyone for posting your thought with your valuable time.
I got the answer that I was looking for.
Special thanks to 'farslayer' for pointing out the ubuntu forams list where similar discussion has already taken place. This made the picture clearer for me.
if each disk is 500GB (like mine) then RAID5 gives 1.5TB space where RAID10 gives 1TB
as im more instersted in the size avalable and speed increace that stripinfg gives but am not prepared with the one drive fails you loose everything aspect of RAID0
5 was the obvious choice at least that can withstand 1 of 4 failing without loss (but 2 failing kills the whole array) whereas with 10 one can fail, or 2 but not any 2
SQL recommends a RAID 10 Array for high performance databases because it outperforms RAID 5 for that application.
The RAID level you choose will depend on what you plan to use the array for.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.