45Drives Knowledge Base |
KB450188 - CephFS Removing Large omap Objects https://knowledgebase.45drives.com/kb/kb450188-cephfs-removing-large-omap-objects/ |
This article details the process of clearing the HEALTH_WARN on a ceph cluster due to a large omap object.
Configured Ceph Cluster running CephFS
ceph -s
#ceph health detail HEALTH_WARN 1 large omap objects LARGE_OMAP_OBJECTS 1 large omap objects 1 large objects found in pool 'cephfs_metadata' Search the cluster log for 'Large omap object found' for more details.
for i in `ceph pg ls-by-pool | tail -n +2 | head -n -2 | awk '{print $1}'`; do echo -n "$i: "; ceph pg $i query | grep num_large_omap_objects | head -1 | awk '{print $2}'; done | grep ": 1"
This command will provide you with the placement group number that is being affected by the large objects. For example: pg 2.26
# ceph pg map
The output from this command should be something similar to below
# ceph pg map 2.26 osdmap e8768 pg 2.26 (2.26) -> up acting
ceph osd deep-scrub osd.29 ceph osd deep-scrub osd.37 ceph osd deep-scrub osd.94
Once the scrub completes on the OSDs, the cluster should be in a healthy state again.
Run ceph -s or ceph health detail to confirm this:
ceph -s cluster: id: 170b5370-2d51-4348-b6ef-79e627967474 health: HEALTH_OK services: mon: 3 daemons, quorum ceph-osd1,ceph-osd2,ceph-osd3 (age 8h) mgr: ceph-osd1(active, since 8h), standbys: ceph-osd2, ceph-osd3 mds: cephfs:1 {0=ceph-fsgw1=up:active} 1 up:standby-replay osd: 105 osds: 105 up (since 8h), 105 in (since 24h) data: pools: 3 pools, 4224 pgs objects: 53.10M objects, 26 TiB usage: 82 TiB used, 1.2 PiB / 1.3 PiB avail pgs: 4221 active+clean 2 active+clean+scrubbing+deep 1 active+clean+scrubbing