Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I've done software RAID0 and RAID1 on my webserver before, but now I'm setting up a fileserver with RAID 5. When creating my software RAID, I get the following output:
Code:
raid5: raid level 5 set md1 active with 2 our of 3 device, algorithm 2
mdadm: /dev/md1 has been started with 2 drives (out of 3) and 1 spare.
Is that correct? Shouldn't it start with 3 drives? I only have 3 drives and I though that was the minimum for RAID5 (and this only appears to be using 2...).
The array is 3 1TB SATA drives, and the RAID5 array does regester as being 1.8TB, so I'm not really sure what to think. Is what I got above normal? Any help for the RAID5 noob would be appreciated!
I've done software RAID0 and RAID1 on my webserver before, but now I'm setting up a fileserver with RAID 5. When creating my software RAID, I get the following output:
Code:
raid5: raid level 5 set md1 active with 2 our of 3 device, algorithm 2
mdadm: /dev/md1 has been started with 2 drives (out of 3) and 1 spare.
Is that correct? Shouldn't it start with 3 drives? I only have 3 drives and I though that was the minimum for RAID5 (and this only appears to be using 2...).
The array is 3 1TB SATA drives, and the RAID5 array does regester as being 1.8TB, so I'm not really sure what to think. Is what I got above normal? Any help for the RAID5 noob would be appreciated!
As a rule, RAID5 puts disks into an array, with one drive kept as an online spare. If one of the disks in the array fails, the online spare will spin up, and the array keeps going. When you replace the failed drive, the array will stripe the data back to the new primary unit, and take the spare back offline, ready for the next failure.
I only have 3 drives and I though that was the minimum for RAID5 (and this only appears to be using 2...).
Yes it must have minimum three drive.
If your box can't start all three it means that the third drive data build up from the another two.
So check the configuration cause something is wrong.
When you setup a raid 5 and you have more than 3 disk the raid software or hardware whatever, will ask you that "do you want to put the last disk into a spare disk?" or something like that.
So this was not a choice in your case because you don't have 4 or more disk.
I always though one disk held the parity bits while the others held the data. Is that what the 'spare disk' is?
No, the spare disk is just for the case when a disk from the array goes down. When this occur the spare disk will spin up then will start build up the array from the another disks.
I don't think it should even be able to build a RAID5 without three disk... which is why I'm so curious... I'm going to way for it to finish generatin the RAID and see what happens. I might simulate a failure by unhooking one of the disk (I could try this on all disk...) and see if I can recover the RAID. If I'm not getting the security I need, the I might as well have a 3TB RAID0...
I also just got some more info...
Code:
mdadm --misc --detail /dev/md0
...
Number Major Minor RaidDevice State
0 8 4 0 active sync /dev/sda4
1 8 20 1 active sync /dev/sdb4
3 8 36 2 spare rebuilding
Its 67% done, so I'm hoping to have more info tomorrow. Thanks guys for the help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.