Hardcoding gmirror provider [was Re: Problem with migrating...]

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Feb 6 11:12:11 PST 2005

On Sun, Feb 06, 2005 at 11:05:08AM -0800, George Hartzell wrote:
+> I've figured out that if I hardcode the provider when I label my
+> mirror everything seems to work out, which leaves me confused.  
+> Here's the label command I was using (modified for my situation):
+>   gmirror label -v -n -b round-robin disk0 /dev/ad0s1
+> After running that command, "gmirror list" tells me that the consumer
+> for disk0 is "Name: ad0", even though I've specified ad0s1 above and
+> when I bsdlabel the disk the slice table gets clobbered.
+> If I do this instead:
+>   gmirror label -v -n -h -b round-robin disk0 /dev/ad0s1
+> then "gmirror list" tells me that the consumer is "Name: ad0s1" and
+> bsdlabel doesn't stomp on the slice table.
+> Am I [just] confused, and I tripping over a sharp piece of exposed
+> code, or is this a bug.
+> FWIW, I get the same behaviour on:
+>   FreeBSD merlin.alerce.com 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #9: Sat Dec 18 12:38:37 PST 2004
+> root at merlin.alerce.com:/usr/obj/usr/src/sys/MERLIN  i386
+> and 
+>   Freesbie 1.1

It happens because ad0 and ad0s1 share the same last sector.
To fix this you should use '-h' option as you did or you should recreate
ad0s1 slice one sector smaller.

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-stable/attachments/20050206/87cb8832/attachment.bin

More information about the freebsd-stable mailing list