iscsi target configuration not persistent

Every time I set up an iscsi target in opensuse leap, the configuration is lost after turning off the system, so I have to recreate everything again when the system is turned on, everything works just fine, the problem is that I can not power off the pc or I lost all the set up

How are you “setting it up”?

With yast

Before shutdown

https://easgs.files.wordpress.com/2016/10/opensuse-64-bit-2016-10-22-17-57-49.png

https://easgs.files.wordpress.com/2016/10/opensuse-64-bit-2016-10-22-17-58-05.png

after shutdown

https://easgs.files.wordpress.com/2016/10/opensuse-64-bit-2016-10-22-18-16-28.png

I want to note that I have change the file sysctl as follow

####
#
# /etc/sysctl.conf is meant for local sysctl settings
#
# sysctl reads settings from the following locations:
#   /boot/sysctl.conf-<kernelversion>
#   /lib/sysctl.d/*.conf
#   /usr/lib/sysctl.d/*.conf
#   /usr/local/lib/sysctl.d/*.conf
#   /etc/sysctl.d/*.conf
#   /run/sysctl.d/*.conf
#   /etc/sysctl.conf
#
# To disable or override a distribution provided file just place a
# file with the same name in /etc/sysctl.d/
#
# See sysctl.conf(5), sysctl.d(5) and sysctl(8) for more information
#
####

# net.ipv6.conf.all.disable_ipv6 = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth1.arp_ignore=1
net.ipv4.conf.eth1.arp_announce=2
net.ipv4.conf.eth2.arp_ignore=1
net.ipv4.conf.eth2.arp_announce=2
net.ipv4.conf.eth0.arp_ignore=1
net.ipv4.conf.eth0.arp_announce=2


and this in the firewall

FW_KERNEL_SECURITY=“no”

Which iscsi technology are you using to setup (or are you using YAST exclusively)?
Last I checked, there were 3 different iscsi technologies in the OSS.

TSU

Yast only, the os has the latest updates

I did the same with SLES 12 sp1 and it is working fine with it, but the problem still persist in opensuse 42.1

Just suggesting without knowing…

In your iSCSI configuration,

  • Enable User authentication
  • Separately, you might also try associating with all IP addresses instead of only the single IP address.

For further investigation, the SUSE documentation (https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.journalctl.html) for the systemd journal suggests two methods that look interesting

  • Find the executable (in your case iscsi) and specify as an argument
journalctl *path_to_iscsi_executable* 

To find the path to your iscsi executable, I’d expect it should be found in the systemd Unit file, most likely it would also be displayed with the following, else inspect the Unit file directly(Just running the following command may also display a relevant error).

systemctl status iscsi.service

Other method I haven’t personally tried, YMMV is to install the YAST journal module

zypper in yast2-journal

HTH,
TSU