LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mdadm - raid5 (https://www.linuxquestions.org/questions/linux-server-73/mdadm-raid5-716685/)

jsemon 04-03-2009 07:42 PM

Mdadm - raid5
 
Hey guys, I've got a little bit of confusion. I have a CentOS 4.7 server that I have rebuilt and that previously had raid 1. I have now purchased 4 new drives and want to use raid 5 with a hot spare.

I booted with a liveCD and created the raid 5 array using:
Code:

#mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc
#mdadm --add /dev/md0 /dev/sdd

I did this using the block devices instead of creating partitions. I then issued the command
Code:

#dd if=/dev/sde of=/dev/md0
Thus my partitions will be created on my raid 5 array that were previously on my raid 1 array.

Now, dd is still running so I'm not even sure how the partitions will look after it is done.

So my question is, will this work? Will this create issues with GRUB? My motherboard doesn't support raid other than 0 and 1.

Will I have to use any tricks to make this work if it will work at all.

chrism01 04-04-2009 06:45 PM

So what happened? Personally I'd go with cp -r instead. dd is a block by block copy. You'd be better off letting the new raid sort that out for itself.
Looks like you're using SW raid, so the M/B issue is irrelevant.

BTW, you can add the spare on the same cmd line
Quote:

-x, --spare-devices=
Specify the number of spare (eXtra) devices in the initial
array. Spares can also be added and removed later. The number
of component devices listed on the command line must equal the
number of raid devices plus the number of spare devices.


All times are GMT -5. The time now is 02:17 PM.