[ClusterLabs] pacemaker crm config iSCSITarget lio config
Jelle de Jong
jelledejong at powercraft.nl
Tue May 30 07:04:25 EDT 2017
Hello everybody,
I was switching from tgtd to lio as iscsi target and hitting some issues.
I have to manually run the targetcli command after the pacemaker
resources are started successfully:
/iscsi/iqn.20....iscsi0/tpgt1> luns/ create /backstores/iblock/iscsi0_lun0
to get the mappings right... what is wrong with my pacemaker config?
see my attachment or http://paste.debian.net/hidden/d5523f15/
also changing lun="1" to lun="0" in the iSCSILogicalUnit did not seem to
change the workings.
Kind regards,
Jelle de Jong
-------------- next part --------------
root at godfrey:~# crm configure show
node finley \
attributes standby="on"
node godfrey \
attributes standby="off"
primitive drbd_r0 ocf:linbit:drbd \
params drbd_resource="r0" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s" \
op monitor interval="15s" timeout="30s"
primitive ip_virtual0 ocf:heartbeat:IPaddr2 \
params nic="bond0" ip="192.168.24.40" cidr_netmask="32" \
op monitor interval="10s"
primitive ip_virtual1 ocf:heartbeat:IPaddr2 \
params nic="br0" ip="192.168.35.3" cidr_netmask="32" \
op monitor interval="10s"
primitive iscsi0_lun0 ocf:heartbeat:iSCSILogicalUnit \
params implementation="lio" target_iqn="iqn.2011-04.nl.powercraft:storage.iscsi0" lun="0" path="/dev/drbd0" \
op stop interval="0" timeout="90s" \
op monitor interval="10s"
primitive iscsi0_target ocf:heartbeat:iSCSITarget \
params implementation="lio" iqn="iqn.2011-04.nl.powercraft:storage.iscsi0" allowed_initiators="iqn.1993-08.org.debian:01:551e12e22568 iqn.1993-08.org.debian:01:9753b4d3302c iqn.1993-08.org.debian:01:7786972a49ce" \
op stop interval="0" timeout="120s" \
op monitor interval="10s"
primitive ping_nodes ocf:pacemaker:ping \
params host_list="192.168.24.1 192.168.24.17 192.168.24.18" multiplier="10" attempts="1" dampen="1" timeout="1" \
op start interval="0" timeout="60" \
op monitor interval="1" timeout="60"
group rg_iscsi iscsi0_target iscsi0_lun0 ip_virtual0 ip_virtual1
ms ms_drbd_r0 drbd_r0 \
meta clone-max="2" clone-node-max="1" master-max="1" master-node-max="1" notify="true" target-role="Master"
clone ping_clone ping_nodes
location drbd-fence-by-handler-r0-ms_drbd_r0 ms_drbd_r0 \
rule $id="drbd-fence-by-handler-r0-rule-ms_drbd_r0" $role="Master" -inf: #uname ne godfrey
# location drbd_r0-not-on-ebony ms_drbd_r0 rule -inf: #uname eq ebony
# location drbd_r1-not-on-ebony ms_drbd_r1 rule -inf: #uname eq ebony
# location drbd_r2-not-on-ebony ms_drbd_r2 rule -inf: #uname eq ebony
location drbd_r0-master-on-active-network ms_drbd_r0 \
rule $id="drbd_r0-master-on-active-network-rule" $role="Master" -inf: not_defined pingd or pingd lte 0
location iscsi-on-active-network rg_iscsi \
rule $id="iscsi-on-active-network-rule" -inf: not_defined pingd or pingd lte 0
colocation iscsi-with-drbd_r0-master inf: rg_iscsi ms_drbd_r0:Master
order iscsi-after-drbd_r0-promote inf: ms_drbd_r0:promote rg_iscsi:start
property $id="cib-bootstrap-options" \
no-quorum-policy="ignore" \
stonith-enabled="false" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
last-lrm-refresh="1496135114"
rsc_defaults $id="rsc-options" \
resource-stickiness="200"
root at godfrey:~# targetcli
Welcome to the targetcli shell:
Copyright (c) 2011 by RisingTide Systems LLC.
Visit us at http://www.risingtidesystems.com.
Using loopback fabric module.
Using iscsi fabric module.
Using qla2xxx fabric module.
Using ib_srpt fabric module.
Using tcm_fc fabric module.
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- fileio ................................................................................................... [0 Storage Object]
| o- iblock ................................................................................................... [1 Storage Object]
| | o- iscsi0_lun0 ........................................................................................ [/dev/drbd0 activated]
| o- pscsi .................................................................................................... [0 Storage Object]
| o- rd_dr .................................................................................................... [0 Storage Object]
| o- rd_mcp ................................................................................................... [0 Storage Object]
o- ib_srpt ............................................................................................................ [0 Target]
o- iscsi .............................................................................................................. [1 Target]
| o- iqn.2011-04.nl.powercraft:storage.iscsi0 ............................................................................ [1 TPG]
| o- tpgt1 ........................................................................................................... [enabled]
| o- acls ........................................................................................................... [3 ACLs]
| | o- iqn.1993-08.org.debian:01:551e12e22568 ................................................................. [0 Mapped LUN]
| | o- iqn.1993-08.org.debian:01:7786972a49ce ................................................................. [0 Mapped LUN]
| | o- iqn.1993-08.org.debian:01:9753b4d3302c ................................................................. [0 Mapped LUN]
| o- luns ............................................................................................................ [1 LUN]
| | o- lun0 ................................................................................ [iblock/iscsi0_lun0 (/dev/drbd0)]
| o- portals ...................................................................................................... [1 Portal]
| o- 0.0.0.0:3260 ..................................................................................................... [OK]
o- loopback ........................................................................................................... [0 Target]
o- qla2xxx ............................................................................................................ [0 Target]
o- tcm_fc ............................................................................................................. [0 Target]
/> cd /iscsi/iqn.2011-04.nl.powercraft:storage.iscsi0/tpgt1/
/iscsi/iqn.20....iscsi0/tpgt1> luns/ create /backstores/iblock/iscsi0_lun0
Selected LUN 1.
Successfully created LUN 1.
Created mapped LUN 1 in node ACL iqn.1993-08.org.debian:01:7786972a49ce
Created mapped LUN 1 in node ACL iqn.1993-08.org.debian:01:9753b4d3302c
Created mapped LUN 1 in node ACL iqn.1993-08.org.debian:01:551e12e22568
Entering new node /iscsi/iqn.2011-04.nl.powercraft:storage.iscsi0/tpgt1/luns/lun1
/iscsi/iqn.20...gt1/luns/lun1> cd /
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- fileio ................................................................................................... [0 Storage Object]
| o- iblock ................................................................................................... [1 Storage Object]
| | o- iscsi0_lun0 ........................................................................................ [/dev/drbd0 activated]
| o- pscsi .................................................................................................... [0 Storage Object]
| o- rd_dr .................................................................................................... [0 Storage Object]
| o- rd_mcp ................................................................................................... [0 Storage Object]
o- ib_srpt ............................................................................................................ [0 Target]
o- iscsi .............................................................................................................. [1 Target]
| o- iqn.2011-04.nl.powercraft:storage.iscsi0 ............................................................................ [1 TPG]
| o- tpgt1 ........................................................................................................... [enabled]
| o- acls ........................................................................................................... [3 ACLs]
| | o- iqn.1993-08.org.debian:01:551e12e22568 ................................................................. [1 Mapped LUN]
| | | o- mapped_lun1 ............................................................................................. [lun1 (rw)]
| | o- iqn.1993-08.org.debian:01:7786972a49ce ................................................................. [1 Mapped LUN]
| | | o- mapped_lun1 ............................................................................................. [lun1 (rw)]
| | o- iqn.1993-08.org.debian:01:9753b4d3302c ................................................................. [1 Mapped LUN]
| | o- mapped_lun1 ............................................................................................. [lun1 (rw)]
| o- luns ........................................................................................................... [2 LUNs]
| | o- lun0 ................................................................................ [iblock/iscsi0_lun0 (/dev/drbd0)]
| | o- lun1 ................................................................................ [iblock/iscsi0_lun0 (/dev/drbd0)]
| o- portals ...................................................................................................... [1 Portal]
| o- 0.0.0.0:3260 ..................................................................................................... [OK]
o- loopback ........................................................................................................... [0 Target]
o- qla2xxx ............................................................................................................ [0 Target]
o- tcm_fc ............................................................................................................. [0 Target]
More information about the Users
mailing list