rados命令

chen@admin-node:/etc/ceph$ rados --help
usage: rados [options] [commands]
POOL COMMANDS
   lspools                          list pools
   mkpool <pool-name> [123[ 4]]     create pool <pool-name>'
                                    [with auid 123[and using crush rule 4]]
   cppool <pool-name> <dest-pool>   copy content of a pool
   rmpool <pool-name> [<pool-name> --yes-i-really-really-mean-it]
                                    remove pool <pool-name>'
   df                               show per-pool and total usage
   ls                               list objects in pool

   chown 123                        change the pool owner to auid 123

POOL SNAP COMMANDS
   lssnap                           list snaps
   mksnap <snap-name>               create snap <snap-name>
   rmsnap <snap-name>               remove snap <snap-name>

OBJECT COMMANDS
   get <obj-name> [outfile]         fetch object
   put <obj-name> [infile]          write object
   truncate <obj-name> length       truncate object
   create <obj-name>                create object
   rm <obj-name> ...                remove object(s)
   cp <obj-name> [target-obj]       copy object
   clonedata <src-obj> <dst-obj>    clone object data
   listxattr <obj-name>
   getxattr <obj-name> attr
   setxattr <obj-name> attr val
   rmxattr <obj-name> attr
   stat objname                     stat the named object
   mapext <obj-name>
   rollback <obj-name> <snap-name>  roll back object to snap <snap-name>

   listsnaps <obj-name>             list the snapshots of this object
   bench <seconds> write|seq|rand [-t concurrent_operations] [--no-cleanup] [--run-name run_name]
                                    default is 16 concurrent IOs and 4 MB ops
                                    default is to clean up after write benchmark
                                    default run-name is 'benchmark_last_metadata'
   cleanup [--run-name run_name] [--prefix prefix]
                                    clean up a previous benchmark operation
                                    default run-name is 'benchmark_last_metadata'
   load-gen [options]               generate load on the cluster
   listomapkeys <obj-name>          list the keys in the object map
   listomapvals <obj-name>          list the keys and vals in the object map 
   getomapval <obj-name> <key> [file] show the value for the specified key
                                    in the object's object map
   setomapval <obj-name> <key> <val>
   rmomapkey <obj-name> <key>
   getomapheader <obj-name> [file]
   setomapheader <obj-name> <val>
   tmap-to-omap <obj-name>          convert tmap keys/values to omap
   watch <obj-name>                 add watcher on this object
   notify <obj-name> <message>      notify wather of this object with message
   listwatchers <obj-name>          list the watchers of this object
   set-alloc-hint <obj-name> <expected-object-size> <expected-write-size>
                                    set allocation hint for an object

IMPORT AND EXPORT
   import [options] <local-directory> <rados-pool>
       Upload <local-directory> to <rados-pool>
   export [options] <rados-pool> <local-directory>
       Download <rados-pool> to <local-directory>
   options:
       -f / --force                 Copy everything, even if it hasn't changed.
       -d / --delete-after          After synchronizing, delete unreferenced
                                    files or objects from the target bucket
                                    or directory.
       --workers                    Number of worker threads to spawn 
                                    (default 5)

ADVISORY LOCKS
   lock list <obj-name>
       List all advisory locks on an object
   lock get <obj-name> <lock-name>
       Try to acquire a lock
   lock break <obj-name> <lock-name> <locker-name>
       Try to break a lock acquired by another client
   lock info <obj-name> <lock-name>
       Show lock information
   options:
       --lock-tag                   Lock tag, all locks operation should use
                                    the same tag
       --lock-cookie                Locker cookie
       --lock-description           Description of lock
       --lock-duration              Lock duration (in seconds)
       --lock-type                  Lock type (shared, exclusive)

CACHE POOLS: (for testing/development only)
   cache-flush <obj-name>           flush cache pool object (blocking)
   cache-try-flush <obj-name>       flush cache pool object (non-blocking)
   cache-evict <obj-name>           evict cache pool object
   cache-flush-evict-all            flush+evict all objects
   cache-try-flush-evict-all        try-flush+evict all objects

GLOBAL OPTIONS:
   --object_locator object_locator
        set object_locator for operation
   -p pool
   --pool=pool
        select given pool by name
   --target-pool=pool
        select target pool by name
   -b op_size
        set the size of write ops for put or benchmarking
   -s name
   --snap name
        select given snap name for (read) IO
   -i infile
   --create
        create the pool or directory that was specified
   -N namespace
   --namespace=namespace
        specify the namespace to use for the object
   --all
        Use with ls to list objects in all namespaces
        Put in CEPH_ARGS environment variable to make this the default
   --default
        Use with ls to list objects in default namespace
        Takes precedence over --all in case --all is in environment
   --target-locator
        Use with cp to specify the locator of the new object
   --target-nspace
        Use with cp to specify the namespace of the new object

BENCH OPTIONS:
   -t N
   --concurrent-ios=N
        Set number of concurrent I/O operations
   --show-time
        prefix output with date/time

LOAD GEN OPTIONS:
   --num-objects                    total number of objects
   --min-object-size                min object size
   --max-object-size                max object size
   --min-ops                        min number of operations
   --max-ops                        max number of operations
   --max-backlog                    max backlog (in MB)
   --percent                        percent of operations that are read
   --target-throughput              target throughput (in MB)
   --run-length                     total time (in seconds)

 

转载于:https://www.cnblogs.com/IvanChen/p/4939319.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值