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

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 ...  (get|set)-bytes [file]
ceph-objectstore-tool ...  set-(attr|omap)  [file]
ceph-objectstore-tool ...  (get|rm)-(attr|omap) 
ceph-objectstore-tool ...  get-omaphdr
ceph-objectstore-tool ...  set-omaphdr [file]
ceph-objectstore-tool ... <






你可能感兴趣的:(Ceph,删除pg,查看superblock,查看pg_log,查看pg_info)