Slices + stripes and mirrors

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed May 17 17:21:57 UTC 2006


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

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20060517/bfc04ab1/attachment.pgp


More information about the freebsd-geom mailing list