# [manual] create erasure-coding ceph filesystem pool Cheatsheet how to setup a erasure coding pool, add it to a ceph filesystem and configure files/directories to use the ec pool. ```console root@ceph:~$ ceph osd erasure-code-profile set ec-62-profile k=6 m=2 crush-failure-domain=osd crush-device-class=hdd root@ceph:~$ ceph osd pool create glacier_data_ec-62 erasure ec-62-profile root@ceph:~$ ceph osd pool set glacier_data_ec-62 allow_ec_overwrites true root@ceph:~$ ceph osd pool application enable glacier_data_ec-62 cephfs root@ceph:~$ ceph fs add_data_pool glacier glacier_data_ec-62 ``` ## Managing ceph dir/file layouts ### Files ```console root@ceph:~$ touch file root@ceph:~$ getfattr -n ceph.file.layout file # file: file ceph.file.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=glacier_data" root@ceph:~$ setfattr -n ceph.file.layout.pool -v glacier_data_ec-62 file root@ceph:~$ getfattr -n ceph.file.layout file # file: file ceph.file.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=glacier_data_ec-62" ``` ### Directories ```console root@ceph:~$ mkdir directory root@ceph:~$ getfattr -n ceph.dir.layout directory directory: ceph.dir.layout: No such attribute root@ceph:~$ setfattr -n ceph.dir.layout.pool -v glacier_data_ec-62 directory root@ceph:~$ getfattr -n ceph.dir.layout directory # file: directory ceph.dir.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=glacier_data_ec-62" ``` ## Sources - [Ceph Blog](https://ceph.io/en/news/blog/2017/new-luminous-erasure-coding-rbd-cephfs/) - [Ceph Erasure Coding Documentation](https://docs.ceph.com/en/latest/rados/operations/erasure-code/) - [Ceph Filesystem Documentation](https://docs.ceph.com/en/latest/cephfs/createfs/) - [Ceph File Layout Documentation](https://docs.ceph.com/en/latest/cephfs/file-layouts/) - [SUSE Documentation](https://documentation.suse.com/de-de/ses/6/html/ses-all/cha-ceph-as-cephfs.html) - [Proxmox Documentation](https://pve.proxmox.com/wiki/Storage:_CephFS) - [storage-base.de](https://storage-base.de/knowledgebase/107/Erasure-Coding-Pool-erstellen.html) - [spinics.net](https://www.spinics.net/lists/ceph-users/msg44595.html)