当前位置:网站首页>Minio deployment

Minio deployment

2022-07-03 21:22:00 weixin_ forty-one million eighty-three thousand three hundred a

minio Deploy

1. install minio

# download minio
https://dl.min.io/server/minio/release/linux-amd64/
# Add executable rights 
chmod +x minio

# download prometheus monitor 
https://prometheus.io/download/
# decompression 
tar -zxvf prometheus-2.33.3.linux-amd64.tar.gz
# edit prometheus.yml file , Add monitoring as follows 
scrape_configs:
- job_name: minio-job
  metrics_path: /minio/v2/metrics/cluster
  scheme: http
  static_configs:
  - targets: ['localhost:9000']

# establish prometheus Startup file 
#!/bin/bash
nohup ./prometheus --config.file=prometheus.yml > prometheus.log &

2. minio Basic concepts

Object: Store in minio The basic object of , Such as file 、 picture 、 Byte stream, etc ;
Bucket: The logical space used to store objects . Every bucket The data is isolated from each other ( It can be understood as bucket= Folder );
Drive: The disk on which data is stored , stay minio When it starts , Pass in... As a parameter .minio All objects in are stored in drive in ;
Set: It's a group drive Set , Distributed deployment automatically divides one or more clusters according to the cluster size set, Every set Medium drive Distributed in different locations ;

  • An object is stored in a set in ;
  • A cluster is divided into multiple set;
  • One set Contains drive The quantity is fixed , By default, it is automatically calculated by the cluster according to the system size ;
  • One set Medium drive Distributed on different nodes as much as possible ;

3. Erasure code (Erasure Code)

Erasure code is a mathematical algorithm used to reconstruct lost or damaged data .MinIO Use Reed-Solomon The code fragment the object into variable data and parity blocks . for example , stay 12 Drive settings , An object can be partitioned into a variable number of data and parity blocks on all drives - From six data and six parity blocks to ten data and two parity blocks .
And RAID Or copy different , Erasure codes protect data from multiple drive failures . for example ,RAID6 Prevents both drives from failing , And in the MinIO Erase code , You may lose up to half of your drives , But the data is still safe . Besides ,MinIO The erasure code of is object level , You can fix one object at a time . about RAID, Repairs can only be made at the volume level , This will result in long downtime . because MinIO Encode each object individually , It can repair objects step by step . The deployed storage server does not need to replace or repair the drive in the whole life cycle of the server .MinIO The erasure code backend of is designed to improve operational efficiency , And make full use of hardware acceleration when available .

Development 、 Test environment server configuration

 Insert picture description here

Minimum configuration of production environment server

 Insert picture description here

4. Create a cluster startup command (minio-cluster.sh)

#!/bin/bash
export MINIO_ROOT_USER=minioadmin
export MINIO_ROOT_PASSWORD=admin123
# By default ,MinIO  The request sent to the indicator endpoint needs to be authenticated , Configure for public access 
export MINIO_PROMETHEUS_AUTH_TYPE="public"
# To configure prometheus Address 
export MINIO_PROMETHEUS_URL="http://host:port"
# To configure prometheus Of job_id, The default is minio-job
export MINIO_PROMETHEUS_JOB_ID="minio-job"
#host{1...n} hostname ,export{1...m} Indicates local mount drive route 
nohup ./minio server http://host{
    1...n}/export{
    1...m} --console-address ":9001" > minio.log &

5. common problem

# User name and password configuration length problem , To configure 8 Above position 
Unable to validate credentials inherited from the shell environment: Invalid credentials
原网站

版权声明
本文为[weixin_ forty-one million eighty-three thousand three hundred a]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202142326069874.html

随机推荐