25.7. iSCSI


This section describes the iSCSI API and the iscsiadm utility. Before using the iscsiadm utility, install the iscsi-initiator-utils package first by running yum install iscsi-initiator-utils.
In Red Hat Enterprise Linux 7, the iSCSI service is lazily started by default. If root is not on an iSCSI device or there are no nodes marked with node.startup = automatic then the iSCSI service will not start until an iscsiadm command is run that requires iscsid or the iscsi kernel modules to be started. For example, running the discovery command iscsiadm -m discovery -t st -p ip:port will cause iscsiadm to start the iSCSI service.
To force the iscsid daemon to run and iSCSI kernel modules to load, run systemctl start iscsid.service.

25.7.1. iSCSI API

To get information about running sessions, run:
Copy to Clipboard Toggle word wrap
# iscsiadm -m session -P 3
This command displays the session/device state, session ID (sid), some negotiated parameters, and the SCSI devices accessible through the session.
For shorter output (for example, to display only the sid-to-node mapping), run:
Copy to Clipboard Toggle word wrap
# iscsiadm -m session -P 0
or
Copy to Clipboard Toggle word wrap
# iscsiadm -m session
These commands print the list of running sessions with the format:
Copy to Clipboard Toggle word wrap
driver [sid] target_ip:port,target_portal_group_tag proper_target_name

Example 25.3. Output of the iscsisadm -m session Command

For example:
Copy to Clipboard Toggle word wrap
# iscsiadm -m session

tcp [2] 10.15.84.19:3260,2 iqn.1992-08.com.netapp:sn.33615311
tcp [3] 10.15.85.19:3260,3 iqn.1992-08.com.netapp:sn.33615311
For more information about the iSCSI API, refer to /usr/share/doc/iscsi-initiator-utils-version/README.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.