MinIO数据修复

一、安装minio客户端mc

1、下载二进制文件
wget https://dl.min.io/client/mc/release/linux-amd64/mc
2、赋予可执行权限
chmod +x mc

二、mc admin heal

1、查询admin heal命令说明
[root@minio-1 minio]# ./mc admin heal

NAME:

 mc admin heal - heal disks, buckets and objects on MinIO server

 

USAGE:

 mc admin heal [FLAGS] TARGET

 

FLAGS:

 --scan value         select the healing scan mode (normal/deep) (default: "normal")

 --recursive, -r        heal recursively

 --dry-run, -n         only inspect data, but do not mutate

 --force-start, -f       force start a new heal sequence

 --force-stop, -s       Force stop a running heal sequence

 --remove           remove dangling objects in heal sequence

 --config-dir value, -C value path to configuration folder (default: "/root/.mc")

 --quiet, -q          disable progress bar display

 --no-color          disable color theme

 --json            enable JSON 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.

 

EXAMPLES:

 \1. To format newly replaced disks in a MinIO server with alias 'myminio'

   $ mc admin heal myminio

 

 \2. Heal 'testbucket' in a MinIO server with alias 'myminio'

   $ mc admin heal myminio/testbucket/

 

 \3. Heal all objects under 'dir' prefix

   $ mc admin heal --recursive myminio/testbucket/dir/

 

 \4. Issue a dry-run heal operation to inspect objects health but not heal them

   $ mc admin heal --dry-run myminio

 

 \5. Issue a dry-run heal operation to inspect objects health under 'dir' prefix

   $ mc admin heal --recursive --dry-run myminio/testbucket/dir/

 

 \6. Force start a running heal sequence (meaning it will force kill the running heal sequence and start a new one)

   $ mc admin heal --force-start myminio/testbucket/dir/

  

 \7. Force stop a running heal sequence (meaning it will force kill the running heal sequence)

   $ mc admin heal --force-stop myminio/testbucket/dir/

  

 \8. Issue a dry-run heal operation to inspect objects health under 'dir' prefix

   $ mc admin heal --dry-run myminio/testbucket/dir/
1、config
set +o history

./mc config host add myminio http://10.0.0.1:9000 you_appkey you_secretkey

set -o history 
2、admin

递归修复test1存储桶和及其里面的对象

./mc admin heal -r myminio/test1

在这里插入图片描述

递归修复files存储桶和及其里面的对象

./mc admin heal -r myminio/files

在这里插入图片描述

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值