Fix Ceph BLUEFS_SPILLOVER: DB device too small
Ceph BLUEFS_SPILLOVER means the DB device is full and metadata spilled to the slow device. Extend the LV, then expand and migrate, or move the DB to a new LV.
BLUEFS_SPILLOVER<N> OSD(s) experiencing BlueFS spilloverosd.<id> spilled over <used> metadata from 'db' device (<db_used> used of <db_total>) to slow deviceBLUEFS_SPILLOVER means the block.db you put on a fast device is full, so metadata has spilled over onto the slow primary device. To fix it, give the DB more space and move the spilled data back: extend the LV and run bluefs-bdev-expand and bluefs-bdev-migrate, move the DB to a larger new LV, or redeploy the OSD. The three lines above are the health code, summary and detail text from the Tentacle source (PGMap.cc, BlueStore.cc), not captured output. The docs say this "is not necessarily an error condition or even unexpected behavior, but may result in degraded performance." A setting can silence the warning, but the spillover stays.
[1] Read the detail line to see which OSD spilled and by how much.
$ ceph health detailThis example line is printed in the ceph-volume docs (new-db section):
osd.76 spilled over 128 KiB metadata from 'db' device (56 GiB used of 60 GiB) to slow deviceThe value after spilled over is what went to the slow device, and the parentheses show DB usage and total DB size. Per the source, the alert only exists when the OSD has a separate DB and BlueFS is using the slow device, and it clears by itself once slow-device usage returns to 0.
[2] Check how much DB space the OSD has left. This is the query command registered in the v20.2.0 source; read free (bytes) in the entry whose device is BDEV_DB. The BLUEFS_AVAILABLE_SPACE section of the docs shows bluestore bluefs available, but that command is not in the v20.2.0 or v20.2.4 source. Run ceph daemon osd.123 help to see what your release supports. v20.2.0 BlueFS.cc
$ ceph daemon osd.123 bluestore bluefs device infoOn a cephadm deployment, first enter the daemon container with cephadm enter --name osd.123, as the cephadm docs describe, and run it there.
[3] Compare the DB size with the recommended range from the Sizing section of the BlueStore configuration reference.
| Workload | Recommended block.db size (of block) |
|---|---|
| General | 1% to 4% |
| RGW | At least 4% (heavy omap use) · e.g. block of 1TB needs at least 40GB |
| RBD | Usually no more than 1% to 2% |
The docs say DB logical volumes should be "as large as possible", and that in older releases RocksDB level sizes meant only boundaries of roughly 3GB, 30GB and 300GB were fully used (improved in Nautilus 14.2.12 and Octopus 15.2.6).
[4] If the LV behind the DB can grow, follow the "Reversing BlueFS Spillover to Slow Devices" procedure in the ceph-volume docs. The commands below are the documented ones for a cephadm deployment ($cid is the cluster fsid); a per-OSD noout is added before and after so nothing rebalances while the OSD is down (from the OSD maintenance docs).
$ ceph osd add-noout osd.123# lvextend -l ${size} ${lv}/${db} ${ssd_dev}# cephadm unit --fsid $cid --name osd.123 stop# cephadm shell --fsid $cid --name osd.123 -- ceph-bluestore-tool bluefs-bdev-expand --path /var/lib/ceph/osd/ceph-123# cephadm shell --fsid $cid --name osd.123 -- ceph-bluestore-tool bluefs-bdev-migrate --path /var/lib/ceph/osd/ceph-123 --devs-source /var/lib/ceph/osd/ceph-123/block --dev-target /var/lib/ceph/osd/ceph-123/block.db# cephadm unit --fsid $cid --name osd.123 start$ ceph osd tree$ ceph osd rm-noout osd.123$ ceph health detailbluefs-bdev-migrate moves the BlueFS data that spilled onto the slow device (block) straight back to the DB. Without it, the ceph-bluestore-tool manual says spilled files "will be moved to the fast device over time" as RocksDB compacts. The docs note that the procedure came from the users mailing list during Pacific 16.2.14. On a non-cephadm deployment, stop the OSD and run the same two ceph-bluestore-tool lines directly.
[5] If the LV cannot grow, you can move the DB to a larger new LV. The ceph-volume migrate docs show moving BlueFS data from the main and DB devices to a new LV, which then replaces the DB:
# ceph-volume lvm migrate --osd-id 123 --osd-fsid <uuid> --from data db --target vgname/new_dbThe migrate page does not say whether the OSD must be stopped first or how to call it under cephadm, and that could not be confirmed here; check your deployment's docs before running it. The last option is to redeploy the OSD with a larger DB, which the docs say "involves data migration and recovery".
[6] Silence the warning only when you know the DB is small and accept it. The default is true, and per the source the setting only decides whether the alert is raised to health; the spillover and its performance cost remain.
$ ceph config set osd.123 bluestore_warn_on_bluefs_spillover false$ ceph config rm osd.123 bluestore_warn_on_bluefs_spilloverThe first line is the per-OSD command from the docs; the second undoes it. Avoid the cluster-wide ceph config set osd … form, because it also hides OSDs that start spilling later.
For health codes in general see reading ceph health detail; for OSD capacity warnings see nearfull and full ratios.