Skip to main content

Identify and fix iSCSI issues

Hands-On Lab

 

Photo of Michael Christian

Michael Christian

Course Development Director in Content

Length

01:30:00

Difficulty

Advanced

In this exercise, you'll troubleshoot and resolve an issue connecting an iSCSI initiator to the iSCSI target.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Identify and fix iSCSI issues

Introduction

In this exercise, you'll troubleshoot and resolve an issue connecting an iSCSI initiator to the iSCSI target.

Another administrator has configured Server1 as an iSCSI target and Server2 as an initiator, but is having trouble connecting. They've asked you for assistance in successfully connecting the initiator to the target.

Solution

Start by logging in to the lab servers using the credentials provided on the hands-on lab page:

ssh cloud_user@PUBLIC_IP_ADDRESS

Become the root user:

sudo su -

Be sure to log in to both Server1 and Server2 in separate tabs or windows.

Review target configuration

On Server1:

  1. Verify the target service is running:

    systemctl status target
  2. Start and enable the target service:

    systemctl start target && systemctl enable target
  3. Review the iSCSI target configuration:

    targetcli
    /> ls
    /> iscsi/iqn.2003-01.org.linux-iscsi.ip-10-0-1-10.x8664:sn.a3776832068c/tpg1/ get auth

Review initiator configuration

On Server2:

  1. View existing block devices:

    lsblk
  2. Verify network connectivity to the target:

    telnet 10.0.1.10 3260

    Disconnect the Telnet session by pressing CTRL+] and then entering quit.

  3. Review the initiator configuration file:

    vim /etc/iscsi/iscsid.conf
  4. Comment out the authentication settings:

    #node.session.auth.authmethod = CHAP
    ...
    #node.session.auth.username = server2
    #node.session.auth.password = secret
  5. Save and close the file:

    :wq
  6. Check for existing target records:

    iscsiadm -m node
  7. Verify the name in /etc/iscsi/initatorname.iscsi matches the target ACL:

    cat /etc/iscsi/initiatorname.iscsi
  8. Retrieve the target from Server1:

    iscsiadm -m discovery -t sendtargets -p 10.0.1.10
  9. Connect to the target:

    iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.ip-10-0-1-10.x8664:sn.a3776832068c -l
  10. Verify the block device is available:

    lsblk

Conclusion

Congratulations, you've completed this hands-on lab!