Cloning with Clonezilla

Before you actually start cloning, you need to do three things. One, get all the cluster MAC address and put them in a file, which I will assume has been given the name cluster_macs.txt, although you might want to name it after the specific cluster in someway. Copy this file to the Clonezilla machine. Also, the head node of your cluster needs to be turned off during this whole process, and its golden node needs to be turned off at the beginning with a monitor plugged in (a keyboard should be optional).

Then, ssh into the Clonezilla machine. Run sudo /opt/drbl/sbin/drblpush -i. This will lead you through a bunch of interactive prompts.
 * The DNS domain name and the NIS/YP domain name should both be the name of your cluster head node.
 * The client hostname prefix should be the name that goes before &quot;01&quot;, &quot;02&quot;, et cetera on your nodes: for us, it was the same as the cluster name.
 * Say No to collecting the MAC addresses,
 * Yes to the same address each time
 * Enter the name of the file with your MAC addresses, which we named cluster_macs.txt.
 * The initial number for the last set of digits is indeed one, the default. Confirm that.
 * Pick 2 for no diskless Linux service to client
 * Pick 1 for clonezilla box mode
 * Pick default directory for saved image
 * No password for pxe
 * No for boot prompt
 * No to graphical login screen
 * No to NAT server
 * Default for keeping the old settings
 * Yes to override firewal

Then, run the command sudo /opt/drbl/sbin/dcs. For anything unmentioned, use defaults. Tell it to select all the clients, pick &quot;Clonezilla start&quot;, &quot;Expert mode&quot;, &quot;Save disk&quot;, and the disk image you named in the previous paragraph. Pick &quot;-fsck-src-part&quot; &quot;Interactively check and repair source file system before saving&quot; option. Choose an appropriate image name at that prompt. Tell it to power off after netbooting at that prompt.

Next, turn on the Golden Node, with a monitor (but not necessarily keyboard) plugged in. It will netboot from Clonezilla (assuming you have it set to netboot by default). On the Clonezilla machine, you should see the massage:

Client 10.0.0.2 (00:13:20:12:4a:d0) finished cloning. Stats: Saved /clonezilla/images, /dev/sda1, success, 1.8 GB, 2.060 mins;

Then run sudo /opt/drbl/sbin/dcs to distribute the image. Choose defaults unless otherwise indicated. Follow the same process as above (select all the nodes, select Clonezilla start, and expert mode). Then tell it to restore the disk. OK all the default extra parameters, use the partition table from the image, and, when prompted, set the machines to power off when finish. When prompted, choose the image that you saved in the last command. Then select Unicast mode.

Now, turn on the other nodes. The Clonezilla machine should print out that the nodes finished cloning.

Then, one tests that the cluster works. First, try ssh'ing into the nodes from the headnode (you turn it on at this point). Then, on the head node, run sinfo, which should say that all the nodes are up. If they are not, you may need to put in the startup script to start NIS if it did not start correctly.