commands.sh

iscsiadm

linux

Manage iSCSI sessions, nodes, and discovery.

More info →

Options (9)

-m, --modeboolean

Show active iSCSI sessions

Example: sudo iscsiadm {{[-m|--mode]}} session
-t, --typeboolean

Discover available iSCSI targets on a portal (no authentication)

Example: sudo iscsiadm {{[-m|--mode]}} discovery {{[-t|--type]}} sendtargets {{[-p|--portal]}} {{ip_address}}
-p, --portalboolean

Discover available iSCSI targets on a portal (no authentication)

Example: sudo iscsiadm {{[-m|--mode]}} discovery {{[-t|--type]}} sendtargets {{[-p|--portal]}} {{ip_address}}
-T, --targetnameboolean

Log in to a specific iSCSI target without authentication

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260 {{[-l|--login]}}
-l, --loginboolean

Log in to a specific iSCSI target without authentication

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260 {{[-l|--login]}}
-u, --logoutboolean

Log out from a specific iSCSI target

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260 {{[-u|--logout]}}
-o, --opboolean

Create an iSCSI node when discovery is blocked (for CHAP authentication)

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-o|--op]}} new {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260
-n, --nameboolean

Configure CHAP authentication for an iSCSI target

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260 {{[-o|--op]}} update {{[-n|--name]}} node.session.auth.authmethod {{[-v|--value]}} CHAP
-v, --valueboolean

Configure CHAP authentication for an iSCSI target

Example: sudo iscsiadm {{[-m|--mode]}} node {{[-T|--targetname]}} {{iqn}} {{[-p|--portal]}} {{ip_address}}:3260 {{[-o|--op]}} update {{[-n|--name]}} node.session.auth.authmethod {{[-v|--value]}} CHAP

Examples (7)

Show active iSCSI sessions

sudo iscsiadm [-m|--mode] session

List all known iSCSI nodes

sudo iscsiadm [-m|--mode] node

Discover available iSCSI targets on a portal (no authentication)

sudo iscsiadm [-m|--mode] discovery [-t|--type] sendtargets [-p|--portal] ip_address

Log in to a specific iSCSI target without authentication

sudo iscsiadm [-m|--mode] node [-T|--targetname] iqn [-p|--portal] ip_address:3260 [-l|--login]

Log out from a specific iSCSI target

sudo iscsiadm [-m|--mode] node [-T|--targetname] iqn [-p|--portal] ip_address:3260 [-u|--logout]

Create an iSCSI node when discovery is blocked (for CHAP authentication)

sudo iscsiadm [-m|--mode] node [-o|--op] new [-T|--targetname] iqn [-p|--portal] ip_address:3260

Configure CHAP authentication for an iSCSI target

sudo iscsiadm [-m|--mode] node [-T|--targetname] iqn [-p|--portal] ip_address:3260 [-o|--op] update [-n|--name] node.session.auth.authmethod [-v|--value] CHAP
made by @shridhargupta | data from tldr-pages