📜 ⬆️ ⬇️

Clonezilla live CD multicast OS cloning on 10 servers by reference

0. Preamble.


The article is a small guide on the capabilities of Clonezilla SE using a specific example.

The task was to install the system on 10 servers in the remote ds.
You need to install the system on bare metal.

I looked in the direction of the partimage server - conveniently, but not quite (copying only partitions, you need to boot, for example, from the System Rescue CD).
')
In the end - stopped at Clonezilla.

The distribution kit happens two versions:
1. Clonezilla ( http://clonezilla.org/downloads.php )
2. Clonezilla Server Edition ( http://drbl.org/download/ )

The second option leads to another site - drbl (and another livecd). And this is true because Clonezilla Server Edition is Clonezilla (utility) + drbl (diskless remote boot in linux).

In principle, you can take the Clonezilla LiveCD and put it on top of the drbl (similar to the example in this article: http://www.howtoforge.com/cloning-linux-systems-with-clonezilla-server-edition-clonezilla-se ). However, on this way (by experience) we are waiting for a certain amount of rake and lost time. Our task implies that the solution needs to be set up quickly. Therefore, we will take the LiveCD Drbl in which Clonezilla is enabled by default.


1. Working with the Drbl LiveCD



It can (in conjunction with drbl):


Can not:


To clone a system over a network over a network, we need two objects:


Since in our case there is no free server, we will use the following scheme:

1. Install the reference system on one of the servers.

Install the packages, configure the network (dhcp, static). If the network is static, you can use a script similar to the following (we will write it in the rc.local of the reference server):

root@1:~# cat ~/ip_check.sh
 # / bin / bash
 hostname = host-name
 network = 192.168.0
 domain = domain

 if [-f / etc / network / pid];
         then exit 0;
 else echo 1> / etc / network / pid;
         for i in $ (seq 3 12);
         do `fping -u -c1 $ network. $ i`;
                 if [$?  -eq "1"];  then
                         / bin / sed -i.bak -es / address \ $ network.2 / address \ $ network. $ i / g / etc / network / interfaces;
                         h = `expr $ i - 1`;
                         echo "$ hostname $ h"> / etc / hostname;
                         echo "$ network. $ i $ hostname $ h. $ domain $ hostname $ h" >> / etc / hosts;
                         shutdown -r now;
                         exit 0;

                 fi;
         done;
 fi;

  root @ 1: ~ # cat /etc/rc.local 

  /root/ip_check.sh 


2. Run the LiveCD on this server benchmark.

Select a full disk load in RAM, in the boot loader from the disk: “Other modes of DRBL Live” -> “DRBL Live (To Ram. Boot media can be removed later)”.
3. Perform cloning.

Using the “Clonezilla live” icon of an existing hard disk to an image (device-image point) to a local disk (actually RAM, to the mounted / home / partimag directory) of this LiveCD (skip point).

4. Run drbl.

Launch the drbl server with the Clonezilla server icon. Choose the type of multicast replication and the number of clients after which it should start. As an action on completion - choose halt - the servers must be turned on alternately.

5. We are overloading the servers.

In my example, the servers are loaded by default from the network, so we are overloading the servers to which we want to clone the system.

* UPD * Corrected script.

Source: https://habr.com/ru/post/180841/


All Articles