iSCSI datastore with Dell Equallogic arrays


This guide, pulled out from these two threads by Francesco Camisa: Import iscsi images and iscsi datastore with Dell Equallogic arrays -- partial solution hack, shows how to integrate the iSCSI datastore subsystem with Dell Equallogic arrays.

It's not meant as a definite solution, but a guide on how to achieve integration.


I modified this relevant parts of /var/lib/one/remotes/tm/iscsi/ln:

TARGET=`arg_path $SRC`
DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
BASE_IQN=`echo $IQN|$CUT -d: -f1`
TARGET=`echo $IQN|$CUT -d: -f2`
#LV_NAME=`echo $TARGET|$AWK -F. '{print $(NF)}'`
#VG_NAME=`echo $TARGET|$AWK -F. '{print $(NF-1)}'`
    set -e
    mkdir -p $DST_DIR
    $SUDO $(iscsiadm_discovery "$TARGET_HOST")
    $SUDO $(iscsiadm_login "$IQN" "$TARGET_HOST")
    sleep 5

I had to modify the DISK_BY_PATH with DISK_EQL_MULTIPATH since we use Equallogic Multipath Host Integration Tools for linux which dramaticalliy increase performance.

General tips

Keep in mind that you need to be careful with the oneimage delete action. If you do oneimage delete, this snippet of code will get called:

   $SUDO $(tgtadm_target_delete "$TID")
log "Removing $DST_HOST:$DEV from the image repository"
ssh_exec_and_log "$DST_HOST" "$RM_COMMAND" \
   "Error removing $DST_HOST:$DEV"

Which would fail. I suggest you can either substitute the iscsi/rm file with an a simple 'exit 0' and manually delete the image. Or you could modify it to really remove your device, which would be the best approach.

Also, I think it would be wise to substitute iscsi/mkfs with 'exit 1' so it will always fail since it won't be supported either (this will be called when doing 'oneimage create' for a TYPE = DATABLOCK image). Or same as before you could modify the script to really create an empty datablock. The same applies for the iscsi/cp command ('oneimage create' when using PATH). You could also modify it to really create an equallogic device.

If you do adapt the iscsi drivers to really take action on equallogic devices, so you can create a new image, an empty datablock and delete images, please let us know so we can upload the code to the ecosystem. The files you need to modify are:


Francesco Camisa has contributed this premigration script to log into the iscsi before performing the migration. It is made for OpenNebula 3.8.1.

# -------------------------------------------------------------------------- #
# Copyright 2002-2012, OpenNebula Project Leads (             #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
#                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #
# PREMIGRATE SOURCE DST remote_system_dir vmid dsid template
#  - SOURCE is the host where the VM is running
#  - DST is the host where the VM is to be migrated
#  - remote_system_dir is the path for the VM home in the system datastore
#  - vmid is the id of the VM
#  - dsid is the target datastore
#  - template is the template of the VM in XML and base64 encoded
# To access the vm_template you can use the xpath.rb utility. Check the
# datastore drivers for an example.
if [ -z "${ONE_LOCATION}" ]; then
DRIVER_PATH=$(dirname $0)
source ${DRIVER_PATH}/../../datastore/iscsi/iscsi.conf
IQN=$(onevm show $VMID|grep SOURCE|cut -f2 -d "\""|cut -f1 -d "\"")
    set -e
    $SUDO $(iscsiadm_discovery "$TARGET_HOST")
    $SUDO $(iscsiadm_login "$IQN" "$TARGET_HOST")
    sleep 10
ssh_exec_and_log "$DST" "$DISCOVER_CMD" \
        "Error registering $DST_HOST:$DEV"
exit 0
iscsi_dell_equallogic · Last modified: 2013/01/09 10:24 by Javi Fontan
Admin · Login