LINUX

Configure Linux iSCSI Initiator

configure-icsi-target-initiator-linux
Configure Linux iSCSI Initiator

Configure Linux iSCSI Initiator

Provided that you’ve got access to the Liquid web SAN you’ll ought to got wind of your iSCSI instigator in order that you’ll access your volume. browse on to seek out out however.

When you receive your welcome email that contains your SAN credentials you ought to be more-or-less able to begin. The primary issue we want to try to to is install the iSCSI instigator utilities:

Utilities:

yum install iscsi-initiator-utils

One of the files that put in by the on top of command is that the configuration file for the iscsid service. The default settings within the file square measure fairly reliable. However so as to attach to the Liquid net SAN you’ll would like a touch additional info. Within the interest of constructing this as easy as attainable let’s keep a copy the initial configuration before we tend to proceed:

Initial Configuration:

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 vital components square measure the entries that reference “USERNAME” and “PASSWORD” you’ll ought to replace these with the SAN access username and countersign that you just received in your welcome email. Once saving the file you must be able to take off the iscsid service associated do an initial discovery. You’ll ought to replace “SANGROUPIP” within the following commands with the SAN cluster informatics that was enclosed 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:

READ  How to Find Files and Folders on Linux

Output:

[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’ll be able to see within the second to last line higher than the iSCSI target from the Liquid net SAN has been mere as /dev/sdb. It’s currently prepared for you to partition (to learn additional regarding drive partitioning, see Disk Partitioning With fdisk), format, and use.

About the author

Venkatesan Prabu

Venkatesan Prabu

Wikitechy Founder, Author, International Speaker, and Job Consultant. My role as the CEO of Wikitechy, I help businesses build their next generation digital platforms and help with their product innovation and growth strategy. I'm a frequent speaker at tech conferences and events.

Add Comment

Click here to post a comment