先将某个osd down掉,将对应的硬盘挂载到/tmp/data/sdb1。
Must provide --data-pathAllowed options: --help produce help message --type arg Arg is one of [filestore (default), memstore, keyvaluestore] --data-path arg path to object store, mandatory --journal-path arg path to journal, mandatory for filestore type --pgid arg PG id, mandatory except for import, list-lost, fix-lost, list-pgs, set-allow-sharded-objects --op arg Arg is one of [info, log, remove, export, import, list, list-lost, fix-lost, list-pgs, rm-past-inte rvals, set-allow-sharded-objects] --file arg path of file to export or import --format arg (=json-pretty) Output format which may be json, json-pretty, xml, xml-pretty --debug Enable diagnostic output to stderr --skip-journal-replay Disable journal replay --skip-mount-omap Disable mounting of omapPositional syntax:ceph-objectstore-tool ...
列出对象: ceph-objectstore-tool --op list --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal
列出pg: ceph-objectstore-tool --op list-pgs --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal
导出pg: ceph-objectstore-tool --op export --pgid 1.1 --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal --file /tmp/export/sdb1/1.1
导入pg: ceph-objectstore-tool --op import --data-path /var/lib/ceph/osd/ceph-4 --journal-path /var/lib/ceph/osd/ceph-4/journal --file /tmp/export/sdb1/1.1
列出某个pg的信息: [root@inspur306 sdb1]# ceph-objectstore-tool --op info --pgid 1.1 --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal
列出某个对象的信息: ceph-objectstore-tool --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal "["1.33",{"oid":"10000000003.0000000b","key":"","snapid":-2,"hash": 3095299315,"max":0,"pool":1,"namespace":""}]" list-atttrs
将一个对象导出为文件: ceph-objectstore-tool --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal "["1.33",{"oid":"10000000003.0000000b","key":"","snapid":-2,"hash": 3095299315,"max":0,"pool":1,"namespace":""}]" get-bytes /tmp/file
删除一个对象: ceph-objectstore-tool --data-path /tmp/data/sdb1 --journal-path /tmp/data/sdb1/journal "["1.33",{"oid":"10000000003.0000000b","key":"","snapid":-2,"hash": 3095299315,"max":0,"pool":1,"namespace":""}]" remove