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-users

[Xen-users] Re: OT: Re: multiple iscsi targets on bonding interface

To: Jeff Williams <jeffw@xxxxxxxxxxxxxx>
Subject: [Xen-users] Re: OT: Re: multiple iscsi targets on bonding interface
From: Ferenc Wagner <wferi@xxxxxxx>
Date: Wed, 06 May 2009 11:16:14 +0200
Cc: Xen mailinglist <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 06 May 2009 02:17:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A00F779.60905@xxxxxxxxxxxxxx> (Jeff Williams's message of "Wed, 06 May 2009 10:35:37 +0800")
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <Pine.GSO.4.58.0904051750050.21575@xxxxxxxxxxxxxxxxx> <877i1xmllf.fsf@xxxxxxxxxxxxx> <alpine.DEB.2.00.0904070957560.6289@xxxxxxxxxxxxxxxxxxxx> <87ws9sh73x.fsf@xxxxxxxxxxxxx> <4A00F779.60905@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
Jeff Williams <jeffw@xxxxxxxxxxxxxx> writes:

> On 10/04/09 23:16, Ferenc Wagner wrote:
>
>> Don't confuse the different layers.  Each of our PV domUs are backed
>> by independent iSCSI targets, to make independent live migration of
>> domUs possible.  Each domU sees its assigned target as virtual disk
>> /dev/xvda, and has no idea whatsoever that it is an iSCSI target in
>> reality.  Then each domU uses this virtual disk as it wants: some
>> partition it, some use it as an LVM physical volume, some put a
>> filesystem straight on it.  iSCSI is absolutely out of the picture
>> here, with the exception of the iSCSI rooted domUs, which, on the
>> other hand, have no disk devices assigned to them by Xen: they are
>> (virtual) "diskless"; the Xen host doesn't know they mount iSCSI
>> devices as their roots from initramfs.
>
> Just out of interest, do have any problems managing all of those iSCSI
> targets across all of your Xen dom0s? I would imagine you'd end up
> with a very large number of /dev/sd* devices on all of the dom0s?

Sure, there's quite some of them.  But computers are supposed to be
good exactly in this field, aren't they?  Anyway, I don't use the
/dev/sd* nodes in the domU configs directly, but the /dev/disk/by-path
symlinks.  Those are presistent and descriptive at the same time (if
configured correctly on the target device).

For the initiator side config I created a simple script, which makes
the necessary changes to the default configuration of the open-iscsi
Debian package.  That's about it.

Cheers,
Feri.

#!/bin/bash -e

iqn=<COMMON TARGET NAME PREFIX>
portal=<SAN PORTAL>

while [ -n "$1" ]; do
    case "$1" in
    -n) debug=echo;;
    -l) login=yes;;
    -d) $debug iscsiadm --mode discovery --type sendtargets -p $portal;;
    *) echo "targetconf: unknown switch: $1" >&2; exit 1;;
    esac
    shift
done

while read lun pass; do
    while read name value; do
        $debug iscsiadm -m node -T $iqn:$lun -p $portal -o update -n $name -v 
$value
    done <<EOF
node.startup automatic
node.session.auth.authmethod CHAP
node.session.auth.username $lun
node.session.auth.password $pass
node.session.auth.username_in <SAN USER>
node.session.auth.password_in <SAN PASSWORD>
node.session.timeo.replacement_timeout 2400
EOF
    [ -n "$login" ] && $debug iscsiadm -m node -T $iqn:$lun -p $portal -l
done <<EOF
<TARGET_NAME1> <PASSWORD1>
<TARGET_NAME2> <PASSWORD2>
[...]
EOF

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

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