Gmirror on a partition of a slice

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Sep 13 01:19:16 PDT 2007


On Wed, Sep 12, 2007 at 05:43:50PM +0200, n j wrote:
> Hello,
> 
> 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.
> 
> 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):
> 
> 1) install FreeBSD on 1st disk /dev/da0s1a
> 
> 2) create slice on 2nd disk fdisk -BI /dev/da1
> 
> 3) bsdlabel -w -B /dev/da1s1
> 
> 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
> 
> 5) gmirror label -h -n -b round-robin gm0 /dev/da1s1a to create mirror
> 
> 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

-- 
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/20070913/b27fa307/attachment.pgp


More information about the freebsd-geom mailing list