diff --git a/docs/en/tutorials/aliyun.md b/docs/en/tutorials/aliyun.md index ea426fbfcb80..5406e39ffe98 100644 --- a/docs/en/tutorials/aliyun.md +++ b/docs/en/tutorials/aliyun.md @@ -2,35 +2,38 @@ title: Use JuiceFS on Alibaba Cloud sidebar_position: 7 slug: /clouds/aliyun +description: Learn how to use JuiceFS on Alibaba Cloud. --- As shown in the figure below, JuiceFS is driven by both the database and the object storage. The files stored in JuiceFS are split into fixed-size data blocks and stored in the object store according to certain rules, while the metadata corresponding to the data is stored in the database. -The metadata is stored completely independently, and the retrieval and processing of files does not directly manipulate the data in the object storage, but first manipulates the metadata in the database, and only interacts with the object storage when the data changes. +The metadata is stored completely independently. Retrieval and processing of files do not directly manipulate the data in the object storage. Instead, operations are performed first on the metadata in the database. Interaction with the object storage only occurs when data changes. -This design can effectively reduce the cost of the object storage in terms of the number of requests, but also allows us to significantly experience the performance improvement brought by JuiceFS. +This design can effectively reduce the cost of the object storage in terms of the number of requests. It also allows users to significantly experience the performance improvement brought by JuiceFS. ![JuiceFS-arch-new](../images/juicefs-arch-new.png) +This document introduces how to use JuiceFS on Alibaba Cloud. + ## Preparation -From the previous architecture description, you can know that JuiceFS needs to be used together with database and object storage. Here we directly use Alibaba Cloud ECS cloud server, combined with cloud database and OSS object storage. +From the previous architecture description, you can know that JuiceFS needs to be used together with database and object storage. Here we directly use the Alibaba Cloud ECS cloud server, combined with cloud database and OSS object storage. When you create cloud computing resources, try to choose in the same region, so that resources can access each other through intranet and avoid using public network to incur additional traffic costs. -### 1. ECS +### ECS -JuiceFS has no special requirements for server hardware, generally speaking, entry-level cloud servers can also use JuiceFS stably, usually you just need to choose the one that can meet your own business. +JuiceFS has no special requirements for server hardware. Generally speaking, entry-level cloud servers can also use JuiceFS stably. Typically, you just need to choose the one that can meet your own application requirements. -In particular, you do not need to buy a new server or reinstall the system to use JuiceFS, JuiceFS is not business invasive and will not cause any interference with your existing systems and programs, you can install and use JuiceFS on your running server. +In particular, you do not need to buy a new server or reinstall the system to use JuiceFS. JuiceFS is not application invasive and does not cause any interference with your existing systems and programs. You can install and use JuiceFS on your running server. -By default, JuiceFS takes up 1GB of hard disk space for caching, and you can adjust the size of the cache space as needed. This cache is a data buffer layer between the client and the object storage, and you can get better performance by choosing a cloud drive with better performance. +By default, JuiceFS takes up 1 GB of hard disk space for caching, and you can adjust the size of the cache space as needed. This cache is a data buffer layer between the client and the object storage. You can get better performance by choosing a cloud drive with better performance. In terms of operating system, JuiceFS can be installed on all operating systems provided by Alibaba Cloud ECS. **The ECS specification used in this document are as follows:** -| **Instance Specification** | ecs.t5-lc1m1.small | +| **Instance specification** | ecs.t5-lc1m1.small | | -------------------------- | -------------------------- | | **CPU** | 1 core | | **MEMORY** | 1 GB | @@ -38,60 +41,60 @@ In terms of operating system, JuiceFS can be installed on all operating systems | **OS** | Ubuntu Server 20.04 64-bit | | **Location** | Shanghai | -### 2. Cloud Database +### Cloud database -JuiceFS will store all the metadata corresponding to the data in a separate database, which is currently support Redis, MySQL, PostgreSQL and SQLite. +JuiceFS stores all the metadata corresponding to the data in a separate database, which currently supports Redis, MySQL, PostgreSQL, and SQLite. -Depending on the database type, the performance and reliability of metadata are different. For example, Redis runs entirely on memory, which provides the ultimate performance, but is difficult to operate and maintain, and has relatively low reliability. SQLite is a single-file relational database with low performance and is not suitable for large-scale data storage, but it is configuration-free and suitable for a small amount of data storage on a single machine. +Depending on the database type, the performance and reliability of metadata are different. For example, Redis runs entirely in memory. While it provides the ultimate performance, it is difficult to operate and maintain and has low reliability. SQLite is a single-file relational database with low performance and is not suitable for large-scale data storage. However, it is configuration-free and suitable for a small amount of data storage on a single machine. -If you just want to evaluate the functionality of JuiceFS, you can build the database manually on ECS. When you want to use JuiceFS in a production environment, the cloud database service is usually a better choice if you don't have a professional database operation and maintenance team. +If you just want to evaluate the functionality of JuiceFS, you can build the database manually on ECS. If you want to use JuiceFS in a production environment, and you don't have a professional database operation and maintenance team, the cloud database service is usually a better choice. -Of course, you can also use cloud database services provided on other platforms if you wish.But in this case, you have to expose the database port to the public network, which also has some security risks. +You can also use cloud database services provided on other platforms if you wish. But in this case, you have to expose the database port to the public network, which may have some security risks. If you must access the database through the public network, you can enhance the security of your data by strictly limiting the IP addresses that are allowed to access the database through the whitelist feature provided by the cloud database console. -On the other hand, if you cannot successfully connect to the cloud database through the public network, then you can check the whitelist of the database. +On the other hand, if you cannot successfully connect to the cloud database through the public network, you can check the whitelist of the database. | Database | Redis | MySQL/PostgreSQL | SQLite | | :-------------: | :-----------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | | **Performance** | High | Medium | Low | | **Management** | High | Medium | Low | | **Reliability** | Low | Medium | Low | -| **Scenario** | Massive data, distributed high-frequency read and write | Massive data, distributed low and medium frequency read and write | Low frequency read and write in single machine for small amount of data | +| **Scenario** | Massive data, distributed high-frequency reads and writes | Massive data, distributed low- and medium-frequency reads and writes | Low-frequency reads and writes in single machine for small amounts of data | -**This article uses the [ApsaraDB for Redis](https://www.alibabacloud.com/product/apsaradb-for-redis), and the following is pseudo address compiled for demonstration purposes only:** +**This document uses [ApsaraDB for Redis](https://www.alibabacloud.com/product/apsaradb-for-redis), and the following pseudo address is compiled for demonstration purposes only:** -| Redis Version | 5.0 Community Edition | +| Redis version | 5.0 Community Edition | |----------------------------|----------------------------------------| -| **Instance Specification** | 256M Standard master-replica instances | -| **Connection Address** | `herald-sh-abc.redis.rds.aliyuncs.com` | -| **Available Zone** | Shanghai | +| **Instance specification** | 256M Standard master-replica instances | +| **Connection address** | `herald-sh-abc.redis.rds.aliyuncs.com` | +| **Available zone** | Shanghai | -### 3. Object Storage OSS +### Object Storage OSS -JuiceFS will store all the data in object storage, which supports almost all object storage services. However, to get the best performance, when using Alibaba Cloud ECS, with OSS object storage is usually the optimal choice. However, please note that choosing ECS and OSS Bucket in the same region so that they can be accessed through intranet not only has low latency, but also does not require additional traffic costs. +JuiceFS stores all data in object storage, which supports almost all object storage services. However, to get the best performance, when using Alibaba Cloud ECS, OSS object storage is usually the optimal choice. However, you must choose ECS and OSS buckets in the same region so that they can be accessed through intranet. This has low latency and does not require additional traffic costs. -Of course, you can also use object storage services provided by other cloud platforms if you wish, but this is not recommended. First of all, accessing object storage from other cloud platforms through ECS has to take public network, and object storage will incur traffic costs, and the access latency will be higher compared to this, which may affect the performance of JuiceFS. +You can also use object storage services provided by other cloud platforms if you wish, but this is not recommended. This is because accessing object storage from other cloud platforms through ECS needs the public network, and object storage will incur traffic costs. In addition, the access latency will be higher compared to this, which may affect the performance of JuiceFS. -Alibaba Cloud OSS has different storage levels, and since JuiceFS needs to interact with object storage frequently, it is recommended to use standard tier. You can use it with OSS resource pack to reduce the cost of using object storage. +Alibaba Cloud OSS has different storage levels. Since JuiceFS needs to interact with object storage frequently, it is recommended to use standard tier. You can use it with OSS resource pack to reduce the cost of using object storage. ### API access secret key -Alibaba Cloud OSS needs to be accessed through API, you need to prepare the access secret key, including `Access Key ID` and `Access Key Secret`, [click here](https://www.alibabacloud.com/help/doc-detail/125558.htm) to get the way. +Alibaba Cloud OSS needs to be accessed through an API. You need to prepare an access key pair, including an AccessKey ID and an AccessKey secret. [Click here](https://www.alibabacloud.com/help/doc-detail/125558.htm) to see how to obtain the access key pair. -> **Security Advisory**: Explicit use of the API access secret key may lead to key compromise, it is recommended to assign [RAM Role](https://www.alibabacloud.com/help/doc-detail/110376.htm) to the cloud server. Once an ECS has been granted access to the OSS, the API access key is not required to access the OSS. +> **Security advisory**: Explicit use of the API access secret key may lead to key compromise. It is recommended to assign a [RAM role](https://www.alibabacloud.com/help/doc-detail/110376.htm) to the cloud server. Once an ECS is granted access to the OSS, the API access key is no longer required to access the OSS. ## Installation -We currently using Ubuntu Server 20.04 64-bit, so you can download the latest version of the client by running the following command +We are currently using Ubuntu Server 20.04 64-bit, so you can download the latest version of the client by running the following command: ```shell curl -sSL https://d.juicefs.com/install | sh - ``` -You can also choose another version by visiting the [JuiceFS GitHub Releases](https://github.com/juicedata/juicefs/releases) page. +Alternatively, you can choose another version by visiting the [JuiceFS GitHub Releases](https://github.com/juicedata/juicefs/releases) page. -Execute the command and see the help message `juicefs` returned, which means the client installation is successful. +Execute the command, and you will see the help message returned by JuiceFS. This means that the client installation was successful. ```shell $ juicefs @@ -134,15 +137,15 @@ COPYRIGHT: Apache License 2.0 ``` -JuiceFS has good cross-platform compatibility and is supported on Linux, Windows and macOS. This article focuses on the installation and use of JuiceFS on Linux, if you need to know how to install it on other systems, please [check the documentation](../getting-started/installation.md). +JuiceFS has good cross-platform compatibility and supports Linux, Windows, and macOS. This document focuses on installing and using JuiceFS on Linux. For installation instructions on other systems, [check this document](../getting-started/installation.md). -## Creating JuiceFS +## Create JuiceFS storage -Once the JuiceFS client is installed, you can now create the JuiceFS storage using the Redis database and OSS object storage that you prepared earlier. +Once the JuiceFS client is installed, you can create the JuiceFS storage using the Redis database and OSS object storage that you prepared earlier. -Technically speaking, this step should be called "Format a volume". However, given that many users may not understand or care about the standard file system terminology, we will simply call the process "Create a JuiceFS Storage". +Technically speaking, this step should be called "Format a volume." However, given that many users may not understand or care about the standard file system terminology, we will refer to the process simply as "Create JuiceFS storage." -The following command creates a storage called `mystor`, i.e., a file system, using the `format` subcommand provided by the JuiceFS client. +The following command creates a storage named `mystor`, which is a file system, using the `format` subcommand provided by the JuiceFS client: ```shell $ juicefs format \ @@ -156,13 +159,13 @@ $ juicefs format \ **Option description:** -- `--storage`: Specify the type of object storage, [click here to view](../reference/how_to_set_up_object_storage.md) object storage services supported by JuiceFS. -- `--bucket`: Bucket domain name of the object storage. When using OSS, just fill in the bucket name, no need to fill in the full domain name, JuiceFS will automatically identify and fill in the full address. -- `--access-key` and `--secret-key`: the secret key pair to access the object storage API, [click here](https://www.alibabacloud.com/help/doc-detail/125558.htm) to get the way. +- `--storage`: Specifies the type of object storage. [Click here](../reference/how_to_set_up_object_storage.md) to view the object storage services supported by JuiceFS. +- `--bucket`: Bucket domain name of the object storage. When using OSS, just fill in the bucket name. There is no need to fill in the full domain name. JuiceFS will automatically identify and fill in the complete address. +- `--access-key` and `--secret-key`: The secret key pair to access the object storage API. [Click here](https://www.alibabacloud.com/help/doc-detail/125558.htm) for instructions on obtaining these keys. -> Redis 6.0 authentication requires username and password parameters in the format of `redis://username:password@redis-server-url:6379/1`. Currently, Alibaba Cloud Redis only provides Reids 4.0 and 5.0 versions, which require only a password for authentication, and just leave the username empty when setting the Redis server address, for example: `redis://:password@redis-server-url:6379/1`. +> Redis 6.0 authentication requires username and password parameters in the format of `redis://username:password@redis-server-url:6379/1`. Currently, Alibaba Cloud Redis only provides Reids 4.0 and 5.0 versions, which require only a password for authentication. When setting the Redis server address, leave the username empty, like this: `redis://:password@redis-server-url:6379/1`. -When using the RAM role to bind to the ECS, the JuiceFS storage can be created by specifying `--storage` and `--bucket` without providing the API access key. The command can be rewritten as follows: +When you are using the RAM role to bind to the ECS, you can create JuiceFS storage by specifying `--storage` and `--bucket` without providing the API access key. The command can be rewritten as follows: ```shell $ juicefs format \ @@ -172,7 +175,7 @@ $ juicefs format \ mystor ``` -Output like the following means the file system was created successfully. +A successful creation of the file system will yield output similar to the following: ```shell 2021/07/13 16:37:14.264445 juicefs[22290] : Meta address: redis://@herald-sh-abc.redis.rds.aliyuncs.com:6379/1 @@ -184,7 +187,7 @@ Output like the following means the file system was created successfully. ## Mount JuiceFS -When the file system is created, the information related to the object storage is stored in the database, so there is no need to enter information such as the bucket domain and secret key when mounting. +When the file system is created, the information related to the object storage is stored in the database. Therefore, you do not need to enter information such as the bucket domain and secret key when mounting. Use the `mount` subcommand to mount the file system to the `/mnt/jfs` directory. @@ -192,9 +195,9 @@ Use the `mount` subcommand to mount the file system to the `/mnt/jfs` directory. sudo juicefs mount -d redis://:@herald-sh-abc.redis.rds.aliyuncs.com:6379/1 /mnt/jfs ``` -> **Note**: When mounting the file system, only the Redis database address is required, not the file system name. The default cache path is `/var/jfsCache`, please make sure the current user has enough read/write permissions. +> **Note**: When mounting the file system, only the Redis database address is required; the file system name is not necessary. The default cache path is `/var/jfsCache`. Make sure the current user has sufficient read/write permissions. -Output similar to the following means that the file system was mounted successfully. +Output similar to the following means that the file system was mounted successfully: ```shell 2021/07/13 16:40:37.088847 juicefs[22307] : Meta address: redis://@herald-sh-abc.redis.rds.aliyuncs.com/1 @@ -205,7 +208,7 @@ Output similar to the following means that the file system was mounted successfu .2021/07/13 16:40:38.410742 juicefs[22307] : OK, mystor is ready at /mnt/jfs ``` -Using the `df` command, you can see how the file system is mounted. +You can use the `df` command to see how the file system is mounted: ```shell $ df -Th @@ -213,11 +216,11 @@ File system type capacity used usable used% mount point JuiceFS:mystor fuse.juicefs 1.0P 64K 1.0P 1% /mnt/jfs ``` -After the file system is successfully mounted, you can now store data in the `/mnt/jfs` directory as if you were using a local hard drive. +After the file system is successfully mounted, you can store data in the `/mnt/jfs` directory as if you were using a local hard drive. -> **Multi-Host Sharing**: JuiceFS storage supports being mounted by multiple cloud servers at the same time. You can install the JuiceFS client on other could server and then use `redis://:@herald-sh-abc.redis.rds.aliyuncs. com:6379/1` database address to mount the file system on each host. +> **Multi-host sharing**: JuiceFS storage supports being mounted by multiple cloud servers at the same time. You can install the JuiceFS client on other could servers and then use the `redis://:@herald-sh-abc.redis.rds.aliyuncs. com:6379/1` database address to mount the file system on each host. -## File System Status +## File system status Use the `status` subcommand of the JuiceFS client to view basic information and connection status of a file system. @@ -256,14 +259,14 @@ $ juicefs status redis://:@herald-sh-abc.redis.rds.aliyuncs ## Unmount JuiceFS -The file system can be unmounted using the `umount` command provided by the JuiceFS client, e.g. +You can unmount the file system using the `umount` command provided by the JuiceFS client, for example: ```shell sudo juicefs umount /mnt/jfs ``` -> **Note**: Forced unmount of the file system in use may result in data corruption or loss, so please be sure to proceed with caution. +> **Note**: Forcelly unmounting a file system in use may result in data corruption or loss. Therefore, proceed with caution. ## Auto-mount on boot -Please refer to ["Mount JuiceFS at Boot Time"](../administration/mount_at_boot.md) for more details. +For details on auto-mounting JuiceFS at boot time, see [Mount JuiceFS at Boot Time](../administration/mount_at_boot.md).