Monday, March 10, 2008

Clonezilla FOSS For Partition / Computer Cloning

If you are familiar with Symantec Ghost, then you already know what Clonezilla can do for you.

Ghost is a partition copying utility for windows. It geared toward making and restoring complete copies of individual system's hard disks. There is an open-source alternative called Partimage. Symantec also offers a corporate edition designed to use for cloning multiple machines out over a network. This is exactly what Clonezilla does for free - and it is open source.

Ghost has a nice GUI, and a nice polished package. Clonezilla is all text (but menu driven), and harder to use. But it also has many more options, and supports more file systems - such as the kind typically used by Linux.

By itself, Clonezilla requires a server backend. Setting this up is probably more work than it is worth for most small/medium business IT folks. However there is an excellent Clonezilla Live disk, which runs all by itself. I use Clonezilla live for almost all my partition work. Clonezilla actually uses several open-source utilities (including Partimage), so It can copy and restore partitions to/from external usb disks, firewire disk, smb (windows) shares, just about anything you can think of. You can copy the partitions directly, or to archived images. It is the all in one partition toolkit, except for resizing that is.

I use Clonezilla Live to image multiple machines each week, sometimes up to 20 at a time. On the Clonezilla Live site, they warn that if you are imaging multiple machines, you should use Clonezilla with its DRBL server. From what I've seen, for my needs, Clonzilla Live's performance has been more than adequate.

8 comments:

Familia Davis said...

So how do you make the clonezilla live do multiple clients? I can do one at a time.
Thanks

Jim said...

when you say multiple clients, I assume you are talking about imaging multiple machines simultaneously?

You should have no issues if you have multiple copies of the disk (or run it out of RAM), and your image files live on a network share.

Familia Davis said...

I mean I have a single disk that I want to clone out to several machines at once. I am imaging a high school lab where all of the machines are identical.
I loaded clonezilla live on the machine that has the finised OS and all of my programs, and then I booted my workstations with the live cd and gave them all ip addresses and ran ocs-onthefly --source-IP 192.168.120.1 -t sda . It works for one machine at a time but if I have more than one the second machine says its done even though it didn't do anything.

My question is: is there a way to get the server machine to use multicast or talk to many machines at once?

Thanks

Jim said...

To do multiple copies, I think you can't use OCS-onthefly.

The process to do multiple machines:
Use the Clonezilla live disk to create an image of your source machine's partation(s). Clonezilla will allow you to specify the network share. You would use SMB for a windows (or samba) share.

Then run clonezilla on your machines to be imaged specify that share as your source.

Unknown said...

Examine this page form Clonezilla's Server Edition site:

http://clonezilla.org/

It reports in several places that Clonezilla SE (as opposed to Live) supports Multicasting, and that the creators used it specifically to restore 39 clients simultaneously. I can even find walkthroughs for older versions that show how to do it, but the menus are all different for the latest version, so that knowledge is irrelevant now.

Clonezilla simply uses UDPCast for image transfers, and UDPcast supports multicast restores. Any idea on how to initiate this?

I've got a massive PXE environnment here (300+ clients per day) and I've gotten Clonezilla to have it boot and run all sorts of usefull utilities, and now all I need to do is get rid of Ghost (the whole purpose of Clonezilla). Ideas?

Jim said...

Jonathan,

maybe this can help you?
http://clonezilla.org/clonezilla-live/livepxe.php



I don't know how much help I can be, but I will tell you what we do (and how we got rid of ghost):

We have never bothered to setup the Clonezilla server components, as a SMB/CIFS (or a real live windows share) work just fine for us.

We now just use clonezilla live on USB thumb drives when we image a lot of machines, and keep our images on an the SMB/CIFS shares.

We can image a lot of machines simultaneously, without issues - pretty much as many simultaneously as the server can handle.

For servers, we use cheap storage solutions like old computers running linux, and buffalo storage devices to house our images. The buffalo drive will get bogged down after about 5 sessions start, so it is limited in that way.

So I have found no need to us SE, as live works just fine, has very few setup requirements, has reasonable simultaneous imaging capabilities.

AND the new versions will resize partitions, in case you need that as well. There are also machine renaming capabilities, although I haven't tried those, so I can't comment on that.

Unknown said...

I was just about to look into how Live does it, and maybe steal the code.

Clonezilla SE is very easy and fast to set up (requires very basic Linux admin knowledge), and it works great. Before that, I was using a Frankensteined PXE\TFTP setup on a Windows server that served floppy images to boot clients. These include dignostics, secure erasure, and ghost utilities. I originally set this up when I started at this facility to eliminate having to ever use boot media again (discs were constantly left in machines that were sold off, USB drives break easily, and updating the software requires you to burn new discs / flash all the drives). I've got CLonezilla SE doing ALL of that, and we don't even have to use SMB, as we don't even need WIndows on the server now. If I can't multicast from a PXE boot, I can't get rid of Ghost, which was the entire purpose of this "upgrade."

We tried using several NAS devices for storage initially, including those Buffalo TeraStations, you're totally right on how crazy slow they are. The only thing I found that wasn't annoying was just a server with lots of internal storage (RAID 5+1, large block sizes). I was using HP ProCurve switches for a while, but switching to Cisco 3750's (after hours of configuration) netted a nice boost. Yeah, it's expenisve and it took me 18 months to get approval for the expense, but the amount of money it saves us in productivity pays for itself.

I'll keep poking around. If I get a solution, I'll post it here too for public reference.

Unknown said...

Figured it out (though I'm not happy with it):

You have to run /opt/drbl/sbin/dcs and select the restore mode form the server (don't pick "select in client"). It will then walk you through selecting the image, and ask if you want multicast or unicast.

It works fine, but I can't have end users interracting with the server. Since this setup can be initiated from a command line, I'm going to write a script that will run at boot time from the client, ask for the image name, ssh into the server, and automatically tell the server to start multicast. We'll see how that goes.