Skip to content

Commit 4ac7915

Browse files
authored
Merge pull request #1704 from chrboe/cbo/lio-t-iblock-glob
iSCSILogicalUnit: do not use lio_iblock with lio-t
2 parents a441781 + 2bb2473 commit 4ac7915

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

heartbeat/iSCSILogicalUnit.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ iSCSILogicalUnit_start() {
428428
lio-t)
429429
ocf_take_lock $TARGETLOCKFILE
430430
ocf_release_lock_on_exit $TARGETLOCKFILE
431-
iblock_attrib_path="/sys/kernel/config/target/core/iblock_${OCF_RESKEY_lio_iblock}/${OCF_RESOURCE_INSTANCE}/attrib"
431+
iblock_attrib_path="/sys/kernel/config/target/core/iblock_*/${OCF_RESOURCE_INSTANCE}/attrib"
432432
# For lio, we first have to create a target device, then
433433
# add it to the Target Portal Group as an LU.
434434
# Handle differently 'block', 'fileio' and 'pscsi'
@@ -445,10 +445,10 @@ iSCSILogicalUnit_start() {
445445
ocf_run targetcli /backstores/${OCF_RESKEY_liot_bstype} create ${OCF_RESOURCE_INSTANCE} ${OCF_RESKEY_path} || exit $OCF_ERR_GENERIC
446446
fi
447447
if [ -n "${OCF_RESKEY_scsi_sn}" ]; then
448-
echo ${OCF_RESKEY_scsi_sn} > /sys/kernel/config/target/core/iblock_${OCF_RESKEY_lio_iblock}/${OCF_RESOURCE_INSTANCE}/wwn/vpd_unit_serial
448+
echo ${OCF_RESKEY_scsi_sn} > /sys/kernel/config/target/core/iblock_*/${OCF_RESOURCE_INSTANCE}/wwn/vpd_unit_serial
449449
fi
450450
if [ -n "${OCF_RESKEY_product_id}" ]; then
451-
echo "${OCF_RESKEY_product_id}" > /sys/kernel/config/target/core/iblock_${OCF_RESKEY_lio_iblock}/${OCF_RESOURCE_INSTANCE}/wwn/product_id
451+
echo "${OCF_RESKEY_product_id}" > /sys/kernel/config/target/core/iblock_*/${OCF_RESOURCE_INSTANCE}/wwn/product_id
452452
fi
453453

454454
ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/luns create /backstores/${OCF_RESKEY_liot_bstype}/${OCF_RESOURCE_INSTANCE} ${OCF_RESKEY_lun} || exit $OCF_ERR_GENERIC

0 commit comments

Comments
 (0)