[kwlug-disc] Cloning a physical server
rashkae at tigershaunt.com
Fri Jul 16 22:39:50 EDT 2010
Khalid Baheyeldin wrote:
> Time to upgrade a server via the proverbial forklift operation: a new server
> comes in, and need to copy the existing server to it before
> de-commissioning/re-purposing the old server.
> Normally, on a regular LAMP server, it would be an opportunity to clean
> things up by doing a fresh install and configuring the few bits that need to
> be done manually, then just copying the data portion(s).
> In this case, this server is quite complex and has been running for several
> years with lots of stuff on it, not just LAMP. Therefore a fresh install is
> less desirable.
> Normally, if the hardware is similar, it is a no brainer: just use dump on
> the old server and restore on the new one, and you are done.
> The old concerns about /dev no longer apply, because now it is a dev is a
> tmpfs so it is not backed up by dump. However, in this case the hardware is
> a bit different, and therefore I am concerned about things in udev, modules,
> ...etc. being restored over from the older server's dump. That would
> overwrite configurations for devices such as MAC addresses and such. For
> modules, there could be differences too.
> Is this concern valid? Or should I just copy over everything and not care
> much? What about udev and modules in that case?
> This is Ubuntu, so Debian advice will work too.
> Generic non-distro-specific advice welcome too (e.g. you used cpio instead
> of dump/restore).
> Thoughts? Ideas?
Assuming the hardware is supported by the old kernel, most* things will
just work. If the hardware is *not* supported, then you have problems.
Leaving aside for a moment hardware compatibility, the things you have
to look out for are changing hard drive references, (if using UUID to
mount filesystems, then you have to update fstab with any new UUID's for
filesystems you create) and persistent network device names. (This is
where the MAC address issue becomes a concern. Assuming your server is
Hardy (you didn't specify), you will have to manually update
/etc/udev/rules.d/70-persistent-net.rules to assign eth0 eth1 etc. to
the interfaces you want.
More information about the kwlug-disc_kwlug.org