From owner-freebsd-current@FreeBSD.ORG Mon May 18 19:05:11 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A40F0106564A; Mon, 18 May 2009 19:05:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 46F118FC0C; Mon, 18 May 2009 19:05:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so2250179qwe.7 for ; Mon, 18 May 2009 12:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=9RUDr08hQeiL0STeG3j7Mc5/8ll27jatqgjhw8y2VSo=; b=UdHbPxbZHG/Ti9dt1d0YsB+HUDAQQQI26JeFgQEgW0WG8jLpXjHXt9oJOyIZwZ9308 /i06YPa0mrxg0wHv3vyCmzhMStHysCLt/1IcvTD8XoCWFMg240VpG20bZOZxVVj8lgNJ D3UUy4coAFpOLecjp212yoSC1SwtI5jdV0+w0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=FVwhnrm3jCemZr6Mt4Y9eQtDFjPPeTEP8u381DO0lARmUMJF6+yZ053r5+cyGt+DIe Wm4C+eDe8P/p+JDlrjpe8XtBH2oTlHeFusqVoJdsqG7W/J63w0ww82UiQ1/pgXwk/rtF qtRXTy5puukvkkzF+cIyyxQdGoQenovkEi9Uw= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.84.82 with SMTP id i18mr2999987qcl.90.1242673509896; Mon, 18 May 2009 12:05:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 May 2009 03:05:09 +0800 X-Google-Sender-Auth: 63944ac50c6858bd Message-ID: From: Adrian Chadd To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: FreeBSD-current/Xen and block device enumeration X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 19:05:12 -0000 (Cross-posting to -current because of the way a badly confused Xen DomU confuses GEOM and populates invalid stuff.) 2009/5/19 Adrian Chadd : > 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 at device/vbd/1 on xenbus0 > GEOM: new disk xbd0 > xbd1: 512MB 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