7.3. Monitoring an iSCSI session by using the iscsiadm utility
You can monitor the iscsi session by using the iscsiadm utility.
By default, an iSCSI service is lazily started and the service starts after running the iscsiadm command. 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 executed that requires iscsid or the iscsi kernel modules to be started.
Use the systemctl start iscsid command as root to force the iscsid service to run and iSCSI kernel modules to load.
For more information, see:
-
/usr/share/doc/iscsi-initiator-utils/READMEfile -
iscsiadm(8)man page on your system
Procedure
Install the
iscsi-initiator-utilson client machine:# dnf install iscsi-initiator-utilsFind information about the running sessions:
# iscsiadm -m session -P 3This command displays the session or 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-nodemapping, run:# iscsiadm -m session -P 0 or # 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.33615311These commands print the list of running sessions in the following format:
driver [sid] target_ip:port,target_portal_group_tag proper_target_name.