Disk cloning
Tino Schwarze
linux-poweredge.lists at tisc.de
Tue Jan 20 05:35:05 CST 2009
Hi,
On Tue, Jan 20, 2009 at 04:43:04PM +0530, Paniraja_KM at dell.com wrote:
> Cloning using dd is not a good option if the disk size is huge. This
> will take lot of time for completion.
>
> Its better to use
> tar cvfz - * |ssh <user_name at server_name> tar xvfz \-
>
He's talking about making a remote clone. I suppose, they've got one
working system at a colo and want a second one there.
> -----Original Message-----
> From: linux-poweredge-bounces at dell.com
> [mailto:linux-poweredge-bounces at dell.com] On Behalf Of Dimitri Yioulos
> Sent: Tuesday, January 20, 2009 4:28 PM
> To: linux-poweredge-Lists
> Subject: Disk cloning
>
> Hello to all.
>
> I hope it's OK to ask the following:
>
> I've been asked by a company to remotely clone a working system. It's
> colo'd in Virginia (company HQ is in New York, I'm in Massachusetts).
> Physical access to the box, a PE 2950, I believe, is via "Remote Hands"
> only - colo personnel can do minor things, including disk swaps. Down
> time is really not an option.
Down time is not an option - it's an requirement since you want your
system in a consistent state.
> I've considered all of the various cloning tools, and it seems to me
> that dd and rsync are best-suited to the task. It looks like "dd
> if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror" will accomplish
> the cloning (sda and sdb are of the same make, model, and size).
That will work.
> My questions:
>
> 1. Is the above dd command correct?
You might want to use dd_rescure instead if your worry about disk
errors. (I'd worry about swapping disks ASAP if there was any error.)
> 2. After cloning, must sdb be disconnected so as not to cause booting
> problems?
No.
> 3. Do I have to do anything post-cloning to make sdb bootable?
No. You get an exact image. Your sdb will work as a new sda in the new
system (given that the system is exactly equal). You might want to mount
your root and modify network addresses or similar (if not obtained via
DHCP).
> 4. What rsync command would I use to keep the two disks synced?
> If anyone has gone through this process, and can provide guidance, I'd
> appreciate it.
Please explain with more details what you are trying to accomplish and
what your setup is.
Do you have two servers? (sda and sdb are in the same server, aren't
they?)
If you want to keep some kind of hot-standby, an rsync command like this
would do:
rsync -e ssh -a --exclude=/etc/sysconfig/network/* /home /srv /root /usr /etc $standby-server:/
As I said: The question is what are you trying to accomplish?
Bye,
Tino.
--
"What we nourish flourishes." - "Was wir nähren erblüht."
www.lichtkreis-chemnitz.de
www.craniosacralzentrum.de
More information about the Linux-PowerEdge
mailing list