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

Re: [Xen-users] 2 instances of a DomU on the same LV



Le -10/01/-28163 20:59, Fajar A. Nugraha a écrit :
On Wed, Mar 24, 2010 at 4:23 PM, Guy Roussin
<guy.roussin@xxxxxxxxxxxxxxxx>  wrote:
First the basics: xen does a basic sanity check to prevent more than a
domU uses the same block device/file when it's set as writable, unless
user specifically overides it. The check is only on the same dom0.
Nothing is done to prevent the same device used on another dom0. You
need some other kind of external mechanism to prevent that.
Thank you Fajar, now i understand the logic.
Is there some "external mechanism" i can use ?
No ready-to-use script/application that I know of.

Otherwise I could develop my own simple mechanisms (shell scripts),
You could extend /etc/xen/scripts/block. Look for check_sharing(), and
add a custom function there to check whether a remote node/guest is
using it.

A simple way would be to set up ssh authorized_keys on both nodes and
changing the basic commands (cat /proc/mounts, xenstore-list/read) to
have "ssh other-host-ip" in front of it. I'm not sure how this method
will interact with live migration though.

and stop using virt-manager.
If done correctly, you can still use virt-manager.

Hello,

Sorry for bring back this thread but, like Fajar said, i extended the "/etc/xen/scripts/block" script. Now, on the add of a new device, we check that this device is an LV and if it is not already opened on another
node of our non-clustered dom0s which access to the shared VG.

Problem is that this script is called by udevd when a device is added or removed, but in the case of migration,
this will not works.

# cat /etc/udev/xen-backend.rules | grep block
SUBSYSTEM=="xen-backend", KERNEL=="vbd*", RUN+="/etc/xen/scripts/block $env{ACTION}"


So how does the node could know that the device is 'mounted' by xen for a migration, and how
udev could handle this and does the appropriate call to the block script ?


Best regards,

--
Matthew

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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