Error when setting up an iSCSI LIO Target Server

I have created an iSCSI target using yast2.
After a start systemctl target,
systemctl status target gives me:

target.service - “Generic Target Mode service”
Loaded: loaded (/usr/lib/systemd/system/target.service; enabled)
Active: active (exited) since Fr 2016-01-22 15:28:25 CET; 14s ago
Process: 4301 ExecStopPost=/usr/sbin/tcm_node --unload (code=exited, status=0/SUCCESS)
Process: 4290 ExecStopPost=/usr/sbin/lio_node --unload (code=exited, status=0/SUCCESS)
Process: 4287 ExecStopPost=/usr/sbin/tcm_fabric --unloadall (code=exited, status=0/SUCCESS)
Process: 4278 ExecStop=/usr/sbin/tcm_dump --file /etc/target/tcm_setup.sh (code=exited, status=0/SUCCESS)
Process: 4272 ExecStop=/usr/sbin/lio_dump --file /etc/target/lio_setup.sh (code=exited, status=0/SUCCESS)
Process: 4345 ExecStartPost=/etc/target/lio_setup.sh (code=exited, status=1/FAILURE)
Process: 4341 ExecStartPost=/etc/target/tcm_setup.sh (code=exited, status=0/SUCCESS)
Process: 4337 ExecStart=/etc/target/lio_start.sh (code=exited, status=0/SUCCESS)
Process: 4327 ExecStart=/etc/target/tcm_start.sh (code=exited, status=0/SUCCESS)
Main PID: 4337 (code=exited, status=0/SUCCESS)
January 22 15:28:25 aaa lio_setup.sh [4345]: /etc/target/lio_setup.sh: line 50: echo: write error: Invalid argument

And in /var/log/messages:
aaa kernel: [3075.165526] Rounding down aligned max_sectors from 4294967295 to 4294967288
aaa lio_setup.sh [4481]: /etc/target/lio_setup.sh: line 50: echo: write error: Invalid argument
aaa kernel: [3075.199676] iSCSI Target Portal Group: 1 is already inactive, ignoring request.

And in /etc/target/lio_setup.sh, line 50 is:
echo 0> /sys/kernel/config/target/iscsi/iqn.XXXX.XX:XXXX-XXX-XX/tpgt_1/enable

ls -l /sys/kernel/config/target/iscsi/iqn.XXXX.XX:XXXX-XXX-XX/tpgt_1/enable

results in:
-rw-r - r-- 1 root root 4096 January 22 15:39 /sys/kernel/config/target/iscsi/iqn.XXXX.XX:XXXX-XXX-XX/tpgt_1/enable

Now I wonder what is going wrong.

ti6,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.suse.com/faq.php

If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot…

Good luck!

Your SUSE Forums Team
http://forums.suse.com