• 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. Using iostat to monitor system performance in Linux (Examples included)
  2. Linux OS service ‘iscsid’
  3. xz Command Examples in Linux
  4. How to Switch Password Algorithm on CentOS/RHEL
  5. export: command not found
  6. How to use the “screen” command in Linux
  7. ansible-galaxy – Create and manage Ansible roles (Command Examples)
  8. Comparing NET-TOOLS V/s IPROUTE Package Commands (ip Vs ifconfig command comparison)
  9. exec Command Examples in Linux
  10. qm migrate Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright