Skip to content

Instantly share code, notes, and snippets.

@yuvalif
Last active December 27, 2021 13:28
Show Gist options
  • Select an option

  • Save yuvalif/060f66f03511bff881e952287df3087b to your computer and use it in GitHub Desktop.

Select an option

Save yuvalif/060f66f03511bff881e952287df3087b to your computer and use it in GitHub Desktop.

setup

setup 2 clusters:

MON=1 OSD=1 MDS=0 MGR=1 ../src/test/rgw/test-rgw-multisite.sh 2

using hsbench create a bucket on cluster 1:

hsbench -a 1234567890 -s pencil -u http://localhost:8001 -bp my-bucket -b 1 -r zg1 -m i

reshard after sync

upload objects:

hsbench -a 1234567890 -s pencil -u http://localhost:8001 -bp my-bucket -b 1 -r zg1 -m p -z 4K -d 10 -op obj1

check the bilog:

bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 0 | grep object | wc -l

reshard:

bin/radosgw-admin -c run/c1/ceph.conf bucket reshard --bucket my-bucket000000000000 --num-shards 13 --max-entries 10000

then upload objects again:

hsbench -a 1234567890 -s pencil -u http://localhost:8001 -bp my-bucket -b 1 -r zg1 -m p -z 4K -d 10 -op obj2

and check bilog for both generarions:

bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 0 | grep object | wc -l
bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 1 | grep object | wc -l

reshard mid sync

now upload the objects again:

hsbench -a 1234567890 -s pencil -u http://localhost:8001 -bp my-bucket -b 1 -r zg1 -m p -z 4K -d 10 -op obj3

and do a reshard in a separate window while objects are uploaded:

bin/radosgw-admin -c run/c1/ceph.conf bucket reshard --bucket my-bucket000000000000 --num-shards 17 --max-entries 10000

then check bilog for all generarions:

bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 0 | grep object | wc -l
bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 1 | grep object | wc -l 
bin/radosgw-admin -c run/c1/ceph.conf bilog list --bucket my-bucket000000000000 --gen 2 | grep object | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment