# iSCSI LIO Target setup problem

**URL:** <https://forums.suse.com/t/iscsi-lio-target-setup-problem/24991>\
**Category:** SLES Configure-Administer\
**Created:** [January 17, 2014, 8:25am UTC](https://forums.suse.com/t/iscsi-lio-target-setup-problem/24991 "2014-01-17T08:25:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy\_s](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@andy\_s](https://forums.suse.com/u/andy_s)\
**Post date:** [January 17, 2014, 8:25am UTC](https://forums.suse.com/t/iscsi-lio-target-setup-problem/24991/1 "2014-01-17T08:25:54Z")

</div>

I’m trying to setup iSCSI LIO Target on SLES 11 SP3 after clean install

After creating everything in YaST I have:

[QUOTE]ili-nas:~/Desktop # service target status  
[---------------------------] TCM/ConfigFS Status [----------------------------]  
\------\> iblock\_0  
HBA Index: 1 plugin: iblock version: v4.1.0-rc2-ml  
\-------\> dev\_lvext\_i-data  
Status: ACTIVATED Max Queue Depth: 0 SectorSize: 512 HwMaxSectors: 4294967288  
iBlock device: dm-6 UDEV PATH: /dev/lvext/i-data readonly: 0  
Major: 253 Minor: 6 CLAIMED: IBLOCK  
udev\_path: /dev/lvext/i-data  
\-------\> dev\_lvnas\_i-win8  
Status: ACTIVATED Max Queue Depth: 0 SectorSize: 512 HwMaxSectors: 4294967288  
iBlock device: dm-5 UDEV PATH: /dev/lvnas/i-win8 readonly: 0  
Major: 253 Minor: 5 CLAIMED: IBLOCK  
udev\_path: /dev/lvnas/i-win8

[---------------------------] LIO-Target Status [----------------------------]  
\------\> iqn.2014-01.local.ili-home:win  
\-------\> tpgt\_1 TargetAlias: LIO Target  
TPG Status: ENABLED  
TPG Network Portals:  
\-------\> 192.168.32.100:3260  
TPG Logical Units:  
\-------\> lun\_1/dev\_lvext\_i-data → target/core/iblock\_0/dev\_lvext\_i-data  
\-------\> lun\_0/dev\_lvnas\_i-win8 → target/core/iblock\_0/dev\_lvnas\_i-win8

Target Engine Core ConfigFS Infrastructure v4.1.0-rc2-ml on Linux/x86\_64 on 3.0.76-0.11-default  
RisingTide Systems Linux-iSCSI Target v4.1.0-rc2  
running  
ili-nas:~/Desktop #  
[/QUOTE]  
and in /etc/target there are no files lio\_setup.sh and tcm\_setup.sh.  
If I reboot after this, I have clean config without any targets and clients.

If after setting everything in YaST I run in terminal “service target stop”, I get the files lio\_setup.sh and tcm\_setup.sh in /etc/target.  
Next, if I run “service target start”, it reports executing both scripts, but I have only one LUN with nothing about authentication:

[QUOTE]ili-nas:~/Desktop # service target status  
[---------------------------] TCM/ConfigFS Status [----------------------------]  
\------\> iblock\_0  
HBA Index: 1 plugin: iblock version: v4.1.0-rc2-ml  
\-------\> dev\_lvext\_i-data  
Status: ACTIVATED Max Queue Depth: 0 SectorSize: 512 HwMaxSectors: 4294967288  
iBlock device: dm-6 UDEV PATH: /dev/lvext/i-data readonly: 0  
Major: 253 Minor: 6 CLAIMED: IBLOCK  
udev\_path: /dev/lvext/i-data

[---------------------------] LIO-Target Status [----------------------------]  
\------\> iqn.2014-01.local.ili-home:win  
\-------\> tpgt\_1 TargetAlias: LIO Target  
TPG Status: DISABLED  
TPG Network Portals:  
\-------\> 192.168.32.100:3260  
TPG Logical Units:  
\-------\> lun\_1/dev\_lvext\_i-data → target/core/iblock\_0/dev\_lvext\_i-data

Target Engine Core ConfigFS Infrastructure v4.1.0-rc2-ml on Linux/x86\_64 on 3.0.76-0.11-default  
RisingTide Systems Linux-iSCSI Target v4.1.0-rc2  
running  
ili-nas:~/Desktop #  
[/QUOTE]  
Trying to stop the service brings an error:

[QUOTE]ili-nas:~/Desktop # service target stop  
Unloading fabric/configfs: done  
Unloading LIO-Target/ConfigFS fabric: sh: line 0: echo: write error: Invalid argument  
Unable to disable TPG: iqn.2014-01.local.ili-home:win TPGT: 1  
failed  
Unloading target\_core\_mod/ConfigFS core: Traceback (most recent call last):  
File “/usr/sbin/tcm\_node”, line 1211, in   
main()  
File “/usr/sbin/tcm\_node”, line 1203, in main  
(options, args) = parser.parse\_args()  
File “/usr/lib64/python2.6/optparse.py”, line 1394, in parse\_args  
stop = self.\_process\_args(largs, rargs, values)  
File “/usr/lib64/python2.6/optparse.py”, line 1434, in \_process\_args  
self.\_process\_long\_opt(rargs, values)  
File “/usr/lib64/python2.6/optparse.py”, line 1509, in \_process\_long\_opt  
option.process(opt, value, values, self)  
File “/usr/lib64/python2.6/optparse.py”, line 788, in process  
self.action, self.dest, opt, value, values, parser)  
File “/usr/lib64/python2.6/optparse.py”, line 808, in take\_action  
self.callback(self, opt, value, parser, \*args, \*\*kwargs)  
File “/usr/sbin/tcm\_node”, line 1090, in tcm\_unload  
tcm\_delhba(None, None, f, None)  
File “/usr/sbin/tcm\_node”, line 252, in tcm\_delhba  
\_\_tcm\_freevirtdev(None, None, tmp\_str, None)  
File “/usr/sbin/tcm\_node”, line 598, in \_\_tcm\_freevirtdev  
ret = os.rmdir(cfs\_dev\_path)  
OSError: [Errno 16] Device or resource busy: ‘/sys/kernel/config/target/core/iblock\_0/dev\_lvext\_i-data’  
failed  
ili-nas:~/Desktop #  
[/QUOTE]  
and the files lio\_setup.sh and tcm\_setup.sh in /etc/target are changed with reduced size.

---

<div class="post-metadata">

**Author:** ![andy\_s](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@andy\_s](https://forums.suse.com/u/andy_s)\
**Post date:** [January 18, 2014, 10:12am UTC](https://forums.suse.com/t/iscsi-lio-target-setup-problem/24991/2 "2014-01-18T10:12:32Z")

</div>

After fixing an error in /usr/lib64/python2.6/site-packages/tcm\_node.py line 144:

> [@](#):
>
> alua\_path = tvm\_var + “/alua/tpgs\_” + unit\_serial + “/” + tg\_pt\_gp\_name

from tvm\_var to tcm\_var I got 2 LUNs, but LUN0 is disabled and no authentication info.

[QUOTE]ili-nas:~/Desktop # service target status  
[---------------------------] TCM/ConfigFS Status [----------------------------]  
\------\> iblock\_0  
HBA Index: 1 plugin: iblock version: v4.1.0-rc2-ml  
\-------\> dev\_lvnas\_i-win8  
Status: DEACTIVATED Max Queue Depth: 128 SectorSize: 512 HwMaxSectors: 4294967288  
iBlock device: dm-5 UDEV PATH: /dev/lvnas/i-win8 readonly: 0  
Major: 253 Minor: 5 CLAIMED: IBLOCK  
udev\_path: /dev/lvnas/i-win8  
\-------\> dev\_lvext\_i-data  
Status: ACTIVATED Max Queue Depth: 128 SectorSize: 512 HwMaxSectors: 4294967288  
iBlock device: dm-6 UDEV PATH: /dev/lvext/i-data readonly: 0  
Major: 253 Minor: 6 CLAIMED: IBLOCK  
udev\_path: /dev/lvext/i-data

[---------------------------] LIO-Target Status [----------------------------]  
\------\> iqn.2014-01.local.ili-home:win  
\-------\> tpgt\_1 TargetAlias: LIO Target  
TPG Status: DISABLED  
TPG Network Portals:  
\-------\> 192.168.32.100:3260  
TPG Logical Units:  
\-------\> lun\_1/dev\_lvext\_i-data → target/core/iblock\_0/dev\_lvext\_i-data

Target Engine Core ConfigFS Infrastructure v4.1.0-rc2-ml on Linux/x86\_64 on 3.0.76-0.11-default  
RisingTide Systems Linux-iSCSI Target v4.1.0-rc2  
running  
ili-nas:~/Desktop #[/QUOTE]  
It seems that there may be another errors in Python scripts.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [January 22, 2014, 1:48pm UTC](https://forums.suse.com/t/iscsi-lio-target-setup-problem/24991/3 "2014-01-22T13:48:21Z")

</div>

Hi andy\_s,

I’ll forward your change suggestion (including your question and comments, of course) to my SuSE contacts and will ask for some developer to look into this. Of course I cannot promise on any result, but if there’s something useful to report back, I’ll do so 🙂

Regards,  
Jens
