Ceph常用命令汇总

对象用户和桶

$ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
$ radosgw-admin user rm --uid=johnny
$ radosgw-admin user rename --uid=johny --new-uid=joe
$ radosgw-admin user rm --uid=johnny --purge-data

$ radosgw-admin bucket rm --bucket=foo
$ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
$ radosgw-admin bucket unlink --bucket=foo --uid=johnny
$ radosgw-admin bucket link --bucket=foo --bucket-new-name=bar --uid=johnny
$ radosgw-admin bucket link --bucket=/foo --uid='12345678$12345678'
$ radosgw-admin bucket chown --bucket=/foo --uid='12345678$12345678'
$ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
$ radosgw-admin usage show --uid=johnny --start-date=2012-03-01 --end-date=2012-04-01
$ radosgw-admin usage show --show-log-entries=false
$ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01

dashboard

$ radosgw-admin user create --uid=<user_id> --display-name=<display_name> --system
$ radosgw-admin user info --uid=<user_id>
$ ceph dashboard set-rgw-api-access-key -i <file-containing-access-key>
$ ceph dashboard set-rgw-api-secret-key -i <file-containing-secret-key>
$ ceph dashboard set-rgw-api-host <host>
$ ceph dashboard set-rgw-api-port <port>
$ ceph dashboard set-rgw-api-scheme <scheme>  # http or https
$ ceph dashboard set-rgw-api-admin-resource <admin_resource>
$ ceph dashboard set-rgw-api-user-id <user_id>
$ ceph dashboard set-rgw-api-ssl-verify False
$ ceph dashboard set-rest-requests-timeout <seconds>

ceph-deploy

$ ceph-deploy config push {host-name [host-name]...}
$ ceph-deploy config pull {host-name [host-name]...}
$ ceph-deploy mds create {ceph-node}
$ ceph-deploy mon add {ceph-nodes}
$ ceph quorum_status --format json-pretty
$ ceph-deploy mgr create node2 node3
$ ceph-deploy rgw create {gateway-node}

rclone

--config string                                  Config file (default "/root/.config/rclone/rclone.conf")

--s3-force-path-style                            If true use path style access if false use virtual hosted style (default true)
--s3-list-chunk int                              Size of listing chunk (response list for each ListObject S3 request) (default 1000)
--s3-location-constraint string                  Location constraint - must be set to match the Region
--s3-max-upload-parts int                        Maximum number of parts in a multipart upload (default 10000)
--s3-memory-pool-flush-time Duration             How often internal memory buffer pools will be flushed (default 1m0s)
--s3-storage-class string                        The storage class to use when storing new objects in S3
--s3-upload-concurrency int                      Concurrency for multipart uploads (default 4)
--s3-upload-cutoff SizeSuffix                    Cutoff for switching to chunked upload (default 200Mi)
--s3-v2-auth                                     If true use v2 authentication

s3cmd

$ s3cmd mb --region=":temporary" s3://buck2

 

posted @ 2023-08-07 14:01  Varden  阅读(260)  评论(0编辑  收藏  举报