Skip to content

Instantly share code, notes, and snippets.

@cbodley
Created March 1, 2023 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbodley/a5e2d4740977ecea9abb51d33d7cbbe9 to your computer and use it in GitHub Desktop.
Save cbodley/a5e2d4740977ecea9abb51d33d7cbbe9 to your computer and use it in GitHub Desktop.
1. identify bucket instance id for bucket named "testbucket"
~/ceph/build $ bin/radosgw-admin metadata get bucket:testbucket | grep bucket_id
"bucket_id": "4b022f22-54ca-49e5-b547-9e8225d98de1.4159.1",
2. read bucket instance metadata into testbucket.orig.json
~/ceph/build $ bin/radosgw-admin metadata get bucket.instance:testbucket:4b022f22-54ca-49e5-b547-9e8225d98de1.4159.1 > testbucket.orig.json
3. replace "num_shards": 0 with 1
~/ceph/build $ sed 's/"num_shards": 0/"num_shards": 1/' testbucket.orig.json > testbucket.new.json
4. write updated bucket instance metadata from testbucket.new.json
~/ceph/build $ bin/radosgw-admin metadata put bucket.instance:testbucket:4b022f22-54ca-49e5-b547-9e8225d98de1.4159.1 < testbucket.new.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment