• 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 connection command examples (Cheat Sheet)

by admin

Internet Small Computer System Interface (iSCSI) is an Internet Protocol (IP)–based storage standard that connects iSCSI initiators to iSCSI targets over IP networks. To put it simply, the SCSI packets are encapsulated in IP packets and sent over a standard IP network, where the initiators and targets reassemble the packets and interpret the commands carried by these packets.

iSCSI takes advantage of existing IP infrastructure, unlike Fibre Channel (FC), which requires special cables and switches.

Overview of iSCSI Connectivity

The main elements of iSCSI connectivity are initiators, targets, portals, sessions, and connections. I start with iSCSI sessions to provide a high-level connectivity overview, and then I cover the remaining elements in later sections of this chapter.

iSCSI Sessions

Each iSCSI initiator establishes a single session with each iSCSI target server via Transmission Control Protocol (TCP). Within that session, there can be one or more connections between initiators and portals on the target server. A portal is an IP address and TCP port combination.

iSCSI connection command examples

Below are few most commonly used iscsi connection commands.

1. Discover targets at a given IP address:

# iscsiadm --mode discoverydb --type sendtargets --portal 192.168.1.10 --discover

2. Login, must use a node record id found by the discovery:

# iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login

3. Logout:

# iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --logout

4. List node records:

# iscsiadm --mode node

5. Display all data for a given node record:

# iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS/RHEL: How to find the package with a missing file using YUM
  2. cuyo: command not found
  3. 5 Useful Examples of firewall-cmd command
  4. YUM command examples to install, remove and upgrade packages
  5. How to grep with color output
  6. daemon: command not found
  7. mount: command not found
  8. hcitool Command Examples in Linux
  9. btrfs check Command Examples in Linux
  10. How to troubleshoot NFS transfer latency issues using “nfsiostat” in CentOS / RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright