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 09:43:28AM -0800, Jeff Rizzo wrote:
> When I'm working with EC2 images, I can successfully get NetBSD to
> boot by attaching block devices as "/dev/sda1" and "/dev/sda2" which
> come up as xbd0 and xbd1 (respectively) consistently.  However, if I
> attempt to have the domU start with one of their "ephemeral" block
> devices as, say, "/dev/sda3" or "/dev/sdf", these devices are
> attached by NetBSD in a different order, and I get an error because
> the kernel can't then find /sbin/init (because suddenly it's not on
> xbd1 like it should be)

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.

> 
> A quick glance at kernel configs doesn't give me a clue how I might
> wire these down; I assume the xenbus "id" is needed, but of course,
> this will be different every time.
> 
> Any suggestions?

/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.

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


Home | Main Index | Thread Index | Old Index