Created by Unknown User (sigfried), last modified on Jan 27, 2021
First update your package list by running:
sudo apt update
Next up is to install open-iscsi.
sudo apt install open-iscsi
Now that it is installed you will have to enable the service for it. Don't yet start it.
sudo systemctl enable iscsid
Time to configure iSCSI, first open the file "/etc/iscsi/initiatorname.iscsi". And set the Initiator Target to the correct value.
/etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2005-10.be.iswleuven.nas1
Time to open the iSCSI configuration file. Comment the manual version and uncomment the automatic line.
/etc/iscsi/initiatorname.iscsi
# To request that the iscsi initd scripts startup a session set to "automatic".
node.startup = automatic
#
# To manually startup the session set to "manual". The default is manual.
#node.startup = manual
Also if you have a CHAP username and password set configure it using "node.session.auth.username" and "node.session.auth.password".