Discussion:
targetcli do not show iscsi
Luigi Tarenga
2014-09-30 08:52:20 UTC
Permalink
hi everybody,
I write to you for a problem that sound as my simple mistake
but I can't really find a solution after googling and reading
official doc.

I'm trying to configure a iscsi target on a centos 6.5 box with
a custom kernel compiled from vanilla 3.16.3.

I have compile:
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
CONFIG_CONFIGFS_FS=m

I mount configfs:
# mount | grep config
configfs on /sys/kernel/config type configfs (rw)

manually load iscsi_target_mod (and this show nothing in dmesg)

and when I run targetcli ls command this is the output:
# targetcli ls
o- /
..................................................................... [...]
o- backstores
.......................................................... [...]
| o- block ................................................ [0
Storage Object]
| o- fileio ............................................... [0
Storage Object]
| o- pscsi ................................................ [0
Storage Object]
o- loopback ...................................................... [0
Targets]

I can't see "o- iscsi" so I can't create the iscsi target i need...

# targetcli version
targetcli version 2.0rc1.fb16

$ ls /sys/kernel/config/target/
core version

# lsmod | grep scsi
iscsi_target_mod 205464 0
target_core_mod 229493 1 iscsi_target_mod
configfs 22151 3 iscsi_target_mod,target_core_mod
scsi_mod 93246 6
iscsi_target_mod,target_core_mod,sg,sd_mod,sr_mod,libata

any idea of what I can check?

many thanks in advance
Luigi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jerome Martin
2014-09-30 08:56:23 UTC
Permalink
Hi Luigi,

I am not 100% sure of that, as you are using the -fb branch, but it
seems to me you haven't got the /sys/kernel/config/target/iscsi/
directory. Normally this is created by the initscript.

Can you either try creating it manually, and/or starting the target
service susing the initscript ?

Best,
--
Jerome
Post by Luigi Tarenga
hi everybody,
I write to you for a problem that sound as my simple mistake
but I can't really find a solution after googling and reading
official doc.
I'm trying to configure a iscsi target on a centos 6.5 box with
a custom kernel compiled from vanilla 3.16.3.
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
CONFIG_CONFIGFS_FS=m
# mount | grep config
configfs on /sys/kernel/config type configfs (rw)
manually load iscsi_target_mod (and this show nothing in dmesg)
# targetcli ls
o- /
..................................................................... [...]
o- backstores
.......................................................... [...]
| o- block ................................................ [0
Storage Object]
| o- fileio ............................................... [0
Storage Object]
| o- pscsi ................................................ [0
Storage Object]
o- loopback ...................................................... [0
Targets]
I can't see "o- iscsi" so I can't create the iscsi target i need...
# targetcli version
targetcli version 2.0rc1.fb16
$ ls /sys/kernel/config/target/
core version
# lsmod | grep scsi
iscsi_target_mod 205464 0
target_core_mod 229493 1 iscsi_target_mod
configfs 22151 3 iscsi_target_mod,target_core_mod
scsi_mod 93246 6
iscsi_target_mod,target_core_mod,sg,sd_mod,sr_mod,libata
any idea of what I can check?
many thanks in advance
Luigi
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Luigi Tarenga
2014-09-30 09:04:46 UTC
Permalink
Hi Jerome,
thanks for the promptly reply. I'm not using the -fb branch.
I have installed targetcli from centos rpm:
# rpm -qi fcoe-target-utils-2.0rc1.fb16-5.el6.noarch
Name : fcoe-target-utils Relocations: (not relocatable)
Version : 2.0rc1.fb16 Vendor: CentOS
Release : 5.el6 Build Date: Fri 22 Nov 2013
06:52:35 PM CET
Install Date: Mon 29 Sep 2014 03:13:11 PM CEST Build Host:
c6b9.bsys.dev.centos.org
Group : System Environment/Libraries Source RPM:
fcoe-target-utils-2.0rc1.fb16-5.el6.src.rpm
Size : 188886 License: AGPLv3
Signature : RSA/SHA1, Sun 24 Nov 2013 08:29:11 PM CET, Key ID
0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : https://github.com/agrover/targetcli-fb
Summary : An administration shell for FCoE storage targets
Description :
An administration shell for TCM/LIO storage targets, most notably
Fiber Channel over Ethernet (FCoE) targets.

I'm not sure what is the initscript you mention. I have in /etc/init.d/:
# ls fcoe-target iscsi*
fcoe-target iscsi iscsid

but afaik those are for the initiatior or fcoe-target...

I tryed to manually create the directory but nothing changed:
# ll /sys/kernel/config/target/
total 0
drwxr-xr-x 3 root root 0 Sep 30 10:25 core
drwxr-xr-x 3 root root 0 Sep 30 10:59 iscsi
-r--r--r-- 1 root root 4096 Sep 30 10:59 version
[***@lizard init.d]#
[***@lizard init.d]# targetcli ls
o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
| o- block
....................................................................................................
[0 Storage Object]
| o- fileio
...................................................................................................
[0 Storage Object]
| o- pscsi
....................................................................................................
[0 Storage Object]
o- loopback
..........................................................................................................
[0 Targets]

the only difference I see is that the module is now used:
iscsi_target_mod 205464 1

and I can't rmmod it.

Luigi
Post by Jerome Martin
Hi Luigi,
I am not 100% sure of that, as you are using the -fb branch, but it
seems to me you haven't got the /sys/kernel/config/target/iscsi/
directory. Normally this is created by the initscript.
Can you either try creating it manually, and/or starting the target
service susing the initscript ?
Best,
--
Jerome
Post by Luigi Tarenga
hi everybody,
I write to you for a problem that sound as my simple mistake
but I can't really find a solution after googling and reading
official doc.
I'm trying to configure a iscsi target on a centos 6.5 box with
a custom kernel compiled from vanilla 3.16.3.
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
CONFIG_CONFIGFS_FS=m
# mount | grep config
configfs on /sys/kernel/config type configfs (rw)
manually load iscsi_target_mod (and this show nothing in dmesg)
# targetcli ls
o- /
..................................................................... [...]
o- backstores
.......................................................... [...]
| o- block ................................................ [0
Storage Object]
| o- fileio ............................................... [0
Storage Object]
| o- pscsi ................................................ [0
Storage Object]
o- loopback ...................................................... [0
Targets]
I can't see "o- iscsi" so I can't create the iscsi target i need...
# targetcli version
targetcli version 2.0rc1.fb16
$ ls /sys/kernel/config/target/
core version
# lsmod | grep scsi
iscsi_target_mod 205464 0
target_core_mod 229493 1 iscsi_target_mod
configfs 22151 3 iscsi_target_mod,target_core_mod
scsi_mod 93246 6
iscsi_target_mod,target_core_mod,sg,sd_mod,sr_mod,libata
any idea of what I can check?
many thanks in advance
Luigi
--
To unsubscribe from this list: send the line "unsubscribe
target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jerome Martin
2014-09-30 09:11:26 UTC
Permalink
Hi Luigi,
Post by Luigi Tarenga
Hi Jerome,
thanks for the promptly reply. I'm not using the -fb branch.
# rpm -qi fcoe-target-utils-2.0rc1.fb16-5.el6.noarch
See the version here? ....fb16...
Post by Luigi Tarenga
# ls fcoe-target iscsi*
fcoe-target iscsi iscsid
but afaik those are for the initiatior or fcoe-target...
Well, given the name of the redhat package, my best best would be
fcoe-target :-)
Mmmh. ok.

I'll have to take a look at that installing a centos 6.5 box, or we can
wait for Andy (who maintains the fb branch) to be around, whichever
comes first. I would still try that initscript first though :-)
Post by Luigi Tarenga
# ll /sys/kernel/config/target/
total 0
drwxr-xr-x 3 root root 0 Sep 30 10:25 core
drwxr-xr-x 3 root root 0 Sep 30 10:59 iscsi
-r--r--r-- 1 root root 4096 Sep 30 10:59 version
o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
| o- block
....................................................................................................
[0 Storage Object]
| o- fileio
...................................................................................................
[0 Storage Object]
| o- pscsi
....................................................................................................
[0 Storage Object]
o- loopback
..........................................................................................................
[0 Targets]
iscsi_target_mod 205464 1
and I can't rmmod it.
Luigi
Post by Jerome Martin
Hi Luigi,
I am not 100% sure of that, as you are using the -fb branch, but it
seems to me you haven't got the /sys/kernel/config/target/iscsi/
directory. Normally this is created by the initscript.
Can you either try creating it manually, and/or starting the target
service susing the initscript ?
Best,
--
Jerome
Post by Luigi Tarenga
hi everybody,
I write to you for a problem that sound as my simple mistake
but I can't really find a solution after googling and reading
official doc.
I'm trying to configure a iscsi target on a centos 6.5 box with
a custom kernel compiled from vanilla 3.16.3.
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
CONFIG_CONFIGFS_FS=m
# mount | grep config
configfs on /sys/kernel/config type configfs (rw)
manually load iscsi_target_mod (and this show nothing in dmesg)
# targetcli ls
o- /
..................................................................... [...]
o- backstores
.......................................................... [...]
| o- block ................................................ [0
Storage Object]
| o- fileio ............................................... [0
Storage Object]
| o- pscsi ................................................ [0
Storage Object]
o- loopback ...................................................... [0
Targets]
I can't see "o- iscsi" so I can't create the iscsi target i need...
# targetcli version
targetcli version 2.0rc1.fb16
$ ls /sys/kernel/config/target/
core version
# lsmod | grep scsi
iscsi_target_mod 205464 0
target_core_mod 229493 1 iscsi_target_mod
configfs 22151 3 iscsi_target_mod,target_core_mod
scsi_mod 93246 6
iscsi_target_mod,target_core_mod,sg,sd_mod,sr_mod,libata
any idea of what I can check?
many thanks in advance
Luigi
--
To unsubscribe from this list: send the line "unsubscribe
target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Luigi Tarenga
2014-09-30 09:20:49 UTC
Permalink
Post by Jerome Martin
Post by Luigi Tarenga
# rpm -qi fcoe-target-utils-2.0rc1.fb16-5.el6.noarch
See the version here? ....fb16...
oh ok.
Post by Jerome Martin
Post by Luigi Tarenga
# ls fcoe-target iscsi*
fcoe-target iscsi iscsid
but afaik those are for the initiatior or fcoe-target...
Well, given the name of the redhat package, my best best would be
fcoe-target :-)
I started it but still no luck, actually I had to comment out 2 module
loading since I didn't
compiled them (can this be the problem? would be strange since there is
no module
dependencies...):

load_modules()
{
errmsg=$( /sbin/modprobe configfs 2>&1 ) || return 1
errmsg=$( /sbin/modprobe target_core_mod 2>&1 ) || return 1
#errmsg=$( /sbin/modprobe target_core_pscsi 2>&1 ) || return 1
errmsg=$( /sbin/modprobe target_core_file 2>&1 ) || return 1
#errmsg=$( /sbin/modprobe target_core_iblock 2>&1 ) || return 1

return 0
}



Luigi
Jerome Martin
2014-09-30 09:28:54 UTC
Permalink
Luigi,

Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?

Best,
--
Jerome
Post by Luigi Tarenga
Post by Jerome Martin
Post by Luigi Tarenga
# rpm -qi fcoe-target-utils-2.0rc1.fb16-5.el6.noarch
See the version here? ....fb16...
oh ok.
Post by Jerome Martin
Post by Luigi Tarenga
# ls fcoe-target iscsi*
fcoe-target iscsi iscsid
but afaik those are for the initiatior or fcoe-target...
Well, given the name of the redhat package, my best best would be
fcoe-target :-)
I started it but still no luck, actually I had to comment out 2 module
loading since I didn't
compiled them (can this be the problem? would be strange since there is
no module
load_modules()
{
errmsg=$( /sbin/modprobe configfs 2>&1 ) || return 1
errmsg=$( /sbin/modprobe target_core_mod 2>&1 ) || return 1
#errmsg=$( /sbin/modprobe target_core_pscsi 2>&1 ) || return 1
errmsg=$( /sbin/modprobe target_core_file 2>&1 ) || return 1
#errmsg=$( /sbin/modprobe target_core_iblock 2>&1 ) || return 1
return 0
}
Luigi
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Luigi Tarenga
2014-09-30 09:41:49 UTC
Permalink
Post by Jerome Martin
Luigi,
Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?
Best,
--
Jerome
didn't test that configuration and since I can't find module
iscsi_target_mod in stock
kernel I would have to recompile it against centos kernel. It's worth
trying?

btw, I saw that after loading the module and manually create the iscsi
directory this
content automatically appear:

# ll /sys/kernel/config/target/iscsi/
total 0
drwxr-xr-x 2 root root 0 Sep 30 11:38 discovery_auth
-r--r--r-- 1 root root 4096 Sep 30 11:39 lio_version

I start suspecting a problem with targetcli or configshell. I
regenerated the log.txt file:

# targetcli /iscsi info
No such path /iscsi

# cat log.txt
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:932 run_cmdline()
Running command line '/iscsi info'.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:837
_parse_cmdline() Parsing commandline.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:844
_parse_cmdline() [('path', 0, 6, []), ('command', 7, 11, None)]
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:848
_parse_cmdline() Found path token /iscsi.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:848
_parse_cmdline() Found command token info.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:861
_parse_cmdline() Parse gave path='/iscsi' command='info' pparams=[]
kparams={}
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/node.py:1857 get_node()
Looking for path '/iscsi'
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/node.py:1857 get_node()
Looking for path 'iscsi'
[ERROR] 2014-30-09 11:40:52 No such path /iscsi

Luigi
Jerome Martin
2014-09-30 09:45:45 UTC
Permalink
Post by Luigi Tarenga
Post by Jerome Martin
Luigi,
Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?
Best,
--
Jerome
didn't test that configuration and since I can't find module
iscsi_target_mod in stock
ok
Post by Luigi Tarenga
kernel I would have to recompile it against centos kernel. It's worth
trying?
Sure :-)
Post by Luigi Tarenga
btw, I saw that after loading the module and manually create the iscsi
directory this
# ll /sys/kernel/config/target/iscsi/
total 0
drwxr-xr-x 2 root root 0 Sep 30 11:38 discovery_auth
-r--r--r-- 1 root root 4096 Sep 30 11:39 lio_version
Yes, it means that the iscsi module is correctly loaded.
Post by Luigi Tarenga
I start suspecting a problem with targetcli or configshell. I
Yes, as I said earlier I'll have to reproduce your setup and/or wait for
Andy to come around.
Post by Luigi Tarenga
# targetcli /iscsi info
No such path /iscsi
# cat log.txt
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:932 run_cmdline()
Running command line '/iscsi info'.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:837
_parse_cmdline() Parsing commandline.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:844
_parse_cmdline() [('path', 0, 6, []), ('command', 7, 11, None)]
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:848
_parse_cmdline() Found path token /iscsi.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:848
_parse_cmdline() Found command token info.
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/shell.py:861
_parse_cmdline() Parse gave path='/iscsi' command='info' pparams=[]
kparams={}
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/node.py:1857 get_node()
Looking for path '/iscsi'
[DEBUG] 2014-30-09 11:40:52
/usr/lib/python2.6/site-packages/configshell/node.py:1857 get_node()
Looking for path 'iscsi'
[ERROR] 2014-30-09 11:40:52 No such path /iscsi
Luigi
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Andy Grover
2014-09-30 15:21:16 UTC
Permalink
Post by Luigi Tarenga
Post by Jerome Martin
Luigi,
Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?
Best,
--
Jerome
didn't test that configuration and since I can't find module
iscsi_target_mod in stock
iscsi is not a supported fabric on rhel/centos 6. Only FCoE uses LIO.
scsi-target-utils (tgt) is the supported iscsi target on rhel6. rhel7
uses LIO for both, as does Fedora.

Regards -- Andy

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jerome Martin
2014-09-30 15:26:27 UTC
Permalink
Post by Andy Grover
iscsi is not a supported fabric on rhel/centos 6. Only FCoE uses LIO.
scsi-target-utils (tgt) is the supported iscsi target on rhel6. rhel7
uses LIO for both, as does Fedora.
Ha, that explains it then. Thanks Andy.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Luigi Tarenga
2014-09-30 15:35:10 UTC
Permalink
Post by Andy Grover
Post by Luigi Tarenga
Post by Jerome Martin
Luigi,
Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?
Best,
--
Jerome
didn't test that configuration and since I can't find module
iscsi_target_mod in stock
iscsi is not a supported fabric on rhel/centos 6. Only FCoE uses LIO.
scsi-target-utils (tgt) is the supported iscsi target on rhel6. rhel7
uses LIO for both, as does Fedora.
Regards -- Andy
Hi Andy,
I see LIO is a technology preview on rhel 6 but I'm not looking for
official support, just play with it :)
that said I have a custom kernel compiled from vanilla so if we esclude
some problem with
udev or other userspace services only kernel modules and targetcli is
involved in this configuration.
I hope someone that maintain this module have some time to help me to
get it running otherwise
I will try to use scst (actually I compiled and installed it but still
have to configure it).

My final goal is to have a litttle lab that let me write an integration
module for my failover cluster
manager ( https://code.google.com/p/back-to-work/ ). I need to implement
scsi fencing without
destroying a production server connected to a real SAN :P

Luigi
Luigi Tarenga
2014-09-30 15:52:34 UTC
Permalink
Post by Luigi Tarenga
Post by Andy Grover
Post by Luigi Tarenga
Post by Jerome Martin
Luigi,
Out of curiosity, does it work as expected with the stock fedora
packaged kernel ?
Best,
--
Jerome
didn't test that configuration and since I can't find module
iscsi_target_mod in stock
iscsi is not a supported fabric on rhel/centos 6. Only FCoE uses LIO.
scsi-target-utils (tgt) is the supported iscsi target on rhel6. rhel7
uses LIO for both, as does Fedora.
Regards -- Andy
Hi Andy,
I see LIO is a technology preview on rhel 6 but I'm not looking for
official support, just play with it :)
that said I have a custom kernel compiled from vanilla so if we
esclude some problem with
udev or other userspace services only kernel modules and targetcli is
involved in this configuration.
I hope someone that maintain this module have some time to help me to
get it running otherwise
I will try to use scst (actually I compiled and installed it but
still have to configure it).
My final goal is to have a litttle lab that let me write an
integration module for my failover cluster
manager ( https://code.google.com/p/back-to-work/ ). I need to
implement scsi fencing without
destroying a production server connected to a real SAN :P
Luigi
Maybe I misunderstood your statement. Are you saying that
the targetcli I'm using (fb16) does not support iscsi fabric?
In this case I will try to use the git version.

Luigi

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Luigi Tarenga
2014-09-30 16:49:33 UTC
Permalink
Post by Luigi Tarenga
Post by Luigi Tarenga
Post by Andy Grover
iscsi is not a supported fabric on rhel/centos 6. Only FCoE uses
LIO. scsi-target-utils (tgt) is the supported iscsi target on rhel6.
rhel7 uses LIO for both, as does Fedora.
Regards -- Andy
Hi Andy,
I see LIO is a technology preview on rhel 6 but I'm not looking for
official support, just play with it :)
that said I have a custom kernel compiled from vanilla so if we
esclude some problem with
udev or other userspace services only kernel modules and targetcli is
involved in this configuration.
I hope someone that maintain this module have some time to help me to
get it running otherwise
I will try to use scst (actually I compiled and installed it but
still have to configure it).
My final goal is to have a litttle lab that let me write an
integration module for my failover cluster
manager ( https://code.google.com/p/back-to-work/ ). I need to
implement scsi fencing without
destroying a production server connected to a real SAN :P
Luigi
Maybe I misunderstood your statement. Are you saying that
the targetcli I'm using (fb16) does not support iscsi fabric?
In this case I will try to use the git version.
Luigi
got it working :D

# targetcli
targetcli shell version 2.1.fb37
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> ls
o- /
......................................................................................................................
[...]
o- backstores
...........................................................................................................
[...]
| o- block
...............................................................................................
[Storage Objects: 0]
| o- fileio
..............................................................................................
[Storage Objects: 0]
| o- pscsi
...............................................................................................
[Storage Objects: 0]
| o- ramdisk
.............................................................................................
[Storage Objects: 0]
o- iscsi
.........................................................................................................
[Targets: 0]
o- loopback
......................................................................................................
[Targets: 0]
o- sbp
...........................................................................................................
[Targets: 0]
o- vhost
.........................................................................................................
[Targets: 0]
/>

I installed the last version from
https://fedorahosted.org/releases/t/a/targetcli-fb/
and fortunally I had python2.7 installed in /usr/local (I don't
remember why I installed it :D)

builded and installed using python2.7

Thanks Andy for your hint and excuse me if I seemed stubborn :)
Thank to Martin too for his support!

regards
Luigi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jerome Martin
2014-09-30 16:52:43 UTC
Permalink
Post by Luigi Tarenga
Thanks Andy for your hint and excuse me if I seemed stubborn :)
Thank to Martin too for his support!
The first name's Jerome :-)

Just a quick note, as you are apparently doing some R&D, may I suggest
that you test v3.x instead ? I can use all reports I can get, and this
is the way forward :-)

Regards,
--
Jerome
Luigi Tarenga
2014-09-30 17:01:58 UTC
Permalink
Post by Jerome Martin
Post by Luigi Tarenga
Thanks Andy for your hint and excuse me if I seemed stubborn :)
Thank to Martin too for his support!
The first name's Jerome :-)
Just a quick note, as you are apparently doing some R&D, may I suggest
that you test v3.x instead ? I can use all reports I can get, and this
is the way forward :-)
Regards,
--
Jerome
oops... ok Jerome I'll be happy to help doing some tests.
Just forgive me, I'm very new to LIO:
what do you mean for v3.x?
python3?
kernel 3.x? (I'm using 3.16.3)
or the targetcli branch from Datera?

Luigi
Jerome Martin
2014-09-30 17:09:54 UTC
Permalink
Post by Luigi Tarenga
oops... ok Jerome I'll be happy to help doing some tests.
what do you mean for v3.x?
I mean targetcli version 3.x
Post by Luigi Tarenga
or the targetcli branch from Datera?
OK, as you are new, a little catchup summary :-)

The "targetcli branch from Datera" is the main targetcli repository.
I am actually the original author of targetcli, and still develop it
using the Datera repository on GitHub, which is the official home for
targetcli on the web.

The "fb" branch done by Andy is a fork of targetcli version 2, and is
used in RedHat distributions.

If you look a bit in the mailing list, you'll also notice discussions
with Andy to reunify his fork and my code.

Best,
--
Jerome
Jerome Martin
2014-10-01 11:49:40 UTC
Permalink
Hi Luigi,
Post by Luigi Tarenga
Hi Jerome,
I did some test with 3.x version but I have some problem.
Let's start saying i cloned your git repos.
I have a problem generating the rpm with all 3 package (configshell,
# make rpm
Exporting the repository files...
Cleaning up the target tree...
Fixing version string...
Generating rpm specfile from template...
Generating rpm changelog...
Generating debian changelog...
dist/configshell-1.5-4-g0827baa.tar.gz
Building rpm packages...
error: line 7: Illegal char '-' in: Version: 1.5-4-g0827baa
make: *** [build/rpm-stamp] Error 1
the error is the same, seem you can't use a hyphen in the version.
Ah, right.
I need to update that, there were some changes in the versionning that
breaks the included RPM packaging. Typically the packaging from the git
repo is only used for development as distros tend to bin it and replace
with their own. I will fix that ASAP.
Great :-)
However, you should generate a release first (make release) and then do
the install from the generated tarball, as this will extract version
information etc. from the git repo. Also, you will need to install the
initscript manually.
Post by Luigi Tarenga
# /usr/bin/targetcli ls
o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
o- fileio
...................................................................................................
[0 Storage Object]
o- iblock
...................................................................................................
[0 Storage Object]
o- pscsi
....................................................................................................
[0 Storage Object]
o- rd_mcp
...................................................................................................
[0 Storage Object]
# /usr/bin/targetcli version
Cannot find configshell version. The configshell package has probably
not been built properly from either the git repository or a public tarball.
Cannot find rtslib version. The rtslib package has probably not been
built properly from either the git repository or a public tarball.
Cannot find targetcli version. The targetcli package has probably not
been built properly from either the git repository or a public tarball.
This is what I was talking about above, you need to generate a release
tarball first (make release).
Post by Luigi Tarenga
I tried with both python (stock from centos) and python2.7 (compiled
from source in /usr/local)
So, again, I would like to reproduce and solve this on CentOS / RHEL.
Can you confirm this is version 6.5 with custom-built kernel 3.16.3 ?

In any case, thanks for testing, I need that badly :-)

Best Regards,
--
Jerome
Luigi Tarenga
2014-10-01 12:30:50 UTC
Permalink
This post might be inappropriate. Click to display it.
Luigi Tarenga
2014-10-01 12:35:50 UTC
Permalink
Post by Luigi Tarenga
Post by Jerome Martin
So, again, I would like to reproduce and solve this on CentOS / RHEL.
Can you confirm this is version 6.5 with custom-built kernel 3.16.3 ?
In any case, thanks for testing, I need that badly :-)
Best Regards,
--
Jerome
Hi Jerome,
I confirm I have a centos 6.5 x86_64 with custom kernel and I'm using
python2.7 compiled
from source too (since this works for targetcli-fb)
make cleanall
make release
cd dist
tar xvf xxxx.tar.gz
cd xxxx
./setup.py build
./setup.py install
# targetcli
targetcli shell version 2.1.fb37
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> ls
o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
| o- block
..................................................................................................
[Storage Objects: 0]
| o- fileio
.................................................................................................
[Storage Objects: 1]
| | o- test1
..................................................................
[/root/lun-test1 (10.0MiB) write-back deactivated]
| o- pscsi
..................................................................................................
[Storage Objects: 0]
| o- ramdisk
................................................................................................
[Storage Objects: 0]
o- iscsi
............................................................................................................
[Targets: 1]
| o- iqn.2003-01.org.linux-iscsi.lizard.x8664:sn.29470994615c
.......................................................... [TPGs: 1]
| o- tpg1
...............................................................................................
[no-gen-acls, no-auth]
| o- acls
..........................................................................................................
[ACLs: 0]
| o- luns
..........................................................................................................
[LUNs: 0]
| o- portals
....................................................................................................
[Portals: 1]
| o- 0.0.0.0:3260
.....................................................................................................
[OK]
o- loopback
.........................................................................................................
[Targets: 0]
o- sbp
..............................................................................................................
[Targets: 0]
o- vhost
............................................................................................................
[Targets: 0]
/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json
(between the 2 test I removed the -fb version to avoid mixing libs)
now I had to make some little mod to the init script because it seems
--- target.init 2014-07-31 19:07:30.000000000 +0200
+++ target.init.custom 2014-10-01 14:17:57.343006241 +0200
@@ -9,7 +9,7 @@
### END INIT INFO
# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
+#PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="The Linux SCSI Target"
NAME=target
DAEMON=/usr/bin/targetcli
@@ -25,10 +25,24 @@
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
+#. /lib/init/vars.sh
# Define LSB log_* functions - requires lsb-base (>= 3.2-14)
-. /lib/lsb/init-functions
+#. /lib/lsb/init-functions
+
+alias python="python2.7"
+
+log_failure_msg () {
+}
+
+log_action_msg () {
+}
+
+log_warning_msg () {
+}
# ./target.init.custom start
Possible config migration detected, saving the running target to
/etc/target/scsi_target.lio
File "<stdin>", line 3, in <module>
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
562, in load_live
source=source, allow_new_attrs=True)
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
190, in _load_parse_tree
token = self.validate_obj(token, cur)
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
385, in validate_obj
raise ConfigError("Unknown object type: %s" % obj_type)
rtslib.config.ConfigError: Unknown object type: storage
The Linux SCSI Target looks properly installed
The configfs filesystem is already mounted
Core module target_core_mod already loaded
Failed to load core module target_core_pscsi
Could not start The Linux SCSI Target
# targetcli
targetcli 3.0~pre2-5-g7e32595 (rtslib 3.0~pre2-8-g86e46bc)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.
/> ls
o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
o- fileio
...................................................................................................
[1 Storage Object]
| o- test1
...............................................................................
[/root/lun-test1 (10.0M) deactivated]
o- iblock
...................................................................................................
[0 Storage Object]
o- pscsi
....................................................................................................
[0 Storage Object]
o- rd_mcp
...................................................................................................
[0 Storage Object]
/> exit
File "/usr/local/lib/python2.7/site-packages/configshell/shell.py",
line 990, in run_interactive
self._cli_loop()
File "/usr/local/lib/python2.7/site-packages/configshell/shell.py",
line 820, in _cli_loop
self.run_cmdline(cmdline)
File "/usr/local/lib/python2.7/site-packages/configshell/shell.py",
line 934, in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/local/lib/python2.7/site-packages/configshell/shell.py",
line 909, in _execute_command
result = target.execute_command(command, pparams, kparams)
File "/usr/local/lib/python2.7/site-packages/targetcli/ui_node.py",
line 103, in execute_command
pparams, kparams)
File "/usr/local/lib/python2.7/site-packages/configshell/node.py",
line 1416, in execute_command
result = method(*pparams, **kparams)
File "/usr/local/lib/python2.7/site-packages/targetcli/ui_node.py",
line 119, in ui_command_exit
config.load_live()
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
562, in load_live
source=source, allow_new_attrs=True)
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
190, in _load_parse_tree
token = self.validate_obj(token, cur)
File "/usr/local/lib/python2.7/site-packages/rtslib/config.py", line
385, in validate_obj
raise ConfigError("Unknown object type: %s" % obj_type)
ConfigError: Unknown object type: storage
Luigi
PS: should we keep linux-scsi ML in cc?
version
Using configshell version 1.5-4-g0827baa
Using rtslib version 3.0~pre2-8-g86e46bc
Using targetcli version 3.0~pre2-5-g7e32595

Luigi
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...