Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linux vs. NetBSD disk enumeration



On Thu, Feb 09, 2012 at 04:33:05PM -0800, Jeff Rizzo wrote:
> Does this block device number remain consistent every time?

It does. Otherwise the name would change for linux too.

> Is
> there any way we can use it in the kernel as a locator for xbd*?

It should be possible using
xbd0 at xenbus? id xxx

for example, I have:
disk = [ 'file:/domains/nb1.vnd,0x1,w' ]

and NetBSD probes it as:
xbd0 at xenbus0 id 1: Xen Virtual Block Device Interface

> 
> OK, I'm not 100% sure what's going on, but I'm sure it's because
> Amazon have their own method of putting the devices in xenstore.
> 
> Here's the dmesg from an instance I just tried;  two of the xbd
> devices are ones I normally use (and which reliably and consistently
> show up as xbd0/xbd1 when I only use them), and two are ones I added
> for this test.  Unfortunately, it doesn't print any information
> about them but their xenbus id, so I'm not even certain which one
> gets mapped where.
> 
> NetBSD 5.1.2 (XEN3PAE_DOMU) #0: Thu Feb  2 17:18:36 UTC 2012
> builds%b6.netbsd.org@localhost:/home/builds/ab/netbsd-5-1-2-RELEASE/i386/201202021012Z-obj/home/builds/ab/netbsd-5-1-2-RELEASE/src/sys/arch/i386/compile/XEN3PAE_DOMU
> total memory = 1700 MB
> avail memory = 1662 MB
> mainbus0 (root)
> hypervisor0 at mainbus0: Xen version 3.4
> vcpu0 at hypervisor0: Intel 686-class, 2266MHz, id 0x106a5
> xenbus0 at hypervisor0: Xen Virtual Bus Interface
> xencons0 at hypervisor0: Xen Virtual Console Driver
> xencons0: using event channel 2
> npx0 at hypervisor0: using exception 16
> xbd0 at xenbus0 id 2049: Xen Virtual Block Device Interface
> xbd1 at xenbus0 id 2080: Xen Virtual Block Device Interface
> xbd2 at xenbus0 id 2050: Xen Virtual Block Device Interface
> xbd3 at xenbus0 id 2051: Xen Virtual Block Device Interface

The xenbus id are 2049, 2050, 2051 and 2080

I just hope amazon doesn't change them over time. This would change the
device name for linux too, but with LVM or using LABEL= in /etc/fstab,
linux can deal with it.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index