Project

General

Profile

Actions

Bug #76256

closed
AK

bluefs: META space usage explodes on osds without sharding after upgrade to tentacle

Bug #76256: bluefs: META space usage explodes on osds without sharding after upgrade to tentacle

Added by Alex Kershaw 7 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Due date:
% Done:

0%

Source:
Community (user)
Backport:
umbrella, tentacle
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3208-gaaf2a1792c
Released In:
Upkeep Timestamp:
2026-10-29T01:10:35+00:00

Description

Initially raised this in Slack:
https://ceph-storage.slack.com/archives/C1HFU4JK1/p1773738921375699

After upgrading my cluster to Tentacle, I've seen a recurring issue where my OSD's META usage fills the OSD and causes the OSD to become unavailable for writes.

My cluster was originally deployed on 15.2.13 (Octopus). It is managed by Cephadm. I have a single block device for the OSD (no fast/slow split). It's a small test cluster with 3 OSDs on 3 hosts.

I've seen symptoms on this on 4 clusters of the same nature now so fairly convinced it's not a one-off.

[qs-admin@condor-sc0 ~]$ ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP     META     AVAIL    %USE   VAR   PGS  STATUS
 0    hdd  0.34180   1.00000  700 GiB  335 GiB  320 GiB  763 MiB   15 GiB  365 GiB  47.86  0.73  121      up
 1    hdd  0.34180   1.00000  650 GiB  335 GiB  320 GiB  774 MiB   14 GiB  315 GiB  51.47  0.79  121      up
 2    hdd  0.34180   1.00000  700 GiB  667 GiB  320 GiB  800 MiB  346 GiB   33 GiB  95.29  1.46  121      up
                       TOTAL  2.0 TiB  1.3 TiB  959 GiB  2.3 GiB  375 GiB  713 GiB  65.20
MIN/MAX VAR: 0.73/1.46  STDDEV: 21.56
[root@condor-sc2 ceph]#  ceph --admin-daemon ceph-osd.2.asok bluestore bluefs device info
{
    "dev": {
        "device": "BDEV_DB",
        "total": 751615082496,
        "free": 35334656000,
        "bluefs_used": 372968783872,      <-- 300GB+ space used
        "bluefs max available": 608763904
    }
}
[root@condor-sc2 ceph]# ceph --admin-daemon ceph-osd.2.asok bluefs files list | grep size | cut -d ":" -f2 | cut -d "," -f1 | awk '{sum += $1} END {print sum}'
8256072460 <-- 8GB total files on bluefs

It feels like a key bit of information to me that the rocksdb files on BlueFS are only 8GB in size while BlueFS itself is using 300GB+.

A temporary workaround to get out of the situation is to compact the OSD with "ceph tell osd.N compact", or with offline compaction.

I can't make any sense of which OSD it occurs on yet, but I've been playing whack-a-mole with the compact command and have seen this reproduce on every OSD on my cluster a few times now. It doesn't seem to just be one problematic OSD.

I had a chat with Igor on slack who pointed out that my OSDs don't have sharding applied.

[root@albans-sc0 ceph-0]# time ceph-bluestore-tool show-sharding --path /var/lib/ceph/osd/ceph-0
failed to retrieve sharding def

He suggested I apply sharding. I did so on 3 of my 4 clusters. I have not seen a repeat of the issue on those, so pretty convincing evidence that applying sharding makes this issue go away.

He also pointed me at https://tracker.ceph.com/issues/68385 which sounds similar (but this fix is in 20.2.0 is present in the version I am running).

ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-OSD_ID/ --sharding="m(3) p(3,0-12) O(3,0-13)=block_cache={type=binned_lru} L=min_write_buffer_number_to_merge=32 P=min_write_buffer_number_to_merge=32" reshard

That said, it's a nasty surprise for anyone upgrading without resharding.

I've attached a log from an OSD on the cluster without resharding, and on one with.


Files

bluefs-log-dump (1.22 MB) bluefs-log-dump Alex Kershaw, 04/24/2026 03:41 PM
bluefs-log-dump-resharded (1.26 MB) bluefs-log-dump-resharded Alex Kershaw, 04/24/2026 03:50 PM

Related issues 2 (0 open — 2 closed)

Copied to bluestore - Backport #80492: tentacle: bluefs: META space usage explodes on osds without sharding after upgrade to tentacleResolvedKefu Chai

Actions
Copied to bluestore - Backport #80493: umbrella: bluefs: META space usage explodes on osds without sharding after upgrade to tentacleResolvedKefu Chai

Actions

AK Updated by Alex Kershaw 7 months ago Actions #1

  • Subject changed from bluefs: META space usage expodes on osds without sharding after upgrade to tentacle to bluefs: META space usage explodes on osds without sharding after upgrade to tentacle

AK Updated by Alex Kershaw 7 months ago Actions #2

I should mention that at the point of taking the blue-fs log dump there isn't a large amount of META space usage on the OSD I took it on in either case. It may be useful for me to wait for a repro and then take another log dump.

VD Updated by Viliam D 3 months ago Actions #3

I submitted a fix to this issue: https://github.com/ceph/ceph/pull/71479

The problem is missing release of preallocated space, and it's a regression since tentacle.

IF Updated by Igor Fedotov 3 months ago Actions #4

  • Status changed from New to Fix Under Review
  • Pull request ID set to 71479

AK Updated by Adam Kupczyk 3 months ago Actions #5

  • Backport set to umbrella, tentacle

UB Updated by Upkeep Bot 3 months ago Actions #6

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to aaf2a1792c7a2a4921e2405b7a57db6b49034f20
  • Fixed In set to v21.3.0-3208-gaaf2a1792c
  • Upkeep Timestamp set to 2026-09-11T15:31:10+00:00

UB Updated by Upkeep Bot 3 months ago Actions #7

  • Copied to Backport #80492: tentacle: bluefs: META space usage explodes on osds without sharding after upgrade to tentacle added

UB Updated by Upkeep Bot 3 months ago Actions #8

  • Copied to Backport #80493: umbrella: bluefs: META space usage explodes on osds without sharding after upgrade to tentacle added

UB Updated by Upkeep Bot 3 months ago Actions #9

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-09-11T15:31:10+00:00 to 2026-09-12T00:43:02+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #10

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-09-12T00:43:02+00:00 to 2026-10-29T01:10:35+00:00
Actions

Also available in: PDF Atom