From owner-freebsd-questions Fri Aug 3 8:43: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id C75C337B401 for ; Fri, 3 Aug 2001 08:42:59 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f73Fgpm19225; Fri, 3 Aug 2001 08:42:52 -0700 (PDT) Message-Id: <200108031542.f73Fgpm19225@ptavv.es.net> To: Christopher Farley Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Cloning a hard drive - performance issues In-reply-to: Your message of "Thu, 02 Aug 2001 19:50:19 CDT." <20010802195017.A503@northernbrewer.com> Date: Fri, 03 Aug 2001 08:42:51 -0700 From: "Kevin Oberman" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Thu, 2 Aug 2001 19:50:19 -0500 > From: Christopher Farley > Sender: owner-freebsd-questions@FreeBSD.ORG > > I've got a drive that started throwing hard read errors. I'm going to > copy it onto a fresh drive. (Details below, if it's relevant.) > > Using 2 ATA/66 drives, this has proven to be very, very SLOW. So I'm left > with a hardware question: > > Which is faster: > > a) Leave both drives on the same cable, set one as master and the other > as slave > b) Put each drive on its own cable, set them both as master > c) No difference > d) Depends on your mainboard b) should always be faster (assuming there is no activity to any slave device on either controller). > Here is my 'cloning' process - perhaps this is just a slow operation: > > I've prepared my new drive with fdisk, disklabel and newfs. To perform > the 'clone' I'm mounting the new filesystem on /mnt, and piping dump into > restore like this: > > cd /mnt > dump -0uaf - /dev/ad0s1a | restore -rf - You call this 'cloning'. If the new and slices have the same geometry, dd is MUCH faster. I clone my laptop HD weekly with: dd bs=32k if=/dev/ad0s1 of=/dev/ad2s1 # Windows slice dd bs=32k if=/dev/ad0s1 of=/dev/ad2s2 # FreeBSD slice Note that the slices are identical, but the disks are not. (I am cloning 2 of 4 slices on a 12 GB disk onto a 6 GB disk.) You can further speed this up using team from ports. You can also use dd to clone identical partitions. I clone the 6 GB in about 13 minutes. Also, make sure write caching is enabled. It was off in 4.3-Release and will kill you on this type of operation. (It was on in 4.2 and is back on in -stable.) > -- > Christopher Farley > www.northernbrewer.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message