Re: md(4) broken on CURRENT?

From: Kazuaki ODA <kazuaki_at_aliceblue.jp>
Date: Sat, 09 Jun 2007 00:17:41 +0900
illoai_at_gmail.com wrote:
> On 06/06/07, youshi10_at_u.washington.edu <youshi10_at_u.washington.edu> wrote:
> 
>> > On Thu, 7 Jun 2007, Kazuaki ODA wrote:
>> >
>> >> On CURRENT amd64 cvsup'ed yesterday:
>> >>
>> >> # dd if=/dev/zero of=/var/tmp/disk1.img bs=1k count=1m
>> >> 1048576+0 records in
>> >> 1048576+0 records out
>> >> 1073741824 bytes transferred in 29.206387 secs (36763939 bytes/sec)
>> >> # dd if=/dev/zero of=/var/tmp/disk2.img bs=1k count=1m
>> >> 1048576+0 records in
>> >> 1048576+0 records out
>> >> 1073741824 bytes transferred in 27.405935 secs (39179171 bytes/sec)
>> >> # mdconfig -a -t vnode -f /var/tmp/disk1.img
>> >> md0
>> >> # mdconfig -a -t vnode -f /var/tmp/disk2.img
>> >> md1
>> >> # mdconfig -l
>> >> <Nothing outputted>
>> >> # gmirror load
>> >> # gmirror label data md0 md1
>> >> # gmirror status
>> >> gmirror: Cannot get GEOM tree: Unknown error: -1
>> >>
>> >> Hmm, is md(4) broken on CURRENT?  Or is this a problem only on amd64?
>> >>
> . . .
>> Works for me on 7-CURRENT/amd64 cvsup'ed and completely rebuilt Sunday.
>> -Garrett
> 
> With csup as of late in the day 07jun (built last night),
> on i386, it works as expected.
> 

Thanks for your trial and information.  I finally found the reason why I 
cannot get GEOM tree.  That was a problem specific for my environment. 
I ran the commands described in my previous post with a DVD-ROM in a 
drive, and the DVD-ROM had a label (GEOM_LABEL) encoded in Shift_JIS, 
which is one of popular encodings in Japan.  Since the XML parser used 
for parsing GEOM XML tree does not expect the encoding (probably it 
expects UTF-8), geom_xml2tree() defined in libgeom considers it invalid 
and the function fails, so I cannot get GEOM tree.
Now I can easily reproduce the same issue.  For example:

# dd if=/dev/zero of=/var/tmp/disk1.img bs=1k count=1k
# mdconfig -a -t vnode -f /var/tmp/disk1.img
md0
# glabel create <LABEL_NAME_ENCODED_OTHER_THAN_UTF8> md0
# glabel list
glabel: Cannot get GEOM tree: Unknown error: -1


-- 
Kazuaki ODA
Received on Fri Jun 08 2007 - 13:39:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC