Tencent Cloud Server Mounts CFS File System

Publish: 2018-03-17 | Modify: 2018-03-17

CFS is an scalable shared file storage service. It can be mounted to Tencent Cloud servers (CVM) through intranet connection. Currently, you can enjoy 10GB of free storage, which can be used for website backup.

Open CFS

Login to Tencent Cloud console, go to Basic Cloud Products, and select File Storage to create a CFS. Alternatively, you can directly visit https://console.cloud.tencent.com/cfs.

image

Create a new file system. Choose the region/availability zone that matches your Tencent Cloud server, and if you are not sure about the network type, select basic network. See the screenshot below.

image

Mount CFS on CentOS 7

# Install NFS client
sudo yum -y install nfs-utils
# Create mount directory
mkdir -p /home/backup
# Mount CFS
sudo mount -t nfs -o vers=4 <mount point IP>:/ <target directory to mount>
# If you want to mount automatically on startup
echo "<mount point IP>:/  <target directory to mount>  nfs  defaults  1  1" >> /etc/fstab

You can find the mount point IP in the File Storage - Mount Point Information. The official documentation has already generated the mount command, so you just need to modify it accordingly. If you are using a different system, you can refer to the official documentation for mounting.

image

Speed Test

You can use the df -h command to see the newly mounted CFS.

image

Use the dd command to test the speed. The write speed reached 205 MB/s and the read speed reached 122 MB/s. It seems to be even better than the built-in hard drive of the server, maybe because there are fewer users at the moment.

image

Summary

CFS is currently in the testing phase. If you have purchased Tencent Cloud servers, you can mount CFS to backup websites and other data. However, it is not recommended to store important files in COS to avoid risks. Previously, I also shared an article on how to mount COS to Tencent Cloud servers using COS-Fuse. If you are interested, you can refer to it.

Related recommendations:

Some content in this article is referenced from the official documentation on creating file systems and mount points.


Comments