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

Chapter 20. Create a Pool


Before creating pools, refer to the Pool, PG and CRUSH Config section of the Ceph Configuration Guide. Consider overriding the default value for the number of placement groups in you Ceph configuration file, as the default is NOT ideal. For example:

osd pool default pg num = 100
osd pool default pgp num = 100
Copy to Clipboard Toggle word wrap

To create a pool, execute:

ceph osd pool create <pool-name> <pg-num> [<pgp-num>] [replicated] \
         [crush-ruleset-name]
ceph osd pool create <pool-name> <pg-num>  <pgp-num>   erasure \
         [erasure-code-profile] [crush-ruleset-name]
Copy to Clipboard Toggle word wrap

Where:

<pool-name>

Description
The name of the pool. It must be unique.
Type
String
Required
Yes. Picks up default or Ceph configuration value if not specified.

<pg-num>

Description
The total number of placement groups for the pool. See Placement Groups for details on calculating a suitable number. The default value 8 is NOT suitable for most systems. Also, see Ceph Placement Groups per Pool Calculator.
Type
Integer
Required
Yes
Default
8

<pgp-num>

Description
The total number of placement groups for placement purposes. This should be equal to the total number of placement groups, except for placement group splitting scenarios.
Type
Integer
Required
Yes. Picks up default or Ceph configuration value if not specified.
Default
8

<replicated or erasure>

Description
The pool type which may either be replicated to recover from lost OSDs by keeping multiple copies of the objects or erasure to get a kind of generalized RAID5 capability. The replicated pools require more raw storage but implement all Ceph operations. The erasure pools require less raw storage but only implement a subset of the available operations.
Type
String
Required
No.
Default
replicated

[crush-ruleset-name]

Description
The name of the crush ruleset for this pool. If specified ruleset doesn’t exist, the creation of replicated pool will fail with -ENOENT. But replicated pool will create a new erasure ruleset with specified name.
Type
String
Required
No.
Default
"erasure-code" for erasure pool. Pick up Ceph configuration variable osd_pool_default_crush_replicated_ruleset for replicated pool.

[erasure-code-profile=profile]

Description
For erasure pools only. Use the erasure code profiles. It must be an existing profile as defined by osd erasure-code-profile set.
Type
String
Required
No.

When you create a pool, set the number of placement groups to a reasonable value (e.g., 100). Consider the total number of placement groups per OSD too. Placement groups are computationally expensive, so performance will degrade when you have many pools with many placement groups (e.g., 50 pools with 100 placement groups each). The point of diminishing returns depends upon the power of the OSD host.

See Placement Groups for details on calculating an appropriate number of placement groups for your pool. Also see Ceph Placement Groups (PGs) per Pool Calculator.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat