dear members of the pacemaker mailing list,
i am using pacemaker on Debian GNU/Linux testing (wheezy) in combination with
LIO [1] and DRBD. The setup heavily relies on [2].
After fiddling around I am able to move the iscsi storage from one
(storage-)node to the other successfully.
With this setup [3] I unfortunately always need to create the lun mapping
manually like this :
/iscsi/iqn.20...:31f4493c3d6c> create mapped_lun=0 tpg_lun=0 Created Mapped LUN
0.
Entering new node
/iscsi/iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270/tpgt1/acls/iqn.2012-07.lan.xcp1:01:31f4493c3d6c/mapped_lun0
/iscsi/iqn.20...:31f4493c3d6c> create mapped_lun=0 tpg_lun=0 Created Mapped LUN
0.
Entering new node
/iscsi/iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270/tpgt1/acls/iqn.2012-07.lan.xcp2:02:31f4493c3d6c/mapped_lun0
'targetcli' output before
-----------------------------
/> ls iscsi/iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270/
o- iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270
............... [1 TPG]
o- tpgt1 ....................................................................
[enabled]
o- acls
.................................................................... [2 ACLs]
| o- iqn.2012-07.lan.xcp1:01:31f4493c3d6c ............................ [0
Mapped LUN]
| o- iqn.2012-07.lan.xcp2:02:31f4493c3d6c ............................ [0
Mapped LUN]
o- luns
..................................................................... [1 LUN]
| o- lun0 .............................................. [iblock/r_lun0
(/dev/drbd0)]
o- portals ..............................................................
[2 Portals]
o- 192.168.8.14:3260
......................................................... [OK]
o- 192.168.8.6:3260
.......................................................... [OK]
'targetcli' output after
---------------------------
/> ls iscsi/iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270
o- iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270
............... [1 TPG]
o- tpgt1 ....................................................................
[enabled]
o- acls
.................................................................... [2 ACLs]
| o- iqn.2012-07.lan.xcp1:01:31f4493c3d6c ............................ [1
Mapped LUN]
| | o- mapped_lun0 ......................................................
[lun0 (rw)]
| o- iqn.2012-07.lan.xcp2:02:31f4493c3d6c ............................ [1
Mapped LUN]
| o- mapped_lun0 ......................................................
[lun0 (rw)]
o- luns
..................................................................... [1 LUN]
| o- lun0 .............................................. [iblock/r_lun0
(/dev/drbd0)]
o- portals ..............................................................
[2 Portals]
o- 192.168.8.14:3260
......................................................... [OK]
o- 192.168.8.6:3260
.......................................................... [OK]
Any way to get this working the pacemaker way ?
[3]
root@iscsi-tgt1:~# crm configure show
node iscsi-tgt1
node iscsi-tgt2
primitive r_DRBD ocf:linbit:drbd \
params drbd_resource="r0" \
op monitor interval="10" role="Master" \
op monitor interval="20" role="Slave" \
op start interval="0" timeout="240" \
op stop interval="0" timeout="240"
primitive r_iscsid ocf:heartbeat:iSCSITarget \
params implementation="lio" portals="192.168.8.6 192.168.8.14"
iqn="iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270"
allowed_initiators="iqn.2012-07.lan.xcp1:01:31f4493c3d6c
iqn.2012-07.lan.xcp2:02:31f4493c3d6c"
primitive r_lun0 ocf:heartbeat:iSCSILogicalUnit \
params implementation="lio"
target_iqn="iqn.2012-07.org.linux-iscsi.iscsi-storage.i686:sn.d94bc9daa270"
lun="0" path="/dev/drbd0" \
op monitor interval="30"
primitive r_target lsb:target \
op monitor interval="30" timeout="30"
primitive r_vIP-1 ocf:heartbeat:IPaddr2 \
params ip="192.168.8.6" cidr_netmask="255.255.255.248"
primitive r_vIP-2 ocf:heartbeat:IPaddr2 \
params ip="192.168.8.14" cidr_netmask="255.255.255.248"
group g_iscsi r_target r_iscsid r_lun0
group g_vIP r_vIP-1 r_vIP-2
ms ms_DRBD r_DRBD \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Master"
colocation c0 inf: g_iscsi ms_DRBD:Master g_vIP order o0 inf: ms_DRBD:promote
g_iscsi:start property $id="cib-bootstrap-options" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
no-quorum-policy="ignore" \
stonith-enabled="false" \
last-lrm-refresh="1343207694"
kind regards,
Jan
[1] http://linux-iscsi.org
[2] www.linbit.com/fileadmin/tech-guides/ha-iscsi.pdf
_______________________________________________
Pacemaker mailing list: [email protected]
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org