WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: Disk naming (Was Re: [Xen-devel] [PATCH] Guest boot loadersupport [1

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: Disk naming (Was Re: [Xen-devel] [PATCH] Guest boot loadersupport [1/2])
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 15 Apr 2005 00:24:17 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, Philip R Auld <pauld@xxxxxxxxxxx>
Delivery-date: Thu, 14 Apr 2005 23:28:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3B98@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3B98@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8
> I think the key issue is that in domain configs, you want to specify the
> source of the vbd in some high-level name and have the control tools do
> the necessary to map it to a local device and then export it. This
> already happens with file: disk paths. We just need something similar
> for iscsi.

To clarify for anyone who hasn't looked into this code, funky (anything that 
is not "phy:") block devices are handled by Xend calling external programs 
(e.g. scripts) with a particular parameter format.  If you specify a VBD 
source device as "file:/my/file" then the following happens (roughly):

Xend looks in its config for an item called "block-file".  In the default 
config (tools/examples/xend-config.sxp) the value of this item is also 
"block-file", which is the name of the script in /etc/xen/scripts.  It then 
calls this script like this:

/etc/xen/scripts/block-file bind /my/file

The script is required to bind /my/file to a loop device, the name of which it 
outputs (e.g. "/dev/loop0") to stdout.  When the domain is destroyed, Xend 
will call:

/etc/xen/scripts/block-file unbind /dev/loop0

Likewise specifying a block device "enbd:servername:ctlport" causes a call to 
"/etc/xen/scripts/block-enbd bind servername ctlport" and a subsequent 
"/etc/xen/scripts/block-enbd unbind /dev/enbd_node".

For iSCSI you'd define a syntax like "iscsi:target:lun", write a script to run 
iscsiadm (if you're using OpeniSCSI) and stick it in the config.  You could 
probably do a similar thing to deal with your SAN devices.

Thoughts anyone?  It'd be very desirable to have more block scripts in the 
distribution.  If anyone comes up with some, I don't think there'd be any 
problem with them going into the -testing tree.

Cheers,
Mark

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>