This topic describes how to create an iSCSI volume in the local block gateway 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. You have deployed the local block gateway console.
  4. 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.
  5. You have added a disk on the deployment platform.

Step 1: 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.

  1. Open your browser, and in the address bar, enter https://<IP address of the target block gateway> to connect to the local block gateway console.
  2. In the dialog box that appears, enter the username and password, and click OK.
  3. Go to the Caches page, and click Create.
  4. On the Create Cache dialog box that appears, select an available disk.
    Disks are available only after you add the disks on the deployment platform.
  5. Click OK.

Step 2: Bind cloud resources

You can create shares that use OSS buckets as backend storage. One bucket corresponds to one share. You can bind a block gateway to multiple cloud resources.

  1. Open the local block gateway console, click Cloud Resources in the left-side navigation pane, and then click Bind.
  2. In Bind Cloud Resource dialog box that appears, set the following parameters.
    Parameter Description
    Resource Name Specifies the name of the cloud resource that you want to bind.
    Cross-region Binding
    • 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 The regions of the local file gateway and the OSS bucket must belong to the same time zone.
    Region The region where the target bucket is located.
    Bucket Name The name of the bucket that you want to bind to the gateway.
    Notice 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.
    Use SSL Specifies whether to access an OSS bucket over SSL. Valid values: Yes and No.
  3. Click OK.

Step 3: Create an iSCSI volume

  1. Open the local block gateway console, select iSCSI Volumes in the left-side navigation pane to go to the iSCSI Volumes page, and then click Create.
  2. In the Create iSCSI dialog box that appears, set the following parameters.
    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.

    Cloud Resource Specifies the cloud resource that you have bound to the gateway.
    Enabled Specifies whether to enable the specified iSCSI volume.

    You can set this parameter to No to disable the specified iSCSI volume.

    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.
    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.
  3. Click Next to go to the Summary tab, make sure that the specified information is correct, and then click OK.
  4. After you create the iSCSI volume, you can use the volume.