LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Setup RAID 5 + 1 spare disk (https://www.linuxquestions.org/questions/linux-general-1/setup-raid-5-1-spare-disk-824211/)

Laodiceans 08-04-2010 05:14 PM

Setup RAID 5 + 1 spare disk
 
I want to build a 6xSATA RAID 5 system with on of the disks as spare disk. I think this give me a chance of 2 of 6 disks failing without losing data. I am right?

Hardware: Intel ICH10R


First I will creat a 3xSATA RAID 5, after I will add the spare disk and after that I will add the others disks.

This is what I think I should do.

Step 1:
  • Create RAID Device

Code:

mdadm --create --verbose /dev/md0 --metadata 1.2  --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
I read that "--metadata 1.2" is the best option. It is true?
  • Create filesystem on the RAID device

Using this method of calculation:

* chunk size = 128kB (for RAID 5)
* block size = 4kB (recommended for large files, and most of time)
* stride = chunk / block = 128kB / 4k = 32kB
* stripe-width = stride * ( (n disks in raid5) - 1 ) = 32kB * ( (5)- 1 ) = 32kB * 4 = 128kb


Then:

Code:

mkfs.ext3 -v -m .1 -b 4096 -E stride=32,stripe-width=128 /dev/md0

Step 2:

Add spare-disk

Code:

mdadm --add /dev/md0 /dev/sdd1
Is this enough?


Step 3:

Adding disks:

Code:

mdadm --add /dev/md0 /dev/sde1
mdadm --grow /dev/md0 --raid-devices=4

fsck.ext3 /dev/md0
resize2fs /dev/md0

Any help will be useful.
Thanks!

XavierP 08-05-2010 03:17 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 06:09 AM.