RAID1 with gmirror

Chris Elsworth chris at shagged.org
Sun Oct 10 09:59:02 PDT 2004


On Sun, Oct 10, 2004 at 03:22:28PM +0200, Christian Hiris wrote:
> 
> 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
            ^^^^^^^^^
	    label?

I'm quite interested that you didn't bother re-labelling the new
mirror device? I always thought that you had to (and I have been doing
this):

1) boot onto A.N.Other disk that you're not setting the RAID up on
2) gmirror label mirror0 ad0
3) bsdlabel -w -B ad0
4) bsdlabel -e ad0 [taking into account the new 16 byte offset]
5) newfs..
6) dump A.N.Otherdisk | restore /dev/mirror/mirror0a..
7) fix up fstab/loader.conf to get booting working

Is this all completely unnecessary? The first few times I played with
gmirror, I was doing something similar to your method, but if you do
bsdlabel -r /dev/mirror/mirror0s1 (or whatever) on your setup, don't
you get warnings about partition sizes? That's what worried me enough
to go through all the rigmarole above, which fixes those warnings.

-- 
Chris


More information about the freebsd-current mailing list