此内容没有您所选择的语言版本。

Chapter 34. Erasure Code Profiles


Ceph defines an erasure-coded pool with a profile. Ceph uses a profile when creating an erasure-coded pool and the associated crush ruleset.

Ceph creates a default erasure code profile when initializing a cluster, and it provides the same level of redundancy as two copies in a replicated pool, but uses 25% less storage capacity. The default profiles defines k=2 and m=1, meaning Ceph will spread the object data over three OSDs (k+m == 3) and Ceph can lose one of those OSDs without losing data.

You can create a new profile to improve redundancy without increasing raw storage requirements. For instance, a profile with k=10 and m=4 can sustain the loss of four (m=4) OSDs by distributing an object on fourteen (k+m=14) OSDs. Ceph divides the object into 10 chunks (if the object is 10MB, each chunk is 1MB) and computes 4 coding chunks for recovery (each coding chunk has the same size as the data chunk, i.e. 1MB). The raw space overhead is only 40% and the object will not be lost even if four OSDs fail simultaneously.

34.1. osd erasure-code-profile set

To create a new erasure code profile:

ceph osd erasure-code-profile set <name> \
         [<directory=directory>] \
         [<plugin=plugin>] \
         [<key=value> ...] \
         [--force]
Copy to Clipboard Toggle word wrap

Where:

<directory=directory>

Description
Set the directory name from which the erasure code plugin is loaded.
Type
String
Required
No.
Default
/usr/lib/ceph/erasure-code

<plugin=plugin>

Description
Use the erasure code plugin to compute coding chunks and recover missing chunks. See the list of available plugins_ for more information.
Type
String
Required
No.
Default
jerasure

<key=value>

Description
The semantic of the remaining key/value pairs is defined by the erasure code plugin.
Type
String
Required
No.

--force

Description
Override an existing profile by the same name.
Type
String
Required
No.

34.2. osd erasure-code-profile rm

To remove an erasure code profile:

ceph osd erasure-code-profile rm <name>
Copy to Clipboard Toggle word wrap

If the profile is referenced by a pool, the deletion will fail.

34.3. osd erasure-code-profile get

To display an erasure code profile:

ceph osd erasure-code-profile get <name>
Copy to Clipboard Toggle word wrap

34.4. osd erasure-code-profile ls

To list the names of all erasure code profiles:

ceph osd erasure-code-profile ls
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat