View Full Version : Linux software RAID-1 cloning to another system?

21-03-2010, 02:03 PM
Hi all,

So I've got a "Master" fileserver that I've put Software RAID-1 on.

Both drives I partitioned with a /boot, / & SWAP, each partition is software RAID-1.

What I've been asked to do is pull the secondary HDD out of the Master server (Which I have sitting on the workbench here next to me) and then clone everything off that onto a Slave server in an identical configuration (With the only difference being networking)

What's the best way to go about this? Should I simply use SelfImage or DD and go from the Master Drive-2 to both the Slave Drive-1 & Drive-2? Or is there another way that I should be reinstalling grub and then making it "repair" the RAID onto the other two disks? I've never done grub on RAID before :-/

Any thoughts much appreciated



21-03-2010, 03:16 PM
1. Last time I looked GRUB did not support software RAID - it will boot from a single drive, and then the kernel will take over and initialise the array.

2. Use dd if you want to make life really easy (although slightly slow), or tar if you want quick but requiring some config afterwards.

3. If using dd to clone a drive, use 'bs=32K' (32K is the optimal setting for most drives I've come across) - it'll run a hell of a lot faster. This tells dd to copy in 32K blocks (bs == block size).

21-03-2010, 03:40 PM
OK thanks, might use DD then.

Hmm I wonder how Grub is configured then. Unfortunately I can't ssh in and see how I set it up (Just let the installer do its thing).

I should note that it's running debian, doubt it makes a difference though ;)

22-03-2010, 09:35 AM
This looks useful: