Skip to content

Commit

Permalink
add more explain in mount option (#687)
Browse files Browse the repository at this point in the history
* add more explain in mount option

* more

---------

Co-authored-by: timfeirg <[email protected]>
  • Loading branch information
zwwhdls and timfeirg authored Jul 10, 2023
1 parent 32d4eee commit b7b904c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/en/guide/pv.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,17 @@ Mount options are different between Community Edition and Cloud Service, see:
- [Community Edition](https://juicefs.com/docs/community/command_reference#mount)
- [Cloud Service](https://juicefs.com/docs/cloud/reference/commands_reference/#mount)

If you need to pass extra FUSE options (specified in command line using `-o`), append directly in the YAML list, one option in each line, as demonstrated below:
`mountOptions` in PV/StorageClass supports both JuiceFS mount options and FUSE options. Keep in mind that although FUSE options is specified using `-o` when using JuiceFS command line, the `-o` is to be omitted inside CSI `mountOptions`, just append each option directly in the YAML list. For a mount command example like below:

```shell
juicefs mount ... --cache-size=204800 -o writeback_cache,debug
```

Translated to CSI `mountOptions`:

```yaml
mountOptions:
# JuiceFS mount options
- cache-size=204800
# Extra FUSE options
- writeback_cache
Expand Down
9 changes: 8 additions & 1 deletion docs/zh_cn/guide/pv.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,17 @@ JuiceFS 社区版与云服务的挂载参数有所区别,请参考文档:
- [社区版](https://juicefs.com/docs/zh/community/command_reference#mount)
- [云服务](https://juicefs.com/docs/zh/cloud/reference/commands_reference/#mount)

如果要额外添加 FUSE 相关选项(也就是挂载命令的 `-o` 参数),请直接在 YAML 列表中追加,每行一个选项:
PV/StorageClass 中的 `mountOptions` 同时支持 JuiceFS 本身的挂载参数和 FUSE 相关选项。但要注意,虽然 FUSE 参数在命令行使用时会用 `-o` 传入,但在 `mountOptions` 中需要省略 `-o`,直接在列表中追加参数即可。以下方挂载命令为例:

```shell
juicefs mount ... --cache-size=204800 -o writeback_cache,debug
```

翻译成 CSI 中的 `mountOptions`,格式如下:

```yaml
mountOptions:
# JuiceFS mount options
- cache-size=204800
# 额外的 FUSE 相关选项
- writeback_cache
Expand Down

0 comments on commit b7b904c

Please sign in to comment.