93 Star 646 Fork 145

GVPhappyfish100 / FastCFS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
shared-storage-guide-zh_CN.md 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
happyfish100 提交于 2023-06-12 15:56 . small changes for docs

共享数据配置指南

FastCFS客户端缓存默认是开启的,这主要针对独享数据场景(对同一文件单节点读写),也可以支持非实时场景下对同一文件一写多读。

如果将FastCFS作为Oracle RAC等系统的共享存储(对同一文件多节点写入和多节点读取),为了保证数据一致性,需要关闭客户端相关缓存。

默认安装的客户端配置文件为 /etc/fastcfs/fcfs/fuse.conf,下面列出需要修改的配置项:

[FastDIR]

# 对于文件追加写或文件truncate操作,通过加锁避免冲突
# if use sys lock for file append and truncate to avoid conflict
# set true when the files appended or truncated by many nodes (FUSE instances)
# default value is false
use_sys_lock_for_append = true

# 禁用异步报告文件属性(即采用同步报告方式)
# if async report file attributes (size, modify time etc.) to the FastDIR server
# default value is true
async_report_enabled = false

# 禁用合并写
[write-combine]
# if enable write combine feature for FastStore
# default value is true
enabled = false

# 禁用预读机制
[read-ahead]
# if enable read ahead feature for FastStore
# default value is true
enabled = false


[FUSE]
# 禁用Linux对inode缓存
# cache time for file entry in seconds
# default value is 1.0s
entry_timeout = 0.0

# 禁用Linux对文件属性缓存
# cache time for file attribute in seconds
# default value is 1.0s
attribute_timeout = 0.0

# 禁用内核合并写
# if enable kernel writeback cache
# default value is true
writeback_cache = false

# 禁用内核读缓存
# if keep kernel cache for read
# set to true for unshared data scene (private data for single node)
# should set to false on shared data scene for multi nodes
# default value is true
kernel_cache = false

友情提示:配置文件修改后,需要重启fcfs_fused方可生效。

C
1
https://gitee.com/fastdfs100/FastCFS.git
git@gitee.com:fastdfs100/FastCFS.git
fastdfs100
FastCFS
FastCFS
master

搜索帮助