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

Re: [Xen-devel] About block device mapping for guests



OK, here goes:

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

Yup.

> 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?

Yes you can choose an arbitrary IDE or SCSI drive's major / minor pair and 
export as that.  There's no difference to the backend driver, the frontend in 
the guest uses different blocksize for fake IDE vs fake SCSI, I think.

> Then, are the exported devices just plain block devices with nothing
> special to configure?

Yes

> But do any
> special ioctl's or something like that pass through?

Nope.  Ioctls are handled in the guest.

> If I export an 
> entire hard disk, can the parameters for it tuned from inside the
> guest?

The guest can tune its own parameters for the virtual drive but the parameters 
for the real disk are unaffected.

> What about CD/DVD/etc. drives? Do media insert notifications go 
> through? Could I use a CD-burner from a guest?

You can e.g. export ISOs or whole disks to the guest but things like media 
insert notifications and the various controls required for CD burners are not 
part of the virtual disk interface and so won't work at the moment.

It's technically possible to make the frontend behave more like a CD drive, 
it's just that there's not a lot of demand for this, so it's not implemented.

> And yet more, how do these devices play along with devfs? Does the Xen 
> blockdev frontend driver automatically create some nodes for devfs?

Guest domains can't use devfs because the frontend driver doesn't support it.  
The developers feeling is that since devfs is deprecated, it's probably not 
worth the pain of adding support for.

> How about udev? Does udev get boottime events to initialize the
> device nodes for the block devices? And what about sysfs?

Yes, all Xen virtual devices should appear in SysFS in the guest, which udev 
will use to do the right thing - this should all work fine.

> Is there a 
> sysfs interface to see what has been mapped where and with what major
> and minor numbers?

In the guest, sysfs will show block devices with whatever major / minor was 
specified.  It won't tell you what the drive is mapped to in dom0.

State regarding which block devices in dom0 are mapped to what in the guests 
is maintained inside Xend.

> So, how is this all handled in Xen?

HTH,
Mark

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


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.