注意

本文档适用于 Ceph 开发版本。

客户端配置

更新客户端配置

某些客户端配置可以在运行时应用。要检查某个配置选项是否可以在运行时应用(被客户端影响),请使用config help command:

ceph config help debug_client
 debug_client - Debug level for client
 (str, advanced)                                                                                                                      Default: 0/5
 Can update at runtime: true

 The value takes the form 'N' or 'N/M' where N and M are values between 0 and 99.  N is the debug level to log (all values below this are included), and M is the level to gather and buffer in memory.  In the event of a crash, the most recent items <= M are dumped to the log file.

config help来判断给定的配置是否可以在运行时应用,以及默认值和配置选项的描述。

要在运行时更新配置选项,请使用config set command:

ceph config set client debug_client 20/20

注意,这将更改所有客户端的给定配置。

要检查配置选项,请使用config get command:

ceph config get client
 WHO    MASK LEVEL    OPTION                    VALUE     RO
 client      advanced debug_client              20/20
 global      advanced osd_pool_default_min_size 1
 global      advanced osd_pool_default_size     3

客户端配置参考

client_acl_type

设置 ACL 类型。目前,唯一可能的值是"posix_acl"启用 POSIX ACL,或一个空字符串。此选项仅在fuse_default_permissions被设置为false.

type:

str

client_cache_mid

设置客户端缓存中点。中点将最近最少使用列表分成热列表和温列表。

type:

float

default:

0.75

client_cache_size

设置客户端在元数据缓存中保留的inode数量。

type:

size

default:

16Ki

client_caps_release_delay

设置能力释放之间的延迟(秒)。延迟设置客户端等待释放它不再需要的能力的时间,以防这些能力需要用于另一个用户空间操作。

type:

secs

default:

5

client_debug_force_sync_read

如果设置为true,客户端直接从 OSD 读取数据,而不是使用本地页面缓存。

type:

bool

default:

false

client_dirsize_rbytes

此选项启用 CephFS 功能,该功能将递归目录大小(目录及其子目录中文件使用的字节数)存储在 stat 结构的 st_size 字段中。

type:

bool

default:

true

client_max_inline_size

设置存储在文件 inode 中而不是在 RADOS 的单独数据对象中的内联数据的最大大小。如果inline_data标志在 MDS 映射上设置,则此设置才适用。

type:

size

default:

4Ki

client_metadata

发送到每个 MDS 的客户端元数据,除了自动生成的版本、主机名和其他元数据之外,以逗号分隔的字符串。

type:

str

client_mount_gid

设置 CephFS 挂载的组 ID。

type:

int

default:

-1

client_mount_timeout

设置 CephFS 挂载的超时时间(秒)。

type:

secs

default:

5 minutes

client_mount_uid

设置 CephFS 挂载的用户 ID。

type:

int

default:

-1

client_mountpoint

在 CephFS 文件系统上挂载的目录。是-r选项的替代方案ceph-fuse command.

type:

str

default:

/

client_oc

启用对象缓存

type:

bool

default:

true

client_oc_max_dirty

设置对象缓存中脏字节的最大数量。

type:

size

default:

100Mi

client_oc_max_dirty_age

设置对象缓存中脏数据在写回之前的最大年龄(秒)。

type:

float

default:

5.0

client_oc_max_objects

设置对象缓存中的最大对象数量。

type:

int

default:

1000

client_oc_size

设置客户端将缓存多少字节数据。

type:

size

default:

200Mi

client_oc_target_dirty

设置脏数据的目标大小。我们建议保持此数字较低。

type:

size

default:

8Mi

client_permissions

检查所有 I/O 操作的客户端权限。

type:

bool

default:

true

client_quota_df

报告statfs操作。

type:

bool

default:

true

的根目录配额

设置客户端为未来的读取操作预读的最大字节数。被client_readahead_max_periods设置进行指数衰减。

type:

size

default:

0B

覆盖

设置客户端预读的文件布局周期数(对象大小 * 条带数)。覆盖client_readahead_max_bytes设置进行指数衰减。

type:

int

default:

4

client_readahead_min

设置客户端预读的最小字节数。

type:

size

default:

128Ki

client_reconnect_stale

会话变得陈旧时重新连接

type:

bool

default:

false

client_snapdir

设置快照目录名称。

type:

str

default:

.snap

client_tick_interval

设置能力更新和其他维护操作之间的间隔(秒)。

type:

secs

default:

1

client_use_random_mds

为每个请求选择随机 MDS。

type:

bool

default:

false

fuse_default_permissions

当设置为false, ceph-fuse时,实用程序检查会执行自己的权限检查,而不是依赖 FUSE 中的权限强制执行。设置为falseclient acl type=posix_acl选项一起使用以启用 POSIX ACL。

type:

bool

default:

false

fuse_max_write

设置单个写入操作中的最大字节数。0 表示无更改;FUSE 默认的 128 k 字节仍然有效。

type:

size

default:

0B

fuse_disable_pagecache

如果设置为true,对于ceph-fuse挂载,内核页面缓存被禁用。当多个客户端同时读取/写入文件时,读取者可能会从页面缓存中获取陈旧数据。由于 FUSE 的限制,ceph-fuse无法动态禁用页面缓存。

type:

bool

default:

false

开发者选项

重要

这些选项是内部的。它们列在这里只是为了完成选项列表。

client_debug_getattr_caps
type:

bool

default:

false

client_debug_inject_tick_delay
type:

secs

default:

0

client_inject_fixed_oldest_tid
type:

bool

default:

false

client_inject_release_failure
type:

bool

default:

false

client_trace

包含客户端操作跟踪的文件

type:

str

由 Ceph 基金会带给您

Ceph 文档是一个社区资源,由非盈利的 Ceph 基金会资助和托管Ceph Foundation. 如果您想支持这一点和我们的其他工作,请考虑加入现在加入.