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

The Geek Diary

CONCEPTS | BASICS | HOWTO

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

iSCSI troubleshooting : Targets Not Detected After Reboot

By admin

Problem

The iSCSI targets may not be discovered after rebooting CentOS/RHEL server. The iSCSI daemon does not show any active sessions after the reboot.

# iscsiadm -m session
iscsiadm: No active sessions.

iSCSI might show the following errors:

# iscsiadm -m node
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
[]:3260,-1
...

Solution

The iSCSI daemon was abnormal and when rebooting the server the iSCSI service didn’t start correctly. The following behaviour may be observed when there is a corruption of the iSCSI utilities. The symptoms may be corrected by reinstalling and rediscovering the targets by following steps:

1. Make Sure nothing is using the targets on the server

2. Stop iSCSI service.

# service iscsi stop

3. Erase the iscsi initiator packages.

# yum erase iscsi-initiator-utils

4. Make sure /var/lib/iscsi directory is empty, and there are no leftovers

# ls /var/lib/iscsi
#

5. Install the iscsi initiator packages again.

# yum install iscsi-initiator-utils

6. Discover targets using the target ip address in the below command.

# iscsiadm -m discovery -t st -p [IP addr]

7. Login to targets.

# iscsiadm -m node --loginall all

8. Make sure you see them all by running the following command

# iscsiadm -m session
tcp: [1] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun134-xxx (non-flash)
tcp: [10] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun133-xxx (non-flash)
tcp: [11] 1x.x.x.x:3260,2460 iqn.2007-11.com.server:lun132-xxx (non-flash)
tcp: [12] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun131-xxx (non-flash)
tcp: [13] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun001-xxx (non-flash)
tcp: [14] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun129-xxx (non-flash)
tcp: [15] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun128-xxx (non-flash)
tcp: [16] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun127-xxx (non-flash)
tcp: [17] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun126-xxx (non-flash)
tcp: [18] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun125-xxx (non-flash)
tcp: [19] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun124-xxx (non-flash)
tcp: [2] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun123-xxx (non-flash)
tcp: [20] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun122-xxx c (non-flash)
tcp: [21] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun121-xxx (non-flash)
tcp: [22] x.x.x.x:3260,2460 iqn.2007-11.com.server:lun130-xxx (non-flash)

9. Reboot the server to make sure the problem is completely resolved and will not reoccur after reboot.

# shutdown -r now

At this point iSCSI should have detected the targets after a reboot.

Complete Guide to Configuring iSCSI in CentOS / RHEL 7
How to troubleshoot iSCSI issues in CentOS / RHEL 6,7
How to configure iSCSI Initiator (client) in CentOS / RHEL 6

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

Some more articles you might also be interested in …

  1. Why Does a Lun World Wide ID Starts with the Number 3 in Linux dm-multipath
  2. Understanding mpathconf Utility to configure DM-Multipath
  3. The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1
  4. Beginners Guide to Udev in Linux
  5. Linux OS Service ‘psacct’
  6. How to configure kdump in Oracle Enterprise Linux (OEL 5,6)
  7. Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation
  8. Unable to Run X Applications Through SSH in Linux
  9. Running repairs on XFS Filesystems
  10. How to Configure ACL(Access Control Lists) in Linux FileSystem

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary