From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 13:04:10 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0192316A41F for ; Thu, 12 Jan 2006 13:04:10 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DC2D43D45 for ; Thu, 12 Jan 2006 13:04:03 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id k0CD3qFx025929; Thu, 12 Jan 2006 14:03:57 +0100 (MET) Message-ID: <43C65332.906@fer.hr> Date: Thu, 12 Jan 2006 14:01:38 +0100 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050921) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Kukulies References: <200601120948.k0C9mcqR092895@www.kukulies.org> In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 13:04:10 -0000 Christoph Kukulies wrote: > Anyway, I decided to buy a second identical hard disk and tried to > block by block copy the old disk to the new one using > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > The process is running now since yesterday evening and it is at 53 MB > at a transfer rate of about 1.1 MB/s. The default block size for dd is 512 bytes, meaning dd will read 512 bytes from one disk and write them to the other before reading again. This is SLOW. You need to specify a larger block size to use it effectively, like adding "bs=1m" argument to dd (which will make it use 1 MB blocks). Also, you should probably add "sync" to your "conv" argument, see the manual page of dd. I don't know if using "sync" will produce a full 1 MB of zeros when a bad sector is encountered - I hope someone else will clarify this :) Btw. I don't think this is the right group for your question - in the future use questions@freebsd.org or stable@freebsd.org...