On Sun, Mar 30, 2025 at 7:21 PM Richard Bade <hitr...@gmail.com> wrote: > > Hi Everyone, > I've found through a bit of digging that if I use the reshard > stale-instances list I get entries of this form (bucket name is > "bstor08") > bstor08:2efbe9f5-7b36-4290-a370-52f57c6353c7.2708501101.618772 > I know that this particular bucket is junk left over from an automated > system as per above so I'd like to clean them up. > I can do a metadata get on this: > radosgw-admin metadata get > bucket.instance:bstor08:2efbe9f5-7b36-4290-a370-52f57c6353c7.2708501101.618772 > and therefore also a metadata rm: > radosgw-admin metadata rm > bucket.instance:bstor08:2efbe9f5-7b36-4290-a370-52f57c6353c7.2708501101.618772 > After doing this I re-run the stale-instances list and that instance > is gone from the list so that looks promising. > > Checking the code, it looks like the stale-instance delete/rm also > does an instance purge before the metadata remove, so above is > possibly half right: > > int ret = bucket->purge_instance(dpp, y); > if (ret == 0){ > auto md_key = "bucket.instance:" + > binfo.bucket.get_key(); > ret = driver->meta_remove(dpp, md_key, y); > } > > Is anyone able to tell me if there's a radosgw-admin command to do the > instance purge part? I couldn't see anything when I was digging around > but I've probably missed something obvious.
'radosgw-admin bi purge' is probably what you're looking for. it deletes the bucket's index shard objects, but needs that bucket instance metadata to know how many shards there are and where they live > > Thanks, > Rich > > On Mon, 17 Mar 2025 at 17:49, Richard Bade <hitr...@gmail.com> wrote: > > > > Hi Everyone, > > We've just completed undoing multisite to bring us back down to a > > single zone/site. Now I'm working through cleaning things up. Heads > > up, I'll probably have a few more questions over the next couple of > > weeks :) > > Firstly though, regarding "radosgw-admin reshard stale-instances > > list". This brings back a decent list mostly of some test buckets that > > were being deleted and recreated by an automated system. This has left > > over 150k stale instances for each of three buckets. I know these ones > > will be fine to delete as even if it messes up the bucket I can delete > > and re-create them. > > So my question is, how do I clean these up without using the big > > hammer "radosgw-admin reshard stale-instances delete" to remove all of > > them which would include some production buckets that I'm not quite > > sure how to verify are stale? > > Another thought that I had is maybe if I were to reshard all the > > buckets up to the next prime now that we're on single zone would that > > guarantee that all the stale instances are actually stale? > > Any thoughts and tips would be much appreciated. > > > > Thanks, > > Rich > _______________________________________________ > ceph-users mailing list -- ceph-users@ceph.io > To unsubscribe send an email to ceph-users-le...@ceph.io > _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-le...@ceph.io