Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Sep 2004 01:23:06 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        current@FreeBSD.org
Subject:   Re: gmirror: DIRTY flag?
Message-ID:  <20040918232306.GC30151@darkness.comp.waw.pl>
In-Reply-To: <414CAD21.9060409@fer.hr>
References:  <414C2E85.6090904@fer.hr> <20040918185841.GA30151@darkness.comp.waw.pl> <414CAD21.9060409@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help

--yexORrMnrnY/PSAO
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Sep 18, 2004 at 11:48:17PM +0200, Ivan Voras wrote:
+> >Remember, that 'prefer' algorithm is based on priority, so in your case
+> >ggate0 will be used for reading as component with bigger priority.
+>=20
+> I was wondering about that: is bigger priority assigned to smaller or=20
+> bigger number? The way I've expected it, since command line goes like th=
is:
+>=20
+> # gmirror label myname device1 [device2...]
+>=20
+> I've expected that device1 would have bigger priority (semantically=20
+> speaking).

Nope. device1 gets priority 0 and device2 priority 1.

+> >Priority is also important for synchronization. If you have power
+> >failure, component with the biggest priority will be used as a master
+> >component, and all the rest components synchronize to him.
+>=20
+> What if the master fails? :) I'm expecting this: When device1 fails, I=
=20
+> deactivate it from the mirror, (at this time device2 becomes master) and=
=20
+> insert another (will it automagically gain priority 3 or I'll need to=20
+> specify it?). The mirror resynchronises (transferring everything from=20
+> device2 to the newly inserted one, thus killing the bandwidth for=20
+> applications?), and device2 keeps the master status.

If you don't specify priority it'll take 0, but remember that syncid is
more important attribute. Priority is only used in synchronization process
if syncids are equal and components are marked as dirty.

+> >Command for changing priority for running mirror is missing, but you
+> >can increase priority for local component by doing:
+> >
+> >	# gmirror remove netmirror ad2s1e
+> >	# gmirror insert -p 2 netmirror ad2s1e
+> >
+>=20
+> Ok. Since this is a test setup, it really isn't a problem to tear down=
=20
+> and rebuild the mirror. Which leads to another question:
+>=20
+> Is it ok to rebuild mirrors and change device orders/priorities? E.g. if=
=20
+> I do:
+>=20
+> # gmirror label myname device1 device2
+> # gmirror stop myname
+> # gmirror label myname device2 device1
+>=20
+> ... nothing extraordinary is supposed to happen?

Yes, gmirror is not going to touch the data.

--=20
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

--yexORrMnrnY/PSAO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBTMNaForvXbEpPzQRAvutAJsEa1nqqiwIr+GaDIACjTC+dWQZRwCbBAU9
xGMOwSaQWcaJ20IoQA4K4iE=
=s1fh
-----END PGP SIGNATURE-----

--yexORrMnrnY/PSAO--



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