From owner-freebsd-questions@FreeBSD.ORG Thu Jan 27 13:03:08 2005 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 18D9C16A4CE for ; Thu, 27 Jan 2005 13:03:08 +0000 (GMT) Received: from mail.int.xm.co.za (email.xm.co.za [196.23.175.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2314443D5C for ; Thu, 27 Jan 2005 13:03:07 +0000 (GMT) (envelope-from al@xms.co.za) Received: from [192.168.1.193] (helo=linux.site) by mail.int.xm.co.za with smtp (Exim 4.42 (FreeBSD)) id 1Cu9Ox-0000H2-N6 for freebsd-questions@freebsd.org; Thu, 27 Jan 2005 15:09:35 +0200 Date: Thu, 27 Jan 2005 15:05:01 +0200 From: Andrew Lewis To: freebsd-questions@freebsd.org Message-Id: <20050127150501.1b80c59e@linux.site> X-Mailer: Sylpheed-Claws 0.9.12 (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Setting up RAID1 with gmirror 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: Thu, 27 Jan 2005 13:03:08 -0000 Got a live system I'm trying to setup RAID1 on, using gmirror. This is my first attempt at such a thing. Two hard-disks: ad0 has a UFS2+softupdates formatted / partition and a swap partition. ad2 is a clean disk. I've been following the instructions @: http://people.freebsd.org/~rse/mirror/ I used 'Approach 1' from the instructions @ the URL above: dd if=/dev/zero of=/dev/ad2 bs=512 count=79 gmirror label -v -n -b round-robin gm0 /dev/ad2 gmirror load fdisk -v -B -I /dev/mirror/gm0 bsdlabel -w -B /dev/mirror/gm0s1 bsdlabel -e /dev/mirror/gm0s1 newfs -U /dev/mirror/gm0s1a mount /dev/mirror/gm0s1a /mnt dump -L -0 -f- / | (cd /mnt; restore -r -v -f-) cp -p /mnt/etc/fstab /mnt/etc/fstab.orig sed -e 's/dev\/ad0/dev\/mirror\/gm0/g' /mnt/etc/fstab echo 'swapoff="YES"' >>/mnt/etc/rc.conf echo 'geom_mirror_load="YES"' >>/mnt/boot/loader.conf echo "2:ad(2,a)/boot/loader" >/boot.config reboot. Machine no longer boots with F1, booted with F5 (Second disk) fine; I neglected to look @ what it was complaining about. Assuming this wasn't supposed to happen? Seems GEOM is working, so now I continue with the instructions for joining the first disk to the mirror. dd if=/dev/zero of=/dev/ad0 bs=512 count=79 gmirror configure -a gm0 -bash-2.05b# gmirror insert gm0 /dev/ad0 Provider ad0 too small. ^- Oops. Where did I go wrong? And what should I do now to get it working properly without killing everything? :) Seems I nuked swap, which is fine, because this machine can handle without it... *sigh* :) Thanks for the help in advance. -AL.