This procedure assumes that you are logged in to the local system that contains the iSCSI targets.
Become superuser.
Set the CHAP secret name for the target.
A convention is to use the host name for the secret name. For example:
target# iscsitadm modify admin -H stormpike |
Specify the CHAP secret.
The CHAP secret must be between 12 and 16 characters. For example:
target# iscsitadm modify admin -C Enter secret: xxxxxx Re-enter secret: xxxxxx |
Create an initiator object that will be associated with one or more targets.
This step is done so that you can associate a friendly name (normally the host name, in this case monster620) with the IQN value, instead of typing it in every time. For example:
# iscsitadm create initiator -n iqn.1986-03.com.sun: 01:00e081553307.4399f40e monster620 |
Provide the same CHAP name that was used on the initiator.
This name can be different from the friendly name that was used for the initiator object. For example:
target# iscsitadm modify initiator -H monster620 monster620 |
Use the same CHAP secret that was used on the initiator.
For example:
target# iscsitadm modify initiator -C monster620 Enter secret: xxxxxx Re-enter secret: xxxxxx |
Associate the initiator object with one or more targets.
For example:
target# iscsitadm modify target -l monster620 sandbox |