KB450107 – Creating & Using Erasure Code Pools

Last modified: September 14, 2020
You are here:
Estimated reading time: 2 min


This article will show you how to create an Erasure Code Pool in the ceph dashboard, along with the Erasure Code Profile for the pool to use.



  • An existing ceph cluster
  • Ceph Filesystem configured on your existing ceph cluster*

*If the Erasure Code pool is to be used for RBD storage only, you do not need the ceph filesystem up and running on your cluster.



  1. Go to your ceph dashboard and go to the “Pools” section

2. Click “Create” to start creating a new pool

  • For Pool type, select “erasure” from the drop down list
  • For Placement groups, it’s best to start low with 64 for example and let auto-scale add more PGs to the pool as needed.
  • For Erasure code profile, the default is 2+1. If you are needing your a different profile, select the “+” button to create a new one.


In this example, we are creating a 4 + 2 EC profile. When you are creating your profile whatever it may be (4+2, 5+3, etc)

You want your “Data chunks” to be your first number in your EC profile (4,5,etc)

You want your “Coding chunks” to be the second number in your EC profile (2,3,etc)

The Crush failure domain stays at host level**

**Unless otherwise specified by a custom crush map of the data on the cluster.



Once you have your EC profile created, you will select it from a drop down list for “Erasure code profile” and select your Applications for the pool you are creating. Where in this example, we are creating a pool for filesystem access (ceph, SMB, NFS), we are selecting “cephfs”.


Once you have everything filled out as needed, click “CreatePool” to create the pool.



Next step is we need to add the newly created pool to the cephfs filesystem to use for any shares we have created or plan to create.

  • Log into any nodes of the ceph cluster and run the following command:

ceph fs add_data_pool cephfs data_ec



  • Once the pool is added successfully, you can verify by going to the Filesystems section of your dashboard and cehck for what pools are available under cephfs



Next, We will need to mount the existing ceph filesystem to run the command to tell the filesystem to use the newly created Erasure Coded pool for storage.



setfattr -n ceph.dir.layout.pool -v data_ec /mnt/localceph



  • Run the following command on the mount location of the filesystem:

getfattr -n ceph.dir.layout /mnt/localceph



 As you can in the output of the command, the “pool=data_ec” confirms the filesystem is using the erasure coded pool we created for storage.




  • If you can’t run either “setfattr” or “getfattr” commands, please install the “attr” package: yum install attr




Was this article helpful?
Dislike 0
Views: 117
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access