25th Anniversary Savings | 25% Off Dedicated Servers*Shop Now
25th Anniversary Savings | 25% Off VPS Hosting* †††Shop Now
Limited Inventory: High-Performance AMD-Powered Servers Now Available.* Shop Now >
Dedicated Hosting Deals | From $99/moShop Now
Earn hosting credits and a chance to win an Amazon gift card when you refer friends to Liquid Web!Read our promo rules

How to Setup a Linux iSCSI Initiator in a Liquid Web SAN

Posted on by J. Mays | Updated:
Reading Time: 2 minutes

Provided that you have access to the Liquid Web SAN you will need to set up your iSCSI initiator so that you can access your volume. Read on to find out how.

When you receive your welcome email that contains your SAN credentials you should be more-or-less ready to begin. The first thing we need to do is install the iSCSI initiator utilities:

yum install iscsi-initiator-utils

One of the files that installed by the above command is the configuration file for the iscsid service. The default settings in the file are fairly reliable, but in order to connect to the Liquid Web SAN you’ll need a bit more information. In the interest of making this as simple as possible let’s back up the original configuration before we proceed:

mv /etc/iscsi/iscsid.conf /etc/iscsi/iscsid.conf.orig

Now you need to create a new /etc/iscsi/iscsid.conf with the following contents:

node.startup = automatic
node.session.auth.authmethod = CHAP
node.session.auth.username = USERNAME
node.session.auth.password = PASSWORD
discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = USERNAME
discovery.sendtargets.auth.password = PASSWORD
node.session.timeo.replacement_timeout = 120
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 5
node.session.err_timeo.abort_timeout = 15
node.session.err_timeo.lu_reset_timeout = 20
node.session.initial_login_retry_max = 8
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
node.conn[0].iscsi.HeaderDigest = None
node.session.iscsi.FastAbort = Yes

The important parts are the entries that reference “USERNAME” and “PASSWORD.” You will need to replace these with the SAN access username and password that you received in your welcome email. After saving the file you should be ready to start up the iscsid service and do an initial discovery.  You will need to replace “SANGROUPIP” in the following commands with the SAN group IP that was included in your welcome email:

/etc/init.d/iscsid restart
iscsiadm -m discovery -t sendtargets -p $SANGROUPIP

The discovery command will return a list of volumes to which your server has access. In order to use them, you’ll need to log into each of them:

iscsiadm -m node -T VOLUMENAME --login

Run dmesg and you will see that a new block device was attached.  Here is an output example from a test server:

[root@host ~]# dmesg
scsi1 : iSCSI Initiator over TCP/IP
Vendor: EQLOGIC Model: 100E-00 Rev: 4.3
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sdb: 209725440 512-byte hdwr sectors (107379 MB)
sdb: Write Protect is off
sdb: Mode Sense: ad 00 00 00
SCSI device sdb: drive cache: write through
SCSI device sdb: 209725440 512-byte hdwr sectors (107379 MB)
sdb: Write Protect is off
sdb: Mode Sense: ad 00 00 00
SCSI device sdb: drive cache: write through
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0

As you can see in the second to last line above the iSCSI target from the Liquid Web SAN has been specified as /dev/sdb. It is now ready for you to partition (to learn more about drive partitioning, see Disk Partitioning With fdisk), format, and use.


Liquid Web’s Heroic Support is always available to assist customers with this or any other issue. If you need our assistance please contact us:
Toll-Free 1.800.580.4985
International 517.322.0434

About the Author: J. Mays

As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!

Latest Articles

How to Edit the PHP Memory for Your WordPress Site via WP Toolkit

Read Article

What is CGI-Bin and What Does it Do?

Read Article

Top 10 Password Security Standards

Read Article

Top 10 Password Security Standards

Read Article

How to Use the WP Toolkit to Secure and Update WordPress

Read Article