Created
February 27, 2019 09:46
-
-
Save wido/9f136130352b2685c9709bc2d282fc6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Fetch the amount of shards a Ceph RADOS Gateway bucket has | |
# | |
# Author: Wido den Hollander <wido@denhollander.io> | |
# | |
BUCKET=$1 | |
ID=$(radosgw-admin bucket stats --bucket=${BUCKET}|jq -r '.id') | |
SHARDS=$(radosgw-admin metadata get bucket.instance:${BUCKET}:${ID}|jq '.data.bucket_info.num_shards') | |
echo $SHARDS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment