Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 19:19:55 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Darcy Buskermolen <darcy@wavefire.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Slices + stripes and mirrors
Message-ID:  <20060517171955.GB838@garage.freebsd.pl>
In-Reply-To: <200605161555.08195.darcy@wavefire.com>
References:  <200605161555.08195.darcy@wavefire.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--PmA2V3Z32TCmWXqI
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 16, 2006 at 03:55:07PM -0700, Darcy Buskermolen wrote:
+>=20
+> I have a 6.1 setup with 4 identical 300GB disks, ad4,6,8,10.  I'd like t=
o=20
+> create a bootable mirror (gm0s1) of all 4 disks on a 512MB slice, and ha=
ve=20
+> the remaining space a big slice (gs0s2).  I've tried several different t=
hings=20
+> using the docs found @ http://people.freebsd.org/~rse/mirror/ as a guide=
,=20
+> with little luck, what I usually end up with an invalid partition table,=
 or=20
+> no boot device error when I reboot.  I think the key is somehow in how t=
he=20
+> slices are created on the original (ad4) disk.
+>=20
+> If someone could provide me with some insight on how to accomplish this =
that=20
+> would be very much usefull.
+>=20
+>=20
+> [------------------ad4-----------------]
+> [------ad4s1------][------ad4s2------]
+> [--mirror/gm0s1--][--stripe/gs0s2--]
+>=20
+> [-----------------ad6------------------]
+> [------ad6s1------][------ad6s2------]
+> [--mirror/gm0s1--][--stripe/gs0s2--]
+>=20
+> [------------------ad8-----------------]
+> [------ad8s1------][------ad8s2------]
+> [--mirror/gm0s1--][--stripe/gs0s2--]
+>=20
+> [-----------------ad10-----------------]
+> [------ad10s1-----][-----ad10s2-----]
+> [--mirror/gm0s1--][--stripe/gs0s2--]

Ok, first initialize your disks and create two slices on them:

	# apply "fdisk -Bi /dev/ad%1" 4 6 8 10

(If they are identical, you can probably initizlize one of them and copy
 first 63 sectors to the others.)

Once you have your slices, create a mirror:

	# gmirror label -b round-robin gm0s1 /dev/ad{4,6,8,10}s1

And partition (needed for booting):

	# bsdlabel -wB /dev/mirror/gm0s1

Now, the root file system:

	# newfs /dev/mirror/gm0s1a

Mount it and copy files there.

Creating stripe is also easy:

	# gstripe label -s 16384 gs0s2 /dev/ad{4,6,8,10}s2

You can create file system directly on it:

	# newfs -U /dev/stripe/gs0s2

BTW. You may consider creating root file system only on a two-slices
mirror and in addition create swap on a mirror built from the rest two
slices.

Good luck!

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--PmA2V3Z32TCmWXqI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFEa1s7ForvXbEpPzQRAjXCAKDrybnn6oHoPNsoYHbhzM7uj5LzDQCgyLTj
aHdtmTZZf2Hqb22BFYYAe60=
=v01R
-----END PGP SIGNATURE-----

--PmA2V3Z32TCmWXqI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060517171955.GB838>