Skip to content

mon/doc/qa: Enable EC pools for metadata in CephFS - #71817

Open
MattyWilliams22 wants to merge 3 commits into
ceph:mainfrom
MattyWilliams22:wip-ec-metadata-cephfs
Open

MattyWilliams22 wants to merge 3 commits into
ceph:mainfrom
MattyWilliams22:wip-ec-metadata-cephfs

Conversation

@MattyWilliams22

@MattyWilliams22 MattyWilliams22 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

https://tracker.ceph.com/issues/75062

Enable the use of EC for metadata and default data pools in CephFS.

Update the documentation to reflect this new functionality.

Test EC metadata and default data pools in Teuthology.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@MattyWilliams22 MattyWilliams22 self-assigned this Sep 16, 2026
@MattyWilliams22
MattyWilliams22 force-pushed the wip-ec-metadata-cephfs branch 2 times, most recently from 15bc04d to 2d8298d Compare September 16, 2026 14:23
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@MattyWilliams22 MattyWilliams22 changed the title cephfs/qa: Enable EC pools for metadata in CephFS cephfs: Enable EC pools for metadata in CephFS Oct 16, 2026
@MattyWilliams22 MattyWilliams22 changed the title cephfs: Enable EC pools for metadata in CephFS mon: Enable EC pools for metadata in CephFS Oct 16, 2026
@MattyWilliams22 MattyWilliams22 changed the title mon: Enable EC pools for metadata in CephFS mon/doc: Enable EC pools for metadata in CephFS Oct 16, 2026
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

@MattyWilliams22
MattyWilliams22 marked this pull request as ready for review October 20, 2026 12:58
@MattyWilliams22
MattyWilliams22 requested review from a team as code owners October 20, 2026 12:58

@bill-scales bill-scales left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the mixed pool check should probably be removed. Other checks are good.

Comment thread src/mon/FSCommands.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
@MattyWilliams22
MattyWilliams22 removed the request for review from a team November 4, 2026 09:25

@gregsfortytwo gregsfortytwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation still seems pretty conflicted about if EC is okay to use on metadata pools. I think we need to have enough information to be clearer about that.

Do we have any performance evaluations we can link to and refer to for this?

Comment thread doc/cephfs/createfs.rst Resolved
Comment thread doc/cephfs/createfs.rst
Comment on lines +31 to +33
Separately, another erasure-coded data pool can be added (see also :ref:`ecpool`)
that can be used on an entire hierarchy of directories and files
(see also :ref:`file-layouts`).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's not much point to this sentence if we're allowing people to use EC pools for data.

I don't remember how omap support ended up working on fast EC pools, though — do we actually want that kind of workload on those pools @aainscow ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the tech preview file being referenced here now, I believe this sentence is fine to keep?

Comment thread doc/cephfs/createfs.rst Resolved
Comment thread src/mon/FSCommands.cc
@@ -285,7 +285,20 @@ class FsNewHandler : public FileSystemCommandHandler
if (r < 0) {
return r;
}


if (metadata_pool->is_erasure() && !data_pool->is_erasure()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this check for an inverted EC pool seems really odd when we already reject an EC metadata pool in check_pools? We do invoke that as part of this pool create workflow, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_pools no longer rejects all EC pools for metadata.
Therefore, this check is necessary.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} else if (type == POOL_METADATA && !force) {
looks to me like it rejects them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the force flag is used, it doesn't reject them.
As this check depends on the yes-i-really-really-mean-it flag, it is necessary in conjunction with _check_pools.

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No testing?

Probably a knob should be turned in qa/suites/fs/workloads. Also admin commands added to qa/tasks/cephfs/test_admin.py.

Comment thread doc/cephfs/createfs.rst Resolved
Comment thread doc/cephfs/createfs.rst Resolved
Comment thread doc/cephfs/createfs.rst Outdated

ceph osd pool create cephfs_data_ec erasure ec_profile
ceph osd pool set cephfs_data_ec allow_ec_overwrites true
ceph osd pool set cephfs_data_ec allow_ec_optimizations true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any value in using different ec profiles for the two pool types? The load / operation patterns are very different.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not. Generally you choose m to decide how much redundancy you have (m=2 is equivalent to replca-3), for smaller clusters your choice of k will be limited by the number of nodes, for larger clusters you will restrict k to somewhere between 4 and 10 based what type of backfill performance you want.

@anthonyeleven anthonyeleven Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find that people often don't understand the tradeoffs of EC profiles, cf. my Ceph Days Seattle presentation from 2025. I would keep it simple and suggest that an EC CephFS metadata pool not use k>4, and assert that m must >= 2. Even if the code doesn't enforce the latter, there's value in keeping people from shooting themselves in the foot

Comment thread doc/cephfs/createfs.rst Outdated

.. code:: bash

ceph fs new fs_name cephfs_metadata_ec cephfs_data_replicated --force --yes-i-really-really-mean-it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change walks back years of guidance / experience. I am wondering if we should make this TP in Vampire and add switches to allow doing it at all (--yes-i-really-mean-it).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users are also going to ask: can we migrate the metadata pools? (No. Maybe if the file system is taken offline and we plumb in the new metadata pool id into the FSMap.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users are also going to ask: can we migrate the metadata pools? (No. Maybe if the file system is taken offline and we plumb in the new metadata pool id into the FSMap.)

Well actually that is what pool migration is for. You can't merge pools (so if you have a separate metadata and data pool you have to continue having two pools) but you can convert all your replica pools to EC pools (and versa versa) non-disruptively with no change/awareness needed at CephFS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change walks back years of guidance / experience. I am wondering if we should make this TP in Vampire and add switches to allow doing it at all (--yes-i-really-mean-it).

I think this is the key discussion point. Technically we believe that EC pools now have equivalent functionality Replica pools - supporting Class Ops and OMAPs, we've got extensive testing of this at the RADOS layer, and QA changes which demonstrate that CephFS works using just EC pools. From a data integrity and robustness perspective we believe this works.

But just because we know that something works, doesn't necessarily mean its always a good idea. The use of Erasure Coded Pools versus Replica Pools generally comes down to a trade off between Storage Efficiency (EC is better) versus Performance (Replica is better). There is also an argument that using just one type of Pool is simpler. What we are lacking is experience to know when its fine to use CephFS with just EC pools and when you shouldn't. We probably need to collect more performance data to help make these decisions, but will need help from the CephFS team to define what test cases to run.

The documentation as written at the moment is trying to say that you can use EC pools with CephFS, but is trying to discourage this as an everyday choice because we don't have enough data to say what performance trade off you are making.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the storage efficiency argument is weak for metadata pools because in a well-behaved Ceph cluster, the metadata pool is dwarfed by the data pool and other pools. The metadata pool is also where performance is most critical.

So for those reasons, I don't think this should be suggested at all. We can say "yes it's possible" and "yes we test it". However, there are compelling reasons to stay on replica for metadata pools.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users are also going to ask: can we migrate the metadata pools? (No. Maybe if the file system is taken offline and we plumb in the new metadata pool id into the FSMap.)

This to me would be really ugly: a k/v store on top of indirection to EC sharding. No, just ... no.

Comment thread src/mon/FSCommands.cc
ss << "pool '" << metadata_name << "' is an erasure-coded pool but"
" pool '" << data_name << "' is a replicated pool."
" Using an EC metadata pool with a replicated data pool is not a"
" recommended configuration."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... why? Other than being really weird I don't see why.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must agree with Patrick. While there might be some valid reason for someone somewhere sometime to use omap on EC, I also wonder why that might be. Is anyone clamoring for this? If metadata pools were a nontrivial consumer of raw capacity it'd be different.

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

No testing?

Probably a knob should be turned in qa/suites/fs/workloads. Also admin commands added to qa/tasks/cephfs/test_admin.py.

The tests are in this PR: #72786

@batrick

batrick commented Nov 5, 2026

Copy link
Copy Markdown
Member

72786

combine the PRs please.

From that PR:

fscrypt is not supported on EC pools (allocation is not preserved)

That's a pretty big caveat and virtually guarantees this cannot be allowed by default without big warning statements.

I'm fine with starting to test this for bug hunting but this is not ready for GA.

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

72786

combine the PRs please.

From that PR:

fscrypt is not supported on EC pools (allocation is not preserved)

That's a pretty big caveat and virtually guarantees this cannot be allowed by default without big warning statements.

I'm fine with starting to test this for bug hunting but this is not ready for GA.

That comment was written by me, and is false.
EC pools do support fscrypt.

I need to remove that comment from that PR, as it is a stale comment from a previous revision of the tests where I falsely believed that fscrypt wasn't supported by EC pools.

@gregsfortytwo

Copy link
Copy Markdown
Member

72786

combine the PRs please.
From that PR:

fscrypt is not supported on EC pools (allocation is not preserved)

That's a pretty big caveat and virtually guarantees this cannot be allowed by default without big warning statements.
I'm fine with starting to test this for bug hunting but this is not ready for GA.

That comment was written by me, and is false. EC pools do support fscrypt.

I need to remove that comment from that PR, as it is a stale comment from a previous revision of the tests where I falsely believed that fscrypt wasn't supported by EC pools.

When did this get fixed? I thought the allocation information was a straight-up BlueStore implementation detail that we got lucky with in replicated mode.

@gregsfortytwo

Copy link
Copy Markdown
Member

@MattyWilliams22 Given that we're uncertain how this will go, why don't we enable this for lab testing but not present it to users?

We can create a dev config value to accept EC pools in these places, default false but enable in teuthology, start running it in the nightlies, and see what happens. Plus do some CephFS performance testing. Save the user documentation until we have some confidence in it and an idea of what performance looks like.

@anthonyeleven

Copy link
Copy Markdown
Contributor

@MattyWilliams22 Given that we're uncertain how this will go, why don't we enable this for lab testing but not present it to users?

We can create a dev config value to accept EC pools in these places, default false but enable in teuthology, start running it in the nightlies, and see what happens. Plus do some CephFS performance testing. Save the user documentation until we have some confidence in it and an idea of what performance looks like.

I don't have much standing here, but I strongly agree. I must admit that this seems like a solution in search of a problem.

EC pools that support omap can be used as a CephFS metadata pool with the --force flag.
Adding a replicated data pool with an EC metadata pool requires the --yes-i-really-mean-it flag.

Fixes: http://tracker.ceph.com/issues/75062
Signed-off-by: Matty Williams <[email protected]>
Assisted-by: IBM-Bob-2.2.1:Claude/GPT
Previously, you could add an ec_profile section to a yaml file to specify the profile that should be used for the EC data pool.
This has been replaced with the pool_types section which allows you to specify the pool type, and EC profile settings of both the metadata and data pools.

The objectstore-ec directory has also been condensed into an objectstore directory which can be used in combination with the pool_types randomisation to provide the same coverage as before.

The 0-fscrypt/with-fscrypt-dummy.yaml is rejected with EC pools as fscrypt is currently unsupported for EC pools.

Fixes: https://tracker.ceph.com/issues/75062
Signed-off-by: Matty Williams <[email protected]>
Assisted-by: IBM-Bob-2.2.1:Claude/GPT
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

This force push:

  • Added tests to this PR in the third commit. These tests introduce 3 pool types (replicated, ec-data and ec-all) which are introduced at random for supported suites. Also, some unit tests were added which test the changes to the cephfs CLI.
  • Updated the documentation to have the ec-metadata-pools.rst file which explains that EC metadata and default data pools are tech preview features. Included links to this new page in relevant places.

@MattyWilliams22 MattyWilliams22 changed the title mon/doc: Enable EC pools for metadata in CephFS mon/doc/qa: Enable EC pools for metadata in CephFS Nov 12, 2026
Overwrites must be enabled on erasure-coded data pools.
:term:`BlueStore`. Overwrites must be enabled on erasure-coded data pools.
Using erasure-coded pools as metadata pools or default data pools is a tech
preview feature; see :ref:`cephfs-ec-metadata-pools`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about "default data pools", since I have dozens of volumes set up that way from at least Pacific.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An EC default data pool currently (on the main branch) requires --force. I have not changed that.

However, EC default data pools are not being effectively tested in Teuthology (only EC extra data pools are currently being tested). This PR will test EC default data pools with the pool-types/ec-data option. As this was not being tested before (outside of some unit tests), I believe it is also in the same boat as EC metadata pools.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we're talking about different things, since I haven't needed --force to create or to setfattr the volume root's layout.

@MattyWilliams22

MattyWilliams22 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

After meeting with @batrick @gregsfortytwo @bill-scales and @aainscow, we came to the following consensus about how these changes should be delivered:

  • Combine the code changes that were originally in this PR with the QA changes that were originally in PR 72786. This has been completed.
  • Create a new docs page explaining that these changes are a Tech Preview, explaining why a user would want to use EC metadata or default data pools, and giving examples of how this can be done. This page should be referenced in relevant places in the documentation. This has been completed.
  • Keep the --force requirement for creating a filesystem with an EC metadata pool or EC default data pool. This has been kept.
  • Deliver this code to the main branch, but hold off on backporting to umbrella until performance testing has been completed, and these features are no longer a Tech Preview.
  • Because Replicated metadata pools provide better performance and the storage efficiency of erasure coding is negligible for metadata, we agreed that Replicated pools should continue to be recommended over EC pools. I have included this in the documentation.
  • We discussed the possibility of using CephFS with a single pool, and how this could be a scenario where EC pools handling metadata could be valuable, as well as discussing the cons of such a configuration. This discussion is theoretical for now, and not addressed by this PR.

Having gone through the comments on this PR, I think the main topic we never came to a consensus on was whether creating a filesystem with an EC metadata pool and Replicated default data pool should require --yes-i-really-really-mean-it or not.

If there is anything you feel that I've left out, feel free to add your own comment.

@anthonyeleven

Copy link
Copy Markdown
Contributor

as Replicated pools will almost certainly provide better performance, as the impact of erasure coding is negligible for a metadata pool.

I’m not parsing this well, it seems like an incomplete edit.

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

as Replicated pools will almost certainly provide better performance, as the impact of erasure coding is negligible for a metadata pool.

I’m not parsing this well, it seems like an incomplete edit.

I've edited the bullet point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants