Client 配置

配置说明

名称 类型 描述 必需
mountPoint string 挂载点
volName string 卷名称
owner string 所有者
masterAddr string Master节点地址
logDir string 日志存放路径
logLevel string 日志级别:debug, info, warn, error
profPort string golang pprof 调试端口
exporterPort string prometheus 获取监控数据端口
consulAddr string 监控注册服务器地址
lookupValid string 内核 FUSE lookup 有效期,单位:秒
attrValid string 内核 FUSE attribute 有效期,单位:秒
icacheTimeout string 客户端 inode cache 有效期,单位:秒
enSyncWrite string 使能 DirectIO 同步写,即 DirectIO 强制数据节点落盘
autoInvalData string FUSE 挂载使用 AutoInvalData 选项
rdonly bool 以只读方式挂载,默认为false
writecache bool 利用内核 FUSE 的写缓存功能,需要内核 FUSE 模块支持写缓存,默认为 false
keepcache bool 保留内核页面缓存。此功能需要启用 writecache选项,默认为false
token string 如果创建卷时开启了 enableToken,此参数填写对应权限的token
readRate int 限制每秒读取次数,默认无限制
writeRate int 限制每秒写入次数,默认无限制
followerRead bool 从 follower 中读取数据,默认为 false
accessKey string 卷所属用户的鉴权密钥
secretKey string 卷所属用户的鉴权密钥
disableDcache bool 禁用 Dentry 缓存,默认为 false
subdir string 设置子目录挂载
fsyncOnClose bool 文件关闭后执行 fsync 操作,默认为true
maxcpus int 最大可使用的 cpu 核数,可限制 client 进程 cpu 使用率
enableXattr bool 是否使用 *xattr*,默认是 false
enableBcache bool 是否开启本地一级缓存,默认false
enableAudit bool 是否开启本地审计日志,默认false

配置示例

{
        "masterAddr":   "192.168.2.160:15010,192.168.2.161:15010,192.168.2.185:15010",
        "mountPoint":   "/data/udbto/mountpoint",
        "volName":      "udbtovol",
        "owner":        "udbtovol",
        "logDir":       "/data/udbto/client/log",
        "logLevel":     "warn",
        "consulAddr":   "http://192.168.2.160:8500",
        "ebsAddr":      "http://192.168.2.160:8500",
        "exporterPort": 15450,
        "profPort":     "15410",
        "minWriteAbleDataPartitionCnt": 0
}