Basic usage of iscsiadm in Linux.

iscsiadm is a command-line tool used for managing iSCSI devices and sessions. Here are a few basic uses of iscsiadm:

  1. List of discovered iSCSI devices:
    iscsiadm -m discovery -t sendtargets -p
    This command will send an iSCSI discovery request to the specified IP address and list all discovered iSCSI devices.
  2. Log into an iSCSI target:
    iscsiadm -m node -l
    This will log into all discovered iSCSI targets.
  3. List the iSCSI devices that are logged in:
    Use the command “iscsiadm -m session”
    This will display all the logged in iSCSI devices and sessions.
  4. Logout an iSCSI device:
    iscsiadm -m node -u
    This will log out all currently logged in iSCSI devices.
  5. Remove the discovered iSCSI device:
    iscsiadm -m discovery -t sendtargets -p –op delete
    This will delete the discovered iSCSI device with the specified IP address.
  6. View detailed information about iSCSI devices by using the command:
    iscsiadm -m session -P 3
    This command will display detailed information about all logged-in iSCSI devices, including device name, iSCSI target address, session status, and more.

The above are some basic usages of iscsiadm, which can be used to manage and configure iSCSI devices and sessions using different command line options based on specific needs.

广告
Closing in 10 seconds
bannerAds