From owner-freebsd-geom@FreeBSD.ORG Thu Sep 13 08:19:16 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344DD16A418 for ; Thu, 13 Sep 2007 08:19:16 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id DF70B13C459 for ; Thu, 13 Sep 2007 08:19:15 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 24AC045EAE; Thu, 13 Sep 2007 10:19:14 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E2CDA456AB; Thu, 13 Sep 2007 10:19:07 +0200 (CEST) Date: Thu, 13 Sep 2007 10:17:48 +0200 From: Pawel Jakub Dawidek To: n j Message-ID: <20070913081748.GA1155@garage.freebsd.pl> References: <92bcbda50709120843o6af4bd38v8725be3f5b765b0e@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <92bcbda50709120843o6af4bd38v8725be3f5b765b0e@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: Gmirror on a partition of a slice X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2007 08:19:16 -0000 --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 12, 2007 at 05:43:50PM +0200, n j wrote: > Hello, >=20 > I've originally sent this mail to -questions, but -geom is probably > the better place to ask for pointers to any help regarding installing > gmirror on a partition of a slice. Here's the problem. >=20 > Using http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html > and http://people.freebsd.org/~rse/mirror/ as pointers, as well as > handbook and man pages, I tried to set up gmirror on a partition of a > slice the following way (using identical 1Gb disks da0 & da1): >=20 > 1) install FreeBSD on 1st disk /dev/da0s1a >=20 > 2) create slice on 2nd disk fdisk -BI /dev/da1 >=20 > 3) bsdlabel -w -B /dev/da1s1 >=20 > 4) edit BSD label to create a ~500 Mb partition for gmirror > a: 1000000 16 4.2BSD 2048 16384 8 > c: 2097120 0 unused 0 0 # "raw" part >=20 > 5) gmirror label -h -n -b round-robin gm0 /dev/da1s1a to create mirror >=20 > 6) fdisk -BI /dev/mirror/gm0 to create a slice in gm0 Don't do this. > 7) bsdlabel -w -B /dev/mirror/gm0s1 to create root partition > a: 995951 16 4.2BSD 2048 16384 8 > c: 995967 0 unused 0 0 # "raw" part And this. > 8) newfs, mount, dump/restore to /dev/mirror/gm0s1a, modify fstab, > loader.conf, create boot.config to boot off mirror newfs /dev/mirror/gm0. Copy the data from da0s1a to /dev/mirror/gm0. Modify /etc/fstab on da0s1a to mount root as /dev/mirror/gm0. For example: # newfs -U /dev/mirror/gm0 # mount -o noatime /dev/mirror/gm0 /mnt # cd / # tar -c --one-filesystem -f - . | tar xpf - -C /mnt/ # umount /mnt --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG6PIsForvXbEpPzQRAiaCAKCOYfBXOnbdOlmFxYsQUcLlJW7uLQCeOCCr bR4VulPpC1NNO1GtfiJimPU= =wkCj -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--