[Original] Solve the problem of minio startup reporting ERROR Unable to use the drive ** found backend type fs, expected xl or xl-single

foreword

Since minio reported a security vulnerability ( MinIO verify interface sensitive information disclosure vulnerability analysis (CVE-2023-28432)_minio vulnerability_super sour lemon blog-CSDN blog ), so the company needs to upgrade the minio version, but I found that using the latest version Minio can not start normally after the minio. Since it was a stand-alone deployment before, it was still a stand-alone deployment this time, but it failed to start. I found a circle of information on the Internet and said that it is an old version. I'm really convinced, since the old version is already useful, why don't I use the old version...

The currently used version of minio is:

RELEASE.2023-03-24T21-41-23Z (commit-id=74040b457b50417b58eae7cb17c63428a0e2dd44)

At present (March 30, 2023), the Linux version of minio downloaded from the official website cannot be started (it’s killing me) , the latest version of minio I downloaded from GitHub

https://github.com/minio/minio/

https://dl.min.io/server/minio/release/linux-amd64/minio

Environmental preparation

Get ready to download the completed minio and upload it to the server. I am using CentOS7.9 here, enter the user directory, create a minio folder, and throw all the required things into this folder

Then create a data directory for storing minio files

use:

chmod 755 minio

Give minio executable permission

use:

./minio --version > version.log

You can view the current version number of minio

Problem recurrence

Execute directly:

/home/dct/minio/minio server --console-address "0.0.0.0:9099"  --address "0.0.0.0:9098" /home/dct/minio/data > minio.log

It turned out that it started normally (the default username and password are both minioadmin)

 This is not the result I want! ! I clearly reported an error when I started it on the server, and the report was:

ERROR Unable to use the drive /home/dct/data/minio: Drive /home/dct/data/minio: found backend type fs, expected xl or xl-single - to migrate to a supported backend visit https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html: Invalid arguments specified

I am not reconciled to this, why the test server I just installed can start normally, but the official server fails to start! !

After several tests of the control variable method, I found that it was caused by the data path of the old version of minio! Inside are a bunch of files generated by the old version, and then lead to an error!

But the files are still needed, and we can't just use a new directory to perfunctory. It seems that this problem still needs to be solved.

problem solved

In fact, the answer is in the error message, please see: https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html

Create minio.service

According to the official solution, first create /etc/systemd/system/minio.service

vi /etc/systemd/system/minio.service

Copy the pile of information on the webpage directly into it

Pay attention to the results copied to the vi editor, don't miss anything

Modify these configuration items:

AssertFileIsExecutable is changed to the path of the minio you downloaded, for example, my side is /home/dct/minio/minio

WorkingDirectory is changed to the old data directory, for example, my side is /home/dct/minio/old-data/minio

User and Group are changed to the current user's information, for example, my side is dct

ExecStart is changed to minio's startup command, for example, here is

/home/dct/minio/minio server --console-address "0.0.0.0:9099" --address "0.0.0.0:9098" /home/dct/minio/old-data/minio

 Then :wq to save the file

Create /etc/default/minio

vi /etc/default/minio

Modify MINIO_ROOT_USER and MINIO_ROOT_PASSWORD to your own username and password

MINIO_VOLUMES is changed to the directory where you use the data, for example, my side is /home/dct

There is also a small episode here, the password of minio requires no less than 8 characters , but I don’t know, I wrote a 6-digit password to save trouble, and as a result, minio.service cannot be started anyway! ! It took me nearly 2 hours to compare the configuration file with the official server for a long time, and the result passed

journalctl -u minio.service

ERROR Unable to validate credentials inherited from the shell environment: Invalid credentials

Just found out it was a password problem

Then save it with :wq

Execute as root user

systemctl start minio.service

You can start minio

 

 

If the startup fails, you can check the error message through systemctl status minio.service and journalctl -u minio.service. You may need to add MINIO_VOLUMES to the environment variable and try again

Guess you like

Origin blog.csdn.net/DCTANT/article/details/129861486