Ask Your Question
0

has anyone sucessfully setup linux LIO on a compute node in openstack?

asked 2014-09-18 12:32:43 -0600

japa70 gravatar image

updated 2014-09-18 17:40:53 -0600

Hi,

I have 3 node openstack icehouse instance running on ubuntu 14.04 (controller, network, compute using external iscsi storage). I am adding a new compute node to the cluster however, i would like that compute node to use the Linux LIO for storage. There doesn't seem to be a lot of documentation on how to get this up and running.

Here are my steps to try to get this working.

From the new compute node 1.Install targetcli

#>apt-get install --no-install-recommends targetcli python-urwid

2.Install the rtslib-fb-2.1.49.tar.gz and rtstool-0.1a4.tar.gz

#>pip install --upgrade https://pypi.python.org/packages/source/r/rtstool/rtstool-0.1a4.tar.gz

#>pip install --upgrade https://pypi.python.org/packages/source/r/rtslib-fb/rtslib-fb-2.1.49.tar.gz

3.Edit cinder.conf and update to have the following fields


#> cat /etc/cinder/cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = lioadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
enabled_backends=lio
rabbit_host = controller
rabbit_password = <rabbit pw>
[lio]
volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver
volume_group = multitenant
volume_backend_name=lio

4.Restart Cinder-volume

At this point you now have a new cinder command cinder-rtstool


#> cinder-rtstool
Usage:
/usr/bin/cinder-rtstool create [device] [name] [userid] [password] <initiator_iqn,iqn2,iqn3,...>
/usr/bin/cinder-rtstool add-initiator [target_iqn] [userid] [password] [initiator_iqn]
/usr/bin/cinder-rtstool get-targets
/usr/bin/cinder-rtstool delete [iqn]
/usr/bin/cinder-rtstool verify

5.Enable multiple back ends (original compute node and now the new compute node) and set the volume_type for each backend.

Here are the issues I am facing

1.The targecli command now longer works after installing the python rtstools (this is recreate able it happens right after you install the drivers, however you cant revert back for some reason). I saw that the error that I am getting was from an old defect that was fixed back in rtstools build 27. I and currently running 49

Ref https://bugs.launchpad.net/ubuntu/+source/rtslib/+bug/1166042 (https://bugs.launchpad.net/ubuntu/+so...)


#> targetcli
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 22, in <module>
    from targetcli import UIRoot
  File "/usr/lib/python2.7/dist-packages/targetcli/__init__.py", line 18, in <module>
    from ui_root import UIRoot
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_root.py", line 24, in <module>
    from ui_target import UIFabricModule
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_target.py", line 21, in <module>
    from ui_backstore import dedup_so_name
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_backstore.py", line 22, in <module>
    from rtslib import FileIOBackstore, IBlockBackstore
ImportError: cannot import name FileIOBackstore

2.Is there any other configuration needed for linux LIO and openstack. From these docs it makes it seem very easy. https://wiki.openstack.org/wiki/Cinder/LIO-Grizzly (https://wiki.openstack.org/wiki/Cinde...)

http://docs.openstack.org/admin-guide-cloud/content/using-lio-iscsi.html (http://docs.openstack.org/admin-guide...)

3.Is there any CLI guide for cinder-rtstool? From my searching haven ...

(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-26 10:00:45 -0600

japa70 gravatar image

Hi,

Just to update. So per the readme file from Github, you need to be using either all "FB" (free branch) versions of targetcli, python-rtslib and configshell or the regular versions. I found that for openstack, its recommended to use the free branch versions.

In addition you must stop the "tgt" service from running on startup or after boot to use targetcli successfully, that is where the error was coming from when i tried to create a network using targetcli

Now the only question i have is based on configuration for targetcli and cinder.conf

I know for cinder.conf, i need to have the iscsi_help= lioadm and set volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver however is there anything else? I created a block backstore and pointed to my second hd in /dev/sdd

I added a volume group name in cinder that conf to match what i called my backstore but cinder cant find it.

Any thoughts on what needs to be configured with cinder.conf and targetcli?

Thanks in advance

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-18 12:32:43 -0600

Seen: 1,315 times

Last updated: Sep 26 '14