Andrew Fecheyr-Lippens
CAC Actividad 6
Andrew Fecheyr Lippens CAC: Actividad 6 18 November 2009
CLONEZILLA Brief description Clonezilla is a free (GPL) software disaster recovery, disk cloning and deployment solution. It is very useful in a clustering environment for it’s massive disk cloning over multicast with PXE booting. Which means that it can be used to copy one Linux installation to multiple computers in a short amount of time. Clonezilla does smart copying for supported partition types, which means it only copies blocks that contain data. On unsupported partitions it will copy every block. There are two version of Clonezilla: a the server edition (SE), for PXE based cloning, and a LiveCD/ USB version for local backup/restore. General features • Filesystem supported: ext2, ext3, ext4, reiserfs, xfs, jfs of GNU/Linux, FAT, NTFS of MS Windows, and HFS+ of Mac OS. It can clone GNU/Linux, MS windows and Intel-based Mac OS, no matter if it's a 32-bit (x86) or 64-bit (x86-64) OS. For these file systems, only used blocks in partition are saved and restored. For unsupported file system, sector-to-sector copy is done by dd in Clonezilla. • LVM2 under GNU/Linux is also supported. • Multicast is supported in Clonezilla SE, which is suitable for massive cloning. You can remotely use it to save or restore a bunch of computers if PXE and Wake-on-LAN are supported on the clients. • Clonezilla can save and restore partitions and/or whole disks. • By using drbl-winroll (free software from the same developers) the hostname, group, and SID of cloned MS windows machine can be automatically changed.
Pros
Cons
Multicast restore/cloning is very useful for clusters with a lot of nodes
No ‘real’ GUI available
Relatively easy to use
Not a complete solution like OSCAR
Smart copying for supported partition types → fast copy and restore
Does not configure software packages after restoring an image/clone
No enterprise support
LiveCD/USB available Free and OpenSource
1 of 5
Andrew Fecheyr-Lippens
CAC Actividad 6
Installation Procedure For these installation instructions we are going to install Clonezilla SE on a Debian installation. In a cluster environment this should be done on the master node. After the installation of Clonezilla SE, a ‘model’ node can be used to create the image for cloning to all the other nodes. 1. Installing Clonezilla SE First we import the GPG key of the DRBL (Diskless Remote Boot in Linux) and Clonezilla repository: wget -q http://drbl.sourceforge.net/GPG-KEY-DRBL -O- | apt-key add -
Then we add the DRBL/Clonezilla Debian repository to /etc/apt/sources.list... echo “deb http://drbl.sourceforge.net/drbl-core drbl stable” >> /etc/apt/sources.list
Update the apt database apt-get update
Now we can install DRBL and Clonezilla with the following command: apt-get install drbl
Then we run this script to configure DRBL and Clonezilla (you can use the default values) /opt/drbl/sbin/drbl4im
2. Creating the ‘model’ image To create an image, we first start Clonezilla on the Debian system and tell it to store an image (the server will then wait until a client connects to store the new image). Afterwards we boot the client system of which we want to create the image from the network. Run this on the Debian server and select “All Select all clients”: /opt/drbl/sbin/dcs
Next pick “Clonezilla-start Start_Clonezilla_mode”.
2 of 5
Andrew Fecheyr-Lippens
CAC Actividad 6
Choose “save-disk Save client disk as an image”. Select “Later_in_client Later input image and device name in client” (you will then be prompted for an image name later on the client, instead of having to provide an image name now) On the next two screens you can simply press ENTER to select the default values. Select the action when the client finishes cloning (We want to reboot the client after the image has been created, so we select “-p reboot”) Press ENTER again on the next two screens to accept the default values. Press ENTER again when the system goes back to the command line (non ncurses).
The server is now ready. Start the client system that you want to clone. It is important that you boot it from the network (via PXE). After you've configured the client to boot from the network, you should see a DRBL boot menu. Select “Clonezilla: save disk (choose later) as image (choose later)”:
3 of 5
Andrew Fecheyr-Lippens
CAC Actividad 6
Provide a name for the image and select the source hard drive to clone. The image will now be created and transferred to the Clonezilla server. 3. Setup the server for cloning/restoring of the ‘model’ image To clone (or restore) the image to other nodes, run the following command on the Clonezilla Server. /opt/drbl/sbin/dcs
Select “All Select all clients” Select “Clonezilla-start Start_Clonezilla_mode”. This time choose “restore-disk Restore an image to client disk”.
You can customize the image restore process in the next few screens, or accept the reasonable defaults by pressing ENTER. When you see the following screen pick “multicast multicast restore”.
After this you can choose to wait a certain amount of time or select the number of clients you want to restore the image to. When the ncurses ‘wizard’ finishes you can press ENTER twice after reading the warnings/info.
4 of 5
Andrew Fecheyr-Lippens
CAC Actividad 6
4. Booting the nodes for cloning Now power on the other clients/nodes. Make sure they are configured to boot via PXE. In the boot menu, select “Clonezilla: multicast restore�.
The cloning process will then begin
When the cloning is finished, the Clonezilla server will be notified and the client will reboot (if you choose that behavior). If all goes well, the computer should reboot into the cloned operating system.
Other function: Clonezilla Live Clonezilla also offers a Live CD/USB version which can be used for making a backup image of the Master node and to restore it. Clonezilla Live allows a user to clone an individual machine. A particular partition or entire disk can be cloned to another medium. This can be saved as an image file or as a replicated copy of the data. The data can be saved to locally attached storage, an SSH server, Samba Server or a NFS file share and then restored at a later date. Clonezilla requires no modification to the machine as the software runs in its own environment.
5 of 5