Connecting iSCSI Linux (Debian | Ubuntu)

Dedicated Server

Dedicated server

Check out SIM-Networks’ powerful pre-made server configurations

See packages

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 – <target’a address>:,1 iqn.2017-01.com.sim-networks:storage.

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/// folder.

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: node.session.auth.username = node.session.auth.password =

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.

Was this article helpful?

Tags:

#server

Did you like the article?

Cookie consent

By clicking «I agree», you consent to our website's use of cookies to give you the most relevant experience by remembering your preferences and repeat visits. However, you may visit «Manage сookies» to provide controlled consent. Learn more

Cookies settings

functional

Necessary cookies are crucial for the basic functions of the website and the website will not work in its intended way without them.

Analytics

Analytical cookies are used to understand how visitors interact with the website.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns.