gmirror: DIRTY flag?

Pawel Jakub Dawidek pjd at FreeBSD.org
Sat Sep 18 16:23:10 PDT 2004


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.
+> 
+> I was wondering about that: is bigger priority assigned to smaller or 
+> bigger number? The way I've expected it, since command line goes like this:
+> 
+> # gmirror label myname device1 [device2...]
+> 
+> I've expected that device1 would have bigger priority (semantically 
+> 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.
+> 
+> What if the master fails? :) I'm expecting this: When device1 fails, I 
+> deactivate it from the mirror, (at this time device2 becomes master) and 
+> insert another (will it automagically gain priority 3 or I'll need to 
+> specify it?). The mirror resynchronises (transferring everything from 
+> device2 to the newly inserted one, thus killing the bandwidth for 
+> 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
+> >
+> 
+> Ok. Since this is a test setup, it really isn't a problem to tear down 
+> and rebuild the mirror. Which leads to another question:
+> 
+> Is it ok to rebuild mirrors and change device orders/priorities? E.g. if 
+> I do:
+> 
+> # gmirror label myname device1 device2
+> # gmirror stop myname
+> # gmirror label myname device2 device1
+> 
+> ... nothing extraordinary is supposed to happen?

Yes, gmirror is not going to touch the data.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd at FreeBSD.org                           http://garage.freebsd.pl
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-current/attachments/20040919/710b9f38/attachment.bin


More information about the freebsd-current mailing list