[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to clone a drive



On Fri, 2003-10-03 at 16:03, Kent West wrote:
> What's the best way to clone a SCSI drive in a Sunblade 1000 running 
> Debian to another SB1000?

I'm going to assume that all of the partitions on this drive are Linux
ones, that you're talking about a bootable drive not a data drive, and
that your master is already set up.

You may find this generally helpful:

  http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/index.html

This is x86-specific in a few places: LILO vs SILO, partitioning.

The howto says you can copy data between drives at 10 megabytes/minute. 
With new ultra/wide >=7200 RPM drives expect a rate in megabytes per
second, probably well over 10 MB/sec.

>  I don't mind physically moving drives from one 
> box to another temporarily.

That's what I've done on several platforms.  I use the cp -ax method to
copy.

I couldn't find an online example of making the destination drive
bootable with SILO.  I don't quite remember how I did it last time
cloning an Ultra Sparc drive.  Possibly a chroot environment and some
arguments to the silo command to get it to write the bootblock to the
new drive instead of the current boot one.

> What about a firewire connection? USB?

Copying works the same way as if you install the drive internally or in
an external SCSI box.  Speeds vary, especially with USB1 which is barely
1 megabyte/sec.


> Is it easier just to build the clone from scratch instead of cloning a 
> drive?

That heavily depends on how complex your installation is already on the
master.  And did you document every install and config step on the
master precisely?

If you have a lot of manual install steps (a couple of dozen apps for
example, or many non-default debconf settings) and you want to exactly
duplicate them on the three replicas, drive cloning is the best way to
ensure consistency.  If you had do do manual post-install tweaking to
get the master to work properly, then cloning is vital to eliminate
having to repeat the tweaking.

If your master is a barebones install with few manual steps after
partitioning and mkfs, then you could simply set up the three replica
Blades next to one another and run the installs in parallel, following
the precise docs of the master install.


Cloning will cost more clock time than parallel installs - you're
powering down and rebooting the machine once per clone drive.  Even
worse if you do badblock scans on large drives.  You can do the badblock
scans in parallel in their home machines then interrupt the installs and
switch to drive cloning.


Thought experiment: Hook all four drives up to one machine at the same
time over SCSI, and clone in parallel, three for the price of one.  I
assume a Blade is Ultra2 or faster SCSI so the box could be mkfs-ing and
cp-ing to all three destination drives in parallel without saturating
the SCSI bus.  Lag the cp's a little from one another so only the first
cp of a file has to read from the master drive and the other two read
from the RAM disk cache.

-- good luck, SP




Reply to: