|
Apr 22
2009
|
System CloningPosted by: Steve Stringer in Infrastructure on Apr 22, 2009 |
|
Whether you are rolling out desktops or working with clustered nodes, cloning is a great way to ensure that your systems are as closely matched as possible. Cloning produces a better result than performing the same OS install time and time again, and if done correctly, saves masses of time.
As part of my job I often need to install Linux for a clustered application on up to 28 nodes. Naturally I wanted to find a way to clone a 'gold' system to reduce the amount of time I was spending on these builds.
An easy way to clone a Linux system is use the applications dd and netcat together. Booting the source and target nodes from a live Linux distribution you can use dd with netcat to take a complete block copy of the hard disk or disks of the source node to the target node. The approach has some major drawbacks. Firstly this is a one to one operation, you must repeat this operation for each node. Secondly you are cloning at the block level. So if you have a 100GB boot disk with only 2GB in use, dd will copy 2GB of data and 98GB of zeros. However, this solution does not require complex setup and live Linux distributions are generally free.
A smarter approach is using commercial software like Norton Ghost. Norton Ghost is file system aware. This means that unlike dd, you will only clone real data rather than free space as well. Norton can also clone to different size disks than the source, dd cannot do this. In addition Norton Ghost can multicast clone, so you can clone many targets at once. However, Norton Ghost is a commercial licensed software product. Unlike using dd and netcat, you need to pay to use it.
Clonezilla is part of the DRBL (Diskless Remote Boot in Linux) project and is a way of using existing open source software to clone systems. Clonezilla, like Norton Ghost, is file system aware and supports multicasting. Clonezilla supports the cloning of both Windows and Linux systems. To use Clonezilla you need to install DRBL. DRBL needs be installed on a Linux system and for best performance you will need multiple network adapters. I have easily installed DRBL on Ubuntu Desktop 7.1 with no trouble at all. After the initial configuration (which can be tricky, so make sure you read the online documents) Clonezilla uses PXE to boot a remote blade to create an image back on the Clonezilla server. To distribute this image Clonezilla boots all the target nodes using PXE and can use either UDP multicast or broadcast to send to data to all nodes. Best of all DRBL and Clonezilla are both GPL projects, making them entirely free to use. The downside to this is that if you run in to problems, you will need to hit the support forums and read me files. However my experience has been that Clonezilla work straight out of the box and does exactly as it claims.
In conclusion if you do not want to set up any software or do not have a system to installing cloning software on to you will probably need to use netcat and dd. If you want to use server based cloning software, need support and can justify the cost, Norton Ghost could be right for you. Finally if you are already familiar with Linux and want to avoid the licensing costs of commercial software then give Clonezilla a try.
For extra information on the solutions mentionedplease look up the following websites.
dd http://en.wikipedia.org/wiki/Dd_(Unix)
netcat http://en.wikipedia.org/wiki/Netcat
Norton Ghost http://www.symantec.com/norton/ghost
Clonezilla http://clonezilla.org/
In my next blog I will be sharing my own tips for cloning SuSE Enterprise Linux Server.









