Ceph高级工具介绍之ceph-objectstore-tool的使用

本文介绍了Ceph高级工具ceph-objectstore-tool的使用,包括列出OSD上的PG、查看PG信息、PG日志、删除PG、导出/导入PG等操作。警告:此工具操作可能导致数据丢失,需谨慎使用。
摘要由CSDN通过智能技术生成

0 简介

ceph-objectstore-tool工具是Ceph提供的一个low level(可以操作object和pg)的工具,可以用来查看、修改、删除ObjectStore上的object、pg以及dump OSD journal中的数据,请谨慎使用这个工具,它有可能会造成数据的永久丢失,可能这也是很少有文章介绍它的一个原因吧。

1 使用

ceph-objectstore-tool目前没有manpage,它的help文档写的也不是很友好。

[root@ceph03 ~]# ceph-objectstore-tool -h
Must provide --data-path

Allowed options:
  --help                      produce help message
  --type arg                  Arg is one of [filestore (default), memstore]
  --data-path arg             path to object store, mandatory
  --journal-path arg          path to journal, mandatory for filestore type
  --pgid arg                  PG id, mandatory for info, log, remove, export,
                              rm-past-intervals, mark-complete
  --op arg                    Arg is one of [info, log, remove, mkfs, fsck,
                              fuse, export, import, list, fix-lost, list-pgs,
                              rm-past-intervals, dump-journal, dump-super,
                              meta-list, get-osdmap, set-osdmap,
                              get-inc-osdmap, set-inc-osdmap, mark-complete]
  --epoch arg                 epoch# for get-osdmap and get-inc-osdmap, the
                              current epoch in use if not specified
  --file arg                  path of file to export, import, get-osdmap,
                              set-osdmap, get-inc-osdmap or set-inc-osdmap
  --mountpoint arg            fuse mountpoint
  --format arg (=json-pretty) Output format which may be json, json-pretty,
                              xml, xml-pretty
  --debug                     Enable diagnostic output to stderr
  --force                     Ignore some types of errors and proceed with
                              operation - USE WITH CAUTION: CORRUPTION POSSIBLE
                              NOW OR IN THE FUTURE
  --skip-journal-replay       Disable journal replay
  --skip-mount-omap           Disable mounting of omap
  --head                      Find head/snapdir when searching for objects by
                              name
  --dry-run                   Don't modify the objectstore

Positional syntax:
ceph-objectstore-tool ... <object> (get|set)-bytes [file]
ceph-objectstore-tool ... <object> set-(attr|omap) <key> [file]
ceph-objectstore-tool ... <object> (get|rm)-(attr|omap) <key>
ceph-objectstore-tool ... <object> get-omaphdr
ceph-objectstore-tool ... <object> set-omaphdr [file]
ceph-objectstore-tool ... <
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值