From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 25 17:49:46 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C90D1065675 for ; Thu, 25 Jun 2009 17:49:46 +0000 (UTC) (envelope-from jflowers@ezo.net) Received: from smtp.ezo.net (mbox2.ezo.net [69.36.15.166]) by mx1.freebsd.org (Postfix) with ESMTP id 57C638FC14 for ; Thu, 25 Jun 2009 17:49:46 +0000 (UTC) (envelope-from jflowers@ezo.net) Received: from ezo.net (localhost [127.0.0.1]) by smtp.ezo.net (Postfix) with ESMTP id B734828502; Thu, 25 Jun 2009 13:50:28 -0400 (EDT) From: "jflowers" To: rick-freebsd2008@kiwi-computer.com,krad Date: Thu, 25 Jun 2009 13:50:28 -0400 Message-Id: <20090625173404.M30669@ezo.net> In-Reply-To: <20090625154950.GA83146@keira.kiwi-computer.com> References: <20090623032742.M54551@ezo.net> <2C153FCDAC3B43BDADDD1B28CED80036@uk.tiscali.intl> <20090625154950.GA83146@keira.kiwi-computer.com> X-Mailer: OpenWebMail 2.52 20060502 X-OriginatingIP: 70.228.71.121 (jflowers@ezo.net) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: dd copy of FreeBSD-7.2 won't boot 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, 25 Jun 2009 17:49:46 -0000 I wound up using kraduk's suggestion except for using a snapshot instead of a live file system. Because the source disk had suffered DMA errors and a few files lost to SOFT UPDATE errors, I built a full system first and then let rsync merge the two. mount -u -o snapshot /snapshot/snap1 / mdconfig -a -t vnode -f /snapshot/snap1 -u 4 mount -r /dev/md4 /mnt mount /dev/ad4s1a /mnt_t rsync -aPH --exclude=usr/dumps/** /mnt/* /mnt_t umount /mnt mdconfig -d -u 4 umount /mnt_t repeated for all partitions (/ /tmp /var /usr). Also had to edit transferred fstab to reflect new device name (ad4) and install a new boot0. mount /dev/ad4s1a /mnt_t vi /mnt_t/etc/fstab umount /mnt_t fdisk -B -b /boot/boot0 /dev/ad4 18 GB took about 20 minutes to complete snapshots and another 25 minutes to transfer via rsync. Thanks for all the help. On Thu, 25 Jun 2009 10:49:50 -0500, Rick C. Petty wrote > On Wed, Jun 24, 2009 at 11:11:21PM +0100, krad wrote: > > Personally id stay away from dd. Create the partitions and file systems > > manually, and install the boot loader, then rsync the data across. It will > > be a lot faster in most cases, as unlike dd you wont be copying unused > > space. Something like this should do the job > > I wouldn't say rsync is faster than dd, unless you have a lot of > empty space or are migrating across a network. The nice thing about > rsync is it if you restart it, it picks up where it left off so to > speak. With dd you have to add two arguments. > > > Rsync -aPH --exclude=/mnt/** / /mnt > ^ > > I often use: > > rsync -avHSPx / /mnt > > The "x" means don't cross file system boundaries, which is generally > what you want when migrating file systems. > > > I'm assuming you weren't migrating due to a bad disk > > Actually using rsync to migrate a bad disk is preferrable over dd > > (presuming you have no backup), since rsync will skip and warn you aboud > bad files, but "dd conv=noerror" could leave you in a bad situation > if it skips over critical metadata blocks. I always try rsync first, > with the source filesystem mounted read-only, and if that fails > I'll fall back to dd. Actually if you have the space and it was a > bad disk, I'd probably dd to a new disk or file, then mount that > disk or file read-only, and then use rsync. > > -- Rick C. Petty > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. -- Jim Flowers