gmirror & sparc64 oddness

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Apr 11 06:57:40 PDT 2005


On Mon, Apr 11, 2005 at 01:24:50PM +0100, Chris Elsworth wrote:
+> Hello,
+> 
+> I'm trying FreeBSD 5.4 on a sparc64 (T1/AC200) ; it's a RELENG_5_4
+> checkout as of last night, so RC2.
+> 
+> After I create a gmirror and make some partitions in it, I'm not
+> seeing any entries for the partitions in /dev/mirror, so I can't do
+> anything with them. Here's results from sunlabel for the mirror (gm0)
+> and it's one underlying provider, da4:
+> 
+> t1# sunlabel  mirror/gm0
+> # /dev/mirror/gm0:
+> text: SUN9.0G cyl 4924 alt 2 hd 27 sec 133
+> bytes/sectors: 512
+> sectors/cylinder: 3591
+> sectors/unit: 17682084
+> 
+> 8 partitions:
+> #
+> # Size is in sectors.
+> # Offset is in cylinders.
+> #    size       offset      tag         flag
+> #    ---------- ----------  ----------  ----
+>   a:     265734          0        root    wu
+>   c:   17682084          0      backup    wu
+> 
+> 
+> t1# sunlabel da4
+> # /dev/da4:
+> text: SUN9.0G cyl 4924 alt 2 hd 27 sec 133
+> bytes/sectors: 512
+> sectors/cylinder: 3591
+> sectors/unit: 17682084
+> 
+> 8 partitions:
+> #
+> # Size is in sectors.
+> # Offset is in cylinders.
+> #    size       offset      tag         flag
+> #    ---------- ----------  ----------  ----
+>   a:     265734          0        root    wu
+>   c:   17682084          0      backup    wu
+> 
+> 
+> t1# ls /dev/mirror
+> gm0
+> 
+> t1# ls /dev/da4*
+> /dev/da4
+> 
+> 
+> But if I remove the mirror the partitions appear in da4:
+> 
+> t1# gmirror remove gm0 da4
+> t1# ls /dev/da4*
+> /dev/da4        /dev/da4a       /dev/da4c
+> 
+> 
+> I found a reference to this also asked previously over in
+> freebsd-sparc64: 
+> http://lists.freebsd.org/pipermail/freebsd-sparc64/2005-March/002834.html
+> 
+> But there was no response. Is this a known problem or something we
+> both did wrong?

(I'm not reading freebsd-sparc64@ mailing list.)

No, the problem is that geom_sunlabel class operates only on rank#1
providers (disks, etc.).
Mirrors are not rank#1 of course, because there are providers under them.
This was done to prevent recursive labels creations.

geom_bsd and geom_mbr are already fixed and are using MD5 to verify
if metadata were already used for slices/labels creation.

I don't have HW to test this, but please try this patch and tell me
if it works for you:

	http://people.freebsd.org/~pjd/patches/geom_sunlabel.c.patch

PS. I'm CCing author of post from sparc64 at .

-- 
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/20050411/f37bfbc8/attachment.bin


More information about the freebsd-geom mailing list