This topic describes how to manage a software gateway in the Cloud Storage Gateway (CSG) console.

Prerequisites

  1. An Alibaba Cloud account is created and real-name verification for the account is complete. For more information, see Create an Alibaba Cloud account.
    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. CSG is activated. The first time you log on to the CSG console, activate the CSG service as prompted.
  3. An Elastic Compute Service (ECS) instance is available in the region where you want to create a software gateway. The ECS instance runs in a virtual private cloud (VPC). For more information, see Create an ECS instance.
    Note Software gateways support the following region and operating systems:
    • Region: China (Shanghai)
    • Operating system: CentOS 7 and Alibaba Cloud Linux 2
  4. An Object Storage Service (OSS) bucket is created. For more information, see Create buckets.
    Note CSG supports Standard and Infrequent Access (IA) OSS buckets.

Step 1: Create a software gateway

  1. Log on to the CSG console.
  2. In the left-side navigation pane, click Gateway software version.
  3. On the Gateway software version page, click Create.
  4. In the Create a gateway software version dialog box, set the parameters. The following table describes the parameters.
    Parameter Description
    Select Vpc Select an available VPC.
    Select ECS Select an available ECS instance.
  5. Click Completed.
    Wait until the software gateway is deployed and the status is changed to Activated.

Step 2: Configure mount settings

  1. On the Gateway software version page, click Mount configuration in the Actions column of the software gateway.
  2. In the Mount configuration dialog box, set the parameters. The following table describes the parameters.
    Parameter Description
    ECSInstanceID After a software gateway is deployed, you cannot change the ID of the ECS instance that you selected.
    Mount the path Enter a mount path.
    Note
    • The mount path must start and end with a forward slash (/).
    • The .csgagent and csgfs folders are reserved in a mount directory. Make sure that the folders are empty or do not exist before you create the mount directory.
    Mount directory size Enter the size of the mount directory.
    Note
    • Valid values: 20 to 32768. Unit: GB.
    • The size of a mount directory must be less than the available space of the disk on which the mount directory resides.

      You can run the df -h <Mount directory> command to view the available space of the disk on which the mount directory resides.

    • In a mount directory, 80% of the space is used to cache data, and 20% of the space is used to cache metadata such as the directory structure.
    Cross-border binding Set the parameter.
    • If you select Yes, you can access a bucket that resides in a different region from the specified gateway.
    • If you select No, you can access only a bucket that resides in the same region as the specified gateway.
    Bucket Region Select the region where the bucket resides.
    Bucket Name You can select an existing bucket from the drop-down list. You can also enter a subdirectory of the bucket in the Subdirectory field.

    The Subdirectory field supports only letters and digits.

    OSSAccessKey Enter the AccessKey ID of an Alibaba Cloud account that has the read and write permissions on the bucket. You can also enter the AccessKey ID of a RAM user.
    OSSAccessSecret Enter the AccessKey secret of the account.
  3. Click OK.
    Wait until the software gateway is deployed and the status is changed to Running.

Step 3: Access the software gateway

  1. Run the df -h command to check the mount result.

    If the mount result that is similar to the following information appears, the software gateway is configured.

    df-h
  2. After you configure the software gateway, you can access a share directory on the software gateway that you created in the same way as you access an on-premises directory.
    Note The share directory of a software gateway is synchronized with a specified OSS bucket. If you manage a share directory, the changes to the share directory also take effect on the specified OSS bucket.