Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 2004 15:22:28 +0200
From:      Christian Hiris <4711@chello.at>
To:        freebsd-current@freebsd.org, axel.gruner@suedfactoring.de
Subject:   Re: RAID1 with gmirror
Message-ID:  <200410101522.45548.4711@chello.at>
In-Reply-To: <20041010110159.GA91160@pcs28.suedfactoring.de>
References:  <20041010110159.GA91160@pcs28.suedfactoring.de>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 10 October 2004 13:01, Axel S. Gruner wrote:
> Hi,
>
> i am looking for a way to set up a RAID1 with gmirror also on the /
> partition.
> Is there a known way to do so? Setting up without / is not a problem,
> but my brain gets sick while thinking about to set up gmirror also for
> /.

I migrated from an existing mirror, which was created by the  'atacontrol 
create' command to the new gmirror. I migrated to gmirror, because I 
installed a second PDC20269 controller, which atacontrol couldn't handle.

On 5.3- BETA7 with patched gmirror.c booting from the mirror works, but there 
is still the problem for me that the root-mirror starts degraded after a 
reboot and I need to run 'gmirror activate' to start synchronization. I'm 
just rebuilding my root-mirror and will try if the a shutdown command does a 
better job then an ordinary reboot when restarting my system.

The migrating process (as far as I remember):

The existing raid1 array resided on disks ad1 and ad3 where slice1 holds 3 
4.2-BSD partitions and a swap partition:
ar0s1s /
ar0s1b swap
ar0s1d /usr
ar0s1e /home

1. Change /etc/fstab to be able to reboot / (read-only) from ad3:
# ee /etc/fstab
/dev/ar0s1a --> /dev/ad3s1a
/dev/ar0s1b --> /dev/ad3s1b 
/dev/ar0s1d --> /dev/ad3s1d
/dev/ar0s1e --> /dev/ad3s1e

2. Boot from ad3s1a into single user mode and delete the existing raid1:
# atacontrol delete 0  

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

4. Boot from ad0s1a and add disk ad3 to the mirror:
# gmirror insert -v -p 1 mirror0 ad3
 
HTH
ch

- -- 
Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE 
OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBaTel09WjGjvKU74RAq8KAJ96Y8YluaID5MiV4dRbefDMDwhdIQCfb6BU
/A+kilLmb2moeWwnu4lfsXM=
=1pGh
-----END PGP SIGNATURE-----



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