Skip to contentSkip to conversation

register new block device script

DISCUSSION Michael Mey 3 participants 5 messages Oct 24, 2005

lore
Share & tools
lore
#0 lore raw

Hi all,

I'd like to develop a new script for block-devices. Where do I have to register it?

It's for DRBD block devices. It's called 'block-drbd' . I tried the following steps:

1) copy it in /etc/xen/scripts
2) register it in /etc/xen/xend-config.sxp :
# Setup script for drbd block devices
(block-drbd block-drbd)
3) use it in a domU config file:

    ...
    disk = [ 'drbd:drbd0,hda1,w' ]
    ...

So far, it doesn't work.
Can anyone give me a hint?
Thx,

Mike

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

What version of Xen is this? For Xen 2.0, that looks correct. Xen 3.0 does things differently and I don't know if it needs anything else (like, possibly extra hotplug rules???).

Just a silly question: did you chmod +x the script?

Cheers,
Mark

Quoted 22 lines · Michael Mey

Hi all,

I'd like to develop a new script for block-devices. Where do I have to register it?

It's for DRBD block devices. It's called 'block-drbd' . I tried the following steps:

1) copy it in /etc/xen/scripts
2) register it in /etc/xen/xend-config.sxp :
# Setup script for drbd block devices
(block-drbd block-drbd)
3) use it in a domU config file:

    ...
    disk = [ 'drbd:drbd0,hda1,w' ]
    ...

So far, it doesn't work.
Can anyone give me a hint?
Thx,

Mike

#3 lore raw
In reply to Michael Mey
Quoted 5 lines · Michael Mey

Hi all,

I'd like to develop a new script for block-devices. Where do I have to register it?

Quoted 7 lines

It's for DRBD block devices. It's called 'block-drbd' . I tried the following steps:

1) copy it in /etc/xen/scripts
2) register it in /etc/xen/xend-config.sxp :
# Setup script for drbd block devices
(block-drbd block-drbd)

There's no need to do this. This is out-of-date stuff from the pre-hotplug days. I removed these examples last week, in fact, so you may want to update your config file.

These scripts are now called by the hotplug/udev infrastructure. There should be no need to register the script as such -- xen-backend.agent should be called by udev, and then that will call /etc/xen/scripts/block, which in turn will call /etc/xen/scripts/block-drdb.

Have a look in your syslog files (particularly the debug level one, e.g. /var/log/debug) and maybe add some tracing to those files, to see where it gets stuck.

You might also want to try

PYTHONPATH=/usr/lib/python python /usr/lib/python/xen/util/diagnose.py <dom>

which at least will tell you whether the store entries for the device have been created correctly.

Cheers,

Ewan.

#2 lore raw
In reply to Mark Williamson

Oh sorry, I forgot to mention. Yes, it's for Xen 2.0.7.

Hm, strange. I rechecked everything including execution permissions for the script. Now it works fine. Thought it wasn't called, but I guess there was a problem with drbd.

Thanks, regards

Mike

Quoted 37 lines · Mark Williamson

What version of Xen is this? For Xen 2.0, that looks correct. Xen 3.0 does things differently and I don't know if it needs anything else (like, possibly extra hotplug rules???).

Just a silly question: did you chmod +x the script?

Cheers,
Mark

Quoted 17 lines · Michael Mey

Hi all,

I'd like to develop a new script for block-devices. Where do I have to register it?

It's for DRBD block devices. It's called 'block-drbd' . I tried the following steps:

1) copy it in /etc/xen/scripts
2) register it in /etc/xen/xend-config.sxp :
# Setup script for drbd block devices
(block-drbd block-drbd)
3) use it in a domU config file:

    ...
    disk = [ 'drbd:drbd0,hda1,w' ]
    ...
Quoted 5 lines

So far, it doesn't work.
Can anyone give me a hint?
Thx,

Mike

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 6 lines
----------------------------------------------------------------------------------------
Michael Mey                                  
Thinking Objects Software GmbH    |   mailto: [email protected] 
Lilienthalstrasse 2/1                         |   phone: +49 711 88770-147
70825 Stuttgart-Korntal, Germany  |   fax: +49 711 88770-449
----------------------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
In reply to Ewan Mellor

The hotplug/udev infrastructure support is for Xen 3.0, right? Because I downloaded the latest sources of Xen-stable last week.

After rechecking all of my steps, it finally works fine :)

Regards,

Mike

Quoted 43 lines · Ewan Mellor
Quoted 5 lines · Michael Mey

Hi all,

I'd like to develop a new script for block-devices. Where do I have to register it?

Quoted 7 lines

It's for DRBD block devices. It's called 'block-drbd' . I tried the following steps:

1) copy it in /etc/xen/scripts
2) register it in /etc/xen/xend-config.sxp :
# Setup script for drbd block devices
(block-drbd block-drbd)

There's no need to do this. This is out-of-date stuff from the pre-hotplug days. I removed these examples last week, in fact, so you may want to update your config file.

These scripts are now called by the hotplug/udev infrastructure. There should be no need to register the script as such -- xen-backend.agent should be called by udev, and then that will call /etc/xen/scripts/block, which in turn will call /etc/xen/scripts/block-drdb.

Have a look in your syslog files (particularly the debug level one, e.g. /var/log/debug) and maybe add some tracing to those files, to see where it gets stuck.

You might also want to try

PYTHONPATH=/usr/lib/python python /usr/lib/python/xen/util/diagnose.py <dom>

which at least will tell you whether the store entries for the device have been created correctly.

Cheers,

Ewan.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 6 lines
----------------------------------------------------------------------------------------
Michael Mey                                  
Thinking Objects Software GmbH    |   mailto: [email protected] 
Lilienthalstrasse 2/1                         |   phone: +49 711 88770-147
70825 Stuttgart-Korntal, Germany  |   fax: +49 711 88770-449
----------------------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel