Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > 315d10a531712e91872011f37e016236 > files > 9

clone-0.1-5mdv2010.0.noarch.rpm

<?xml version="1.0"  encoding="ISO-8859-1"?>
  <article id="clone" lang="en">
    <title>Duplicate an operating System</title>
    <sect1>
    <title>Three way to duplicate a computer over the network</title>
    <para>
      Goal of duplication is to easily deploy a computer over network without taking care of numbers of computer.
      They use parralel technology from clustering product (ka tools, dolly and dolly+).
      Those methods can duplicate SCSI or IDE hard drive, storage device, and support multiple filesystem (reiserfs, ext2, ext3, xfs, fat...).
      In this documentation we call <emphasis role="bold">golden node</emphasis> the node we want to clone.
    </para>

    <sect2>
      <title>KA method</title>
      <para>
	With KA method you can quickly duplicate a computer using a <emphasis role="bold">desc</emphasis>
	file wich describe your partition table. KA method only duplicate data on partitions, so if you have 80go HDD disk, and
	only 10go on it, KA only duplicates 10go, and not the whole disk.
	Ka method can clone various Linux filesystem (ext2, ext3, resiserfs, xfs, jfs), and is able to regenerate the <emphasis role="bold">modprobe.conf</emphasis>
	file, so you can duplicate computer wich don't have the same hardware.
	</para>
      <para>
	Drawbacks:
	<itemizedlist>
	  <listitem><para>KA method doesn't not support RAID software</para></listitem>
	  <listitem><para>you can only clone Linux filesystem</para></listitem>
	  <listitem><para>you must use <emphasis role="bold">lilo</emphasis> bootloader</para></listitem>
	  <listitem><para>in case of computer trouble, the process of duplication stop</para></listitem>
	  <listitem><para>You can only duplicate same kind of HDD (IDE or SCSI)</para></listitem>
	</itemizedlist>
      </para>
    </sect2>

    <sect2>
      <title>Dolly method</title>
      <para>
	Dolly is used to clone the installation of one machine to (possibly many) other machines.
	It can distribute image-files (even gnu-zipped), partitions or whole hard disk drives to other partitions or hard disk drives.
	As it forms a "virtual TCP ring" to distribute data, it works best with fast switched networks.
	For example, you can duplicate RAID 0 software on other computer.
      </para>
      <para>
	Drawbacks:
	<itemizedlist>
	  <listitem><para>when you duplicate an HDD, it duplicate all HDD, not only data on HDD. So Dolly can duplicate all filesystem (FAT, LVM, NTFS...)</para></listitem>
	  <listitem><para>Duplicate all HDD can take a while. There is no simple way to create the configuration so you have to learn how to write it (it's quite easy)</para></listitem>
	  <listitem><para>like KA, in case of computer trouble, the process of duplication stop. You can NOT clone an OS which is currently in use</para></listitem>
	  <listitem><para>If you clone an HDD or a partition, you must use the same HDD size, or the same partitions size</para></listitem>
	  <listitem><para>you can only duplicate one file/hdd/device</para></listitem>
	</itemizedlist>
      </para>
    </sect2>
    <sect2>
      <title>Dolly+ method</title>
      <para>
	Dolly+ is based on dolly program, but it include more features.
      </para>
      <para>improvement in Dolly+:</para>
      <para>
	<itemizedlist>
	  <listitem><para>speed up by using multi threading (net->memory, memory->disk, memory->net threads)</para></listitem>
	  <listitem><para>multi file transfer: so you can clone more than one partitions</para></listitem>
	  <listitem><para>fail safe mechanism (bypass if a node has trouble)</para></listitem>
	  <listitem><para>separate Server (dollyS) which run in the host having the original file image and Client (dollyC) which run in hosts where images are cloned</para></listitem>
	</itemizedlist>
      </para>
      <para>
	Drawbacks: like dolly, expect for computer trouble.
      </para>
    </sect2>
  </sect1>

  <sect1>
    <title>HOW it works</title>
    <sect2>
      <title>3 steps</title>
      <para>The clone process works in three steps</para>
      <para>
	<itemizedlist>
	  <listitem><para><emphasis role="bold">PXE boot to retrieve stage1</emphasis>: the computer boot on PXE mode, retrieve <emphasis role="bold">vmlinuz</emphasis>
	      and an<emphasis role="bold">initrd</emphasis>. The computer is in <emphasis role="bold">stage1</emphasis> mode, and is able to
	      get the stage2 througt various installation method (nfs, ftp, http, dolly, ka). Network is up.</para></listitem>
	  <listitem><para><emphasis role="bold">get stage2</emphasis>: the computer get the stage2 with the method you have choosen.
	      You should use <emphasis role="bold">dolly</emphasis> or <emphasis role="bold">ka</emphasis> method to speed up the process to retrieve the stage2
	      if you want to clone many computer. Stage2 contains all necessary tools to recognize your hardware
	      (the most important things is to detect you HDD), and all necessary tools to finalise the clone process.</para></listitem>
	  <listitem><para><emphasis role="bold">Duplication process</emphasis>: the computer auto-probe needed modules to be able to
	      access to HDD. Now you can choose <emphasis role="bold">dolly</emphasis>, <emphasis role="bold">ka</emphasis> or <emphasis role="bold">dollyC</emphasis>
	      to integrate the duplication ring.</para></listitem>
	</itemizedlist>
      </para>
      <para>
	To resume, you can get stage2 from:
	<itemizedlist>
          <listitem><para>normal network: nfs, http</para></listitem>
	  <listitem><para>parrallel mode: dolly, ka</para></listitem>
	</itemizedlist>
      </para>
      <para>
	You can duplicate a node in stage2 with: ka, dolly or dolly+
      </para>
    </sect2>
    <sect2>
      <title>Needed files</title>
      <para>All needed files are on the CS4 DVD</para>
      <itemizedlist>
	<listitem><para><emphasis role="bold">install/stage2/rescue.clp</emphasis> : stage2 with all needed file to detect and probe modules, and launch
	    the third step of the duplication process. This file is needed on the golden node, if you want to send stage2 via a parrallel method (dolly or ka).
	    It's really easy to modify this file, and create your custom stage2 steps (explained later in this documentation).
	  </para></listitem>
	<listitem><para><emphasis role="bold">isolinux/alt0/vmlinuz</emphasis> : linux kernel, needed in the
	    <emphasis role="bold">/var/lib/tftpboot/X86PC/linux/images/</emphasis> directory of the pxe server</para></listitem>
	<listitem><para><emphasis role="bold">isolinux/alt0/all.rdz</emphasis> : stage1 and all needed modules, must be in the same directory <emphasis role="bold">vmlinuz</emphasis></para></listitem>
      </itemizedlist>
    </sect2>
  </sect1>

  <sect1>
    <title>Step 1: PXE, TFTP, DHCPD services</title>
    <para>
      To easily clone a computer node, we use PXE technology to boot a <emphasis role="bold">kernel</emphasis>, and an <emphasis role="bold">initrd</emphasis> image
      wich contains all needed modules for network and media storage. Documentation about PXE can be found here: <ulink url="http://people.mandriva.com/~aginies/doc/pxe/">PXE doc</ulink>.
      Please, keep in mind setting such services can disturb current network architecture.
    </para>
    <para>
      We need a <emphasis role="bold">TFTP</emphasis> server to share files over the network, in fact kernel and initrd, and a DHCPD server wich support PXE (various options in configuration file).
    </para>
    <sect2>
      <title>PXE parameters on server</title>
      <para>
	Mandriva Linux installer support various method to install a computer.
	With PXE configuration file you can specify wich method you want to use for isntalling your node, or add a specific option at boot prompt.
	Edit your <emphasis role="bold">default</emphasis> PXE configuration file to add specific entry (<emphasis role="bold">/var/lib/tftpboot/X86PC/linux/pxelinux.cfg/default</emphasis>).
      </para>
      <para>
	<screen>
PROMPT 1
DEFAULT local
DISPLAY messages
TIMEOUT 50
F1 help.txt

label local
    LOCALBOOT 0

label kamethod
    KERNEL images/vmlinuz
    APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:ka,interface:eth0,network:dhcp root=/dev/ram3 rw rescue kamethod

label dolly
    KERNEL images/vmlinuz
    APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:dolly,dolly_timeout:100,interface:eth0,network:dhcp rescue dollymethod

label nfs
    KERNEL images/vmlinuz
    APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:nfs,interface:eth0,network:dhcp,server:10.0.1.253,directory:/cs4 root=/dev/ram3 rescue rw

label http
    KERNEL images/vmlinuz
    APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:http,interface:auto,network:dhcp,server:10.0.1.253,directory:/cs4 root=/dev/ram3 rescue rw</screen>
      </para>
      <para>At boot prompt no you can boot</para>
      <para>
	<itemizedlist>
	  <listitem><para><emphasis role="bold">DEFAULT local</emphasis> : default boot will be local, change it with the name of a <emphasis role="bold">LABEL</emphasis></para></listitem>
	  <listitem><para><emphasis role="bold">local</emphasis> : boot local</para></listitem>
	  <listitem><para><emphasis role="bold">dolly</emphasis> :  automatic mode, get stage2 through dolly, set timeout to get
	      stage2 to 100 seconds, if it fails, dolly will try 3 times and reboot. Computer should use eth0 network interface.
	      <emphasis role="bold">rescue dollymethod</emphasis> words at the end of the line tell the computer to get the rescue.clp file,
	      and use the dolly replication method</para></listitem>
	  <listitem><para><emphasis role="bold">kamethod</emphasis> : automatic mode, get stage2 through ka. Network interface set to eth0.
	      Auto setup the network with DHCP, and use the ka technology to launch the recplication method</para></listitem>
	  <listitem><para><emphasis role="bold">nfs</emphasis> : get stage2 through NFS, </para></listitem>
	  <listitem><para><emphasis role="bold">http</emphasis> : get stage2 through http,</para></listitem>
	</itemizedlist>
      </para>
      <para>
	KA method: at PXE boot you can add <emphasis role="bold">kaopt=ka_session_name</emphasis> to use a ka session name.
	You will to be able to assign computer to ka session, and restrict access to private KA session.
      </para>
      <para>If you use the <emphasis role="bold">nfs</emphasis> or <emphasis role="bold">http</emphasis> method, put the <emphasis role="bold">rescue.clp</emphasis> file in <emphasis role="bold">/SERVER/install/stage2/</emphasis> directory, or client node will be unable to find it.
      </para>
    </sect2>
    <sect2>
      <title>Configuration files</title>
	<para>
	  <itemizedlist>
	    <listitem><para><ulink url="data/clone.pxe">default pxe file</ulink></para></listitem>
	    <listitem><para><ulink url="data/pxe.conf">pxe server configuration file</ulink></para></listitem>
	    <listitem><para><ulink url="data/dhcpd.conf">Dhcpd configuration file</ulink></para></listitem>
	    <listitem><para><ulink url="data/tftp">tftp for xinetd</ulink></para></listitem>
	  </itemizedlist>
	</para>
      </sect2>
    </sect1>
  
  <sect1>
    <title>Various scripts</title>
    <sect2><title>prepare_pxe_dhcp_conf script</title>
      <para>Use this script to auto-configure your computer as a PXE, DHCPD and TFTP server.
	<emphasis role="bold">prepare_pxe_dhcp_conf</emphasis>
	help:</para>
      <screen>
script to auto-configure PXE and DHCPD server
ie:
./clone_script -I -p 10.0.1.21 -w 10.0.1.253 -n 10.0.1 -s 10.0.1.253 -t 10.0.1.21

-I: install needed software
-p: IP address of the PXE server (should be this computer)
-w: IP address of the gateway
-n: NET base address for dhcpd conf (ie: 10.0.1)
-s: IP address of the DNS server
-t: IP address of the tftpserver (with vmlinuz and all.rdz)

ie:
./clone_script -c path/rescue.clp

You need mount right.
-c: prepare chroot with rescue.clp</screen>
    </sect2>

    <sect2>
      <title>ka-d-session.sh script</title>
      <para>
	  <ulink url="data/ka-d-session.sh"><emphasis role="bold">ka-d-session.sh</emphasis></ulink> is a quick script to deploy a chroot via KA method. It can be usefull if you want to send
	in memory nodes a specific chroot, like an mini-distribution.
      </para>
      <screen>
Usage:
DATA_PATH=/mnt/ka ./ka-d-session.sh -n nb_nodes</screen>
    </sect2>
  </sect1>

  <sect1>
    <title>Step 2: parrallel methods to get stage2</title>
    <para>As explain before, you ca use two parralels method to get stage2 on client's computer the <emphasis role="bold">KA</emphasis> one,
      and the <emphasis role="bold">Dolly</emphasis>.
    </para>
    <sect2>
      <title>Get stage2 via KA method</title>
      <para>
	First you have to get the <emphasis role="bold">rescue.clp</emphasis> file on CS4 cdrom (/install/stage2/rescue.clp).
	We have to convert the <emphasis role="bold">rescue.clp</emphasis> to an ISO9660 file, and
	mount it loop into /mnt/ka directory.
	  You can do it manually, or use the <ulink url="data/clone_script"><emphasis role="bold">clone_script</emphasis></ulink>, but you need mount right:
      </para>
      <para>
	<screen>
clone_script -c rescue.clp</screen>
      </para>
      <para>
	Now our stage2 is ready, we can send it to all nodes.
	Choose a PXE entry with a <emphasis role="bold">automatic=method:ka</emphasis> line on the PXE server, boot all nodes to be cloned.
	Logon onto your golden node, and use the <ulink url="data/ka-d-session.sh"><emphasis role="bold">ka-d-session.sh</emphasis></ulink> script.
	For example if you want to send the stage2 to 4 nodes, just do:
	<screen>
DATA_PATH=/mnt/ka ./ka-d-session.sh -n 4</screen>
      </para>
      <para>
	Now, you boot all your nodes. The replication process
	will start once all nodes are up and waiting on the ka
	screen.
      </para>
      <figure><title>KA stage1</title>
	<mediaobject>
	  <imageobject>
	    <imagedata  fileref="images/ka_stage1.jpg" scale="100" scalefit="1"></imagedata>
	  </imageobject>
	</mediaobject>
      </figure>
      <para>
	If the nodes cannot reach the golden node, running the KA
	server, the message "Can't reach a valid KA server" will appear. Each node will try five
	times to reach the KA server, after that the node will reboot.
	As the node boots on kamethod, it will retry until it finds
	it. Node are now ready for step 3.
      </para>
    </sect2>
    <sect2>
      <title>Get stage2 via Dolly</title>
      <para>It's a little bit different. With dolly you can send a partition, or an image.
	Morever you need to write a configuration file, wich describe on wich computer you want
	to send the stage2, and what kind of stage2 you use (an image or partition).
     </para>
      <sect3>
	<title>Create a stage2.img</title>
	<para>
	  Get the rescue from your CS4 cdrom (/install/stage2/rescue.clp).
	  Convert the <emphasis role="bold">rescue.clp</emphasis> to an ISO9660 file, and
	  mount it loop into a directory, then create a file call stage2.img, format it in ext2,
	  mount it loop too, and copy all data from the mount loop rescue directory to the mount loop
	  stage2.img directory. <ulink url="data/clone_script"><emphasis role="bold">clone_script</emphasis></ulink> will do it for you, but you need mount right:
	  <screen>clone_script -c rescue.clp</screen>
	</para>
      </sect3>
    </sect2>
    <sect2>
      <title>dolly.cfg configuration file</title>
      <para>Exemple of a dolly server configuration file</para>
	<screen>
infile stage2.img
outfile /dev/ram3
server servernode
firstclient node1
lastclient node3
clients 3
node1
node2
node3
endconfig</screen>
      <para>
	<itemizedlist>
	  <listitem><para><emphasis role="bold">infile stage2.img</emphasis> : input file in the server is stage2.img</para></listitem>
	  <listitem><para><emphasis role="bold">outfile /dev/ram3</emphasis> :  output file in clients. '&gt;' means dolly does not modify the image</para></listitem>
	  <listitem><para><emphasis role="bold">server servernode</emphasis> : specify wich node is the dolly server</para></listitem>
	  <listitem><para><emphasis role="bold">firstclient node1</emphasis> : wich node is the first client</para></listitem>
	  <listitem><para><emphasis role="bold">lastclient node3</emphasis> : wich node is the last one</para></listitem>
	  <listitem><para><emphasis role="bold">clients 3</emphasis> : how many nodes</para></listitem>
	  <listitem><para><emphasis role="bold">node1 ... node3</emphasis> : names of the clients</para></listitem>
	  <listitem><para><emphasis role="bold">endconfig</emphasis> : needed, end of configuration file</para></listitem>
	</itemizedlist>
      </para>
      <para>
	Choose a PXE entry with a <emphasis role="bold">automatic=method:dolly</emphasis> line on the PXE server, boot all nodes to be cloned.
	Logon onto your golden node, prepare your dolly configuration file, and launch:
      <screen>dolly -s -v -f dolly.cfg</screen>
      </para>
      <para>
	Now boot all your node in PXE mode, stage2 will be sent to all of them with the dolly method.
	Node are now ready for step 3.
      </para>
      <para>
	Now, you boot all your nodes. The replication process
	will start once all nodes are up and waiting on the dolly
	  screen.
      </para>
      <figure><title>Dolly stage1</title>
	<mediaobject>
	  <imageobject>
	    <imagedata  fileref="images/dolly_stage1.jpg" scale="100" scalefit="1"></imagedata>
	  </imageobject>
	</mediaobject>
      </figure>
      <para>
	If the nodes cannot reach the golden node, running the dolly
	server, the message "Can't reach a valid Dolly server" will appear.
	Each node will try three times to reach the Dolly server,
	with a default timeout set to 120. After that the node will reboot.
	As the node boots on dolly method, it will retry until it finds
	it. Node are now ready for step 3.
      </para>
    </sect2>
  </sect1>

  <sect1>
    <title>Step 3, the duplication process</title>
    <sect2>
      <title>Duplicate a golden node with KA</title>
      <para>
	Logon the node you want to duplicate.
	You need to create a file wich describes your partition tables. 
	  Run <ulink url="data/fdisk_to_desc"><emphasis role="bold">fdisk_to_desc</emphasis></ulink> as root to get a <emphasis role="bold">desc</emphasis> file.
	Your desc file should be like this one:
      </para>
      <screen>
linux 3500
extended fill
logical swap 500
logical linux fill</screen>
	<para>
	This file describes your partition table and the sample above
	can be considered as a default one for a recommended
	installation. There is a 3.5GB "/" partition, a 500 MB swap
	partition, and "/var" fills the rest, of course you can adjust
	sizes accoding to your system. Please refer to the man page to
	get more information (man ka-d).
      </para>
      <para>
	Set your default PXE server to a PXE entry wich contains <emphasis role="bold">rescue kamethod</emphasis> and boot
	all nodes. So if you want to use <emphasis role="bold">ka</emphasis> to get stage2 on computers, and <emphasis role="bold">ka</emphasis>
	to duplicate your golden node, choose a PXE entry like this one:
      </para>
<screen>
APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:ka,interface:eth0,network:dhcp root=/dev/ram3 rw rescue kamethod</screen>
      <para>
	If you want to use <emphasis role="bold">dolly</emphasis> to get stage2 on computers, and <emphasis role="bold">ka</emphasis>
        to duplicate your golden node, choose a PXE entry like this one:
	</para>
      <screen>
APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:dolly,interface:eth0,network:dhcp root=/dev/ram3 rw rescue kamethod</screen>
      	<para>
	  Now all is ready, launch your ka server:
	</para>
	<screen>
ka-d.sh -r lilo -n nb_nodes -p sda/hda desc -x /tmp</screen>
      <para>
	<itemizedlist>
	  <listitem><para><emphasis role="bold">-r lilo</emphasis> : run lilo in chroot after ka deploiement</para></listitem>
	  <listitem><para><emphasis role="bold">-n nb_nodes</emphasis> : specify how many nodes to use</para></listitem>
	  <listitem><para><emphasis role="bold">-p sda/hda desc</emphasis> : specify if you want to duplicate scsi or ide storage, and the name of the HDD</para></listitem>
	  <listitem><para><emphasis role="bold">-x /tmp</emphasis> : exclude /tmp dorectory</para></listitem>
	</itemizedlist>
      </para>
      <para>
	See manpage of ka-d.sh for more help.</para>
      <para>
	The duplication process will clone your drives following
	the description you have made. Nodes will rewrite their
	partition table, then format their filesystems (ReiserFs, XFS,
	ext2/3). Then, the drive duplication process will begin. On a
	fast Ethernet switch you can reach speeds of
	10MBytes/sec.
      </para>
      <para>
	At the end of the duplication process, each node will
	chroot its partitions and rebuild its <emphasis role="bold">/boot/initrd.img</emphasis>,
	and <emphasis role="bold">/etc/modprobe.conf</emphasis>.
	This step ensures that your node will reboot using its potential
	SCSI drives and adjusting its network card driver. Before
	rebooting, each node reinstalls lilo on the MBR. All your node are
	now ready, adn are clone of master node.
      </para>
      <para>
	Don't forget to change the default PXE boot to <emphasis role="bold">local</emphasis>
	so node after replication will boot localy.
	network cards.
      </para>
	<sect3>
	  <title>Know BUGS with desc file</title>
	  <para>
	    <emphasis role="bold">fdisk_to_desc</emphasis> only works with MDK::Common (available in Mandriva Linux distro).
	    If you have large capacity HDD fdisk_to_desc can create a wrong desc files.
	    To fix it follow this procedure:
	  </para>
	  <para>
	    here is the result of fdisk to desc:
	  </para>
	  <screen>
swap 509
linux 5992
extended 71657
logical linux 52281
logical linux 19375
logical linux 78167
logical linux 156327</screen>
      <para>
      just change it to:
      </para>
      <screen>
swap 509
linux 5992
extended fill
logical linux 52281
logical linux 19375
logical linux 78167
logical linux fill</screen>
	</sect3>
      </sect2>
    <sect2>
      <title>Duplicate a computer with dolly</title>
      <para>
	More documentation about dolly can be found here: <ulink url="http://www.cs.inf.ethz.ch/CoPs/patago\nia/dolly.html">Dolly website</ulink>.
      </para>
      <para>
	Set your default PXE server to a PXE entry wich contains <emphasis role="bold">rescue dollymethod</emphasis> and boot
	all nodes. So if you want to use <emphasis role="bold">ka</emphasis> to get stage2 on computers, and <emphasis role="bold">dolly</emphasis>
	to duplicate your golden node, choose a PXE entry like this one:
      </para>
<screen>
APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:ka,interface:eth0,network:dhcp root=/dev/ram3 rw rescue dollymethod</screen>
      <para>Typical dolly's configuraton file:</para>
    <screen>
infile /dev/sda
outfile /dev/sda
server node1
firstclient node2
lastclient node5
clients 4
node2
node3
node4
node5
endconfig</screen>
    <para>
      <itemizedlist>
	<listitem><para><emphasis role="bold">infile /dev/sda5</emphasis> : input file in the server is /dev/sda5</para></listitem>
	<listitem><para><emphasis role="bold">outfile /dev/sda5</emphasis> :  output file in clients. '&gt;' means dolly does not modify the image</para></listitem>
	<listitem><para><emphasis role="bold">server node1</emphasis> : specify wich node is the dolly server</para></listitem>
	<listitem><para><emphasis role="bold">firstclient node2</emphasis> : wich node is the first client</para></listitem>
	<listitem><para><emphasis role="bold">node2 ... node5</emphasis> : names of the clients</para></listitem>
	<listitem><para><emphasis role="bold">endconfig</emphasis> : needed, end of configuration file</para></listitem>
      </itemizedlist>
	</para>
	<para>
	  Now just launch:
	</para>
	<screen>dolly -s -v -f dolly.cfg</screen>
	<para>
	  Client computer are in <emphasis role="bold">dolly</emphasis> method, with a timeout of 300 seconds. At the ebnd of the timeout, the node
	  autmatically reboot.
	  If all is Ok, the dupliation process start, at the end, the node reboot, so don't forget to set PXE boot to <emphasis role="bold">localboot</emphasis>.
	</para>
      </sect2>
      <sect2>
      <title>Duplicate a computer with dolly+</title>
      <para>Dolly+ is based on dolly but have several improvement. You can find more original documentation at
	<ulink url="http://corvus.kek.jp/~manabe/pcf/dolly/"> Dolly+</ulink>
      </para>
      <para>
	Set your default PXE server to a PXE entry wich contains <emphasis role="bold">rescue dollyCmethod</emphasis> and boot
	all nodes. So if you want to use <emphasis role="bold">dolly</emphasis> to get stage2 on computers, and <emphasis role="bold">dolly+</emphasis>
	to duplicate your golden node, choose a PXE entry like this one:
      </para>
<screen>
APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:dolly,interface:eth0,network:dhcp root=/dev/ram3 rw rescue dollyCmethod</screen>

      <para>Now lets see a typical configuration file. Be carreful Dolly+ doesn't support unneeded 'space' or 'tabulation', and each parameters must be on a new line.</para>
      <screen>
iofiles 3
/dev/hda1 > /tmp/dev/hda1
/data/file.gz  >> /data/file
boot.tar.Z >> /boot
server max5.paris
firstclient max6.paris
lastclient max8.paris
clients 3
max6.paris
max7.paris
max8.paris
endconfig</screen>
    <para>
      <itemizedlist>
	<listitem><para><emphasis role="bold">iofiles 3</emphasis> : 3 images to transfer</para></listitem>
	  <listitem><para><emphasis role="bold">/dev/hda1 &gt; /dev/hda1</emphasis> : input file in the server is /dev/hda1 and output file in clients. '&gt;' means dolly+ does not modify the image</para></listitem>
	  <listitem><para><emphasis role="bold">/data/file.gz &gt;&gt; /data/file</emphasis> : input file is /data/file.gz and output file is /data/file. '&gt;&gt;>>' indicate dolly+ should cook the file according to the name of the file. Now. '.tar.', '.gz', 'tar.gz','tar.Z','cpio','cpio.gz','cpio.Z' are supported</para></listitem>
	  <listitem><para><emphasis role="bold">boot.tar.Z &gt;&gt; /boot</emphasis> : input file is ./boot.tar.Z and output working directory is /boot. The right argument of '&gt;&gt;' in cases where the input name is 'tar' and 'cpio' should be a directory name</para></listitem>
	  <listitem><para><emphasis role="bold">server max5.paris</emphasis> : dolly+ does not care, but must exist</para></listitem>
	  <listitem><para><emphasis role="bold">firstclient max6.paris</emphasis> : dolly+ does not care, but must exist</para></listitem>
	  <listitem><para><emphasis role="bold">max6.paris... max8.paris</emphasis> : names of the clients</para></listitem>
	  <listitem><para>endconfig : needed, end of configuration file</para></listitem>
	</itemizedlist>
      </para>
      <para>Now just launch:</para>
      <screen>dollyS -v -f dolly.cfg</screen>
      <para>
	  Client computer are in dollyC method.
	  if all Ok, the duplication process start, at the end, the node reboot, so don't forget to set PXE boot to <emphasis role="bold">localboot</emphasis>.
	</para>
      <para>Typical node side output (thanx erwan):</para>
<screen>
installing driver piix (for "Intel Corporation|I/O Controller Hub PATA")
Can't find piix.ko in archive
can't find module piix
        failed
Installing driver ata_piix (for "Intel Corporation|I/O Controller Hub SATA cc=IDE")
Installing driver i2c-i801 (for "Intel Corporation|I/O Controller Hub SMBus")
Installing driver tg3 (for "Broadcom Corp.|NetXtreme BCM5721 Gigabit Ethernet PCI
Express")
Installing driver tg3 (for "Broadcom Corp.|NetXtreme BCM5721 Gigabit Ethernet PCI
Express")
I am a dolly+ client
Trying to build ring... 14:13:07.
Accepting port(9998).....cannot find myhost name in RING packet, trying to
continue...(Client.cpp)
 Server name is max5.paris, my name is max8.paris.(14:13:23)
Server(max5.paris) was selected for the next adjacent host.
RING packet recieved/sent.
HOST packet recieved/sent
---Packet contents printing  ---------------------
No of Bytes = 48
No.    flag   name
  0    1      'max5.paris'
  1    1      'max6.paris'
  2    1      'max7.paris'
  3    1      'max8.paris'
--------------------------------------------------
File packet recieved/sent.
---Packet contents printing  ---------------------
No of Bytes = 10
No.    flag   name
  0    0      '/dev/sda'
--------------------------------------------------
readnet() thread started
writenet() thread started. ALL are ready !
open before(14:13:23)-opening file pathname=/dev/sda flag=00
(14:13:23)after
writing to '/dev/sda'
exception is registrated in readnet()
start readnet process 1 files. 14:13:23
Next is server, writenet() exit.
file No.=0 processing...14:13:23</screen>

    <para>Typical server side output:</para>
    <screen>
dollyS -v -f dolly
Read config file(dolly)...
server name is 'max5.paris' (10)
HOSTs
-------------List---------------------
Items = 4
No.    flag   name
  1    1      max5.paris
  2    2      max6.paris
  3    3      max7.paris
  4    3      max8.paris
--------------------------------------
FILEs
-------------List-------------------------------
Items = 1
No.    flag   name                 name
  1    0      /dev/sda             /dev/sda
------------------------------------------------
Trying to build ring...
Start sending RING Packet
use hostname 'max6.paris'
Connecting to max6.paris.....(host=max6.paris::9998)
setting NOBLOCK mode in open_connect()
Sending Ring packet succeeded. try to recieve the return.
Start recieving RING Packet back
Accepting port(9998).....Sent/Recieved Ring Packet
Start sending Host Packet
Start recieving  Host Packet back
sent/recieved HOST Packet.
-------------List---------------------
Items = 4
No.    flag   name
  1    1      max5.paris
  2    1      max6.paris
  3    1      max7.paris
  4    1      max8.paris
--------------------------------------
******************************************
* Host marked with flag=3 has a trouble. *
******************************************
starting threads
readdisk() thread started.
writenet() thread started. ALL are ready !
fileno=0 '/dev/sda' opened.
filenopacket(fileno=0) sending
10MB  44.05MB/s 10MB=44.1MB/s (0.2s 10MB=0.2s)
20MB  54.50MB/s 10MB=71.4MB/s (0.4s 10MB=0.1s)
....
10470MB  58.16MB/s 10MB=44.8MB/s (180.0s 10MB=0.2s)
...
33560MB  55.93MB/s 10MB=41.3MB/s (600.0s 10MB=0.2s)
...
57650MB  52.41MB/s 10MB=52.6MB/s (1100.0s 10MB=0.2s)
...
76420MB  47.76MB/s 10MB=38.0MB/s (1600.1s 10MB=0.3s)
...
80000MB  46.61MB/s 10MB=48.1MB/s (1716.4s 10MB=0.2s)
fileno=0 closed
TotalTime=1716.38(sec) DiskRead=1702.00(sec) SemaphoreWait=0.05(sec)
readdisk() ended..
Totaltime=1716.41(sec) WriteNetTime=718.33(sec) WaitSemaphoreTime=997.76(sec)
miscTime=1716.33(sec)
writenet() ended..
Transfer Bytes=80000MB. Transfer Speed=46.61MB/s</screen>
      <para>Clone 80go on 3 nodes take only <emphasis role="bold">TotalTime=1716.38(sec)</emphasis>.</para>
      </sect2>
    </sect1>
  </article>

<!-- Keep this comment at the end of the file
Local Variables:
mode: xml
sgml-parent-document: ("./duplication.xml" "legalnotice")
End:
-->