From owner-freebsd-questions@FreeBSD.ORG Mon Mar 31 05:46:31 2003 Return-Path: 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 6B6C937B401 for ; Mon, 31 Mar 2003 05:46:31 -0800 (PST) Received: from sage-one.net (adsl-65-71-135-137.dsl.crchtx.swbell.net [65.71.135.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65A9E43F75 for ; Mon, 31 Mar 2003 05:46:30 -0800 (PST) (envelope-from jackstone@sage-one.net) Received: from sagea (adsl-65-68-247-73.dsl.crchtx.swbell.net [65.68.247.73]) by sage-one.net (8.12.6/8.12.6) with SMTP id h2VDkKLl074985; Mon, 31 Mar 2003 07:46:21 -0600 (CST) (envelope-from jackstone@sage-one.net) Message-Id: <3.0.5.32.20030331074619.01414bf8@sage-one.net> X-Sender: jackstone@sage-one.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 31 Mar 2003 07:46:19 -0600 To: taxman , Grant Peel , From: "Jack L. Stone" In-Reply-To: <200303302200.47877.taxman@acd.net> References: <00fb01c2f720$82e2c8f0$6401a8c0@grant> <00fb01c2f720$82e2c8f0$6401a8c0@grant> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, hits=-1.6 required=4.5 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03, TO_LOCALPART_EQ_REAL version=2.44-sageamerules_v1 Subject: Re: dd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 13:46:34 -0000 At 10:00 PM 3.30.2003 -0500, taxman wrote: >On Sunday 30 March 2003 07:57 pm, Grant Peel wrote: >> Hi all, >> >> I am about to make the trip to shutdown one of our servers and 'dd' the >> first SCSI drive to the second. >> >> from what I have read, and what some of you have kindly offered, I just >> kick into single user mode, with only root mounted on the primary drive, > >ro, I assume > >> and away we go... >> >> dd if=/dev/da0 of=/dev/da1 bs=1m > >That'll copy the data, but you'll want to prep the disk. I've seen >recommendations something along the lines of: read data off the whole new >disk first dd if=/dev/da1 of=/dev/null then write the data you want on it, >then read it off to /dev/null again. >Something to the effect of populating the drives on disk bad sector records. >There may be more burn in recommended, but I couldn't find anything in the >archives. > >> One last question, the second drive is identical to the first, but should >> it be right out odf the box condition, formatted, fdisk'ed partiitioned or >> does any of that matter since it will be copies bit for bit? > >None of that matters for the reason you noted. > >> TIA! You'll just need to FDisk and label the new HD so the system knows its there. Then, your command for 'dd' is fine, except perhaps the choice of the bs=1m which can influence the time it takes to do the dd considerably. In my experimenting (but only with IDE), I found low settings (like bs=8192) to take 4 times as long as bs=102400. When I exceeded the 102400, the time increased again. If this is a 1-shot thing, this may not be important to you, but I believe it has to do with I/O ability & you can check it first. Here is my I/O test check for an IDE: #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 Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net jackstone@sage-one.net