lio-utils unpacks the following files which are used in dumping the targetcli/lio configurations to the disk: >>> /usr/lib64/python2.7/site-packages/tcm_loop.py >>> /usr/lib64/python2.7/site-packages/tcm_ramdisk.py >>> /usr/lib64/python2.7/site-packages/tcm_pscsi.py >>> /usr/lib64/python2.7/site-packages/tcm_iblock.py >>> /usr/lib64/python2.7/site-packages/tcm_fileio.py >>> /usr/lib64/python2.7/site-packages/tcm-4.1-py2.7.egg-info >>> /usr/lib64/python2.7/site-packages/lio-4.1-py2.7.egg-info >>> /usr/lib64/python2.7/site-packages/lio_dump.py >>> /usr/lib64/python2.7/site-packages/lio_node.py >>> /usr/lib64/python2.7/site-packages/tcm_dump.py >>> /usr/lib64/python2.7/site-packages/tcm_node.py >>> /usr/lib64/python2.7/site-packages/tcm_fabric.py These files are not set to executable which causes saving the config to fail with permission denied: /> saveconfig WARNING: Saving abrams current configuration to disk will overwrite your boot settings. The current target configuration will become the default boot config. Are you sure? Type 'yes': yes Making backup of loopback/ConfigFS with timestamp: 2015-11-15_02:55:00.149128 Traceback (most recent call last): File "/usr/sbin/tcm_fabric", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Successfully updated default config /etc/target/loopback_start.sh Making backup of LIO-Target/ConfigFS with timestamp: 2015-11-15_02:55:00.149128 Traceback (most recent call last): File "/usr/sbin/lio_dump", line 142, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Generated LIO-Target config: /etc/target/backup/lio_backup-2015-11-15_02:55:00.149128.sh Making backup of Target_Core_Mod/ConfigFS with timestamp: 2015-11-15_02:55:00.149128 Traceback (most recent call last): File "/usr/sbin/tcm_dump", line 141, in <module> os.execv(target_executable_path, sys.argv) OSError: [Errno 13] Permission denied Generated Target_Core_Mod config: /etc/target/backup/tcm_backup-2015-11-15_02:55:00.149128.sh Successfully updated default config /etc/target/lio_start.sh Successfully updated default config /etc/target/tcm_start.sh This is corrected by setting them as executable: abrams ~ # while read file; do chmod -v 700 $file; done < broken mode of ‘/usr/lib64/python2.7/site-packages/tcm_loop.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_ramdisk.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_pscsi.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_iblock.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_fileio.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm-4.1-py2.7.egg-info’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/lio-4.1-py2.7.egg-info’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/lio_dump.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/lio_node.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_dump.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_node.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) mode of ‘/usr/lib64/python2.7/site-packages/tcm_fabric.py’ changed from 0644 (rw-r--r--) to 0700 (rwx------) abrams ~ # targetcli stargetcli GIT_VERSION (rtslib GIT_VERSION) Copyright (c) 2011-2013 by Datera, Inc. All rights reserved. /> saveconfig WARNING: Saving abrams current configuration to disk will overwrite your boot settings. The current target configuration will become the default boot config. Are you sure? Type 'yes': yes Making backup of loopback/ConfigFS with timestamp: 2015-11-15_02:56:01.397348 Successfully updated default config /etc/target/loopback_start.sh Making backup of LIO-Target/ConfigFS with timestamp: 2015-11-15_02:56:01.397348 Generated LIO-Target config: /etc/target/backup/lio_backup-2015-11-15_02:56:01.397348.sh Making backup of Target_Core_Mod/ConfigFS with timestamp: 2015-11-15_02:56:01.397348 Generated Target_Core_Mod config: /etc/target/backup/tcm_backup-2015-11-15_02:56:01.397348.sh Successfully updated default config /etc/target/lio_start.sh Successfully updated default config /etc/target/tcm_start.sh /> exit
Same problem here. Take note that it also affects the init scripts... # /etc/init.d/target restart * Unload Linux-iSCSI.org Fabric module ... Traceback (most recent call last): File "/usr/sbin/lio_node", line 141, in <module> os.execv(target_executable_path, sys.argv) PermissionError: [Errno 13] Permission denied [ !! ] * Unloading misc fabric modules: ... Successfully released fabric: /sys/kernel/config/target/loopback [ ok ] * Unloading Target Core modules: ... Traceback (most recent call last): File "/usr/sbin/tcm_node", line 141, in <module> os.execv(target_executable_path, sys.argv) PermissionError: [Errno 13] Permission denied [ !! ] * ERROR: target failed to stop
Bumping the priority since this has been broken for 5 months. Apologies if this is inappropriate.
*** Bug 562284 has been marked as a duplicate of this bug. ***
Same problem here, will look at it when have some time.
May not be optimal but since this is the 6th time I've had to fix this, it can be remedied by fixing the permissions: qlist lio-utils | grep .py$ | xargs chmod u+x
*** Bug 585128 has been marked as a duplicate of this bug. ***
Same as rtsadmin -- live ebuild committed in 2012, no activity since then. Plus it's broken. Sounds like we should kill it with fire.
# Michał Górny <mgorny@gentoo.org> (17 Feb 2017) # Live ebuilds only. Committed in 2012 with no maintenance afterwards. # One of the last packages to block distutils.eclass removal, #599838 # and #599840. Furthermore, lio-utils is broken, #565824. Removal # in 30 days. sys-block/lio-utils sys-block/rtsadmin
I'm wondering how to start Linux LIO SCSI target WITHOUT lio-utils. It is the package which installs /etc/init.d/target, the init script needed to restart the iSCSI configuration saved from "targetcli" The packages: sys-block/targetcli dev-python/rtslib dev-python/configshell just configure the LIO Linux iSCSI target in the kernel, but the lio-utils are needed to start,restart and stop the configuration. Beside that, this simple patch to the lio-utils ebuild: chmod +x "${D}${sitedir}"/tcm_fileio.py chmod +x "${D}${sitedir}"/tcm_iblock.py chmod +x "${D}${sitedir}"/tcm_loop.py chmod +x "${D}${sitedir}"/tcm_pscsi.py chmod +x "${D}${sitedir}"/tcm_ramdisk.py allow the lio-utils to work under the current stable version of gentoo (tested on my systems). Removal of the package sys-block/lio-utils would make Linux LIO SCSI target unusable under gentoo, beside being present in the kernel. Alternatives?
I'm not aware of any alternative. That's how I ran into this problem. I would think someone just needs to volunteer to take over maintaining this?
>I would think someone just needs to volunteer to take over maintaining this? I have never been a maintainer, but I have a slight knowledge on how ebuilds and portage works. I can volunteer as maintainer with some mentoring or initial help. It seems that it's not so hard and time consuming this kind of ebuild. Maybe I'm wrong. Feel free to contact me if you think it's appropriate. I'm sorry we don't use this package anymore (switched to samba for data sharing) but it's a kind of thing I'd like to work on.
Since Open-ISCSI doesn't build against modern kernels anymore (or at least last I checked) this is the only ISCSI option still available for Gentoo. So we really shouldn't be sunsetting the package.
I rely on tcm_node and lio_node binaries which are provided by this package (and it is not broken here)
There is an alternative iSCSI target – sys-block/tgt. I switched to it recently, because it is easier to configure, doesn't crash on memory-constrained systems and seems to be maintained more actively.
commit 0ad71ddba2d6828dd3ea41609642b5d4c6ede2a2 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Thu Mar 16 20:26:42 2017 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Sat Mar 18 08:33:26 2017 sys-block/lio-utils: Remove last-rited pkg, #565824 Bug #453274 for potentially reintroducing it.
For completeness sake I would like to add that there is a direct successor of the suite targetcli/lio-utils/rtslib in the portage tree. It is called targetcli-fb. It is actively maintained upstream and has a simpler architecture than the targetcli package. I'm using it in gentoo for quite some time now, to full satisfaction. Targetcli-fb is the default iSCSI target package in RHEL 7.
Created attachment 469382 [details] lio ebuild If I understood correctly, lio gentoo ebuild is gone because the python distutils eclass is gone. So, I wrote a quick, dirty and rough sketch of a new lio ebuild, using the new distutils-r1 eclass, which seems to install correctly on my amd64/stable gentoo systems, from my local portage overlays. It is a little bit different from the original ebuild (it hasn't wrappers), but targetcli seems to work correctly on my systems. I understand there are alternatives to targetcli/lio, but anyway, targetcli it is a really nice way to configure Linux kernel iSCSI. If anyone is interested, the ebuild sketch is attached to this post. G. Vitillaro.