This article will show you how to configure Open-iSCSI initiator (client) to connect to an existing iSCSI target (server). I will not actually review how to setup the iSCSI Target in this article. If you don’t already have an iSCSI Target available in your environent, you might take a look at OpenFiler.
In this guide, I am using a CentOS 6.5 system as the iSCSI initiator (client) and will connect to an existing iSCSI target.
Install the Open-iSCSI software
On my CentOS 6.5 system, the Open-iSCSI package is not installed by default. You can check to see if your system has the package installed by running the following command:
[root@linux ~]# rpm -qa | grep iscsi-initiator-utils
If the iscsi-initiator-utils package is not already installed, use the “yum” command to install it:
[root@linux ~]# yum install iscsi-initiator-utils
Start the iSCSI service
After installing the iscsi-initiator-utils packs, start the iscsid service and configure both the iscsid and iscsi services to automatically start each time the system boots:
[root@linux ~]# /etc/init.d/iscsid start
[root@linux ~]# chkconfig iscsid on
[root@linux ~]# chkconfig iscsi on
Discover iSCSI Targets
Use the iscsiadm command to discover all of the iSCSI targets on your iSCSI Target server (i.e. your iSCSI SAN. In this case my server running OpenFiler):
[root@linux ~]# iscsiadm -m discovery -t sendtargets -p 192.168.197.201
192.168.197.201:3260,1 iqn.2006-01.com.openfiler:tsn.target1
Note: In my example, the hostname of my iSCSI Target (SAN) is “openfiler.mydomain.com” and has an IP address of 192.168.197.201
Login to the iSCSI Target and configure automatic login at boot time
[root@linux ~]# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.target1 -p 192.168.197.201 --login
[root@linux ~]# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.target1 -p 192.168.197.201 --op update -n node.startup -v automatic
Verify iSCSI session is active
[root@linux ~]# iscsiadm -m session
tcp: [1] 192.168.197.201:3260,1 iqn.2006-01.com.openfiler:tsn.target1
Identify which device the iSCSI target maps to
[root@linux ~]# (cd /dev/disk/by-path; ls -l *iscsi* | awk '{FS=" "; print $9 " " $10 " " $11}')
ip-192.168.197.201:3260-iscsi-iqn.2006-01.com.openfiler:tsn.target1-lun-0 -> ../../sdc
This tells us that the iSCSI target has been mapped to /dev/sdc on the system. From here, use standard partitioning/formatting commands (fdisk, mkfs, etc) to setup the disk as desired!
Hi,
Using Centos nodes & Openfiler. Quorum disk shows up as sdb on node1 and the quorum disk is sdc on node2. Similarly shared-disk is sdc on node1 and sdb on node2. I have tried rediscovering the targets(logout,delete,discover & relogin) and reloading the iscsi service as well. Getting a couple of disks for “quorum” disk and “shared disk” i.e a total of 4 disks on 1 node each…maybe the 2 interfaces which I am using on the virtual-box is giving this o/p !!!!. Is there any way to fix this.
You should be able to create udev rules to accomplish this. Here are some links that may help:
https://jablonskis.org/2011/persistent-iscsi-lun-device-name/index.html
http://www.cyberciti.biz/tips/linux-assign-static-names-to-scsi-devices.html
Hope this helps,
TonyT
Hi, i belierve that i ssaw you visited my weblog soo i got here to
return the choose?.I’m attempting to to ind things to enhance mmy site!I
assume iits ok to make use of some of your ideas!!
It must be cutting edge, vibrant, a very good selling tool until have
a live question.It is a huge distinction that you really,
really need to bbe sure you get. In CPA marketing, making of sales iss not
necessary.
I’m not sure that can help you, but many of your competitors, or websites similar to linuxclustering.net use this brand new FREE Traffic approach successfully to grow their business and grow their revenue: podcastmoneyapp.com.
That could be just what you are looking for to scale your business…Worth a look.
Hi There,
Are you tired of feeling like you’re stuck in a digital rut with your outdated website?
A website is often the first impression a customer has of your business, and if it’s not up to par, it can be detrimental to your success.
Think of your website as the storefront of your business. Just as a physical storefront needs a fresh coat of paint and regular maintenance to attract customers, your website needs a redesign and regular updates to stay relevant and secure.
That’s where our website package comes in. We offer a full website redesign, website hosting, free SSL security, and 60 minutes of monthly updates. This package will give your website the face-lift it needs and keep it running smoothly.
For only $49.99 a month, you will get the New All-In-One No More Headache Complete Website Package which includes:
Blazing Fast Website
Website Hosting
Daily Backups
Periodic Updates
Ongoing Support
100% Customized Mobile-Friendly Design
1 free SSL certificate
60 minutes of monthly support
Don’t let your outdated website hold you back any longer. Invest in our website package and watch as your online presence and success soar.
Visit http://www.simplybuiltdigital.com and contact us to get started.
Jeff
Simply Built Digital