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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.