From 05176f152cd49c6d23108150b2b1c98d4d287d71 Mon Sep 17 00:00:00 2001 From: Changjian Gao Date: Tue, 15 Aug 2023 11:52:18 +0800 Subject: [PATCH] Docs: check image alt text (#3998) --- .markdownlint-cli2.jsonc | 9 +++++- README.md | 2 +- .../fault_diagnosis_and_analysis.md | 4 +-- docs/en/administration/metadata_dump_load.md | 2 +- docs/en/administration/monitoring.md | 6 ++-- .../benchmark/performance_evaluation_guide.md | 2 +- docs/en/deployment/s3_gateway.md | 6 ++-- docs/en/getting-started/README.md | 4 +-- docs/en/guide/cache_management.md | 2 +- docs/en/guide/sync.md | 4 +-- docs/en/introduction/architecture.md | 2 +- .../comparison/juicefs_vs_s3ql.md | 2 +- docs/en/introduction/io_processing.md | 6 ++-- docs/en/tutorials/aliyun.md | 2 +- docs/en/tutorials/digitalocean.md | 4 +-- docs/en/tutorials/juicefs_on_k3s.md | 12 +++---- docs/en/tutorials/juicefs_on_kubesphere.md | 32 +++++++++---------- docs/en/tutorials/juicefs_on_rancher.md | 20 ++++++------ docs/en/tutorials/juicefs_on_wsl.md | 14 ++++---- .../fault_diagnosis_and_analysis.md | 4 +-- .../administration/metadata_dump_load.md | 2 +- docs/zh_cn/administration/monitoring.md | 6 ++-- .../benchmark/performance_evaluation_guide.md | 4 +-- docs/zh_cn/community/articles.md | 2 +- docs/zh_cn/deployment/s3_gateway.md | 6 ++-- docs/zh_cn/getting-started/README.md | 4 +-- docs/zh_cn/guide/cache_management.md | 2 +- docs/zh_cn/guide/sync.md | 4 +-- docs/zh_cn/introduction/architecture.md | 14 ++++---- .../comparison/juicefs_vs_s3ql.md | 2 +- docs/zh_cn/introduction/io_processing.md | 6 ++-- docs/zh_cn/tutorials/aliyun.md | 2 +- docs/zh_cn/tutorials/digitalocean.md | 4 +-- docs/zh_cn/tutorials/juicefs_on_k3s.md | 12 +++---- docs/zh_cn/tutorials/juicefs_on_kubesphere.md | 32 +++++++++---------- docs/zh_cn/tutorials/juicefs_on_rancher.md | 20 ++++++------ docs/zh_cn/tutorials/juicefs_on_wsl.md | 14 ++++---- docs/zh_cn/tutorials/qcloud.md | 4 +-- 38 files changed, 143 insertions(+), 136 deletions(-) diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 5f33cb46c65f..0877e0c12676 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -38,7 +38,7 @@ }, "fenced-code-language": false, "first-line-heading": false, - "no-alt-text": false, + "no-alt-text": true, "code-block-style": { "style": "fenced" }, @@ -77,6 +77,7 @@ "Consul", "Debian", "DevOps", + "DigitalOcean", "DistCp", "Docker Compose", "Docker", @@ -117,9 +118,11 @@ "JuiceFS", "JuiceFSRuntime", "Juicedata", + "K3s", "K8s", "Kerberos", "KeyDB", + "KubeSphere", "Kubernetes", "LDAP", "LZ4", @@ -130,6 +133,7 @@ "MinIO", "MySQL", "NFS", + "NGINX", "POSIX", "PV", "PVC", @@ -145,9 +149,11 @@ "RGW", "RPC", "Raft", + "Rancher", "Ranger", "Redis", "S3", + "S3QL", "SDK", "SFTP", "SID", @@ -167,6 +173,7 @@ "Ubuntu", "Unix", "VFS", + "WSL", "WebDAV", "WinFsp", "Windows", diff --git a/README.md b/README.md index ec4b483c0195..b82172863698 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ JuiceFS consists of three parts: JuiceFS can store the metadata of file system on different metadata engines, like Redis, which is a fast, open-source, in-memory key-value data storage, particularly suitable for storing metadata; meanwhile, all the data will be stored in Object Storage through JuiceFS client. [Learn more](https://juicefs.com/docs/community/architecture) -![](docs/en/images/data-structure-diagram.svg) +![data-structure-diagram](docs/en/images/data-structure-diagram.svg) Each file stored in JuiceFS is split into **"Chunk"** s at a fixed size with the default upper limit of 64 MiB. Each Chunk is composed of one or more **"Slice"**(s), and the length of the slice varies depending on how the file is written. Each slice is composed of size-fixed **"Block"** s, which are 4 MiB by default. These blocks will be stored in Object Storage in the end; at the same time, the metadata information of the file and its Chunks, Slices, and Blocks will be stored in metadata engines via JuiceFS. [Learn more](https://juicefs.com/docs/community/architecture/#how-juicefs-store-files) diff --git a/docs/en/administration/fault_diagnosis_and_analysis.md b/docs/en/administration/fault_diagnosis_and_analysis.md index 2dfae017d7f9..bee4cd900aa2 100644 --- a/docs/en/administration/fault_diagnosis_and_analysis.md +++ b/docs/en/administration/fault_diagnosis_and_analysis.md @@ -179,7 +179,7 @@ JuiceFS provides the `profile` and `stats` subcommands to visualize real-time pe [`juicefs profile`](../reference/command_reference.md#profile) will collect data from [file system access log](#access-log), run the `juicefs profile MOUNTPOINT` command, you can see the real-time statistics of each file system operation based on the latest access log: -![](../images/juicefs-profiling.gif) +![JuiceFS-profiling](../images/juicefs-profiling.gif) Apart from real-time mode, this command also provides a play-back mode, which performs the same visualization on existing access log files: @@ -203,7 +203,7 @@ juicefs profile /tmp/juicefs.accesslog --uid 12345 The [`juicefs stats`](../reference/command_reference.md#stats) command reads JuiceFS Client internal metrics data, and output performance data in a format similar to `dstat`: -![](../images/juicefs_stats_watcher.png) +![juicefs_stats_watcher](../images/juicefs_stats_watcher.png) Metrics description: diff --git a/docs/en/administration/metadata_dump_load.md b/docs/en/administration/metadata_dump_load.md index 873c558d29c8..07667121aa52 100644 --- a/docs/en/administration/metadata_dump_load.md +++ b/docs/en/administration/metadata_dump_load.md @@ -42,7 +42,7 @@ Starting with JuiceFS v1.0.0, the client automatically backs up metadata and cop The backup files are stored in the `meta` directory of the object storage. It is a separate directory from the data store and not visible in the mount point and does not interact with the data store, and the directory can be viewed and managed using the file browser of the object storage. -![](../images/meta-auto-backup-list.png) +![meta-auto-backup-list](../images/meta-auto-backup-list.png) By default, the JuiceFS client backs up metadata once an hour. The frequency of automatic backups can be adjusted by the `--backup-meta` option when mounting the filesystem, for example, to set the auto-backup to be performed every 8 hours. diff --git a/docs/en/administration/monitoring.md b/docs/en/administration/monitoring.md index 1a77f50e4cfb..4df1777400da 100644 --- a/docs/en/administration/monitoring.md +++ b/docs/en/administration/monitoring.md @@ -10,7 +10,7 @@ The JuiceFS client exposes real-time metrics in [Prometheus](https://prometheus. After JuiceFS is mounted on a host, you can access its metrics using `http://localhost:9567/metrics`, other types of JuiceFS Client (CSI Driver, S3 Gateway, Hadoop SDK) is slightly different in this regard, see [Collecting metrics data](#collect-metrics). -![](../images/prometheus-client-data.jpg) +![Prometheus-client-data](../images/prometheus-client-data.jpg) Here, taking collect metrics of the mount point as an example, edit [`prometheus.yml`](https://prometheus.io/docs/prometheus/latest/configuration/configuration) to add a new scrape config (`scrape_configs`): @@ -54,7 +54,7 @@ Create a new Prometheus-type data source in Grafana: - **Name**: For identification purposes, you can fill it in with the name of the file system. - **URL**: Data interface for Prometheus, which defaults to `http://localhost:9090`. -![](../images/grafana-data-source.jpg) +![Grafana-data-source](../images/grafana-data-source.jpg) JuiceFS provides some dashboard templates for Grafana, which can be imported to show the collected metrics in Prometheus: @@ -65,7 +65,7 @@ JuiceFS provides some dashboard templates for Grafana, which can be imported to Our Grafana dashboard looks like this: -![](../images/grafana_dashboard.png) +![grafana_dashboard](../images/grafana_dashboard.png) ## Collecting metrics data {#collect-metrics} diff --git a/docs/en/benchmark/performance_evaluation_guide.md b/docs/en/benchmark/performance_evaluation_guide.md index 302a533ee262..fc366a1bd2fb 100644 --- a/docs/en/benchmark/performance_evaluation_guide.md +++ b/docs/en/benchmark/performance_evaluation_guide.md @@ -140,7 +140,7 @@ juicefs stats /mnt/jfs --verbosity 1 The results are shown below, which would be easier to understand when combing with the `bench` performance test flows described above. -![](../images/bench-guide-stats.png) +![bench-guide-stats](../images/bench-guide-stats.png) Learn the meaning of indicators in [`juicefs stats`](../administration/fault_diagnosis_and_analysis.md#stats). diff --git a/docs/en/deployment/s3_gateway.md b/docs/en/deployment/s3_gateway.md index 1bd9d4a5a436..1f4cba51df9d 100644 --- a/docs/en/deployment/s3_gateway.md +++ b/docs/en/deployment/s3_gateway.md @@ -8,7 +8,7 @@ JuiceFS has introduced S3 gateway since v0.11. The feature is implemented based Since JuiceFS stores files in chunks, the files cannot be accessed directly through the interfaces of the underlying object storage. The S3 gateway accesses the underlying object storage in a similar way, shown in the following architecture diagram. -![](../images/juicefs-s3-gateway-arch.png) +![JuiceFS-S3-gateway-arch](../images/juicefs-s3-gateway-arch.png) ## Prerequisites @@ -39,7 +39,7 @@ juicefs gateway --cache-size 20480 redis://localhost:6379 localhost:9000 In this example, we assume that the JuiceFS file system is using a local Redis database. When the S3 gateway is enabled, the administrative interface of the S3 gateway can be accessed from the **current host** using the address `http://localhost:9000`. -![](../images/s3-gateway-file-manager.jpg) +![S3-gateway-file-manager](../images/s3-gateway-file-manager.jpg) If you want to access the S3 gateway from other hosts on the LAN or over the Internet, you need to change the listening address, e.g. @@ -333,4 +333,4 @@ export MINIO_ROOT_PASSWORD=12345678 The port number of the S3 gateway console is explicitly specified here as 59001. If not specified, a port will be randomly assigned. According to the command line prompt, open the address [http://127.0.0.1:59001](http://127.0.0.1:59001) in the browser to access the console, as shown in the following snapshot: -![](../images/s3-gateway-console.png) +![S3-gateway-console](../images/s3-gateway-console.png) diff --git a/docs/en/getting-started/README.md b/docs/en/getting-started/README.md index 3f3cf5cc3e38..1254a7195f94 100644 --- a/docs/en/getting-started/README.md +++ b/docs/en/getting-started/README.md @@ -61,7 +61,7 @@ An output similar to the following will return if the file system creation is co As you can see from the output, the file system uses SQLite as the metadata storage engine. The database file is located in the current directory with the file name `myjfs.db`, which creates a table to store all the metadata of the file system `myjfs`. -![](../images/sqlite-info.png) +![SQLite-info](../images/sqlite-info.png) Since no storage-related options are specified in this example, the local disk is used as the storage medium by default. According to the output, the file system storage path is `file:///Users/herald/.juicefs/local/myjfs/`. @@ -97,7 +97,7 @@ The following command mounts the `myjfs` file system to the `~/jfs` folder: juicefs mount sqlite3://myjfs.db ~/jfs ``` -![](../images/sqlite-mount-local.png) +![SQLite-mount-local](../images/sqlite-mount-local.png) The client mounts the file system in the foreground by default. As you can see in the above image, the program keeps running in the current terminal. To unmount the file system, press Ctrl + C or close the terminal window. diff --git a/docs/en/guide/cache_management.md b/docs/en/guide/cache_management.md index 9baf6c163dfe..358582f58425 100644 --- a/docs/en/guide/cache_management.md +++ b/docs/en/guide/cache_management.md @@ -65,7 +65,7 @@ In comparison, JuiceFS Enterprise Edition provides richer functionalities around To improve performance, JuiceFS also provides various caching mechanisms for data, including page cache in the kernel, local file system cache in client host, and read/write buffer in client process itself. Read requests will try the kernel page cache, the client process buffer, and the local disk cache in turn. If the data requested is not found in any level of the cache, it will be read from the object storage, and also be written into every level of the cache asynchronously to improve the performance of the next access. -![](../images/juicefs-cache.png) +![JuiceFS-cache](../images/juicefs-cache.png) ### Read/Write buffer {#buffer-size} diff --git a/docs/en/guide/sync.md b/docs/en/guide/sync.md index 9c9cdbd00fa8..c29c7d95f082 100644 --- a/docs/en/guide/sync.md +++ b/docs/en/guide/sync.md @@ -208,11 +208,11 @@ For example, if you're dealing with a object storage bucket used by JuiceFS, dir Synchronizing between two object storages is essentially pulling data from one and pushing it to the other. The efficiency of the synchronization will depend on the bandwidth between the client and the cloud. -![](../images/juicefs-sync-single.png) +![JuiceFS-sync-single](../images/juicefs-sync-single.png) When copying large scale data, node bandwidth can easily bottleneck the synchronization process. For this scenario, `juicefs sync` provides a multi-machine concurrent solution, as shown in the figure below. -![](../images/juicefs-sync-worker.png) +![JuiceFS-sync-worker](../images/juicefs-sync-worker.png) Manager node executes `sync` command as the master, and defines multiple worker nodes by setting option `--worker` (manager node itself also serve as a worker node). JuiceFS will split the workload distribute to Workers for distributed synchronization. This increases the amount of data that can be processed per unit time, and the total bandwidth is also multiplied. diff --git a/docs/en/introduction/architecture.md b/docs/en/introduction/architecture.md index 1d2690d9e681..2121e65d5549 100644 --- a/docs/en/introduction/architecture.md +++ b/docs/en/introduction/architecture.md @@ -7,7 +7,7 @@ description: This article introduces the technical architecture of JuiceFS and i The JuiceFS file system consists of three parts: -![](../images/juicefs-arch.svg) +![JuiceFS-arch](../images/juicefs-arch.svg) **JuiceFS Client**: The JuiceFS client handles all file I/O operations, including background tasks like data compaction and trash file expiration. It communicates with both the object storage and metadata engine. The client supports multiple access methods: diff --git a/docs/en/introduction/comparison/juicefs_vs_s3ql.md b/docs/en/introduction/comparison/juicefs_vs_s3ql.md index 307b4f880e1b..04c73e39a2eb 100644 --- a/docs/en/introduction/comparison/juicefs_vs_s3ql.md +++ b/docs/en/introduction/comparison/juicefs_vs_s3ql.md @@ -62,7 +62,7 @@ S3QL is developed in Python and requires `python-devel` 3.7 or higher to be inst S3QL will install 12 binary programs in the system, and each program provides an independent function, as shown in the figure below. -![](../../images/s3ql-bin.jpg) +![S3QL-bin](../../images/s3ql-bin.jpg) #### JuiceFS diff --git a/docs/en/introduction/io_processing.md b/docs/en/introduction/io_processing.md index 29174bcdae55..09f90ccb648a 100644 --- a/docs/en/introduction/io_processing.md +++ b/docs/en/introduction/io_processing.md @@ -11,11 +11,11 @@ JuiceFS splits large files at multiple levels to improve I/O performance. See [h Sequential writes are optimized, requiring only one continuously growing slice and one final flush. This maximizes object storage write performance. A simple [JuiceFS benchmark](../benchmark/performance_evaluation_guide.md) below shows sequentially writing a 1 GiB file with a 1 MiB I/O size at its first stage. The following figure shows the data flow in each component of the system. -![](../images/internals-write.png) +![internals-write](../images/internals-write.png) Use [`juicefs stats`](../reference/command_reference.md#stats) to obtain real-time performance monitoring metrics. -![](../images/internals-stats.png) +![internals-stats](../images/internals-stats.png) The first highlighted section in the above figure shows: @@ -54,7 +54,7 @@ Learn more in [Client Write Cache](../guide/cache_management.md#writeback). JuiceFS supports sequential reads and random reads (including mmap-based random reads). During read requests, the object corresponding to the block is completely read through the `GetObject` API of the object storage, or only a certain range of data in the object may be read (e.g., the read range is limited by the `Range` parameter of [S3 API](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)). Meanwhile, prefetching is performed (controlled by the [`--prefetch`](../reference/command_reference.md#mount) option) to download the complete data block into the local cache directory, as shown in the `blockcache` write speed in the second stage of the above metrics figure. This is very good for sequential reads as all cached data is utilized, maximizing the object storage access efficiency. The dataflow is illustrated in the figure below: -![](../images/internals-read.png) +![internals-read](../images/internals-read.png) Although prefetching works well for sequential reads, it might not be so effective for random reads on large files. It can cause read amplification and frequent cache eviction. Consider disabling prefetching using `--prefetch=0`. It is always hard to design cache strategy for random read scenarios. Two possible solutions are increasing the cache size to store all data locally or completely disabling the cache (`--cache-size=0`) and relying on a high-performance object storage service. diff --git a/docs/en/tutorials/aliyun.md b/docs/en/tutorials/aliyun.md index a54c1cd4d719..1ea1bab79689 100644 --- a/docs/en/tutorials/aliyun.md +++ b/docs/en/tutorials/aliyun.md @@ -10,7 +10,7 @@ The metadata is stored completely independently, and the retrieval and processin 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. -![](../images/juicefs-arch-new.png) +![JuiceFS-arch-new](../images/juicefs-arch-new.png) ## Preparation diff --git a/docs/en/tutorials/digitalocean.md b/docs/en/tutorials/digitalocean.md index c9dfc62b7ca0..ea342b649b3f 100644 --- a/docs/en/tutorials/digitalocean.md +++ b/docs/en/tutorials/digitalocean.md @@ -44,7 +44,7 @@ Don't worry about the choice of database, the JuiceFS client provides a metadata For this article, we use DigitalOcean's Redis 6 database hosting service, choose `Singapore`, and select the same VPC private network as the existing Droplet. It takes about 5 minutes to create the Redis, and we follow the setup wizard to initialize the database. -![](../images/digitalocean-redis-guide.png) +![DigitalOcean-Redis-guide](../images/digitalocean-redis-guide.png) By default, the Redis allows all inbound connections. For security reasons, you should select the Droplet that have access to the Redis in the security setting section of the setup wizard in the `Add trusted sources`, that is, only allow the selected host to access the Redis. @@ -54,7 +54,7 @@ In the setting of the eviction policy, it is recommended to select `noeviction`, The access address of the Redis can be found in the `Connection Details` of the console. If all computing resources are in DigitalOcean, it is recommended to use the VPC private network for connection first, which can maximize security. -![](../images/digitalocean-redis-url.png) +![DigitalOcean-Redis-url](../images/digitalocean-redis-url.png) ## Installation and Use diff --git a/docs/en/tutorials/juicefs_on_k3s.md b/docs/en/tutorials/juicefs_on_k3s.md index d215a5ee2df9..61be007eb99e 100644 --- a/docs/en/tutorials/juicefs_on_k3s.md +++ b/docs/en/tutorials/juicefs_on_k3s.md @@ -6,7 +6,7 @@ slug: /juicefs_on_k3s [K3s](https://k3s.io) is a functionally optimized lightweight Kubernetes distribution that is fully compatible with Kubernetes.In other words, almost all operations performed on Kubernetes can also be executed on K3s. K3s packages the entire container orchestration system into a binary program with a size of less than 100MB, significantly reducing the environment dependencies and installation steps required to deploy Kubernetes production clusters. Compared to Kubernetes, K3s has lower performance requirements for the operating system. -In this article, we will build a K3s cluster with two nodes, install and configure [JuiceFS CSI Driver](https://github.com/juicedata/juicefs-csi-driver) for the cluster, and lastly create an Nginx Pod for verification. +In this article, we will build a K3s cluster with two nodes, install and configure [JuiceFS CSI Driver](https://github.com/juicedata/juicefs-csi-driver) for the cluster, and lastly create an NGINX Pod for verification. ## Deploy a K3s cluster @@ -124,9 +124,9 @@ juicefs-sc csi.juicefs.com Retain Immediate > **Note**: A storage class is associated with a JuiceFS file system. You can create as many storage classes as you need, but be aware of the storage class name in the configuration file as the same name can cause conflicts. -## Use JuiceFS to persist Nginx data +## Use JuiceFS to persist NGINX data -Next, deploy an Nginx Pod using a persistent storage declared by the JuiceFS storage class. +Next, deploy an NGINX Pod using a persistent storage declared by the JuiceFS storage class. ### Deployment @@ -206,7 +206,7 @@ sudo kubectl apply -f service.yaml ### Ingress -K3s is pre-installed with traefik-ingress by default. Create an ingress for Nginx through the following configuration. For example: `ingress.yaml` +K3s is pre-installed with traefik-ingress by default. Create an ingress for NGINX through the following configuration. For example: `ingress.yaml` ```yaml apiVersion: networking.k8s.io/v1 @@ -236,9 +236,9 @@ sudo kubectl apply -f ingress.yaml ### Visit -After the deployment is completed, use the host on the same LAN to access any cluster node, and then you will see the Nginx welcome page. +After the deployment is completed, use the host on the same LAN to access any cluster node, and then you will see the NGINX welcome page. -![](../images/k3s-nginx-welcome.png) +![K3s-NGINX-welcome](../images/k3s-nginx-welcome.png) Next, check whether the container has successfully mounted JuiceFS, and execute the following command to check the Pod status: diff --git a/docs/en/tutorials/juicefs_on_kubesphere.md b/docs/en/tutorials/juicefs_on_kubesphere.md index 64c417849f5e..f1510769a17d 100644 --- a/docs/en/tutorials/juicefs_on_kubesphere.md +++ b/docs/en/tutorials/juicefs_on_kubesphere.md @@ -35,7 +35,7 @@ Click in the workspace to enter the application management, select "App Reposito - Repository name: `juicefs-csi-driver` - Index URL: `https://juicedata.github.io/charts/` -![](../images/kubesphere_app_shop_en.png) +![kubesphere_app_shop_en](../images/kubesphere_app_shop_en.png) #### Method two: Application Template @@ -43,17 +43,17 @@ Download the chart compressed package from the JuiceFS CSI Driver warehouse: Attention: If there are permissions error when deploying MinIO, you can set the `securityContext.enables` in the configuration to false. MinIO's access URL can be the service name of the deployed application, as follows: -![](../images/kubesphere_minio_en.png) +![kubesphere_minio_en](../images/kubesphere_minio_en.png) After both Redis and MinIO are set up, you can fill in the `backend` value of JuiceFS CSI Driver. @@ -83,7 +83,7 @@ After both Redis and MinIO are set up, you can fill in the `backend` value of Ju 3. `bucket` is the available bucket of MinIO just created (JuiceFS will automatically create it, no need to create it manually), the access address of MinIO can be the service name corresponding to the MinIO application, such as `http://minio-qkp9my:9000/minio/test` 4. `accessKey` and `secretKey` are the accessKey and secretKey of MinIO just created -![](../images/kubesphere_update_csi_en.png) +![kubesphere_update_csi_en](../images/kubesphere_update_csi_en.png) After the configuration is modified, click "Install". @@ -95,17 +95,17 @@ The JuiceFS CSI Driver installed above has created a `StorageClass`, for example Then you need to create a PVC. In "Project", select "Storage Management", then select "Storage Volume", click the " Create" button to create a PVC, and select `juicefs-sc` for the "StorageClass", as follows: -![](../images/kubesphere_pvc_en.png) +![kubesphere_pvc_en](../images/kubesphere_pvc_en.png) After the PVC is created, in the "Apps" of "Project", select "Workloads", click "Create" button to deploy the workload, and fill in your favorite name on the "Basic Information" page; the "Container Image" page can fill in the mirror image `centos`; Start command `sh,-c,while true; do echo $(date -u) >> /data/out.txt; sleep 5; done`; "Mount Volume" select "Existing Volume", and then select PVC created in one step, fill in the path in the container with `/data` as follows: -![](../images/kubesphere_deployment_en.png) +![kubesphere_deployment_en](../images/kubesphere_deployment_en.png) -![](../images/kubesphere_workload_en.png) +![kubesphere_workload_en](../images/kubesphere_workload_en.png) After the deployment completed, you can see the running pod: -![](../images/kubesphere_pod_en.png) +![kubesphere_pod_en](../images/kubesphere_pod_en.png) ### Create StorageClass @@ -113,15 +113,15 @@ If you did not create a `StorageClass` when installing JuiceFS CSI Driver, or yo After preparing the metadata service and object storage service, create a new `Secret`. On the "Platform Management" page, select "Configuration", select "Secret", and click the "Create" button to create a new one: -![](../images/kubesphere_secret_en.png) +![kubesphere_secret_en](../images/kubesphere_secret_en.png) Fill in the metadata service and object storage information in "Data Settings", as follows: -![](../images/kubesphere_update_secret_en.png) +![kubesphere_update_secret_en](../images/kubesphere_update_secret_en.png) After creating `Secret`, create `StorageClass`, select "Storage" on the "Platform Management" page, select "Storage Classes", click the "Create" button to create a new one, and select "Custom" for "Storage Class": -![](../images/kubesphere_sc_create_en.png) +![kubesphere_sc_create_en](../images/kubesphere_sc_create_en.png) The setting page information is as follows, where "Storage System" fills in `csi.juicefs.com`, and 4 more parameters are set: @@ -130,6 +130,6 @@ The setting page information is as follows, where "Storage System" fills in `csi - `csi.storage.k8s.io/node-publish-secret-name`: secret name - `csi.storage.k8s.io/node-publish-secret-namespace`: project of secret -![](../images/kubesphere_sc_update_en.png) +![kubesphere_sc_update_en](../images/kubesphere_sc_update_en.png) After clicking the "Create" button, the `StorageClass` is created. diff --git a/docs/en/tutorials/juicefs_on_rancher.md b/docs/en/tutorials/juicefs_on_rancher.md index be47f4afba5d..796f98879e1d 100644 --- a/docs/en/tutorials/juicefs_on_rancher.md +++ b/docs/en/tutorials/juicefs_on_rancher.md @@ -28,7 +28,7 @@ sudo docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 ran After the container is created, Rancher's management interface can be opened by accessing the IP address of the host. -![](../images/rancher-welcome.jpeg) +![Rancher-welcome](../images/rancher-welcome.jpeg) ## Create a Kubernetes cluster @@ -36,15 +36,15 @@ After Rancher is installed, you can see that it has deployed a K3s cluster in th Next, start to create a Kubernetes cluster. In the Cluster section of the welcome page, click `Create` to create a cluster. Rancher supports the creation of Kubernetes clusters on major cloud computing platforms. Here we need to create a cluster directly on Rancher's host, so choose `Custom`. Then fill in the cluster name according to the wizard and select the Kubernetes version. -![](../images/rancher-cluster-create.jpg) +![Rancher-cluster-create](../images/rancher-cluster-create.jpg) In the `Cluster Options` page, select the node role to be created, then copy the generated command and execute it on the target host. -![](../images/rancher-cluster-options.jpg) +![Rancher-cluster-options](../images/rancher-cluster-options.jpg) After the cluster is created, it will be displayed in Rancher's cluster list. -![](../images/rancher-clusters.jpg) +![Rancher-clusters](../images/rancher-clusters.jpg) ## One-click installation of JuiceFS CSI Driver @@ -53,19 +53,19 @@ In the cluster list, click to enter the Kubernetes cluster, click on the left na - **Name**: `juicefs` - **Index URL**: `https://juicedata.github.io/charts/` -![](../images/rancher-new-repo.jpg) +![Rancher-new-repo](../images/rancher-new-repo.jpg) And then, you can see the new repository in the list. -![](../images/rancher-repos.jpg) +![Rancher-repos](../images/rancher-repos.jpg) Then click to open the `Apps & Marketplace` → `Charts` from the left menu, type `juicefs` in the search bar, and then click to open `juicefs-csi-driver`. -![](../images/rancher-chart-search.jpg) +![Rancher-chart-search](../images/rancher-chart-search.jpg) Click the "Install" button on the application details page, the latest version will be installed by default, or you can click to switch to the historical version to install. -![](../images/rancher-chart-info.jpg) +![Rancher-chart-info](../images/rancher-chart-info.jpg) The installation wizard has two steps: @@ -97,10 +97,10 @@ storageClasses: Click "Install" and wait for the application installation to complete. -![](../images/rancher-chart-installed.jpg) +![Rancher-chart-installed](../images/rancher-chart-installed.jpg) ## Use JuiceFS to persist data When deploying an application, specify `juicefs-sc` in the storage configuration. -![](../images/rancher-pvc.jpg) +![Rancher-PVC](../images/rancher-pvc.jpg) diff --git a/docs/en/tutorials/juicefs_on_wsl.md b/docs/en/tutorials/juicefs_on_wsl.md index adea87cb2a54..78cf3eb9bd36 100644 --- a/docs/en/tutorials/juicefs_on_wsl.md +++ b/docs/en/tutorials/juicefs_on_wsl.md @@ -11,7 +11,7 @@ Using WSL requires Windows 10 2004 or higher or Windows 11. To check the current system version, you can call up the Run program by pressing Win + R. Type and run `winver`. -![](../images/wsl/winver-en.png) +![WSL/winver-en](../images/wsl/winver-en.png) After confirming the Windows version, open PowerShell or Windows Command Prompt as an administrator and run the installation command. @@ -35,11 +35,11 @@ wsl --install -d ubuntu Once the WSL installation is complete, you can find the newly installed Linux distribution in the Start menu. -![](../images/wsl/startmenu-en.png) +![WSL/startmenu-en](../images/wsl/startmenu-en.png) By clicking on the Ubuntu subsystem shortcut, WSL will open the terminal of the Linux subsystem. The first time you run it, you will be asked to set the user and password for managing the Linux subsystem, just follow the prompts. -![](../images/wsl/init.png) +![WSL/init](../images/wsl/init.png) There are several points to note about the username and password set here: @@ -137,7 +137,7 @@ sudo juicefs mount -d redis://myjfs-sh-abc.redis.rds.aliyuncs.com:6379/1 $HOME/m If you need to access the JuiceFS file system mounted on a Linux subsystem from a Windows system, find the Linux subsystem in the list on the left side of Explorer, then find and open the mount point path. -![](../images/wsl/access-jfs-from-win-en.png) +![WSL/access-jfs-from-win-en](../images/wsl/access-jfs-from-win-en.png) For more information on the use of JuiceFS, please refer to the official documentation. @@ -145,13 +145,13 @@ For more information on the use of JuiceFS, please refer to the official documen WSL bridges the Windows and Linux subsystems, allowing them to access each other's files stored on each other's systems. -![](../images/wsl/windows-to-linux-en.png) +![WSL/Windows-to-Linux-en](../images/wsl/windows-to-linux-en.png) Note, however, that accessing the Linux subsystem from Windows or accessing Windows from the Linux subsystem is bound to incur some performance overhead due to switching between systems. Therefore, the recommended practice is to decide where to store the files depending on the system where the program is located, and for programs in the Linux subsystem, the files it will be processing should also be stored in the Linux subsystem for better performance. In the Linux subsystem, WSL mounts each Windows drive to `/mnt`, for example, the mount point for the C: drive in the Linux subsystem is `/mnt/c`. -![](../images/wsl/mount-point.png) +![WSL/mount-point](../images/wsl/mount-point.png) To ensure optimal performance, when using JuiceFS in WSL, both the storage and cache paths should be set in the Linux subsystem. In other words, you should avoid setting the storage or cache on a Windows partition mount point like `/mnt/c`. @@ -163,4 +163,4 @@ When copying files to a Linux subsystem via Windows Explorer, WSL automatically This issue also affects the same problem when saving files to a mounted JuiceFS file system in the Linux subsystem via Windows Explorer. However, reading and writing JuiceFS file systems inside the Linux subsystem is not affected by this bug. -![](../images/wsl/zone-identifier-en.png) +![WSL/zone-identifier-en](../images/wsl/zone-identifier-en.png) diff --git a/docs/zh_cn/administration/fault_diagnosis_and_analysis.md b/docs/zh_cn/administration/fault_diagnosis_and_analysis.md index c74bc73c9a2c..fe1966eed684 100644 --- a/docs/zh_cn/administration/fault_diagnosis_and_analysis.md +++ b/docs/zh_cn/administration/fault_diagnosis_and_analysis.md @@ -177,7 +177,7 @@ JuiceFS 客户端提供 `profile` 和 `stats` 两个子命令来对性能数据 [`juicefs profile`](../reference/command_reference.md#profile) 会对[「文件系统访问日志」](#access-log)进行汇总,运行 `juicefs profile MOUNTPOINT` 命令,便能看到根据最新访问日志获取的各个文件系统操作的实时统计信息: -![](../images/juicefs-profiling.gif) +![JuiceFS-profiling](../images/juicefs-profiling.gif) 除了对挂载点进行实时分析,该命令还提供回放模式,可以对预先收集的日志进行回放分析: @@ -201,7 +201,7 @@ juicefs profile /tmp/juicefs.accesslog --uid 12345 [`juicefs stats`](../reference/command_reference.md#stats) 命令通过读取 JuiceFS 客户端的监控数据,以类似 Linux `dstat` 工具的形式实时打印各个指标的每秒变化情况: -![](../images/juicefs_stats_watcher.png) +![juicefs_stats_watcher](../images/juicefs_stats_watcher.png) 各个板块指标介绍: diff --git a/docs/zh_cn/administration/metadata_dump_load.md b/docs/zh_cn/administration/metadata_dump_load.md index f4237fdd0d5d..c59657dceb00 100644 --- a/docs/zh_cn/administration/metadata_dump_load.md +++ b/docs/zh_cn/administration/metadata_dump_load.md @@ -42,7 +42,7 @@ juicefs dump redis://192.168.1.6:6379/1 meta-dump.json 备份的文件存储在对象存储的 `meta` 目录中,它是一个独立于数据存储的目录,在挂载点中不可见,也不会与数据存储之间产生影响,用对象存储的文件浏览器即可查看和管理。 -![](../images/meta-auto-backup-list.png) +![meta-auto-backup-list](../images/meta-auto-backup-list.png) 默认情况下,JuiceFS 客户端每小时备份一次元数据,自动备份的频率可以在挂载文件系统时通过 `--backup-meta` 选项进行调整,例如,要设置为每 8 个小时执行一次自动备份: diff --git a/docs/zh_cn/administration/monitoring.md b/docs/zh_cn/administration/monitoring.md index 0ca4895b8f8c..8856721dbe72 100644 --- a/docs/zh_cn/administration/monitoring.md +++ b/docs/zh_cn/administration/monitoring.md @@ -10,7 +10,7 @@ JuiceFS 客户端通过监控 API 对外暴露 [Prometheus](https://prometheus.i 在宿主机挂载 JuiceFS 后,默认可以通过 `http://localhost:9567/metrics` 地址获得客户端输出的实时指标数据。其他不同类型的 JuiceFS 客户端(CSI 驱动、S3 网关、Hadoop SDK)收集指标数据的方式略有区别,详见[「收集监控指标」](#collect-metrics)。 -![](../images/prometheus-client-data.jpg) +![Prometheus-client-data](../images/prometheus-client-data.jpg) 这里以收集挂载点的监控指标为例,在 [`prometheus.yml`](https://prometheus.io/docs/prometheus/latest/configuration/configuration) 中添加抓取配置(`scrape_configs`),指向 JuiceFS 客户端的监控 API 地址: @@ -54,7 +54,7 @@ scrape_configs: - **Name**:为了便于识别,可以填写文件系统的名称。 - **URL**:Prometheus 的数据接口,默认为 `http://localhost:9090`。 -![](../images/grafana-data-source.jpg) +![Grafana-data-source](../images/grafana-data-source.jpg) JuiceFS 提供一些 Grafana 的仪表盘模板,将模板导入以后就可以展示收集上来的监控指标。目前提供的仪表盘模板有: @@ -65,7 +65,7 @@ JuiceFS 提供一些 Grafana 的仪表盘模板,将模板导入以后就可以 Grafana 仪表盘如下图: -![](../images/grafana_dashboard.png) +![grafana_dashboard](../images/grafana_dashboard.png) ## 收集监控指标 {#collect-metrics} diff --git a/docs/zh_cn/benchmark/performance_evaluation_guide.md b/docs/zh_cn/benchmark/performance_evaluation_guide.md index d29fe4067bc6..44de40234949 100644 --- a/docs/zh_cn/benchmark/performance_evaluation_guide.md +++ b/docs/zh_cn/benchmark/performance_evaluation_guide.md @@ -140,7 +140,7 @@ juicefs stats /mnt/jfs --verbosity 1 结果如下,可以将其与上述基准测试流程对照来看,更易理解: -![](../images/bench-guide-stats.png) +![bench-guide-stats](../images/bench-guide-stats.png) 其中各项指标具体含义参考 [`juicefs stats`](../administration/fault_diagnosis_and_analysis.md#stats)。 @@ -160,7 +160,7 @@ juicefs profile juicefs.accesslog --interval 0 其中 `--interval` 参数设置访问日志的采样间隔,设为 0 时用于快速重放一个指定的日志文件,生成统计信息,如下图所示: -![](../images/bench-guide-profile.png) +![bench-guide-profile](../images/bench-guide-profile.png) 从之前基准测试流程描述可知,本次测试过程一共创建了 `(1 + 100) * 4 = 404` 个文件,每个文件都经历了「创建 → 写入 → 关闭 → 打开 → 读取 → 关闭 → 删除」的过程,因此一共有: diff --git a/docs/zh_cn/community/articles.md b/docs/zh_cn/community/articles.md index 268d14a93cd2..570a443395df 100644 --- a/docs/zh_cn/community/articles.md +++ b/docs/zh_cn/community/articles.md @@ -75,7 +75,7 @@ JuiceFS 广泛适用于各种数据存储和共享场景,本页汇总来自世 - [利用 JuiceFS 把 MySQL 备份验证性能提升 10 倍](https://juicefs.com/blog/cn/posts/optimize-xtrabackup-prepare-by-oplog) - [跨云数据搬迁利器:Juicesync](https://juicefs.com/blog/cn/posts/juicesync) - [下厨房基于 JuiceFS 的 MySQL 备份实践](https://juicefs.com/blog/cn/posts/xiachufang-mysql-backup-practice-on-juicefs) -- [如何用 JuiceFS 归档备份 Nginx 日志](https://juicefs.com/blog/cn/posts/backup-nginx-logs-on-juicefs) +- [如何用 JuiceFS 归档备份 NGINX 日志](https://juicefs.com/blog/cn/posts/backup-nginx-logs-on-juicefs) ## 教程、使用指南、评测及其他 diff --git a/docs/zh_cn/deployment/s3_gateway.md b/docs/zh_cn/deployment/s3_gateway.md index 80e45f6b0df2..8e648bb4c7a4 100644 --- a/docs/zh_cn/deployment/s3_gateway.md +++ b/docs/zh_cn/deployment/s3_gateway.md @@ -8,7 +8,7 @@ JuiceFS 从 v0.11 开始引入了 S3 网关,这是一个通过 [MinIO S3 网 因为 JuiceFS 会将文件分块存储到底层的对象存储中,不能直接使用底层对象存储的接口和界面来直接访问文件,S3 网关提供了类似底层对象存储的访问能力,架构图如下: -![](../images/juicefs-s3-gateway-arch.png) +![JuiceFS-S3-gateway-arch](../images/juicefs-s3-gateway-arch.png) ## 先决条件 @@ -39,7 +39,7 @@ juicefs gateway --cache-size 20480 redis://localhost:6379 localhost:9000 在这个例子中,我们假设 JuiceFS 文件系统使用的是本地的 Redis 数据库。当 S3 网关启用时,在**当前主机**上可以使用 `http://localhost:9000` 这个地址访问到 S3 网关的管理界面。 -![](../images/s3-gateway-file-manager.jpg) +![S3-gateway-file-manager](../images/s3-gateway-file-manager.jpg) 如果你希望通过局域网或互联网上的其他主机访问 S3 网关,则需要调整监听地址,例如: @@ -334,4 +334,4 @@ export MINIO_ROOT_PASSWORD=12345678 这里显式指定了 S3 网关控制台的端口号为 59001,如果不指定则会随机选择一个端口。根据命令行提示,在浏览器中打开 [http://127.0.0.1:59001](http://127.0.0.1:59001) 地址便可以访问控制台,如下图所示: -![](../images/s3-gateway-console.png) +![S3-gateway-console](../images/s3-gateway-console.png) diff --git a/docs/zh_cn/getting-started/README.md b/docs/zh_cn/getting-started/README.md index f910e895f7d8..d9b54b04d3e9 100644 --- a/docs/zh_cn/getting-started/README.md +++ b/docs/zh_cn/getting-started/README.md @@ -61,7 +61,7 @@ juicefs format sqlite3://myjfs.db myjfs 从返回的信息中可以看到,该文件系统使用 SQLite 作为元数据存储引擎,数据库文件位于当前目录,文件名为 `myjfs.db`,保存了 `myjfs` 文件系统的所有信息。它构建了完善的表结构,将用作所有数据的元信息的存储。 -![](../images/sqlite-info.png) +![SQLite-info](../images/sqlite-info.png) 由于没有指定任何存储相关的选项,客户端默认使用本地磁盘作为存储介质,根据返回的信息, `myjfs` 的存储路径为 `file:///Users/herald/.juicefs/local/myjfs/`,即当前用户家目录下的 `.juicefs/local/myjfs/`。 @@ -97,7 +97,7 @@ Windows 系统的挂载点(`MOUNTPOINT`)应该使用尚未占用的盘符, juicefs mount sqlite3://myjfs.db ~/jfs ``` -![](../images/sqlite-mount-local.png) +![SQLite-mount-local](../images/sqlite-mount-local.png) 默认情况下,客户端会在前台挂载文件系统。就像你在上图中看到的那样,程序会一直运行在当前终端进程中,使用 Ctrl + C 组合键或关闭终端窗口,文件系统会被卸载。 diff --git a/docs/zh_cn/guide/cache_management.md b/docs/zh_cn/guide/cache_management.md index c6578b55d44f..4e1f299147de 100644 --- a/docs/zh_cn/guide/cache_management.md +++ b/docs/zh_cn/guide/cache_management.md @@ -65,7 +65,7 @@ JuiceFS 客户端在 `open` 操作即打开一个文件时,其文件属性会 JuiceFS 对数据也提供多种缓存机制来提高性能,包括内核中的页缓存和客户端所在机器的本地缓存,以及客户端自身的内存读写缓冲区。读请求会依次尝试内核分页缓存、JuiceFS 进程的预读缓冲区、本地磁盘缓存,当缓存中没找到对应数据时才会从对象存储读取,并且会异步写入各级缓存保证下一次访问的性能。 -![](../images/juicefs-cache.png) +![JuiceFS-cache](../images/juicefs-cache.png) ### 读写缓冲区 {#buffer-size} diff --git a/docs/zh_cn/guide/sync.md b/docs/zh_cn/guide/sync.md index 2b47d29a7546..d1287c95505a 100644 --- a/docs/zh_cn/guide/sync.md +++ b/docs/zh_cn/guide/sync.md @@ -192,11 +192,11 @@ JuiceFS `sync` 在**本地目录之间**同步时,支持通过设置 `--links` 在两个对象存储之间同步数据,就是从一端拉取数据再推送到另一端,同步的效率取决于客户端与云之间的带宽: -![](../images/juicefs-sync-single.png) +![JuiceFS-sync-single](../images/juicefs-sync-single.png) 在同步大量数据时,单机带宽往往会被占满出现瓶颈,针对这种情况,JuiceFS Sync 提供多机并发同步支持,如下图。 -![](../images/juicefs-sync-worker.png) +![JuiceFS-sync-worker](../images/juicefs-sync-worker.png) Manager 作为主控执行 `sync` 命令,通过 `--worker` 参数定义多个 Worker 主机,JuiceFS 会根据 Worker 的总数量,动态拆分同步的工作量并分发给各个主机同时执行。即把原本在一台主机上处理的同步任务量拆分成多份,分发到多台主机上同时处理,单位时间内能处理的数据量更大,总带宽也成倍增加。 diff --git a/docs/zh_cn/introduction/architecture.md b/docs/zh_cn/introduction/architecture.md index 558786b4155f..ff82f9ad5e5a 100644 --- a/docs/zh_cn/introduction/architecture.md +++ b/docs/zh_cn/introduction/architecture.md @@ -7,7 +7,7 @@ description: 本文介绍 JuiceFS 的技术架构以及由此带来的技术优 JuiceFS 文件系统由三个部分组成: -![](../images/juicefs-arch.svg) +![JuiceFS-arch](../images/juicefs-arch.svg) **JuiceFS 客户端(Client)**:所有文件读写,以及碎片合并、回收站文件过期删除等后台任务,均在客户端中发生。客户端需要同时与对象存储和元数据引擎打交道。客户端支持多种接入方式: @@ -32,7 +32,7 @@ JuiceFS 采用多引擎设计,目前已支持 Redis、TiKV、MySQL/MariaDB、P 对于 JuiceFS,每一个文件都由 1 或多个「Chunk」组成,每个 Chunk 最大 64M。不论文件有多大,所有的读写都会根据其偏移量(也就是产生读写操作的文件位置)来定位到对应的 Chunk。正是这种分而治之的设计,让 JuiceFS 面对大文件也有优秀的性能。只要文件总长度没有变化,不论经历多少修改写入,文件的 Chunk 切分都是固定的。 -![](../images/file-and-chunks.svg) +![file-and-chunks](../images/file-and-chunks.svg) Chunk 的存在是为了优化查找定位,实际的文件写入则在「Slice」上进行。在 JuiceFS 中,一个 Slice 代表一次连续写入,隶属于某个 Chunk,并且不能跨越 Chunk 边界,因此 Slice 长度也不会超 64M。 @@ -40,25 +40,25 @@ Chunk 的存在是为了优化查找定位,实际的文件写入则在「Slice 文件写入会产生 Slice,而调用 `flush` 则会将这些 Slice 持久化。`flush` 可以被用户显式调用,就算不调用,JuiceFS 客户端也会自动在恰当的时机进行 `flush`,防止[缓冲区](../guide/cache_management.md#buffer-size)被写满。持久化到对象存储时,为了能够尽快写入,会对 Slice 进行进一步拆分成一个个「Block」(默认最大 4M),多线程并发写入以提升写性能。上边介绍的 Chunk、Slice,其实都是逻辑数据结构,Block 则是最终的物理存储形式,是对象存储和磁盘缓存的最小存储单元。 -![](../images/slice-to-block.svg) +![slice-to-block](../images/slice-to-block.svg) 因此,文件写入 JuiceFS 后,你不会在对象存储中找到原始文件,存储桶中只有一个 `chunks` 目录和一堆数字编号的目录和文件,让人不禁疑惑「我的文件到底去了哪儿」?但事实上,这些数字编号的对象存储文件正是经过 JuiceFS 拆分存储的 Block,而这些 Block 与 Chunk、Slice 的对应关系,以及其他元数据信息(比如文件名、大小等属性)则存储在元数据引擎中,这样的分离设计,让 JuiceFS 文件系统得以高性能运作。 -![](../images/how-juicefs-stores-files.svg) +![how-JuiceFS-stores-files](../images/how-juicefs-stores-files.svg) 回到逻辑数据结构的话题,如果文件并不是由连贯的顺序写生成,而是多次追加写,每次追加均调用 `flush` 触发写入上传,就会产生多个 Slice。如果每次追加写入的数据量不足 4M,那么最终存入对象存储的数据块,也会是一个个小于 4M 的 Block。 -![](../images/small-append.svg) +![small-append](../images/small-append.svg) 取决于写入模式,Slice 的排列模式可以是多种多样的:如果文件在相同区域被反复修改,Slice 之间会发生重叠。如果在互不重合的区域进行写入,Slice 中间会有间隔。但不论 Slice 的排列有多复杂,当读文件发生时,对于每一处文件位置,都会读到该位置最新写入的 Slice,用下图可以更加直观地理解:Slice 虽然会相互堆叠,但读文件一定是“从上往下看”,因此一定会看到该文件的最新状态。 -![](../images/complicate-pattern.svg) +![complicate-pattern](../images/complicate-pattern.svg) 正是由于 Slice 会相互覆盖,JuiceFS 在 Chunk 与 Slice 的引用关系中,[标记了各个 Slice 的有效数据偏移范围](../development/internals.md#sliceref),用这种方式告诉文件系统,每一个 Slice 中的哪些部分是有效的数据。 但也不难想象,读取文件需要查找「当前读取范围内最新写入的 Slice」,在上图所示的大量堆叠 Slice 的情况下,这样的反复查找将会显著影响读性能,我们称之为文件「碎片化」。碎片化不仅影响读性能,还会在各个层面(对象存储、元数据)增加空间占用。因此每当写入发生时,客户端都会判断文件的碎片化情况,并异步地运行碎片合并,将同一个 Chunk 内的所有 Slice 合并为一。 -![](../images/compaction.svg) +![compaction](../images/compaction.svg) 最后,JuiceFS 的存储设计,还有着以下值得一提的技术特点: diff --git a/docs/zh_cn/introduction/comparison/juicefs_vs_s3ql.md b/docs/zh_cn/introduction/comparison/juicefs_vs_s3ql.md index 31a4c1a5d419..894aeb2608ba 100644 --- a/docs/zh_cn/introduction/comparison/juicefs_vs_s3ql.md +++ b/docs/zh_cn/introduction/comparison/juicefs_vs_s3ql.md @@ -62,7 +62,7 @@ S3QL 采用 Python 开发,在安装时需要依赖 `python-devel` 3.7 及以 S3QL 会在系统中安装 12 个二进制程序,每个程序都提供一个独立的功能,如下图。 -![](../../images/s3ql-bin.jpg) +![S3QL-bin](../../images/s3ql-bin.jpg) #### JuiceFS diff --git a/docs/zh_cn/introduction/io_processing.md b/docs/zh_cn/introduction/io_processing.md index a5e2ae7ce58c..931e506582f0 100644 --- a/docs/zh_cn/introduction/io_processing.md +++ b/docs/zh_cn/introduction/io_processing.md @@ -11,11 +11,11 @@ JuiceFS 对大文件会做多级拆分([JuiceFS 如何存储文件](../introdu 显然,在应用顺序写情况下,只需要一个不停增长的 Slice,最后仅 `flush` 一次即可;此时能最大化发挥出对象存储的写入性能。以一次简单的 [JuiceFS 基准测试](../benchmark/performance_evaluation_guide.md)为例,使用 1 MiB IO 顺序写 1 GiB 文件,在不考虑压缩和加密的前提下,数据在各个组件中的形式如下图所示: -![](../images/internals-write.png) +![internals-write](../images/internals-write.png) 用 [`juicefs stats`](../reference/command_reference.md#stats) 命令记录的指标图,可以直观地看到实时性能数据: -![](../images/internals-stats.png) +![internals-stats](../images/internals-stats.png) 图中第 1 阶段: @@ -54,7 +54,7 @@ JuiceFS 支持随机写,包括通过 mmap 等进行的随机写。 JuiceFS 支持顺序读和随机读(包括基于 mmap 的随机读),在处理读请求时会通过对象存储的 `GetObject` 接口完整读取 Block 对应的对象,也有可能仅仅读取对象中一定范围的数据(比如通过 [S3 API](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) 的 `Range` 参数限定读取范围)。与此同时异步地进行预读(通过 [`--prefetch`](../reference/command_reference.md#mount) 参数控制预读并发度),预读会将整个对象存储块下载到本地缓存目录,以备后用(如指标图中的第 2 阶段,blockcache 有很高的写入带宽)。显然,在顺序读时,这些提前获取的数据都会被后续的请求访问到,缓存命中率非常高,因此也能充分发挥出对象存储的读取性能。数据流如下图所示: -![](../images/internals-read.png) +![internals-read](../images/internals-read.png) 但是对于大文件随机读场景,预读的用途可能不大,反而容易因为读放大和本地缓存的频繁写入与驱逐使得系统资源的实际利用率降低,此时可以考虑用 `--prefetch=0` 禁用预读。考虑到此类场景下,一般的缓存策略很难有足够高的收益,可考虑尽可能提升缓存的整体容量,达到能几乎完全缓存所需数据的效果;或者直接禁用缓存(`--cache-size=0`),并尽可能提高对象存储的读取性能。 diff --git a/docs/zh_cn/tutorials/aliyun.md b/docs/zh_cn/tutorials/aliyun.md index 429ae81ee03d..ee70176f22d7 100644 --- a/docs/zh_cn/tutorials/aliyun.md +++ b/docs/zh_cn/tutorials/aliyun.md @@ -10,7 +10,7 @@ slug: /clouds/aliyun 这样的设计可以有效缩减对象存储在请求数量上的费用,同时也能让我们显著感受到 JuiceFS 带来的性能提升。 -![](../images/juicefs-aliyun.png) +![JuiceFS-aliyun](../images/juicefs-aliyun.png) ## 准备 diff --git a/docs/zh_cn/tutorials/digitalocean.md b/docs/zh_cn/tutorials/digitalocean.md index c0844d651e90..2bf8c407f487 100644 --- a/docs/zh_cn/tutorials/digitalocean.md +++ b/docs/zh_cn/tutorials/digitalocean.md @@ -44,7 +44,7 @@ JuiceFS 使用对象存储来存储所有的数据,在 DigitalOcean 上使用 本文我们使用 DigitalOcean 的 Redis 6 数据库托管服务,区域选择 `新加坡`,选择与已存在的 Droplet 相同的 VPC 私有网络。创建 Redis 大概需要 5 分钟左右的时间,我们跟随设置向导对数据库进行初始化设置。 -![](../images/digitalocean-redis-guide.png) +![DigitalOcean-Redis-guide](../images/digitalocean-redis-guide.png) 默认情况下 Redis 允许所有入站连接,出于安全考虑,应该在设置向导的安全设置环节,在 `Add trusted sources` 中选中有权访问 Redis 的 Droplet,即仅允许选中的主机访问 Redis。 @@ -54,7 +54,7 @@ JuiceFS 使用对象存储来存储所有的数据,在 DigitalOcean 上使用 Redis 的访问地址可以从控制台的 `Connection Details` 中找到,如果所有计算资源都在 DigitalOcean,则建议优先使用 VPC 私有网络进行连接,这样能最大程度的提升安全性。 -![](../images/digitalocean-redis-url.png) +![DigitalOcean-Redis-url](../images/digitalocean-redis-url.png) ## 安装和使用 diff --git a/docs/zh_cn/tutorials/juicefs_on_k3s.md b/docs/zh_cn/tutorials/juicefs_on_k3s.md index 1483580d2570..94be0ede85ec 100644 --- a/docs/zh_cn/tutorials/juicefs_on_k3s.md +++ b/docs/zh_cn/tutorials/juicefs_on_k3s.md @@ -6,7 +6,7 @@ slug: /juicefs_on_k3s [K3s](https://k3s.io) 是一个经过功能优化的 Kubernetes 发行版,它与 Kubernetes 完全兼容,即几乎所有在 Kubernetes 的操作都可以在 K3s 上执行。K3s 将整个容器编排系统打包进了一个容量不足 100MB 的二进制程序,减少了部署 Kubernetes 生产集群的环境依赖,大大降低了安装难度,对系统硬件的性能要求也更低。 -在本文中,我们会建立一个包含两个节点的 K3s 集群,为集群安装并配置使用 [JuiceFS CSI Driver](https://github.com/juicedata/juicefs-csi-driver),最后会创建一个 Nginx 容器进行验证。 +在本文中,我们会建立一个包含两个节点的 K3s 集群,为集群安装并配置使用 [JuiceFS CSI Driver](https://github.com/juicedata/juicefs-csi-driver),最后会创建一个 NGINX 容器进行验证。 ## 部署 K3s 集群 @@ -133,9 +133,9 @@ juicefs-sc csi.juicefs.com Retain Immediate > **注意**:一个存储类与一个 JuiceFS 文件系统相关联,你可以根据需要创建任意数量的存储类。但需要注意修改配置文件中的存储类名称,避免同名冲突。 -## 使用 JuiceFS 持久化 Nginx 数据 +## 使用 JuiceFS 持久化 NGINX 数据 -接下来部署一个 Nginx Pod,使用 JuiceFS 存储类声明的持久化存储。 +接下来部署一个 NGINX Pod,使用 JuiceFS 存储类声明的持久化存储。 ### Deployment @@ -215,7 +215,7 @@ sudo kubectl apply -f service.yaml ### Ingress -K3s 默认预置了 traefik-ingress,通过以下配置为 Nginx 创建一个 ingress。例如:`ingress.yaml` +K3s 默认预置了 traefik-ingress,通过以下配置为 NGINX 创建一个 ingress。例如:`ingress.yaml` ```yaml apiVersion: networking.k8s.io/v1 @@ -245,9 +245,9 @@ sudo kubectl apply -f ingress.yaml ### 访问 -部署完成以后,使用相同局域网的主机访问任何一个集群节点,即可看到 Nginx 的欢迎页面。 +部署完成以后,使用相同局域网的主机访问任何一个集群节点,即可看到 NGINX 的欢迎页面。 -![](../images/k3s-nginx-welcome.png) +![K3s-NGINX-welcome](../images/k3s-nginx-welcome.png) 接下来查看一下容器是否成功挂载了 JuiceFS,执行命令查看 Pod 状态: diff --git a/docs/zh_cn/tutorials/juicefs_on_kubesphere.md b/docs/zh_cn/tutorials/juicefs_on_kubesphere.md index 3778ac1260ff..648ef23c0026 100644 --- a/docs/zh_cn/tutorials/juicefs_on_kubesphere.md +++ b/docs/zh_cn/tutorials/juicefs_on_kubesphere.md @@ -36,7 +36,7 @@ KubeSphere 提供了运维友好的向导式操作界面,即便是 Kubernetes - 仓库名称:`juicefs-csi-driver` - Index URL:`https://juicedata.github.io/juicefs-csi-driver/` -![](../images/kubesphere_app_shop.png) +![kubesphere_app_shop](../images/kubesphere_app_shop.png) #### 方法二:应用模板 @@ -44,17 +44,17 @@ KubeSphere 提供了运维友好的向导式操作界面,即便是 Kubernetes 在「企业空间」中点击进入「应用管理」,选择「应用模板」,点击「创建」,上传 chart 压缩包: -![](../images/kubesphere_app_template.png) +![kubesphere_app_template](../images/kubesphere_app_template.png) ### 安装 在「企业空间」中选择您所需部署的「项目」(KubeSphere 中的项目即为 K8s 中的 namespace),选择「应用负载」,点击「部署新应用」按钮,选择「来自应用商店」,然后选择 `juicefs`: -![](../images/kubesphere_shop_juicefs.jpg) +![kubesphere_shop_juicefs](../images/kubesphere_shop_juicefs.jpg) 若 KubeSphere 版本低于 v3.2.0,根据上一步配置好的应用模板,选择部署应用「来自应用模板」: -![](../images/kubesphere_install_csi.png) +![kubesphere_install_csi](../images/kubesphere_install_csi.png) 进入配置修改页面后一致,修改以下两个地方: @@ -65,17 +65,17 @@ KubeSphere 提供了运维友好的向导式操作界面,即便是 Kubernetes 您也可以通过 KubeSphere 的应用商店快速创建数据库(如 Redis)和对象存储(如 MinIO)。 比如在 KubeSphere 平台搭建 Redis:在当前所在项目中选择「应用负载」,点击「部署新应用」按钮,选择「来自应用商店」,选择「Redis」,然后快速部署即可。Redis 的访问 URL 可以通过部署好的应用的服务名,如下: -![](../images/kubesphere_redis.png) +![kubesphere_redis](../images/kubesphere_redis.png) 在 KubeSphere 平台搭建 MinIO 也是类似的流程,不过在部署 MinIO 之前可以修改 MinIO 的 accessKey 和 secretKey,并且需要记住配置的值。如下图: -![](../images/kubesphere_create_minio.png) +![kubesphere_create_minio](../images/kubesphere_create_minio.png) > 注:如果部署 MinIO 出现权限问题,可以将配置中的 `securityContext.enables` 设置为 false。 MinIO 的访问 URL 可以通过部署好的应用的服务名,如下: -![](../images/kubesphere_minio.png) +![kubesphere_minio](../images/kubesphere_minio.png) Redis 和 MinIO 都搭建好之后,就可以填写 JuiceFS CSI Driver 的 `backend` 值了。其中: @@ -84,7 +84,7 @@ Redis 和 MinIO 都搭建好之后,就可以填写 JuiceFS CSI Driver 的 `bac 3. `bucket` 为刚才创建的 MinIO 的可用 bucket(JuiceFS 会自动创建,不需要手动创建),MinIO 的访问地址可用 MinIO 应用对应的服务名,如 `http://minio-qkp9my:9000/minio/test` 4. `accessKey` 和 `secretKey` 用刚才创建的 MinIO 的 accessKey 和 secretKey -![](../images/kubesphere_update_csi.png) +![kubesphere_update_csi](../images/kubesphere_update_csi.png) 配置修改完毕后,点击安装即可。 @@ -96,18 +96,18 @@ Redis 和 MinIO 都搭建好之后,就可以填写 JuiceFS CSI Driver 的 `bac 然后需要创建一个 PVC,指定使用 `juicefs-sc` 这个 `StorageClass`。在「项目」中,选择「存储管理」,再选择「存储卷」,点击「创建」按钮创建 PVC,其中「存储类型」选择 `juicefs-sc`,如下: -![](../images/kubesphere_pvc.png) +![kubesphere_pvc](../images/kubesphere_pvc.png) PVC 创建好之后,再在「项目」的「应用负载」中,选择「工作负载」,点击「创建」按钮部署工作负载,其中「基本信息」页填写自己喜欢的名字;「容器镜像」页可以填写镜像 `centos` ; 启动命令 `sh,-c,while true; do echo $(date -u) >> /data/out.txt; sleep 5; done` ;「存储卷来源」选择「已有存储卷」,再选择上一步创建的 PVC,容器内路径填写 `/data` 如下: -![](../images/kubesphere_deployment.png) +![kubesphere_deployment](../images/kubesphere_deployment.png) -![](../images/kubesphere_workload.png) +![kubesphere_workload](../images/kubesphere_workload.png) 部署完成后可以看到运行中的容器组: -![](../images/kubesphere_pod.png) +![kubesphere_pod](../images/kubesphere_pod.png) ### 新建 StorageClass @@ -115,15 +115,15 @@ PVC 创建好之后,再在「项目」的「应用负载」中,选择「工 准备好元数据服务和对象存储服务后,新建一个 `Secret`。在「平台管理」页面选择「配置中心」,选择「密钥」,点击「创建」按钮新建: -![](../images/kubesphere_create_secret.png) +![kubesphere_create_secret](../images/kubesphere_create_secret.png) 「密钥设置」中填入准备好的元数据服务和对象存储信息,如下: -![](../images/kubesphere_update_secret.png) +![kubesphere_update_secret](../images/kubesphere_update_secret.png) `Secret` 新建好之后,创建 `StorageClass`,在「平台管理」页面选择「存储管理」,选择「存储类型」,点击「创建」按钮新建,其中「存储系统」选择「自定义」: -![](../images/kubesphere_sc_create.png) +![kubesphere_sc_create](../images/kubesphere_sc_create.png) 设置页面信息如下,其中「存储系统」填写 `csi.juicefs.com`,另外再设置 4 个参数: @@ -132,6 +132,6 @@ PVC 创建好之后,再在「项目」的「应用负载」中,选择「工 - `csi.storage.k8s.io/node-publish-secret-name`: 刚刚创建好的 secret name - `csi.storage.k8s.io/node-publish-secret-namespace`: secret 对应的项目名 -![](../images/kubesphere_sc_update.png) +![kubesphere_sc_update](../images/kubesphere_sc_update.png) 点击「创建」按钮之后,`StorageClass` 就创建好了。 diff --git a/docs/zh_cn/tutorials/juicefs_on_rancher.md b/docs/zh_cn/tutorials/juicefs_on_rancher.md index 496325f3edc9..c93255345cd2 100644 --- a/docs/zh_cn/tutorials/juicefs_on_rancher.md +++ b/docs/zh_cn/tutorials/juicefs_on_rancher.md @@ -28,7 +28,7 @@ sudo docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 ran 容器创建完成以后,通过浏览器访问主机的 IP 地址就能打开 Rancher 的管理界面。 -![](../images/rancher-welcome.jpeg) +![Rancher-welcome](../images/rancher-welcome.jpeg) ## 创建 Kubernetes 集群 @@ -36,15 +36,15 @@ Rancher 安装成功以后,可以看到它已经在当前容器中部署了一 接下来开始创建 Kubernetes 集群,在欢迎页面的 Cluster 部分点击 `Create` 创建集群。Rancher 支持在各大主流云计算平台创建 Kubernetes 集群,这里我们要在 Rancher 的宿主机上直接选择集群,因此选择 `Custom`。然后根据向导填写集群名称,选择 Kubernetes 版本即可。 -![](../images/rancher-cluster-create.jpg) +![Rancher-cluster-create](../images/rancher-cluster-create.jpg) 在 `Cluster Options` 页面中,选择要创建的节点角色,然后复制生成命令,在目标主机上执行即可。 -![](../images/rancher-cluster-options.jpg) +![Rancher-cluster-options](../images/rancher-cluster-options.jpg) 集群创建完成后,Rancher 的集群列表中会有状态显示。 -![](../images/rancher-clusters.jpg) +![Rancher-clusters](../images/rancher-clusters.jpg) ## 一键安装 JuiceFS CSI Driver @@ -53,19 +53,19 @@ Rancher 安装成功以后,可以看到它已经在当前容器中部署了一 - **仓库名称**:`juicefs` - **Index URL**:`https://juicedata.github.io/juicefs-csi-driver/` -![](../images/rancher-new-repo.jpg) +![Rancher-new-repo](../images/rancher-new-repo.jpg) 创建以后,在仓库列表中可以看到刚刚添加的 JuiceFS CSI 仓库。 -![](../images/rancher-repos.jpg) +![Rancher-repos](../images/rancher-repos.jpg) 紧接着通过左侧菜单点击打开 `应用市场` → `Charts`,搜索栏中输入 `juicefs`,然后点击打开检索出的 `juicefs-csi-driver`。 -![](../images/rancher-chart-search.jpg) +![Rancher-chart-search](../images/rancher-chart-search.jpg) 在应用详情页面点击“安装”按钮,默认会安装最新版本,也可以点选切换到历史版本进行安装。 -![](../images/rancher-chart-info.jpg) +![Rancher-chart-info](../images/rancher-chart-info.jpg) 安装向导共有两步: @@ -97,10 +97,10 @@ storageClasses: 点击「安装」,等待应用安装完成。 -![](../images/rancher-chart-installed.jpg) +![Rancher-chart-installed](../images/rancher-chart-installed.jpg) ## 使用 JuiceFS 持久化数据 部署应用时,在存储配置中指定 `juicefs-sc` 即可。 -![](../images/rancher-pvc.jpg) +![Rancher-PVC](../images/rancher-pvc.jpg) diff --git a/docs/zh_cn/tutorials/juicefs_on_wsl.md b/docs/zh_cn/tutorials/juicefs_on_wsl.md index c194fc7726d3..eaaaef75fcb2 100644 --- a/docs/zh_cn/tutorials/juicefs_on_wsl.md +++ b/docs/zh_cn/tutorials/juicefs_on_wsl.md @@ -11,7 +11,7 @@ WSL 全称 Windows Subsystem for Linux,即适用于 Linux 的 Windows 子系 查看当前系统的版本,可以通过组合键 Win + R 唤出运行程序,输入并运行 `winver`。 -![](../images/wsl/winver.png) +![WSL/winver](../images/wsl/winver.png) 确认 Windows 版本以后,以管理员身份打开 PowerShell 或 Windows 命令提示符,运行安装命令: @@ -35,11 +35,11 @@ wsl --install -d ubuntu WSL 安装完成以后,即可在开始菜单找到新安装的 Linux 发行版。 -![](../images/wsl/startmenu.png) +![WSL/startmenu](../images/wsl/startmenu.png) 点击 Ubuntu 子系统的快捷方式,WSL 会打开 Linux 子系统的终端。初次运行会要求设置管理 Linux 子系统的用户和密码,根据提示设置即可。 -![](../images/wsl/init.png) +![WSL/init](../images/wsl/init.png) 这里设置的用户名和密码有以下几点需要注意: @@ -137,7 +137,7 @@ sudo juicefs mount -d redis://myjfs-sh-abc.redis.rds.aliyuncs.com:6379/1 $HOME/m 如果需要从 Windows 系统访问 Linux 子系统中挂载的 JuiceFS 文件系统,在资源管理器左侧列表中找到 Linux 子系统,然后找到并打开挂载点路径即可。 -![](../images/wsl/access-jfs-from-win.png) +![WSL/access-jfs-from-win](../images/wsl/access-jfs-from-win.png) 有关 JuiceFS 使用方面的更多内容请查阅官方文档。 @@ -145,13 +145,13 @@ sudo juicefs mount -d redis://myjfs-sh-abc.redis.rds.aliyuncs.com:6379/1 $HOME/m WSL 打通了 Windows 与 Linux 子系统,允许二者相互访问彼此系统中存储的文件。 -![](../images/wsl/windows-to-linux.png) +![WSL/Windows-to-Linux](../images/wsl/windows-to-linux.png) 但需要注意,从 Windows 访问 Linux 子系统或从 Linux 子系统访问 Windows 势必会因系统之间的转换而产生一定的性能开销。因此,推荐的做法是根据程序所在的系统来决定文件存储的位置,对于 Linux 子系统中的程序,它要处理的文件也应该存储在 Linux 子系统中性能才更理想。 在 Linux 子系统中,WSL 将 Windows 的各个盘符挂载到了 `/mnt`,比如 C: 盘在 Linux 子系统中的挂载点是 `/mnt/c`。 -![](../images/wsl/mount-point.png) +![WSL/mount-point](../images/wsl/mount-point.png) 为了保证性能最优,在 WSL 中使用 JuiceFS 时,不论存储还是缓存路径都应设置在 Linux 子系统中。换言之,应该避免把存储或缓存设置在 `/mnt/c` 类似的 Windows 分区挂载点上。 @@ -163,4 +163,4 @@ WSL 打通了 Windows 与 Linux 子系统,允许二者相互访问彼此系统 受此问题影响,通过 Windows 资源管理器向 Linux 子系统中挂载的 JuiceFS 文件系统存入文件时也会出现同样的问题。但在 Linux 子系统内部读写 JuiceFS 文件系统不受该 bug 的干扰。 -![](../images/wsl/zone-identifier.png) +![WSL/zone-identifier](../images/wsl/zone-identifier.png) diff --git a/docs/zh_cn/tutorials/qcloud.md b/docs/zh_cn/tutorials/qcloud.md index de11b42188f0..7b188a6b48a8 100644 --- a/docs/zh_cn/tutorials/qcloud.md +++ b/docs/zh_cn/tutorials/qcloud.md @@ -10,7 +10,7 @@ slug: /clouds/qcloud 这样的设计可以有效缩减对象存储在请求数量上的费用,同时也能让我们显著感受到 JuiceFS 带来的性能提升。 -![](../images/juicefs-qcloud.png) +![JuiceFS-qcloud](../images/juicefs-qcloud.png) ## 准备 @@ -67,7 +67,7 @@ JuiceFS 会将数据对应的元数据全部存储在独立的数据库中,目 注意,数据库的连接地址取决于你创建的 VPC 网络设置,创建 Redis 实例时会自动在你定义的网段中获取地址。 -![](../images/qcloud-redis-network.png) +![qcloud-Redis-network](../images/qcloud-redis-network.png) ### 三、对象存储 COS