Cloning CentOS to different RAID arrays

Hi all,

I've been handed an odd situation.  We have Dell R420 servers with four drives.  For what we're up to, we want to have separate installs of CentOS on all four drives.  However, the servers were ordered with an integrated PERC H710 RAID controller, which doesn't allow for direct pass-through of the drives (confirmed in a call with Dell).  The closest we can get to having the single drives is a single disk RAID 0 array.

When it comes to copying our template CentOS install, the RAID configuration seems to knock out the possibility of using tools like dd or clonezilla, given that they're seen afterward by the RAID controller as foreign and have to be initialized.  Due to administrative hurdles, returning the servers for ones without the RAID isn't on the table.

Our current method is to install CentOS on each drive and then do an rsync, but the logical volume structure isn't re-created in this, and we have to tweak it.  Anyone have any ideas on a less painful way to copy these installs?  The hardware is the same all around.

Thanks for any help.
Who is Participating?
DavidConnect With a Mentor PresidentCommented:
All you need to do is boot to a USB stick running Centos (that has the PERC drivers), then dismount the volume, and do a dd from the /dev/sdb  (or whatever, but the stick will usually be /dev/sda)  to a target file or device on a network. You want to use the /dev for the logical volume(s) presented by the controller.

This works, I assure you. Verify yourself by mounting the RAID volume(s) in read-only mode. If you can do that, you can copy the raw device that is used as the mount point.

You can do the opposite to copy to the new array. Just build & format the new target LUN first.  You can even do a background initialization while you restore, but just make sure the target lun has been built and the raw device is visible.

When the copy completes, us partition magic or any other native partitioning to adjust the sizes to use 100% of the new space.
In fact, you could even speed things up a bit.  After you create the first clone on one of the 4 HDDs, and after you tell the controller to create the 3 additional RAID0 volumes, then make sure the 1st HDD you built is dismounted, and then you can do  

(I assume the 1st RAID0 is /dev/sdc, and the others are /dev/sdd,e,f

for i in c d e
 echo starting /dev/sd$i
 dd if=/dev/sdc of=/dev/sd$i bs=64k &
echo "all done"
wonderlusAuthor Commented:
Thank you for assuring me on dd.  Yes, this did work, someone else had attempted the dd, I had taken his word for the rest.  Using the Dell OMSA CentOS disk I was able to write to the disk without any issues and the image booted without error.

Thanks again!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.