This topic describes how to connect to and use iSCSI volumes on a CSG agent on an ECS instance that runs Windows.

Prerequisites

  • An iSCSI volume is created. For more information, see Create an iSCSI volume.
  • The Microsoft iSCSI initiator service is enabled on the Windows-based instance.Microsoft iSCSI initiator service

Connect to the iSCSI volume

  1. Log on to the ECS console.
    Note If your on-premises server is connected to a virtual private cloud (VPC) over an Express Connect circuit, you can also perform the following steps on your server.
  2. Connect to your ECS instance that runs Windows. For more information, see Connect to an instance.
  3. Find and start the iSCSI Initiator.
  4. Configure an iSCSI portal.
    1. In the iSCSI Initiator Properties dialog box, click the Discovery tab, and then click Discover Portal.
    2. In the Discover Target Portal dialog box, enter the IPv4 address or IPv6 address of the block gateway in the IP Address or DNS Name field, retain the default port number 3260 for the Port field, and click OK.

      You can query the IP address of a block gateway in the Service IP Address column of the gateway list in the CSG console. If IPv6 is enabled for the VPC of the gateway, the first line in the column shows the IPv4 address, and the second line shows the IPv6 address.

      Note
      • CSG version 1.6.0 and later support IPv6.
      • You can mount iSCSI volumes over IPv6 only in the China (Hohhot) region. Make sure that the VPC and vSwitch of the gateway support IPv6.
      • If you mount iSCSI volumes over IPv6, make sure that an IPv6 address is configured for your CSG agent.
      • If the VPC and vSwitch of an existing gateway support IPv6, you can obtain an IPv6 mount target after you enable IPv6 for the gateway. By default, gateways created in this VPC support IPv6.
  5. Connect to the iSCSI volume.
    1. In the iSCSI Initiator Properties dialog box, click the Targets tab and then click Connect.
    2. In the Connect to Target dialog box, select the iSCSI volume and the Add this connection to the list of Favorite Targets check box.
    3. Optional. In the Connect to Target dialog box, click Advanced, configure CHAP settings and click OK.
      Note If you enabled CHAP when you created the iSCSI volume, you must configure CHAP settings in the Advanced Settings dialog box before you can use the iSCSI volume.
      In the Advanced Settings dialog box, select the Enable CHAP log on check box and enter the name and target secret.
      • In the Name field, enter the CHAP username that you set when you created the iSCSI volume.
      • In the Target secret field, enter the CHAP secret that you specified when you created the iSCSI volume.
    4. Verify that the connection is established. If the iSCSI volume is in the Connected state, the connection is established.

      After the connection is established, you can use the iSCSI volume from your on-premises host.

View the iSCSI volume

To view a connected iSCSI volume, perform the following steps:

  1. Open Computer Management.
  2. In the left-side navigation pane, right-click Disk Management under Storage and select Rescan Disks.

Delete the iSCSI volume

If you do not need an iSCSI volume, you can disconnect the iSCSI volume. A disconnected iSCSI volume no longer appears on the local computer.

  1. In the iSCSI Initiator Properties dialog box, click the Target tab and then click Disconnect.
  2. Verify that the iSCSI volume is disconnected.

    If the status of the iSCSI volume is Inactive, the volume is disconnected.