Skip to main content

FUSE 挂载选项

如何传入 FUSE 选项

常见有 2 种方式:

  1. juicefs mount 中使用 -o,多个选项用逗号分隔。

    juicefs mount -d -o allow_other,writeback_cache <META-URL> /jfs
  2. /etc/fstab 中,将 FUSE 选项写入 options 字段。

    # <file system>  <mount point>  <type>   <options>                    <dump> <pass>
    myjfs /jfs juicefs _netdev,writeback_cache 0 0

常见选项(摘要)

default_permissions

默认自动启用。内核权限检查和文件系统权限检查都通过后,操作才会继续执行。

allow_other

允许挂载用户之外的其他用户访问。非 root 挂载时,需先在 /etc/fuse.conf 中启用 user_allow_other

writeback_cache

Linux 内核 3.15 及以上,开启 FUSE 写回缓存,有助于提升频繁小写入场景性能(但是会牺牲大文件顺序写的性能,详见「内核回写模式」)。

user_idgroup_id

用于指定文件系统所有者 UID/GID,参与更高层权限校验。若启用 allow_other,该选项不生效。

debug

将底层 go-fuse 调试信息输出到 juicefs.log。它与客户端全局 --debug 选项含义不同。

延伸阅读