How to Install Cloud Storage Gateway

By Oliver Zhang, Solution Architect

Cloud Storage Gateway (CSG) is a gateway that connects on-premises software applications with Alibaba Cloud data storage to provide seamless integration. CSG combines customers’ existing storage applications and workloads with virtual devices. These virtual machines are compatible with industry-standard storage protocols and can be deployed to customers’ on-premises environment and in the cloud. With CSG, customers can easily access Alibaba Cloud data storage and computing services.

This article will discuss the hands on install of Cloud Storage Gateway in customer’s in-house IT environment.

Available CSG Storage Types:

There are 2 types of storage gateway and 3 protocols available. File type CSG supports NFSv3, NFSv4 and SMB. Block type CSG supports iSCSI protocol.

On-premises Installation Example

Provision CSG from the Cloud Console

Image for post
Image for post

Create a new gateway cluster by clicking on the Create Gateway Cluster button. Give it a name and description (optional). For our example, we will be calling the cluster csg2.

Image for post
Image for post

In the csg2 Gateway Cluster, create a new gateway by pressing on the Create Gateway button.

Image for post
Image for post

We will name our gateway csgtest. Since we are performing this installation on the customer’s end, select “On-premise” for Location.

Image for post
Image for post

Choose your desired image based on your business requirements.

Image for post
Image for post

Make sure to click “Download Certificate” to activate CSG.

Once downloaded, click “Completed” to proceed. You should see your new gateway in the console.

The method and file for installation vary with hypervisors. You can obtain the installation file from Alibaba Cloud Customer Service. You can learn more about the various installation methods on this link: https://www.alibabacloud.com/help/doc-detail/70277.htm

After installing CSG, access the CLI console to configure the network.

Image for post
Image for post

Select Configure the Network in the console.

Image for post
Image for post

Enter your static IP address.

Image for post
Image for post

Configure the DNS.

Image for post
Image for post

Configure the NTP server by selecting Use NTP server.

Image for post
Image for post

If no NTP server is available, Alibaba Cloud NTP server is used by default.

Create a RAM user

Give the following access to the RAM user on the target bucket.

"Action": [
"oss:ListBuckets",
"oss:ListObjects",
"oss:GetObject",
"oss:PutObject",
"oss:DeleteObject",
"oss:HeadObject",
"oss:CopyObject",
"oss:InitiateMultipartUpload",
"oss:UploadPart",
"oss:UploadPartCopy",
"oss:CompleteMultipartUpload",
"oss:AbortMultipartUpload",
"oss:ListMultipartUploads",
"oss:ListParts",
"oss:GetBucketStat"
]

Initialize the CSG

Initialize the CSG via https://csg_ip

Image for post
Image for post

Troubleshooting Errors and Best Practices

  1. Remember to use subnet mask in number, instead of the actual netmask. For example, do not use 255.255.255.0. Instead, use 24.
Image for post
Image for post
  1. Make sure the NTP is working by running network test. If NTP is not working and the time is wrong, you may experience unexpected outcomes and the cloud registration API will fail!
Image for post
Image for post
  1. When creating share names, do not use keywords such as db, data, root, log, or var. The share create will hang indefinitely! This issue caused huge problem during our MQU install. Try using something more specific for your application like backup001 or fileshareA. This bug is expected to be fixed in version 33 or 34.
Image for post
Image for post
  1. Do not mount multiple CSGs on the same bucket. The bucket data will be out of sync. At the time of writing, CSG sync feature is not yet available but is already on the roadmap. For now, use only one CSG with one bucket. One bucket can’t mount to different gateways.
    To illustrate this:
  2. The following configuration is not recommended.
  3. Bucket1 -> CSG1 -> user1, user2, user3
  4. Bucket1 -> CSG2 -> user4, user5, user6
  5. The following configuration is recommended.
  6. Bucket1 -> CSG1 -> user1, user2, user3, user4, user5, user6
  7. The local cache drive needs to be at least 3 times larger than the largest file customer uses.
  8. For example, if a 100G cache size is used and the largest file is 50G (50%), cache consumption will be > 85% and the oldest file gets dropped.

Summary

Cloud Storage Gateway is an ideal product to use when a customer wants to move large amount of data into cloud or out of cloud. It can extend customer’s on-premises storage into cloud and have unlimited capacity. Cloud Storage Gateway is not suitable for concurrent read and write applications, and is not for transaction systems and databases.

Reference:https://www.alibabacloud.com/blog/how-to-install-cloud-storage-gateway_594317?spm=a2c41.12451477.0.0

Written by

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store