Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Configure iSCSI Initiator (client) in CentOS / RHEL 6

Rumi, October 30, 2018

To use RHEL/CentOS 6 system as an iSCSI initiator or client, you must have iscsi-initiator-utils package installed. You can verify that this is installed on your system using the rpm command, as shown in the following example:

$ rpm -qa | grep iscsi-initiator-utils

Install the package if its not already available on your system using yum.

# yum install iscsi-initiator-utils

Start the iscsi demaon and use chkconfig to enable it to start after reboot as well.

# service iscsi start
# chkconfig iscsi on

Once you have installed the required package and started the service you can start discovering the available targets. To Obtain a listing of available targets from a given host (please note that ipaddress listed below must be replaced with the resolvable hostname or IP address of the system providing the port if different than default):

# iscsiadm -m discovery -t st -p 192.168.10.10
192.168.10.10:3260,1 iqn.2010-03.com.example:tgtd

Here,
iqn.2010-03.com.example:tgtd – is the target_iqn_name.

You can view more information on the target using the below command.

# iscsiadm -m node -T [target_iqn_name] -p [target_ipaddress]

The next step is to login to the discovered target.

# iscsiadm -m node -T iqn.2010-03.com.example:tgtd -p 192.168.10.10 -l
Logging in to [iface: default, target: iqn.2010-03.com.example:tgtd, portal: 192.168.10.10,3260]
Login to [iface: default, target: iqn.2010-03.com.example:tgtd, portal: 192.168.10.10,3260]: successful

You can also login into all the LUNs exported on the target by running:

# iscsiadm -m discovery -t st -l

The iscsi initiator has it’s own database to save the target/node information and configuration. This is located in “/var/lib/iscsi” directory.

You can view the newly attached iSCSI storage using fdisk command.

# fdisk -l

To disconnect an existing iSCSI storage, you will have to first log out of the target.

# iscsiadm -m node -T [target_iqn_name] -p [ipaddress] -u

To remove the target from the iscsi database so that the iscsi does not reconnect upon reboot, delete the target after logging out of it:

# iscsiadm -m node -T target_iqn_name -p ip address --op delete

If you have multiple targets that you have logged into, you can log out of all targets by running:

# iscsiadm -m node -U all

Trouble Shooting

To get target list, run:

# iscsiadm -m discovery

To get the node list, run:

# iscsiadm -m node

The iscsid daemon opens a TCP session with the target. To check the open session, run:

# iscsiadm -m session
or
# netstat -tpan | grep iscsid

You can also check for the file /sys/class/iscsi_session to find open sessions.

Find which session a disk belongs to:

# iscsiadm -m session

The output will include active sessions and attached scsi disks.

For ZTE KU Storage integraion:

For ISCSI Discovery

# iscsiadm -m discovery -t sendtargets -p 10.10.10.211:3260
# iscsiadm -m discovery -t sendtargets -p 10.10.10.212:3260

( **this ip is the port IP where the optical fiber is connected)

To get the iqn number from blade: (need to enter in KU5200)

#yum install iscsi-initiator-utils

Next command is

# cat /etc/iscsi/initiatorname.iscsi
Administrations Configurations (Linux) CentOSCentOS 6iSCSI

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes