Setting the number of object replicas

Learn how to set the number of object replicas.

To set the number of object replicas on a replicated pool, run the following command:

Syntax

ceph osd pool set POOL_NAME size NUMBER_OF_REPLICAS

You can run this command for each pool.

  • The NUMBER_OF_REPLICAS parameter includes the object itself. If you want to include the object and two copies of the object for a total of three instances of the object, specify 3.

    Example

    [ceph: root@host01 /]# ceph osd pool set data size 3
  • An object might accept I/O operations in degraded mode with fewer replicas than specified by the pool size setting. To set a minimum number of required replicas for I/O, use the min_size setting.

    Example

    ceph osd pool set data min_size 2

    This ensures that no object in the data pool will receive I/O with fewer replicas than specified by the min_size setting.