WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] About block device mapping for guests

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] About block device mapping for guests
From: Nuutti Kotivuori <naked@xxxxxx>
Date: Wed, 22 Dec 2004 15:52:30 +0200
Cache-post-path: aka.i.naked.iki.fi!unknown@xxxxxxxxxxxxxxxxxx
Cancel-lock: sha1:hX3bIo/tJAx77s2ffpHXLNqwVME=
Delivery-date: Wed, 22 Dec 2004 13:53:38 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Organization: Ye 'Ol Disorganized NNTPCache groupie
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Security Through Obscurity, linux)
I am a bit puzzled on how the block device mapping works for Xen
guests. Or particularily the fact on how the device shows on the guest
side. When configuring the domain, one can specify the device name the
partition should appear with inside the guest. And if that device does
not exist on the host side, xend complains. A workaround for this was
to specify the device with explicit minor and major number, instead of
a name.

So, from this I would conclude that you can specify the major and
minor device number, which will map to the device you specify.

Now, can these numbers be picked arbitrarily? I know I can mimic an
entire disk (hda) or just a partition (hda1), for either IDE or SCSI -
but is there any difference on the Xen side? Does Xen behave
differently depending on the minor and major that I specify?

Then, are the exported devices just plain block devices with nothing
special to configure? I guess I can use the 'blockdev' command to
change the blocksize and readahead size for the device? But do any
special ioctl's or something like that pass through? If I export an
entire hard disk, can the parameters for it tuned from inside the
guest? What about CD/DVD/etc. drives? Do media insert notifications go
through? Could I use a CD-burner from a guest?

And yet more, how do these devices play along with devfs? Does the Xen
blockdev frontend driver automatically create some nodes for devfs? 
Can it somehow make /dev/hda or /dev/sda appear on the guest side with
devfs? How about udev? Does udev get boottime events to initialize the
device nodes for the block devices? And what about sysfs? Is there a
sysfs interface to see what has been mapped where and with what major
and minor numbers?

I've used to using UML, where devices ubd0 and onwards are UML block
devices - they have their own major device number. They show up in
devfs as /dev/ubd/disc0/disc, /dev/ubd/disc1/disc and so on. I think
there was supposed to be a sysfs interface as well, but I'm not sure
about that.

So, how is this all handled in Xen?

-- Naked




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>