Useful Commands
In this page lists some common command for ceph rgw.
#Listing Pool with additional information
ceph osd pool ls detail
#listing objects in a file for specific pool
rados -p DC1.rgw.log ls > obj.list
#removing objects based on above list in a pool
for i in $(cat obj.list); do echo $i&& rados -p DC1.rgw.log rm $i ;done
#####Pool Cleanup after tests######
#Deleting objects in all buckets
for i in $(aws s3api list-buckets --endpoint-url http://172.30.212.35:4000 | grep Name | grep -v cos | awk -F"\"" '{print $4}'); do aws s3 rm s3://$i --recursive --endpoint-url http://172.30.212.35:4000; done
#Deleting all buckets
for i in $(aws s3api list-buckets --endpoint-url http://172.30.212.35:4000 | grep Name | grep -v cos | awk -F"\"" '{print $4}'); do aws s3 rb s3://$i --endpoint-url http://172.30.212.35:4000; done
#####Pool Cleanup after tests######
#listing configurations on ceph
ceph config dump
#setting config for a module
ceph config set client rgw_obj_stripe_size 52428800
#getting config for a module
ceph config get client rgw_obj_stripe_size
#To change the ceph dashboard create a file which is the password
ceph dashboard ac-user-set-password admin -i <path_to_file>#To mute the Alarm:
ceph health mute ALARM_IDs3cmd mb s3://BUCKETNAME --bucket-location=:CUSTOM_PLACEMENT
#If we have cold-placement:
s3cmd mb s3://bucket --bucket-location=:cold-placementLast updated