[kwlug-disc] Cloning a physical server

Khalid Baheyeldin kb at 2bits.com
Fri Jul 16 22:56:02 EDT 2010


On Fri, Jul 16, 2010 at 10:39 PM, Rashkae <rashkae at tigershaunt.com> wrote:

> 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.
>

Thanks!

Yes, the server is Hardy (previous LTS).

I realize that I can edit the file and remove eth0 (which will have the MAC
address for the old server's hardware), and then rename eth1 to eth0.

I forgot about the UUID, thanks for reminding me of it.

What I am trying to do is do all this in a clean way with minimal trial and
error rather than fixing things one by one.

I don't mind the manual steps as long as there is a comprehensive list
beforehand.
-- 
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100716/892a5d50/attachment.htm>


More information about the kwlug-disc mailing list