Re: FreeBSD-current/Xen and block device enumeration

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Tue, 19 May 2009 03:05:09 +0800
(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_at_freebsd.org>:
> This config:
>
> disk = [
>        'phy:/dev/hosting2_data2/XEN_freebsd_root,0x01,w',
>        'phy:/dev/hosting2_data2/XEN_freebsd_swap,0x02,w'
>        ]

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-----  1 root  operator    0,  41 May 18 02:51 /dev/xbd0
> crw-r-----  1 root  operator    0,  41 May 18 02:51 /dev/xbd0

.. or that.


Adrian
Received on Mon May 18 2009 - 17:05:11 UTC

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