All Products
Search
Document Center

CHAP configuration

Last Updated: Jun 28, 2019

After you enable CHAP, you must specify the username and password to establish a valid iSCSI session, as shown in the following figure:

88

Configure CHAP in the Windows iSCSI initiator

For more information about starting the iSCSI initiator, see topic 3.7.2.1.

1、Configure the iSCSI portal

In the iSCSI Initiator Properties dialog box that appears, click the Discovery tab, and then click Discover Portal.

130

2、In the Discover Target Portal dialog box, enter the IP address of the target portal, and then click OK.

131

3、Connect the client to the iSCSI target

Click the Targets tab. The portal added in the preceding step is in the Inactive status. Select the target portal and click Connect.

132

In the Discover Target Portal dialog box, enter the IP address of the target portal, and then click Advanced.

133

In the dialog box that appears, select CHAP, specify the username and password, and click OK.

134

Verify that the status of the target portal becomes Connected, and click OK.

135

For more information about viewing disks, see topic 7.2.4.

Configure CHAP in the Linux iSCSI initiator

The following procedure describes how to configure CHAP in the Linux iSCSI initiator:

1、Run the following command to edit the /etc/iscsi/iscsid.conf file through the vi editor: /etc/iscsi/iscsid.conf.

2、Find the CHAP settings, enable CHAP, and enter the username and password. Enter the following information based on the CHAP configuration:

Note: Remove the annotator “#” before each specified item.

Example:

chap配置

3、To discover the volume, you can access port 3260.

Format:

sudo iscsiadm -m discovery -t st –p < GATEWAY_IP >:3260

Example:

iscsiadm -m discovery -t st -p 192.168.0.227:3260

192.168.0.227:the IP address of the gateway. You can obtain the IP address in the Network Information area on the About page in the gateway console.

2

4、Mount the volumeRun the following command to mount the discovered volume. Replace TargetName with the target name of the volume that you want to mount.

The target name can be obtained in step 1. Replace GATEWAY_IP with the IP address of your gateway.

Note: Due to restrictions of the iSCSI protocol, do not mount one volume to multiple clients.

Format:

iscsiadm --mode node --targetname <TargetName> --portal <GATEWAY_IP> -l

Example:

iscsiadm -m node -T iqn.2009-09.com.aliyun.iscsi-sgw:218dir2-218oss -p 192.168.0.227:3260 –l

示例