[ClusterLabs] Pacemaker Resource Agent for iSCSILogicalUnit is Incomplete

Jason A Ramsey jason at eramsey.org
Mon Jul 25 11:30:27 EDT 2016

Hi, everyone. You might’ve noticed a few emails from me in the last couple of weeks that chronicle my struggle to get an HA iSCSI Target configured in AWS. After stumbling through this setup (and struggling all the way), I think I’ve finally gotten to the point where I’m ready to create the LUN’s for this cluster. Unfortunately, I’ve come to realize that the ocf:heartbeat:iSCSILogicalUnit resource agent does not seem to completely support the iSCSI lio-t (lio using targetcli) specification. I was hoping that I could get some help in closing this final loop. Essentially, the resource agent (excerpt below) seems only to support the configuration and management of block backstores. Other backstores are not accounted for including most critically (in my use case) fileio:

       # For lio, we first have to create a target device, then
	# add it to the Target Portal Group as an LU.
	ocf_run targetcli /backstores/block create name=${OCF_RESOURCE_INSTANCE} dev=${OCF_RESKEY_path} || exit $OCF_ERR_GENERIC
	if [ -n "${OCF_RESKEY_scsi_sn}" ]; then
		echo ${OCF_RESKEY_scsi_sn} > /sys/kernel/config/target/core/iblock_${OCF_RESKEY_lio_iblock}/${OCF_RESOURCE_INSTANCE}/wwn/vpd_unit_serial
	ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/luns create /backstores/block/${OCF_RESOURCE_INSTANCE} ${OCF_RESKEY_lun} || exit $OCF_ERR_GENERIC

	if [ -n "${OCF_RESKEY_allowed_initiators}" ]; then
		for initiator in ${OCF_RESKEY_allowed_initiators}; do
			ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls create ${initiator} add_mapped_luns=False || exit $OCF_ERR_GENERIC
			ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls/${initiator} create ${OCF_RESKEY_lun} ${OCF_RESKEY_lun} || exit $OCF_ERR_GENERIC

My assumption is that I can hack out the script bits necessary to support the fileio backstore, but I’m curious if that’s something that someone has already done somewhere. Thanks in advance! I really appreciate all the assistance I’ve gotten from this group.

[ jR ]
  @: jason at eramsey.org
  there is no path to greatness; greatness is the path

More information about the Users mailing list