iscsiadm
Manage iSCSI sessions, nodes, and discovery. tldr-pages
On Linux
Linux
Show active iSCSI sessions
sudo iscsiadm --mode sessionIdentifyList all known iSCSI nodes
sudo iscsiadm --mode nodeIdentifyDiscover available iSCSI targets on a portal (no authentication)
sudo iscsiadm --mode discovery --type sendtargets --portal ip_addressIdentifyLog in to a specific iSCSI target without authentication
sudo iscsiadm --mode node --targetname iqn --portal ip_address:3260 --loginIdentifyLog out from a specific iSCSI target
sudo iscsiadm --mode node --targetname iqn --portal ip_address:3260 --logoutIdentifyCreate an iSCSI node when discovery is blocked (for CHAP authentication)
sudo iscsiadm --mode node --op new --targetname iqn --portal ip_address:3260IdentifyConfigure CHAP authentication for an iSCSI target
sudo iscsiadm --mode node --targetname iqn --portal ip_address:3260 --op update --name node.session.auth.authmethod --value CHAPIdentify