From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 15:39:28 2006 Return-Path: X-Original-To: freebsd-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 ABCE416A41F for ; Thu, 12 Jan 2006 15:39:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4109643D49 for ; Thu, 12 Jan 2006 15:39:24 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id k0CFdN4X098531; Thu, 12 Jan 2006 09:39:23 -0600 (CST) (envelope-from dan) Date: Thu, 12 Jan 2006 09:39:23 -0600 From: Dan Nelson To: Christoph Kukulies Message-ID: <20060112153919.GA21009@dan.emsphone.com> References: <200601120948.k0C9mcqR092895@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-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 15:39:28 -0000 In the last episode (Jan 12), Christoph Kukulies said: > My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop > read errors. I have FreeBSD and Win XP on that disk. Although FreeBSD > ist still working , the errors in the Windows partition are causing > Windows do ask for a filesystem check nearly everytime I reboot the > computer. One time the error was in the hibernate.sys file, which > impedes powering up quickly after a hibernate. > > 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. Everybody has mentioned the first obvious fix: raise your blocksize from the default 512 bytes. The second fix addresses the problem that with a single dd, you are either reading or writing. If you pipe the first dd into a second one, it'll let you run at the max speed of the slowest device. dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k -- Dan Nelson dnelson@allantgroup.com