From owner-freebsd-current@FreeBSD.ORG Sun Oct 10 13:22:49 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DDB916A4CE for ; Sun, 10 Oct 2004 13:22:49 +0000 (GMT) Received: from chello084114137224.1.15.vie.surfer.at (chello084114137224.1.15.vie.surfer.at [84.114.137.224]) by mx1.FreeBSD.org (Postfix) with SMTP id 20F6D43D41 for ; Sun, 10 Oct 2004 13:22:48 +0000 (GMT) (envelope-from 4711@chello.at) Received: (qmail 94518 invoked from network); 10 Oct 2004 13:22:46 -0000 Received: from matrix010.matrix.net (192.168.123.10) by ns.matrix.net with SMTP; 10 Oct 2004 13:22:46 -0000 From: Christian Hiris <4711@chello.at> To: freebsd-current@freebsd.org, axel.gruner@suedfactoring.de Date: Sun, 10 Oct 2004 15:22:28 +0200 User-Agent: KMail/1.7 References: <20041010110159.GA91160@pcs28.suedfactoring.de> In-Reply-To: <20041010110159.GA91160@pcs28.suedfactoring.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410101522.45548.4711@chello.at> Subject: Re: RAID1 with gmirror X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2004 13:22:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 10 October 2004 13:01, Axel S. Gruner wrote: > Hi, > > i am looking for a way to set up a RAID1 with gmirror also on the / > partition. > Is there a known way to do so? Setting up without / is not a problem, > but my brain gets sick while thinking about to set up gmirror also for > /. I migrated from an existing mirror, which was created by the 'atacontrol create' command to the new gmirror. I migrated to gmirror, because I installed a second PDC20269 controller, which atacontrol couldn't handle. On 5.3- BETA7 with patched gmirror.c booting from the mirror works, but there is still the problem for me that the root-mirror starts degraded after a reboot and I need to run 'gmirror activate' to start synchronization. I'm just rebuilding my root-mirror and will try if the a shutdown command does a better job then an ordinary reboot when restarting my system. The migrating process (as far as I remember): The existing raid1 array resided on disks ad1 and ad3 where slice1 holds 3 4.2-BSD partitions and a swap partition: ar0s1s / ar0s1b swap ar0s1d /usr ar0s1e /home 1. Change /etc/fstab to be able to reboot / (read-only) from ad3: # ee /etc/fstab /dev/ar0s1a --> /dev/ad3s1a /dev/ar0s1b --> /dev/ad3s1b /dev/ar0s1d --> /dev/ad3s1d /dev/ar0s1e --> /dev/ad3s1e 2. Boot from ad3s1a into single user mode and delete the existing raid1: # atacontrol delete 0 3. Mount / and /usr to edit fstab and loader.conf on ad0: # mount / # mount /usr # mount /dev/ad0s1a /mnt # ee /mnt/etc/fstab Change devices to the new (ie. mirror0) gmirror devices: /dev/ad3s1a --> /dev/mirror/mirror0s1a /dev/ad3s1b --> /dev/mirror/mirror0s1b /dev/ad3s1d --> /dev/mirror/mirror0s1c /dev/ad3s1e --> /dev/mirror/mirror0s1d # echo "geom_mirror_load="YES"" >> /mnt/boot/loader.conf # gmirror load # gmirror configure -v -b load mirror0 ad0 4. Boot from ad0s1a and add disk ad3 to the mirror: # gmirror insert -v -p 1 mirror0 ad3 HTH ch - -- Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBaTel09WjGjvKU74RAq8KAJ96Y8YluaID5MiV4dRbefDMDwhdIQCfb6BU /A+kilLmb2moeWwnu4lfsXM= =1pGh -----END PGP SIGNATURE-----