MinIO数据修复

分布式对象存储 专栏收录该内容
2 篇文章 0 订阅

一、安装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

在这里插入图片描述

  • 1
    点赞
  • 0
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值