Ceph - Are Ceph OSD filestore partitions susceptible to fragmentation?

Solution In Progress - Updated -

Resolution

  • Ceph is a user-space application which accepts object reads/writes from the clients and performs those reads/writes as files onto the XFS formatted partition.
  • As such, the amount of data-churn and fragmentation depends entirely on the use patterns of the your users / application.
  • Ceph does perform directory splitting & merging, but only at certain thresholds ( this is configurable ) to prevent excessively high file count in a given directory.
  • Ceph, being user-space, does not do anything in attempt to minimize or correct any fragmentation on the underlying XFS partition.

If in your monitoring, you find that an OSD data partition is fragmented to a point that ENOSPC is likely, then yes, defragment the data partition. The threshold and timing of these events / checks is purely up to your comfort level. Red Hat does not have any specific opinion or guidance on this matter.

include a segment that on rare occasions with specific client use patterns, ENOSPC can be returned upon write attempts long before all actual raw space is consumed on a filestore partition. There are many situations which can lead to this, please see (Other KCS article on ENOSPC)
https://access.redhat.com/solutions/3572011

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.