• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to troubleshoot iSCSI issues in CentOS / RHEL 6,7

by admin

Internet Small Computer System Interface (iSCSI) is an IP-based standard for connecting storage devices. iSCSI uses IP networks to encapsulate SCSI commands, allowing data to be transferred over long distances. iSCSI provides shared storage among a number of client systems. Storage devices are attached to servers (targets). Client systems (initiators) access the remote storage devices over IP networks. To the client systems, the storage devices appear to be locally attached. iSCSI uses the existing IP infrastructure and does not require any additional cabling, as is the case with Fibre Channel (FC) storage area networks.

The post describes how to troubleshoot iSCSI issue using tcpdump.

Useful Commands

Below are some useful commands to gather information on the current iSCSI setup that you may have.

1. To get target list, run:

# iscsiadm -m discovery

2. To get the node list, run:

# iscsiadm -m node

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

# iscsiadm -m session

or

# netstat -tpan | grep iscsid

or check /sys/class/iscsi_session

4. Find which session a disk belongs to:

# iscsiadm -m session

The output will include active sessions and attached scsi disks.

Debuging iSCSI issues

1. Log out of the iSCSI connections with the command:

# iscsiadm --mode node --targetname [target_name(iqn)] --portal [target_IP:port_number] --logout

2. Stop the iscsid daemon:

# service iscsid stop   ### RHEL 6
# systemctl iscsid stop   ### RHEL 7

3. Start the packet capture on the network interface:

# tcpdump -s0 -i [interface] -w /var/tmp/[interface]-dump.pcap

4. Start iscsid in debug mode and write all the outputs into the file /tmp/iscsid.log :

# iscsid -d 8 -c /etc/iscsi/iscsid.conf -i /etc/iscsi/initiatorname.iscsi -f &> /tmp/iscsid.log

5. After that login again into the target:

# iscsiadm --mode node --targetname [target_name] --portal [target_IP:port_number] --login

Wait until you have errors in the logs. Then stop both the tcpdump and the iscsid program to review (*.pcap and iscsid.log).

NOTE: Adding the parameter “-d 8” to the init.d script won’t add any debugging log into the /var/log/messages.
How to configure iSCSI Initiator (client) in CentOS / RHEL 6
How to configure iSCSI target using targetcli in CentOS / RHEL 7
How to configure iSCSI Initiator (client) in CentOS / RHEL 7
CentOS / RHEL 6,7 : How to delete an iSCSI Target on the initiator (iSCSI client)

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 7 : How to create an Network Bonding (NIC teaming) using nmcli
  2. What are SELinux Modes and how to set them
  3. CentOS / RHEL 7 : How to remove rescue image using grubby
  4. legit Command Examples in Linux
  5. Configure MySQL Router to Auto Restart of Failure using systemd
  6. man Command Examples in Linux
  7. “yum history” command examples to display, rollback, redo, undo yum transactions
  8. asterisk Command Example
  9. How To Increase The Retention Of “sar” Data To ‘N’ Days in Linux
  10. ipcmk: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright