1

I have a CentOS server, and I want to create an exact copy of it. The device has a single 128MB drive mounted as /boot. I then have a 4 drive Software Raid 5 array, with 2 Logical Volumes on it. First Logical Volume is mounted at /, and the second is the swap. I need to be able to image the /boot drive, and then whole / Logical Volume. I was thinking I could use gparted and partition the new server and create the Logical Volumes. But I am not sure how I would then even restore

I have copied the contents of my raid setup, my partition setup, and LVM information to a pastebin to save space.

Pastebin

I am really clueless on this and have read most of the posted in the 'related' questions and nothing seems to be specific to this. Any help or guidance would be great.

2
  • Is the hardware platform designated for the restore process identical to the harware platform on the source?
    – Sean C.
    Mar 29, 2011 at 18:22
  • Yes. They are the exact same hardware. Sorry for not including that.
    – Justin S
    Mar 30, 2011 at 12:48

1 Answer 1

2

If the kernel you're currently using to run the source server contains all of the drivers required to run the hardware on the destination server then the process isn't too painful. Start by using tar to create archives of your partitions and then store them in a accessible location (removable media or nfs server).

Boot another server with a live distro. Create the partitions you want an untar the archives to those partitions. Install grub to the MBR of the boot device. That's it.

If the server has different hardware or requires drivers for a different boot device, you'll need to compile a kernel for this to work, but, you'd have to do that anyway if you use imaging software and attempt to restore to mismatched hardware.

Nutshell: Restore partitions > Make /boot bootable (install grub) > Compile new kernel and make available to Grub (only if necessary) > done.

2
  • The servers are the exact same hardware wise. I will give this a go. Thanks.
    – Justin S
    Mar 30, 2011 at 12:47
  • One thing worth noting. It is important that you verify your /etc/fstab to make sure your partition mount points are correct. Ideally do this before you reboot :) (i.e. make sure that the /dev/sdX matched up with the correct mount points). You can also use the /etc/fstab from the source server as a guide when designing your partition layout on the new server to make sure the device nodes are the same.
    – Sean C.
    Mar 30, 2011 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .