Ask Your Question
0

iSCSI target not provisioned

asked 2014-11-08 18:37:09 -0500

Jorge Florencio gravatar image

Hello, installing OpenStack Juno on CentOS 7, I have configured LIO Target as Cinder iSCSI backend, in /etc/cinder/cinder.conf :

iscsi_helper=lioadm
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver

When I create a new volume, iSCSI is not provisioned so compute nodes cannot access volumes:

# cinder create --display-name test 1
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2014-11-09T00:26:55.541777      |
| display_description |                 None                 |
|     display_name    |                 test                 |
|      encrypted      |                False                 |
|          id         | 6bf30407-71f4-4f92-9650-d4afb19e1934 |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

There is no errors in the Cinder log:

2014-11-09 01:26:55.671 24762 INFO cinder.volume.flows.manager.create_volume [req-35cf7097-65db-487a-a658-d2f6c4eb2d31 224904d37b3b4e26aaaf11739cdfae00 e832975e17064d399d982e4b379169e3 - - -] Volume 6bf30407-71f4-4f92-9650-d4afb19e1934: being created as raw with specification: {'status': u'creating', 'volume_size': 1, 'volume_name': u'volume-6bf30407-71f4-4f92-9650-d4afb19e1934'}

2014-11-09 01:26:55.855 24762 INFO cinder.volume.flows.manager.create_volume [req-35cf7097-65db-487a-a658-d2f6c4eb2d31 224904d37b3b4e26aaaf11739cdfae00 e832975e17064d399d982e4b379169e3 - - -] Volume volume-6bf30407-71f4-4f92-9650-d4afb19e1934 (6bf30407-71f4-4f92-9650-d4afb19e1934): created successfully

But iSCSI configuration is empty:

# targetcli ls
o- / ..................................................................... [...]
  o- backstores .......................................................... [...]
  | o- block .............................................. [Storage Objects: 0]
  | o- fileio ............................................. [Storage Objects: 0]
  | o- pscsi .............................................. [Storage Objects: 0]
  | o- ramdisk ............................................ [Storage Objects: 0]
  o- iscsi ........................................................ [Targets: 0]
  o- loopback ..................................................... [Targets: 0]

Any idea? missing some configuration or software installation?

Thank you!

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
2

answered 2014-11-09 23:19:42 -0500

ali-hussnain gravatar image

updated 2014-11-10 02:08:44 -0500

There will be significant changes in multi back end cinder architecture of RDO Juno running on CentOS 7 or Fedora 21 utilizing LVM based iSCSI targets. Create following entries in /etc/cinder/cinder.conf on Controller ( which in case of two node Cluster works as Storage node as well).

####################### 
enabled_backends=lvm51,lvm52
#######################

[lvm51]
iscsi_helper=lioadm
volume_group=cinder-volumes51
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
iscsi_ip_address=192.168.1.127
volume_backend_name=LVM_iSCSI51


[lvm52]
iscsi_helper=lioadm
volume_group=cinder-volumes52
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
iscsi_ip_address=192.168.1.127
volume_backend_name=LVM_iSCSI52

VG cinder-volumes52,51 created on /dev/sda6 and /dev/sdb1 correspondently :-

# pvcreate /dev/sda6
# pvcreate /dev/sdb1
# vgcreate cinder-volumes52 /dev/sda6
# vgcreate cinder-volumes51  /dev/sdb1

Then issue :-

[root@juno1 ~(keystone_admin)]# cinder type-create lvms
+--------------------------------------+------+
|                  ID                  | Name |
+--------------------------------------+------+
| 64414f3a-7770-4958-b422-8db0c3e2f433 | lvms  |
+--------------------------------------+------+


[root@juno1 ~(keystone_admin)]# cinder type-create lvmz +--------------------------------------+---------+
|                  ID                  |   Name  |
+--------------------------------------+---------+
| 29917269-d73f-4c28-b295-59bfbda5d044 | lvmz |

+--------------------------------------+---------+ 

[root@juno1 ~(keystone_admin)]# cinder type-list
+--------------------------------------+---------+
|                  ID                  |   Name  |
+--------------------------------------+---------+
| 29917269-d73f-4c28-b295-59bfbda5d044 |  lvmz   |
| 64414f3a-7770-4958-b422-8db0c3e2f433 |  lvms   |
+--------------------------------------+---------+


[root@juno1 ~(keystone_admin)]# cinder type-key lvmz set volume_backend_name=LVM_iSCSI51

[root@juno1 ~(keystone_admin)]# cinder type-key lvms set volume_backend_name=LVM_iSCSI52

Then enable and start service target:-

[root@juno1 ~(keystone_admin)]#   service target enable
[root@juno1 ~(keystone_admin)]#   service target start

[root@juno1 ~(keystone_admin)]# service target status
Redirecting to /bin/systemctl status  target.service
target.service - Restore LIO kernel target configuration
   Loaded: loaded (/usr/lib/systemd/system/target.service; enabled)
   Active: active (exited) since Wed 2014-11-05 13:23:09 MSK; 44min ago
  Process: 1611 ExecStart=/usr/bin/targetctl restore (code=exited, status=0/SUCCESS)
 Main PID: 1611 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/target.service


juno1.localdomain systemd[1]: Starting Restore LIO kernel target configuration...


juno1.localdomain systemd[1]: Started Restore LIO kernel target configuration.

Now all changes done by creating cinder volumes of types lvms,lvmz ( via dashboard - volume create with dropdown menu volume types or via cinder CLI ) will be persistent in targetcli> ls output between reboots

[root@juno1 ~(keystone_boris)]# cinder list
+--------------------------------------+--------+------------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status |   Display Name   | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+-------

Source: http://bderzhavets.blogspot.jp/2014/1...

https://www.centos.org/forums/viewtop...

edit flag offensive delete link more

Comments

I am very sorry, but text above is an exact quote from my posting to LXER mentioned just bellow. Please , view http://lxer.com/module/newswire/view/...

dbaxps gravatar imagedbaxps ( 2014-11-10 02:05:04 -0500 )edit

I have edited the source...

ali-hussnain gravatar imageali-hussnain ( 2014-11-10 02:19:04 -0500 )edit
2

answered 2014-11-08 23:52:26 -0500

dbaxps gravatar image

updated 2014-11-09 06:55:38 -0500

I believe this post answers your question LVMiSCSI cinder backend for RDO Juno on CentOS 7

edit flag offensive delete link more
0

answered 2014-11-11 03:04:32 -0500

Jorge Florencio gravatar image

updated 2014-11-11 03:13:04 -0500

Hello, on my installation, ther is not two backends, and the configuration is the same, but with only one backend. Here is the content of cinder.conf on the storage node:

[DEFAULT]
rabbit_host=*host*
rabbit_userid=*user*
rabbit_password=*pass*
rpc_backend=rabbit
my_ip=*ip*
glance_host=*host*
auth_strategy=keystone
verbose=true
iscsi_ip_address=*ip*
volume_backend_name=LVM_iSCSI
iscsi_helper=lioadm
volume_group=cinder-volumes
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
[BRCD_FABRIC_EXAMPLE]
[CISCO_FABRIC_EXAMPLE]
[database]
connection=mysql://cinder:*pass*@*host*/cinder
[fc-zone-manager]
[keymgr]
[keystone_authtoken]
auth_uri=http://*host*:5000/v2.0
identity_uri=http://*host*:35357
admin_user=cinder
admin_password=*pass*
admin_tenant_name=service
[matchmaker_redis]
[matchmaker_ring]
[profiler]
[ssl]

Thank you,

Jorge.

edit flag offensive delete link more

Comments

Update /etc/cinder/cinder.conf

#######################
enabled_backends=lvm
#######################
[lvm]
iscsi_helper=lioadm
volume_group=cinder-volumes
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
iscsi_ip_address=*ip*
volume_backend_name=LVM_iSCSI
dbaxps gravatar imagedbaxps ( 2014-11-11 03:19:28 -0500 )edit

root@juno1 ~(keystone_admin)]# cinder type-create lvm
[root@juno1 ~(keystone_admin)]# cinder type-key lvm set volume_backend_name=LVM_iSCSI

dbaxps gravatar imagedbaxps ( 2014-11-11 03:21:13 -0500 )edit

Great !! Now its working !!

Jorge Florencio gravatar imageJorge Florencio ( 2014-11-11 16:30:07 -0500 )edit
0

answered 2015-04-30 04:52:12 -0500

Hello,

I got almost the same problem but still not working after follow the instructions above. When I try to attach volume to instance, I can see error from /var/log/message like this:

Apr 30 17:35:14 TMSG0806 cinder-volume: 2015-04-30 17:35:14.603 2740 INFO cinder.brick.iscsi.iscsi [req-881ceead-1204-49ed-ab8e-e83085985718 50ac6ae89ddd46ee96b061d0148efe78 38069e291e304006843dc1d9e5078f41 - - -] Creating iscsi_target for volume: volume-a6671fbe-2ea8-4ca2-b3a8-ac51eea31968 Apr 30 17:35:14 TMSG0806 kernel: Rounding down aligned max_sectors from 4294967295 to 4294967288 Apr 30 17:35:14 TMSG0806 kernel: strict_strtoul() failed for port_str: -22

I can see volume status from targetcli but port 3260 not listen any application. Compute node also report me no iscsi session found.

edit flag offensive delete link more

Comments

I am running openstack juno on CentOS 7.0

Qi Zhang gravatar imageQi Zhang ( 2015-04-30 04:55:02 -0500 )edit

i have the same problem but for my case i use openstack juno in multinode(controller+3compute+network+3 storage nodes) how can'i edit cinder.conf in controller node and storage nodes??

abdelsnake gravatar imageabdelsnake ( 2015-09-04 03:24:59 -0500 )edit

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-11-08 18:37:09 -0500

Seen: 3,641 times

Last updated: Nov 11 '14