|
|
|
|
|
|
|
|
|
|
xen-users
[Xen-users] I/O error after attaching block device
I am trying to have a driver domain control a block device (a disk image
file within the domain, or a physical disk attached to the domain) - I
have managed to get the intended frontend device node to appear in the
frontend domain, but any attempts to access it (such as through fdisk to
partition it) result in I/O errors being printed to dmesg on both the
frontend and backend domains.
The process that I used to get the intended node to even appear is to
run the xm block-attach command (xm block-attach 4 phy:/dev/xvdb
/dev/xvdc w 6), where 4 is the frontend ID, xvdb is the backend device
(which I had previously attached to the backend, and can access with no
issue), xvdc is the device node that I wish to represent this device in
the frontend, and 6 is the backend ID. Before this command times out
with the standard "Hotplug scripts not working" error, I use
xenstore-list to find the device number in xenstore, and I use
xenstore-write to write major:minor (in hex) to the backend entry in
xenstore, then after a few seconds declare the device to be connected:
xenstore-write /local/domain/$2/backend/vbd/$1/$3/physical-device ca:10
sleep 5
xenstore-write /local/domain/$2/backend/vbd/$1/$3/hotplug-status connected
Here $1 is the frontend ID, $2 is the backend ID, and $3 is the xenstore
device number, while 202=0xca and 16=0x10 (202 is the major number for
xvd* devices, and 16 is my particular minor number).
The same results arise whether I am trying to attach a previously
attached physical disk (as above), or a previously attached disk image
that resides in dom0, or a disk image that resides in the backend domain
(in which case there are added steps of attaching the image to
/dev/loop0 in the backend, and writing the "node" value of /dev/loop0 to
the device in xenstore).
Does anyone have any advice, or any experience in something like this?
Ultimately, my goal would be to have the driver domain act as a gateway
to iSCSI or something like that.
Thanks in advance!
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-users] I/O error after attaching block device,
Matthew Mallozzi <=
|
|
|
|
|