Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2009 03:05:09 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        freebsd-xen@freebsd.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: FreeBSD-current/Xen and block device enumeration
Message-ID:  <d763ac660905181205p40c0049fo522449221b3020f3@mail.gmail.com>
In-Reply-To: <d763ac660905181000o6f0b9bc8l88f976f7126a87cf@mail.gmail.com>
References:  <d763ac660905181000o6f0b9bc8l88f976f7126a87cf@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(Cross-posting to -current because of the way a badly confused Xen
DomU confuses GEOM and populates invalid stuff.)

2009/5/19 Adrian Chadd <adrian@freebsd.org>:
> This config:
>
> disk =3D [
> =A0 =A0 =A0 =A0'phy:/dev/hosting2_data2/XEN_freebsd_root,0x01,w',
> =A0 =A0 =A0 =A0'phy:/dev/hosting2_data2/XEN_freebsd_swap,0x02,w'
> =A0 =A0 =A0 =A0]

Confuses some "linux" device unit naming type magic in the blkfront device =
code.

Anyway. To get xbd0 and xbd1 I need to use 0xCA00 and 0xCA10. The code
matches on major 202 (0xca) and shifts the minor bits right to get
partition ids (which I'm not using here.)

This outlines some sanity checking and debugging which should be
improved a little.

> Gives this output in dmesg:
>
> xbd0: 10240MB <Virtual Block Device> at device/vbd/1 on xenbus0
> GEOM: new disk xbd0
> xbd1: 512MB <Virtual Block Device> at device/vbd/2 on xenbus0
> WARNING: WITNESS option enabled, expect reduced performance.
> GEOM: new disk xbd0

.. since I shouldn't be able to do that.

>
> and then ls -l /dev/xbd* :
>
> freebsd_domu# ls -l /dev/xbd*
> crw-r----- =A01 root =A0operator =A0 =A00, =A041 May 18 02:51 /dev/xbd0
> crw-r----- =A01 root =A0operator =A0 =A00, =A041 May 18 02:51 /dev/xbd0

.. or that.


Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d763ac660905181205p40c0049fo522449221b3020f3>