[opensuse] iscsi config screwed up by lio_dump ?
I guess there are not many takers for these questions - anyway: I used targetcli to create/edit my configuration, looked good and I had an initiator connect and run some IO. Then I rebooted the LIO target server and ended up with a partial config being dumped to /etc/target/lio_setup.sh. AFAICT, my saved config in /etc/target/scsi_target.lio is fine, but how do I convert/load that? It looks like json. The targetcli man page on Leap mentions the "clearconfig" command, and the man page on http://linux.die.net also has a "restoreconfig" and "sessions". None of these work in my version of targetcli. I guess it is backlevel? -- Per Jessen, Zürich (5.5°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/10/2016 07:01 AM, Per Jessen wrote:
I guess there are not many takers for these questions - anyway:
My apologies for not commenting earlier, but I don't always make enough time to scan this list. (Please feel free to ping me directly about iSCSI issues.)
I used targetcli to create/edit my configuration, looked good and I had an initiator connect and run some IO.
Then I rebooted the LIO target server and ended up with a partial config being dumped to /etc/target/lio_setup.sh. AFAICT, my saved config in /etc/target/scsi_target.lio is fine, but how do I convert/load that? It looks like json.
I believe there are issues between lio-utils and targetcli. Right now, targetcli does not quite stand on its own, as the modules that needed to be loaded at run time (and a few other configfs issues) need to be set up. So right now, I *believe* you need both lio-utils and targetcli. [Disclaimer: I know this is the case in SLE 12, but I am downloading Leap right now to test it there.] So the things that lio-utils does on startup are: * start up before targetcli * load proper target modules (from /etc/target/*start.sh) * load persistent configuration (saved in /etc/target/*setup.sh) And on shutdown, lio-utils saves the "current configuration" (i.e. the current state of configfs) in the /etc/target/*setup.sh files Targetcli can easily sit on top of this. But this can be confusing, since targetcli complains when you try to exit without saving configuration. And if you do save configuration in targetcli, it saves it in /etc/target/scsi_target.lio. This file is reloaded by systemd when you start your targetcli service. It is not clear if this may conflict with your lio configuration, so I usually do *not* save the targetcli config, even when it asks me twice. Note: work is ongoing to fix this.
The targetcli man page on Leap mentions the "clearconfig" command, and the man page on http://linux.die.net also has a "restoreconfig" and "sessions". None of these work in my version of targetcli. I guess it is backlevel?
I don't care what's on non-openSUSE web pages, but the mention of "clearconfig" on our man page is a bug (so please file one on it, cc-ing me) There is a way to manually restore a config file. See the command load_targetcli_config in /usr/bin. This does not have a "help" option or a man page (also a bug), but I wrote this command so that there was some way to load the configuration that targetcli saves.
My apologies (again) on not replying sooner, as I hadn't noticed this thread until now. -- Lee Duncan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Lee Duncan wrote:
On 02/10/2016 07:01 AM, Per Jessen wrote:
I guess there are not many takers for these questions - anyway:
My apologies for not commenting earlier, but I don't always make enough time to scan this list. (Please feel free to ping me directly about iSCSI issues.)
Thanks Lee, much appreciated! I think my system was in a bit of in-between state, which screwed things up for me. I've got a working SAN server with targetcli now, I'm getting to know it. /Per -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Lee Duncan
-
Per Jessen