This topic describes how to create a block gateway and an Internet Small Computer Systems Interface (iSCSI) volume in the Cloud Storage Gateway (CSG) console.

Prerequisites

  1. You have registered an Alibaba Cloud account and passed the real-name verification. For more information, see Sign up with Alibaba Cloud.
    Note We recommend that you log on to the CSG console as a RAM user. For more information, see Use RAM to implement account-based access control.
  2. You have activated the CSG service.

    When you log on to the for the first time, you can follow the instructions on the page to activate the CSG service.

  3. A Virtual Private Cloud (VPC) is available in the region where you want to create a block gateway. For more information, see Create a VPC and a VSwitch.
  4. An Elastic Compute Service (ECS) instance is available in the region where you want to create a block gateway. The ECS instance runs in the VPC that you have created. For more information, see Create an instance.
    Note If your local host has been connected to an Alibaba Cloud VPC through a leased line, you can also manage the block gateway on your local host.
  5. You have created an Object Storage Service (OSS) bucket. For more information, see Create a bucket.
    Note Block gateways support OSS buckets of standard and infrequent access (IA) types.

Step 1: Create a block gateway

  1. Log on to the CSG console.
  2. Select the region where you want to create a block gateway.
  3. In the left-side navigation pane, select Overview to go to the Overview page. In the Gateway Clusters section, click the target gateway cluster to go to the Gateway Cluster page, and then click Create.
    If you have not created any gateway cluster, on the Overview page, click Create Gateway Cluster to create a gateway cluster.
  4. On the Create Gateway dialog box that appears, set the following parameters, and click Next.
    Parameter Description
    Name Specifies the name of the gateway that you want to create.

    The name must be 1 to 60 characters in length, and can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character.

    Location Specifies the location where the target gateway is located. Valid values: On-premises and Alibaba Cloud.
    • On-premises: specifies a local block gateway that is deployed at your data center. You can deploy a local block gateway either in the CSG console or in the local block gateway console.
    • Alibaba Cloud: specifies an in-cloud block gateway that is deployed in Alibaba Cloud. You can deploy an in-cloud block gateway only in the CSG console.
    Type Specifies the type of the gateway that you want to create. Set this parameter to Block Gateway.
  5. Click Next to open the Configure Gateway tab, set the following parameters, and then click Next.

    If you set Location to Alibaba Cloud, you must specify the following gateway parameters.

    Parameter Description
    Model Specifies the model of the gateway that you want to create. Valid values: Basic, Standard, Enhanced, and Advanced. For more information, see Specifications.
    VPC Specifies the VPC where the target gateway is located.
    Note This must be the VPC where your ECS instance or local host is located.
    VSwitch Specifies the VSwitch that connects to the target gateway.
    Note This must be the VSwitch that connects to your ECS instance or local host. If no gateway is available in the zone where the specified VSwitch is located, you can create a VSwitch in another zone.
  6. Click Next to go to the Paid Information tab, set the following parameters, and then click Next.
    Parameter Description
    Billing Method Specifies the method that the system uses to calculate billing for the target gateway. Valid values: Pay-As-You-Go and Subscription. For more information, see Pricing.

    If you select Subscription, after you create the block gateway, you are redirected to the Cloud Storage Gateway (Subscription) page. Afterward, you must complete the payment on this page. For more information, see Purchase a gateway.

    After Expiration Specifies the way the system processes the target gateway after expiration. Valid values: Pay-As-You-Go and Release After Expiration.
  7. Click Next to go to the Summary tab, make sure that the specified information is correct, and then click OK.
    • After you create an in-cloud block gateway, the system completes the deployment in approximately 5 to 10 minutes. When the target gateway stays in the Running state, the gateway has been activated and deployed.
    • After you create a local block gateway, click Activate Gateway in the Actions column next to the gateway, and on the Activate Gateway dialog box that appears, set the parameters for activating the gateway. For more information, see Activate the gateway.

Step 2: Create a cache

Before you create an iSCSI volume that has the Cache mode enabled, you must add a cache disk to the block gateway.
Note This section describes how to create a cache disk for an in-cloud block gateway. To create a cache for a local block gateway, you must go to the platform where the local gateway console is deployed.
  1. Log on to the CSG console.
  2. Select the region where the target block gateway is located.
  3. Go to the Gateway Cluster page, find the target block gateway, and then click the name of the gateway to go to the Share tab.
  4. Click the Cache tab, and click Create Cache.
  5. On the Add Cache dialog box that appears, set the following parameters:
    • Size: specifies the size of the cache that you want to create. Valid values: 20 GB to 32 TB.
    • Type: specifies the type of the cache that you want to create. Valid values: Ultra Disk and SSD.
  6. Click OK.
    For a subscription block gateway, after you create a cache, you are redirected to the Cloud Storage Gateway Cache Disk (Subscription) page to pay for the cache. For more information, see Purchase a cache disk.

Step 3: Create an iSCSI volume

  1. Log on to the CSG console.
  2. Select the region where the target block gateway is located.
  3. Go to the Gateway Cluster page, find the target block gateway, and then click the name of the gateway to go to the Share tab.
  4. On the Share tab, click Create.
  5. On the Bucket Setting tab, set the following parameters, and click Next.
    Parameter Description
    Allow Cross-region Bucket
    • Yes: specifies that you can access the bucket that stays in the different region from the specified gateway.
    • No: specifies that you can access only the bucket that stays in the same region as the specified gateway.
    Note If you select an Internet endpoint of the target bucket to bind your cloud resource to the block gateway, you may be charged for external download traffic.
    Bucket Endpoint Specifies the endpoint of an existing bucket.
    Connect to Bucket over SSL Specifies whether to connect to a bucket over SSL. Valid values: Yes and No.
  6. Click Next to go to the Basic Information tab, set the following parameters, and then click Next.
    Parameter Description
    Name Specifies the name of the iSCSI volume that you want to create. The name must be 1 to 31 characters in length, and can contain letters and digits.
    Use Recovery Mode Specifies whether to restore a volume that uses the specified OSS bucket as backend storage. Valid values: Yes and No.
    • Yes: uses the metadata such as the capacity of the specified volume to restore the volume.
    • No: uses the specified OSS bucket to create a volume.
    Capacity When you set Use Recovery Mode to No, you must set the Capacity parameter. Valid values: 1 GB to 256 TB.
    Data Access Mode Specifies the mode that CSG uses to read and write files. Valid values: Write-through Mode and Cache Mode.
    • Write-through Mode: writes files directly to an OSS bucket, and reads data directly from the bucket.
    • Cache Mode: writes files to and reads files from a target local cache disk in priority. Typically, the Cache mode provides better read and write performance.
    Cache When you set Data Access Mode to Cache Mode, you must specify a cache disk.

    Make sure that you have added a cache disk to the block gateway. Otherwise, no cache disk is available.

    For more information about cache disks of in-cloud block gateways, see Step 2: Create a cache.

    Storage Allocation Unit When you set Use Recovery Mode to No, you must set the Storage Allocation Unit parameter. Valid values: 8 KB, 16 KB, 32 KB, 64 KB, and 128 KB. Default value: 32 KB.
    Authorization Specifies the one-way Challenge-Handshake Authentication Protocol (CHAP) authentication.

    If you select CHAP from the Authorization Method drop-down list, you must set the following parameters:

    • CHAP User Name: specifies a CHAP username.
    • CHAP Password: specifies a CHAP password. The password must be 12 to 16 characters in length.
  7. Click Next to go to the Summary tab, make sure that the specified information is correct, and then click OK.
  8. After you create the iSCSI volume, you can use the volume. For more information, see Use an iSCSI volume.