gmirror question

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Jun 29 07:42:54 GMT 2005


On Tue, Jun 28, 2005 at 12:20:21PM -0400, Michael Grant wrote:
+> I have 2 boxes connected together with their scsi busses in a cluster.
+> 
+> Each box needs to mirror different things.  It seems that when
+> 'gmirror load' is executed, it hunts around and mirrors everything
+> possible.  This, of course, is a disaster for me.
+> 
+> Is there any way to tell gmirror when it starts which providers to
+> mirror? I don't want gmirror hunting around, I want to tell it exactly
+> which providers to start up.

There is no clean way to achieve this, sorry.
The hack I can recommend goes like this:

Gmirror read the last provider's sector looking for metadata, so if there
will be no metadata there, it will leave provider alone.
You can use gnop(8) to decrease providers size, so original providers will
not be recognized by gmirror class. Let's say you want to mirror da0 and 
a1 on machine0 and da2 and da3 on machine1:

	machine0# gnop create -s <size_of_da0>-512 da0
	machine0# gnop create -s <size_of_da1>-512 da1
	machine0# gmirror label m0 da0.nop da1.nop

	machine1# gnop create -s <size_of_da2>-512 da2
	machine1# gnop create -s <size_of_da3>-512 da3
	machine1# gmirror label m1 da2.nop da3.nop

Now, da[0-3] providers are not recognized by gmirror class, all you need
to do is to create da[01].nop providers on start on machine0 and da[23].nop
on machine1.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
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-geom/attachments/20050629/12fd8eaa/attachment.bin


More information about the freebsd-geom mailing list