• 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

Understanding iscsiadm Utility in CentOS / RHEL

By admin

Internet Small Computer System Interface (iSCSI) is an IP-based standard for connecting storage devices. iSCSI uses IP networks to encapsulate SCSI commands, allowing data to be transferred over long distances. iSCSI provides shared storage among a number of client systems. Storage devices are attached to servers (targets). Client systems (initiators) access the remote storage devices over IP networks. To the client systems, the storage devices appear to be locally attached. iSCSI uses the existing IP infrastructure and does not require any additional cabling, as is the case with Fibre Channel (FC) storage area networks.

Open-iSCSI persistent configuration is implemented as a database, which consists of a hierarchy of files and directories in the /var/lib/iscsi/ directory:

# ls -l /var/lib/iscsi
total 0
drwxr-xr-x. 2 root root 6 Jun 27  2017 ifaces
drwxr-xr-x. 2 root root 6 Jun 27  2017 isns
drwxr-xr-x. 2 root root 6 Jun 27  2017 nodes
drwxr-xr-x. 2 root root 6 Jun 27  2017 send_targets
drwxr-xr-x. 2 root root 6 Jun 27  2017 slp
drwxr-xr-x. 2 root root 6 Jun 27  2017 static

Use the iscsiadm utility to update, delete, insert, and query the persistent database. Also use this utility to establish a session between a target and an initiator. Several different operational modes are available for the command.

  • discoverydb: Updates or queries the Open-iSCSI database records
  • discovery: Performs a discovery operation
  • node: Performs an operation on a portal (IP:port) on an iSCSI target
  • session: Performs an operation on a TCP connection between an initiator and a target
  • iface: Performs an operation on a network interface

Additional options to iscsiadm include:

  • -type – Specify the discover type.
  • -portal – Specify the iSCSI target portal.

iscsiadm connection commands

1. Discover targets at a given IP address:

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

2. Login into a iscsi target (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 from a iscsi target.

# 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: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Run SCP Without Password Prompt Interruption in Linux
  2. Configuring Network Redundancy for PaceMaker Cluster Communication
  3. How to install and configure sosreport under CentOS / RHEL
  4. CentOS / RHEL : How to set chroot jail for vsftp for all the users
  5. How to disable IPv6 on CentOS / RHEL 5
  6. How to Configure Interface bonding (NIC Teaming) on Oracle Linux 6
  7. Linux OS Service ‘named’
  8. Complete Guide to Configuring iSCSI in CentOS / RHEL 7
  9. How to Run DNS and FTP services in a chroot Jail
  10. CentOS / RHEL 7 : How to open the Firewall port for Samba server using FirewallD

You May Also Like

Primary Sidebar

Recent Posts

  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • How to relocate the redo log files to a different location on disk
  • Oracle Database: Redo log operations (Add/Drop/Change Location)
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary