mc admin heal 命令用来扫描损坏的对象并修复这些对象。mc admin heal 是资源密集型的,即使在磁盘故障或损坏事件之后通常也不需要。
相反,MinIO会自动修复因bitrot损坏、磁盘故障或其他POST/GET问题而损坏的对象。MinIO 还执行周期性的后台对象修复。
语法如下:
C:\>mc admin heal -h NAME: mc admin heal - [DEPRECATED] heal disks, buckets and objects on MinIO server USAGE: mc admin heal [FLAGS] TARGET FLAGS: --scan value [DEPRECATED] select the healing scan mode (normal/deep) (default: "normal") --recursive, -r [DEPRECATED] heal recursively --dry-run, -n [DEPRECATED] only inspect data, but do not mutate --force-start, -f [DEPRECATED] force start a new heal sequence --force-stop, -s [DEPRECATED] force stop a running heal sequence --remove [DEPRECATED] remove dangling objects in heal sequence --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help SCAN MODES: normal (default): Heal objects which are missing on one or more disks. deep : Heal objects which are missing or with silent data corruption on one or more disks. DEPRECATED: MinIO server now supports auto-heal, this command will be removed in future.
命令应在存储桶或存储桶前缀的完整路径上执行对象修复,将已配置的 MinIO 部署的别名指定为路径的前缀。例如:
mc admin heal play/mybucket/myprefix
如果 TARGET 存储桶或存储桶前缀具有活动的修复扫描,则该命令将返回该扫描的状态。