[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Linux vs. NetBSD disk enumeration
On 2/9/12 10:45 AM, Manuel Bouyer wrote:
Yes, it's because drives are numbered in the order they're found.
We have the same issue with e.g. hot-swap bays; if you insert a new drive
in the middle of a bay the drives can be renumbered on next boot.
Yes, I'm aware of that.
/dev/sda1 will be translater to the linux's block device number. This
is what xen uses as 'id'. In my config files I don't use linux's
devices names but 0x0, 0x1, 0x2, .... Up to now I've never seen a
NetBSD kernel probe xbd is random order: the xen tools create the
entries in the xenstore in the domains's config file order, and the
domU kernel reads the xenstore sequentially.
Does this block device number remain consistent every time? Is there
any way we can use it in the kernel as a locator for xbd*?
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
total memory = 1700 MB
avail memory = 1662 MB
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
xennet0 at xenbus0 id 0: Xen Virtual Network Interface
xennet0: MAC address 12:31:38:1b:a9:b6
raidattach: Asked for 8 units
Kernelized RAIDframe activated
Searching for RAID components...
boot device: xbd1
root on xbd1a dumps on xbd1b
mountroot: trying lfs...
mountroot: trying ffs...
mountroot: trying ext2fs...
Ext2 fs: unsupported inode size
mountroot: trying nfs...
mountroot: trying smbfs...
mountroot: trying ntfs...
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying coda...
no file system for xbd1 (dev 0x8e08)
cannot mount root, error = 79
root device (default xbd1a):
Main Index |
Thread Index |