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
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.
In the csg2 Gateway Cluster, create a new gateway by pressing on the Create Gateway button.
We will name our gateway csgtest. Since we are performing this installation on the customer’s end, select “On-premise” for Location.
Choose your desired image based on your business requirements.
Make sure to click “Download Certificate” to activate CSG.
Once downloaded, click “Completed” to proceed. You should see your new gateway in the console.
Install CSG In-House
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.
Select Configure the Network in the console.
Enter your static IP address.
Configure the DNS.
Configure the NTP server by selecting Use NTP server.
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.
Initialize the CSG
Initialize the CSG via https://csg_ip
Troubleshooting Errors and Best Practices
- Remember to use subnet mask in number, instead of the actual netmask. For example, do not use 255.255.255.0. Instead, use 24.
- 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!
- 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.
- 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:
- The following configuration is not recommended.
- Bucket1 -> CSG1 -> user1, user2, user3
- Bucket1 -> CSG2 -> user4, user5, user6
- The following configuration is recommended.
- Bucket1 -> CSG1 -> user1, user2, user3, user4, user5, user6
- The local cache drive needs to be at least 3 times larger than the largest file customer uses.
- 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.
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.