Ozone Repair
Ozone Repair (ozone repair) 是用于修复 Ozone 的高级工具。运行该工具前,必须先停止要修复的节点。
注意
所有修复命令都支持 --dry-run 选项,用户可以通过该选项查看命令将执行哪些修复操作,而不会对集群进行任何实际更改。
在出现误报的情况下,可以使用 --force 标志跳过运行中的服务检查。
Usage: ozone repair [-hV] [--verbose] [-conf=<configurationPath>]
[-D=<String=String>]... [COMMAND]
Advanced tool to repair Ozone. The nodes being repaired must be stopped before
the tool is run.
-conf=<configurationPath>
-D, --set=<String=String>
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
--verbose More verbose output. Show the stack trace of the errors.
Commands:
datanode Tools to repair Datanode
ldb Operational tool to repair ldb.
om Operational tool to repair OM.
scm Operational tool to repair SCM.如需更详细的用法,请查看各子命令 --help 的输出。
ozone repair Datanode
用于修复 Datanode 的运维工具。
upgrade-container-schema
在离线模式下,将 Datanode 上所有 schema V2 容器升级为 schema V3。可通过 --volume 选项指定需要升级的卷。
ozone repair ldb
用于修复 ldb 的运维工具。
compact
在服务离线时压缩 DB 中的列族,以清理墓碑记录。
Usage: ozone repair ldb compact [-hV] [--dry-run] [--force] [--verbose]
--cf=<columnFamilyName> --db=<dbPath>
CLI to compact a column-family in the DB while the service is offline.
Note: If om.db is compacted with this tool then it will negatively impact the
Ozone Manager's efficient snapshot diff.
--cf, --column-family, --column_family=<columnFamilyName>
Column family name
--db=<dbPath> Database File Pathozone repair OM
用于修复 OM 的运维工具。
OM 下的子命令
- FSO-tree
- snapshot
- update-transaction
- quota
- compact
- skip-ratis-transaction
FSO-tree
识别并修复断开的 FSO 树,方法是将未被引用的条目标记为待删除。该工具会报告可访问的、不可访问的(待删除)以及未被引用的(孤立的)目录和文件。运行此工具时应先停止 OM。
Usage: ozone repair om fso-tree [-hV] [--dry-run] [--force] [--verbose]
[-b=<bucketFilter>] --db=<omDBPath>
[-v=<volumeFilter>]
Identify and repair a disconnected FSO tree by marking unreferenced entries for
deletion. OM should be stopped while this tool is run.
-b, --bucket=<bucketFilter>
Filter by bucket name
--db=<omDBPath> Path to OM RocksDB
-v, --volume=<volumeFilter>
Filter by volume name. Add '/' before the volume name.snapshot
用于所有与快照相关的修复操作的子命令。
chain
当快照链损坏时,更新某个快照的全局前序快照(global previous snapshot)和路径前序快照(path previous snapshot)。
Usage: ozone repair om snapshot chain [-hV] [--dry-run] [--force] [--verbose]
--db=<dbPath>
--gp=<globalPreviousSnapshotId>
--pp=<pathPreviousSnapshotId> <value>
<snapshotName>
CLI to update global and path previous snapshot for a snapshot in case snapshot
chain is corrupted.
<value> URI of the bucket (format: volume/bucket).
<snapshotName> Snapshot name to update
--db=<dbPath> Database File Path
--gp, --global-previous=<globalPreviousSnapshotId>
Global previous snapshotId to set for the given snapshot
--pp, --path-previous=<pathPreviousSnapshotId>
Path previous snapshotId to set for the given snapshotupdate-transaction
要避免修改 Ratis 日志而只更新最新已应用的事务,可使用 update-transaction 命令。
此命令会更新 OM 事务信息表中的最高事务索引。
Usage: ozone repair om update-transaction [-hV] [--dry-run] [--force]
[--verbose] --db=<dbPath> --index=<highestTransactionIndex>
--term=<highestTransactionTerm>
CLI to update the highest index in transaction info table.
--db=<dbPath> Database File Path
--index=<highestTransactionIndex>
Highest index to set. The input should be non-zero long
integer.
--term=<highestTransactionTerm>
Highest term to set. The input should be non-zero long
integer.quota
用于修复 OM DB 中配额的运维工具。
start
要触发配额修复,请使用 start 命令。
Usage: ozone repair om quota start [-hV] [--dry-run] [--force] [--verbose]
[--buckets=<buckets>]
[--service-host=<omHost>]
[--service-id=<omServiceId>]
CLI to trigger quota repair.
--buckets=<buckets> start quota repair for specific buckets. Input will
be list of uri separated by comma as
/<volume>/<bucket>[,...]
--service-host=<omHost>
Ozone Manager Host. If OM HA is enabled, use
--service-id instead. If you must use
--service-host with OM HA, this must point
directly to the leader OM. This option is
required when --service-id is not provided or
when HA is not enabled.
--service-id, --om-service-id=<omServiceId>
Ozone Manager Service IDstatus
获取最近一次触发的配额修复的状态。
Usage: ozone repair om quota status [-hV] [--verbose]
[--service-host=<omHost>]
[--service-id=<omServiceId>]
CLI to get the status of last trigger quota repair if available.
--service-host=<omHost>
Ozone Manager Host. If OM HA is enabled, use --service-id
instead. If you must use --service-host with OM HA, this
must point directly to the leader OM. This option is
required when --service-id is not provided or when HA is
not enabled.
--service-id, --om-service-id=<omServiceId>
Ozone Manager Service IDcompact
对 OM 数据库中的某个列族执行压实(compact)操作,以清理墓碑(tombstone)记录。该压实操作以异步方式执行,需要管理员权限。
Usage: ozone repair om compact [-hV] [--dry-run] [--force] [--verbose]
--cf=<columnFamilyName> [--node-id=<nodeId>]
[--service-id=<omServiceId>]
CLI to compact a column family in the om.db. The compaction happens
asynchronously. Requires admin privileges.
--cf, --column-family, --column_family=<columnFamilyName>
Column family name
--node-id=<nodeId> NodeID of the OM for which db needs to be compacted.
--service-id, --om-service-id=<omServiceId>
Ozone Manager Service IDskip-ratis-transaction, srt
通过将指定的索引替换为虚拟的 EchoOM 命令,来跳过 Ratis 段文件中的某条 raft 日志。这是一个离线工具,仅当全部 3 个 OM 在同一事务上崩溃时才应使用。如果问题只出现在某一个 OM 上,请手动从一个健康的 OM 复制其数据库。
Usage: ozone repair om skip-ratis-transaction [-hV] [--dry-run] [--force]
[--verbose] -b=<backupDir> --index=<index> (-s=<segmentFile> |
-d=<logDir>)
CLI to omit a raft log in a ratis segment file. The raft log at the index
specified is replaced with an EchoOM command (which is a dummy command). It is
an offline command i.e., doesn't require OM to be running. The command should
be run for the same transaction on all 3 OMs only when all the OMs are crashing
while applying the same transaction. If only one OM is crashing and the other
OMs have executed the log successfully, then the DB should be manually copied
from one of the good OMs to the crashing OM instead.
-b, --backup=<backupDir> Directory to put the backup of the original
repaired segment file before the repair.
-d, --ratis-log-dir=<logDir>
Path of the ratis log directory
--index=<index> Index of the failing transaction that should be
removed
-s, --segment-path=<segmentFile>
Path of the input segment fileozone repair SCM
用于修复 SCM 的运维工具。
SCM 下的子命令
- cert
- update-transaction
cert
用于在 SCM 上执行所有证书相关修复操作的子命令。
recover
从 RocksDB 中恢复已删除的 SCM 证书。
Usage: ozone repair scm cert recover [-hV] [--dry-run] [--force] [--verbose]
--db=<dbPath>
Recover Deleted SCM Certificate from RocksDB
--db=<dbPath> SCM DB Pathupdate-transaction
如需避免修改 Ratis 日志,而只更新最近一次已应用的事务,请使用 update-transaction 命令。该命令会更新 SCM 事务信息表中的最大事务索引。
Usage: ozone repair scm update-transaction [-hV] [--dry-run] [--force]
[--verbose] --db=<dbPath> --index=<highestTransactionIndex>
--term=<highestTransactionTerm>
CLI to update the highest index in transaction info table.
--db=<dbPath> Database File Path
--index=<highestTransactionIndex>
Highest index to set. The input should be non-zero long
integer.
--term=<highestTransactionTerm>
Highest term to set. The input should be non-zero long
integer.评论
登录后参与评论
KnowForge