|45 Drives Knowledge Base
||KB450107 - Creating & Using Erasure Code Pools
This article will outline how to create an Erasure Code Pool in the Ceph Dashboard along with configuring the Erasure Code Profile necessary for the pool to use.
**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
Make sure to apply the newly created EC profile.
For this example, we'll be creating a 2+1 EC profile.
When creating a profile:
Unless a custom Crush Map of the data on the cluster is being used.***
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 the EC profile is created, select it from the "Erasure Code Profile" drop down menu. Select the Applications for the pool you're creating. In this example, a pool for filesystem access is being created, which includes Ceph, SMB and NFS, so select "cephfs".
Once these values are input, click "CreatePool". This will create the pool.
The newly created pool will need to be added to the cephfs filesystem for use with any shares that have been created or planned to be created.
ceph fs add_data_pool cephfs ec_2_1
The existing Ceph filesystem will need to be mounted for the filesystem to be able to use the newly created Erasured Coded pool for storage.
mount -t :/ /mnt/cephfs -o name=admin,secretfile=/etc/ceph/admin.secret
setfattr -n ceph.dir.layout.pool -v data_ec /mnt/localceph
getfattr -n ceph.dir.layout /mnt/localceph
The output from this command, "pool=ec_2_1" confirms the filesystem is using the Erasure Coded pool that has been created for storage.