iscsiadm Command Guide: Manage iSCSI in Linux

The iscsiadm command is a command line tool used to manage iSCSI (Internet Small Computer System Interface) devices. It can be used to add, remove, modify, and display iSCSI targets.

Here are some common usage examples:

  1. Display all connected iSCSI devices.
iscsiadm -m session
  1. Add a new iSCSI target:
iscsiadm -m discovery -t sendtargets -p <target_ip>
iscsiadm -m node --login
  1. Remove a connected iSCSI target.
iscsiadm -m node --targetname <target_name> --logout
iscsiadm -m node --targetname <target_name> --op delete
  1. List all known iSCSI targets.
iscsiadm -m discovery -t st -p <target_ip>
  1. Display detailed information about the connected iSCSI devices.
iscsiadm -m session -P 3

Please note that using the iscsiadm command may require root permissions. For more usage and options, you can refer to the man page of iscsiadm or use the iscsiadm –help command.

bannerAds