• 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

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. CentOS / RHEL : How to prevent disabled repositories from being downloaded into the yum cache
  2. Failed to start LSB: Bring up/down networking – On restarting network service CentOS/RHEL (DHCP client)
  3. GlusterFS – Real Time Data Replication Across Multiple RHEL/CentOS Nodes
  4. Example of using getnstimeofday in Linux kernel
  5. How to Increase KVM Guest vCPU Resources
  6. Reducing/Limiting the CPUs in CentOS/RHEL 5,6
  7. How to schedule Jobs with Cron in Linux
  8. eject Command Examples in Linux
  9. gzip Command Examples in Linux
  10. lspci Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright