Re: targetcli do not show iscsi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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)

I reinstalled everything (from your git repos) with:
make cleanall
make release
cd dist
tar xvf xxxx.tar.gz
cd xxxx
./setup.py build
./setup.py install


I left the LIO configured from a the former fb version:
this was the output with fb:
# 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 to target centos7/rhel7:
so this is the patch I used for target.init:
--- 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 () {
+   echo "$@"
+}
+
+log_action_msg () {
+   echo "$@"
+}
+
+log_warning_msg () {
+   echo "$@"
+}


and this is the output when I start it:
# ./target.init.custom start
Possible config migration detected, saving the running target to /etc/target/scsi_target.lio
Traceback (most recent call last):
  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
Traceback (most recent call last):
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux