#Make bucket
s3cmd mb s3://BUCKET
#Remove bucket
s3cmd rb s3://BUCKET
#List objects or buckets
s3cmd ls[s3://BUCKET[/PREFIX]]#List all object in all buckets
s3cmd la
#Put file into bucket
s3cmd put FILE [FILE...] s3://BUCKET[/PREFIX]#Get file from bucket
s3cmd get s3://BUCKET/OBJECT LOCAL_FILE
#Delete file from bucket
s3cmd del s3://BUCKET/OBJECT
#Delete file from bucket (alias for del)
s3cmd rm s3://BUCKET/OBJECT
#Restore file from Glacier storage
s3cmd restore s3://BUCKET/OBJECT
2.ceph pool常用命令
#1、列出pool中的对象名
rados -p poolname ls#2、任意节点上查看集群pools:
ceph osd lspools
rados lspools
ceph osd dump |grep -i pool
#3、在任意node上删除池
ceph osd pool delete ${poolname}${poolname} --yes-i-really-really-mean-it
#注:这里防止误删,需要输入两次池名,必须使用参数--yes-i-really-really-mean-it#4、修改pool的pg_num,pgp_num
ceph osd pool set${poolname} pg_num ${pg_num}
ceph osd pool set${poolname} pgp_num ${pgp_num}#注:pg_num=pgp_num,当且仅当修改完pgp_num之后,pool中pg才会有remap,backfill等操作#5、查看pool中所有对象
rados -p ${poolname}ls
注:查看对象所在osd可用命令 : ceph osd map ${poolname}${objname}#6、重命名pool
ceph osd pool rename${poololdname}${newpoolname}#7、设置pool副本数
ceph osd pool set{poolname} size {num}#8、删除指定对象rm
rados -p test_rep_pool rm obj_name2 或者加--force-full时强制删除一个对象,不在乎对象此时状态
#9、查看对象的属性 listxattr
rados -p data listxattr obj_name
#10、获取对象指定属性getxattr
rados -p data getxattr obj_name attr
#11、设置对象属性值setxattr
rados -p data setxattr obj_name attr val
#12、删除对象指定属性rmxattr
rados -p data rmxattr obj_name attr