[one-users] Import iscsi images
Jaime Melis
jmelis at opennebula.org
Thu Apr 12 09:40:25 PDT 2012
Hello Francesco,
yes you can. The key is to use SOURCE=<your_iqn> in the image template
instead of using PATH.
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:
https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm
> RM_COMMAND=$(cat <<EOF
> $SUDO $(tgtadm_target_delete "$TID")
> $SUDO $LVREMOVE -f $VG_NAME/$LV_NAME
> EOF
> )
> 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:
https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm
https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/cp
https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/mks
If you need any extra help adapting the drivers we will be happy to help
you out.
Cheers,
Jaime
On Thu, Apr 12, 2012 at 5:55 PM, Francesco Camisa <
francesco.camisa at policlinicosanmarco.it> wrote:
> Hi,
>
> I have installed 3.4. I have read the documentation regarding the iscsi
datastore and I understand that it is tightly integrated with tgt. We don't
use tgt but equallogic devices.
>
> I was wondering if it's possible to add a pre-existing target via
sunstone or oneimage providing the target ip and the iqn.
>
> Thanks in advance
>
> Francesco
>
> Francesco Camisa
> Vice Direttore Generale
> Policlinico San Marco
> via Zanotto 40
> 30173 Mestre-VE
> Italy
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
--
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120412/dc09a581/attachment-0002.htm>
More information about the Users
mailing list