Date: Sat, 16 Dec 2006 18:09:10 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Max Laier <max@love2party.net> Cc: freebsd-geom@freebsd.org Subject: Re: gmirror comes up DEGRADED Message-ID: <20061216170910.GC10541@garage.freebsd.pl> In-Reply-To: <200612161537.21348.max@love2party.net> References: <200612161537.21348.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--lMM8JwqTlfDpEaS6 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 16, 2006 at 03:37:15PM +0100, Max Laier wrote: > Hi, >=20 > I'm new to really playing with gmirror and friends, so please forgive me= =20 > if this is a FAQ - my searches didn't turn up anything. Please CC me,=20 > for I'm not on the list. >=20 > Following setup: 6.2-pre as of Wednesday >=20 > ad0, ad2 250G ata on > atapci0@pci0:31:1: class=3D0x010180 card=3D0x80281043 chip=3D0x244b8086= =20 > rev=3D0x05 hdr=3D0x00 > vendor =3D 'Intel Corporation' > device =3D '82801BA (ICH2) UltraATA/100 IDE Controller' > class =3D mass storage > subclass =3D ATA >=20 > mirror/gm0 over ad0, ad2 >=20 > mirror/gm0s1 spanning all of the available space on gm0 > mirror/gm0s1a spanning all of the available space on gm0s1 >=20 > mirror/gm0s1a.bde gbde encryption on gm0s1a.bde >=20 > Now if I wait for the mirror to get in sync and do a reboot, it comes up= =20 > DEGRADED and resyncs ad0 (again) :-\ Does that mean I have to stop=20 > everything manually before rebooting? Is there a fundamental error in=20 > the setup that I can remedy? How do you do this right? It certainly is= =20 > not a good idea to do it the other way round (i.e. mirror two gbde=20 > provider), right? >=20 > Any help greatly appreciated. If I read the code properly, the problem you are seeing is because gbde doesn't close its consumers on shutdown. It opens consumer r1w1e1 on attach, but it only close it on manual detach. This is wrong. It should open consumer on first provider open or should close it on shutdown. I decided not to touch gbde, so you need to ask phk@ or someone else to fix it. I also found a bug in g_bde_access() function: if ((cp->acr + dr) =3D=3D 0 && (cp->acw + dw) =3D=3D 0 && (cp->ace + de) = =3D=3D 1) { I think it should be: if ((cp->acr + dr) =3D=3D 1 && (cp->acw + dw) =3D=3D 0 && (cp->ace + de) = =3D=3D 1) { --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --lMM8JwqTlfDpEaS6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD4DBQFFhCg2ForvXbEpPzQRAiLGAKDevMcAUon67hdbkGlahU76VbzQ8QCYlS1E OanVOGEMe2nI499uXMsphA== =z+i/ -----END PGP SIGNATURE----- --lMM8JwqTlfDpEaS6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061216170910.GC10541>