45 Drives Knowledge Base
KB450107 - Creating & Using Erasure Code Pools
https://knowledgebase.45drives.com/kb/create-ec-profile/

KB450107 - Creating & Using Erasure Code Pools

Posted on November 19, 2018 by Rob MacQueen


Creating & Using Erasure Code Pools

Scope/Description:

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.

Prerequisites:

**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.

 

Steps:

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

 

Verification:

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.

 

Troubleshooting:

 

 

 

KB450107 – Creating & Using Erasure Code Pools – 45 Drives Knowledge Base

KB450107 – Creating & Using Erasure Code Pools

Last modified: June 8, 2021
You are here:
Estimated reading time: 2 min

Creating & Using Erasure Code Pools

Scope/Description:

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.

Prerequisites:

  • 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.

 

Steps:

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(PGs), it’s best to start low, such as 64, and manually increase the amount, as you cannot decrease it after it has been increased.
  • For Erasure Code Profile, the default value for Ceph Nautilus is 2+1, but Octopus is 4+2. If you’re in need of a different profile, click the “+” button to create a new profile.

 

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:

  • Your “Data Chunks” will be the first number in the EC profile, in this example, that is “2”.
  • Your “Coding Chunks” will be the second number in the EC profile, in this example, that is “1”.
  • The Crush Failure Domain will stay at host level***

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.

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

ceph fs add_data_pool cephfs ec_2_1

 

 

  • Once the pool has been successfully added, it can be verified by checking the Filesystems section of the Ceph Dashboard. Check for pools that are available under “cephfs”.

 

 

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

 

Verification:

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

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.

 

Troubleshooting:

  • If “setfattr” or “getfattr” commands fail, the “attr” package may need to be installed: yum install attr

 

 

 

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