From owner-freebsd-questions@FreeBSD.ORG Wed Feb 15 14:48:42 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E20F16A42A for ; Wed, 15 Feb 2006 14:48:42 +0000 (GMT) (envelope-from antennex@hotmail.com) Received: from hotmail.com (bay106-f20.bay106.hotmail.com [65.54.161.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 165E843D49 for ; Wed, 15 Feb 2006 14:48:37 +0000 (GMT) (envelope-from antennex@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 15 Feb 2006 06:48:37 -0800 Message-ID: Received: from 65.54.161.200 by by106fd.bay106.hotmail.msn.com with HTTP; Wed, 15 Feb 2006 14:48:37 GMT X-Originating-IP: [65.68.247.73] X-Originating-Email: [antennex@hotmail.com] X-Sender: antennex@hotmail.com In-Reply-To: <43F1DF7A.7000504@daleco.biz> From: "Jack Stone" To: kdk@daleco.biz, freebsd-questions@freebsd.org Date: Wed, 15 Feb 2006 08:48:37 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 15 Feb 2006 14:48:37.0574 (UTC) FILETIME=[E7402660:01C6323E] Cc: keramida@ceid.upatras.gr Subject: Re: Using dd to Make a Clone of a Drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 14:48:42 -0000 I have used dump/restore and dd as well. For a block size, I chose 102400 which was the fastest -- but still slow compared to dump/restore. Dump/restore is not limited to making a whole image, blanks and all like dd. Once upon a time, I used this as the best: dd if=/dev/ad0 of=/dev/ad1 bs=102400 The obvious intention is to minimize the number of transfers, so theoretically the larger the transfer, the better. The maximum I/O transfer size is limited to the value of MAXPHYS, which is defined in sys/param.h: #ifndef MAXPHYS #define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ #endif The ATA subsystem uses this value. SCSI drives were limited to 60 kB transfers, though this could have changed. I don't currently have any machine with SCSI disks connected, so I can't confirm that. A way to find is to run a command like will show the I/O: #dd if=/dev/ad0c of=/dev/null bs=128k & and in the background do an 'iostat ad0 1'. Here's an example with an IDE drive: #iostat ad0 1 tty ad0 cpu tin tout KB/t tps MB/s us ni sy in id 0 3 5.19 7 0.03 11 0 4 1 84 0 126 127.36 183 22.74 0 0 6 2 92 0 44 128.00 190 23.76 0 0 2 0 98 0 44 128.00 191 23.89 0 0 5 0 95 0 44 128.00 191 23.88 0 0 7 1 92 As you can see, it's really doing 128 kB transfers, for an average transfer rate of almost 24 MB/s. ============================================================= I do all of my backups every night by scripts by using dump/restore to a dedicated separate HD. It is bootable and ready to go in case of a problem with my master HD. Just shutdown, switch HDs and reboot -- voila! Back on line within a minute and the data is always only a few hours old at the most. Once you master dump/restore, it is indispensable for handling file systems. Best regards, Jack _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/