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

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



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


 


Rackspace

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