1. Install iSCSI access software: # apt install open-iscsi -y
2. Get a list of available targets:
# iscsiadm -m discovery -t st -p
You will receive the target's address in your iSCSI service activation email.
The command will return an available target –
3. After executing this command and getting an available target, you will automatically create a configuration file that will be responsible for connecting this target. The configuration file is named default and is located in the /etc/iscsi/nodes/
4. To automatically connect an iSCSI disk when the server is turned on, you need to make certain changes to the configuration file.
Open the file with any convenient text editor and replace:
node.startup = manual > node.startup = automatic
node.session.auth.authmethod = None > node.session.auth.authmethod = CHAP
And also add the following two lines after the above line:
Login and password are specified in the service activation letter.
5. After the changes are made, restart the service: # service open-iscsi restart
Connect available iSCSI devices: # iscsiadm -m node -L all
If the data in the configuration file was correct, then the command # dmesg | tail will return information that an iSCSI disk has been connected.
Now you can work with this disk as with any other disk.