* When is "physical-device" created in xenstore?
@ 2005-09-20 8:36 Tian, Kevin
0 siblings, 0 replies; 4+ messages in thread
From: Tian, Kevin @ 2005-09-20 8:36 UTC (permalink / raw)
To: xen-devel
Saw a strange problem. When blkfront writes event channel number and
ring-ref to xenstore, the watch registered by blkback is notified.
However immediately watch handler in blkback found there's no
"physical-device" under xenstore which should refer to major/minor
number of device for domU. Then failed to create vbd and finally the
connection can't be setup.
So my puzzle is, when should physical-device be created? And who creates
this item? I searched for name string in whole tools directory to only
find instance in block-file/block-phy/block-endb. I configured disk
image by /dev/loop0, so ideally block-phy should be used. However I
still failed to find where block-phy is invoked.
Any clues?
Thanks,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: When is "physical-device" created in xenstore?
@ 2005-09-20 11:41 Tian, Kevin
2005-09-20 13:12 ` Ewan Mellor
0 siblings, 1 reply; 4+ messages in thread
From: Tian, Kevin @ 2005-09-20 11:41 UTC (permalink / raw)
To: Tian, Kevin, xen-devel
If making following temp hack in XendDomainInfo.py:
back = { 'type' : type,
'params' : params,
'frontend' : frontpath,
- 'frontend-id' : "%i" % self.domid }
+ 'frontend-id' : "%i" % self.domid,
+ 'physical-device' : "%li" % blkdev_name_to_number(params) }
xstransact.Write(backpath, back)
Then physical-device is created under backend and the communication can be setup. However this hard code definitely breaks existing logical behind. Should I do any specific configuration? From the Blkctl.py, it said that "phy" type doesn't require bind/unbind script, but I didn't find the place to add that item specifically. ;-(
Thanks,
Kevin
>-----Original Message-----
>From: xen-devel-bounces@lists.xensource.com
>[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Tian, Kevin
>Sent: 2005年9月20日 16:37
>To: xen-devel@lists.xensource.com
>Subject: [Xen-devel] When is "physical-device" created in xenstore?
>
>Saw a strange problem. When blkfront writes event channel number and
>ring-ref to xenstore, the watch registered by blkback is notified.
>However immediately watch handler in blkback found there's no
>"physical-device" under xenstore which should refer to major/minor
>number of device for domU. Then failed to create vbd and finally the
>connection can't be setup.
>
>So my puzzle is, when should physical-device be created? And who creates
>this item? I searched for name string in whole tools directory to only
>find instance in block-file/block-phy/block-endb. I configured disk
>image by /dev/loop0, so ideally block-phy should be used. However I
>still failed to find where block-phy is invoked.
>
>Any clues?
>
>Thanks,
>Kevin
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: When is "physical-device" created in xenstore?
2005-09-20 11:41 When is "physical-device" created in xenstore? Tian, Kevin
@ 2005-09-20 13:12 ` Ewan Mellor
0 siblings, 0 replies; 4+ messages in thread
From: Ewan Mellor @ 2005-09-20 13:12 UTC (permalink / raw)
To: Tian, Kevin; +Cc: xen-devel
On Tue, Sep 20, 2005 at 07:41:09PM +0800, Tian, Kevin wrote:
> If making following temp hack in XendDomainInfo.py:
>
> back = { 'type' : type,
> 'params' : params,
> 'frontend' : frontpath,
> - 'frontend-id' : "%i" % self.domid }
> + 'frontend-id' : "%i" % self.domid,
> + 'physical-device' : "%li" % blkdev_name_to_number(params) }
> xstransact.Write(backpath, back)
>
> Then physical-device is created under backend and the communication can be
> setup. However this hard code definitely breaks existing logical
> behind. Should I do any specific configuration? From the Blkctl.py, it said
> that "phy" type doesn't require bind/unbind script, but I didn't find the
> place to add that item specifically. ;-(
Hi Kevin,
The key physical-device is created inside the block-phy script, as I think you
found. This is called by xen-backend.agent, which in turn is called by the
Linux hotplug system (keying off the name 'xen-backend'). The file Blkctl.py
is completely unused, AFAICT, and should be removed.
The problems that you are having starting your device are probably down to a
broken or nonexistent installation of the hotplug system. You should check
that first. If your hotplug system is working, then maybe you are failing to
find xenstore-write.
HTH,
Ewan.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: When is "physical-device" created in xenstore?
@ 2005-09-21 9:06 Tian, Kevin
0 siblings, 0 replies; 4+ messages in thread
From: Tian, Kevin @ 2005-09-21 9:06 UTC (permalink / raw)
To: Ewan Mellor; +Cc: xen-devel
>From: Ewan Mellor [mailto:ewan@xensource.com]
>Sent: 2005年9月20日 21:12
>On Tue, Sep 20, 2005 at 07:41:09PM +0800, Tian, Kevin wrote:
>
>> If making following temp hack in XendDomainInfo.py:
>>
>> back = { 'type' : type,
>> 'params' : params,
>> 'frontend' : frontpath,
>> - 'frontend-id' : "%i" % self.domid }
>> + 'frontend-id' : "%i" % self.domid,
>> + 'physical-device' : "%li" %
>blkdev_name_to_number(params) }
>> xstransact.Write(backpath, back)
>>
>> Then physical-device is created under backend and the communication can be
>> setup. However this hard code definitely breaks existing logical
>> behind. Should I do any specific configuration? From the Blkctl.py, it said
>> that "phy" type doesn't require bind/unbind script, but I didn't find the
>> place to add that item specifically. ;-(
>
>Hi Kevin,
>
>The key physical-device is created inside the block-phy script, as I think you
>found. This is called by xen-backend.agent, which in turn is called by the
>Linux hotplug system (keying off the name 'xen-backend'). The file Blkctl.py
>is completely unused, AFAICT, and should be removed.
>
>The problems that you are having starting your device are probably down to a
>broken or nonexistent installation of the hotplug system. You should check
>that first. If your hotplug system is working, then maybe you are failing to
>find xenstore-write.
>
>HTH,
>
>Ewan.
Hi, Ewan,
Thanks for your description about the work flow. Actually I found the cause from bad lines in xen-backend.script, which has already been fixed by Keir several days ago. After removing the bad lines, the "physical-device" can be created automatically.
Thanks,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-21 9:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-20 11:41 When is "physical-device" created in xenstore? Tian, Kevin
2005-09-20 13:12 ` Ewan Mellor
-- strict thread matches above, loose matches on Subject: below --
2005-09-21 9:06 Tian, Kevin
2005-09-20 8:36 Tian, Kevin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.