gmirror bugs, how many?

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Nov 26 00:23:42 PST 2004


On Fri, Nov 26, 2004 at 02:56:15AM -0200, Jo?o Carlos Mendes Luís wrote:
+> Pawel Jakub Dawidek wrote:
+> >First mistake - wrong order. Create a mirror, than partition a mirror
+> >provider.
+> 
+> Is this a constraint in the design?  Im my point of view, geom would 
+> treat all block devices equally, no matter if they are whole disks or 
+> single partitions.

You're right and it does so.

+> If this is not the case, them maybe this should be noted in the man page.
+> 
+> Note that sometimes it is not necessary to have a whole disk redundant. 
+>  I could use part of it to temporary data, for example.  I've done this 
+> with vinum in 4-stable more than once: I get two disks, each with a copy 
+> of the root partition (which I intended to mirror with gmirror), a swap 
+> partition, a mirror vinum subdisk and a stripe vinum subdisk.  Note that 
+> in this case the data integrity and cost is more important than 
+> continuous operation.  If a disk fail, the server will stop, but no 
+> *important* data will get lost.  This is the scenario which I was testing.

You can do that with gmirror.
All I'm saying is that you first should create a mirror, then create slices
and partitions on top of mirror provider, because you want to use
mirror/vol0s1a, not ad0s1a. Note, that mirror/vol0 is one sector shorter
than ad0 and imagine a situation when gmirror stores metadata in the same
place where BSD stores it - if you first create a mirror and then
partitions on ad0 you'll overwrite gmirror metadata. This very painful,
that in MBR metadata is visible on traffic providers and I don't want to
repeat that mistake.

+> >+>     Now, lets reboot.  I could not unload geom_mirror, since it was 
+> >+> preloaded during boot, is this expected?  The device could not be 
+> >+> unloaded, but the volume disapeared (gmirror list, ls /dev/mirror). 
+> >
+> >If there is no mirror configured, you should be able to unload it.
+> 
+> Before putting it in /boot/loader.conf, unload worked, even with mirror 
+> devices configured, IIRC.  Only after loader.conf preloading this 
+> problem appeared.

What error do you get when you try to do this?

+> The man page says only:
+> 
+> -h           Hardcode providers' names in metadata.
+> 
+> and does not explain when I should use this.
+> 
+> Do you mean that if I want it to use ad1s1 as the provider, and not ad1, 
+> -h is what I want?

Only when you share the last sector between those two providers.
You can still create ad1s1, which is one sector shorter.

+> >
+> >+>     Is there any gmirror hacker around to fix these?
+> >
+> >There is nothing to fix.
+> 
+> Surely there is.  At least the manual.

I've to agree here.:)

+> And even if gmirror is correct, there's also the problem shown with 
+> disklabel in my previous email.

What problem is there when you use proper order of doing things?

-- 
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-hackers/attachments/20041126/ec2aaa69/attachment.bin


More information about the freebsd-hackers mailing list