Updating MinIO from 1.6.58
4 minute read.
Last Modified 2022-11-21 15:01 -0500MinIO fails to deploy if you update your version 2022-10-24_1.6.58 Minio app to 2022-10-29_1.6.59 or later using the TrueNAS web UI.
Your app logs display an error similar to the following:
ERROR Unable to use the drive /export: Drive /export: found backend type fs, expected xl or xl-single: Invalid arguments specified.
If you get this error after upgrading your MinIO app, use the app Roll Back function and return to 2022-10-24_1.6.58 to make your MinIO app functional again.
You will need WSL2 (Windows Subsystem for Linux) if you are using a Windows computer.
Follow the instructions here to make a new, up-to-date MinIO deployment in TrueNAS. Make sure it is version 2022-10-29_1.6.59 or later.
Download the MinIO Client here for your OS and follow the installation instructions. The MinIO Client (mc) lets you create and manage MinIO deployments via your system command prompt.
Open a terminal or CLI.
If you are on a Windows computer, open PowerShell and enter wsl
to switch to the Linux subsystem.
Change directories to the folder that contains mc.exe.
Add your old deployment to mc by entering: ./mc alias set old-deployment-name http://IPaddress:port/ rootuser rootpassword
.
Add your new deployment to mc using the same command with the new alias: ./mc alias set new-deployment-name http://IPaddress:port/ rootuser rootpassword
.
Export your old MinIO app configurations by entering ./mc.exe admin config export old-deployment-name > config.txt
.
MinIO Client exports the config file to the current directory path.
Import the old app config file into the new app by entering: ./mc.exe admin config import old-deployment-name < config.txt
.
Restart the new MinIO app to apply the configuration changes.
./mc.exe admin service restart new-minio-deployment
Export the old app bucket metadata by entering ./mc.exe admin cluster bucket export old-minio-deployment
.
Import the metadata into the new app with ./mc.exe admin cluster bucket import new-minio-deployment cluster-metadata.zip
Export the old app IAM settings by entering ./mc.exe admin cluster iam export old-minio-deployment
.
Import the IAM settings into the new app with ./mc.exe admin cluster iam import new-minio-deployment alias-iam-info.zip
.
Create buckets in your new MinIO app to move data and objects to.
Move the objects and data from your old MinIO app to your new one using ./mc.exe mirror --preserve --watch source/bucket target/bucket
.
Repeat for every bucket you intend to move.
After you have moved all data from the old app to the new one, return to the TrueNAS UI Apps screen and stop both Minio apps.
Delete the old MinIO app. Edit the new one and change the API and UI Access Node Ports to match the old MinIO app.
Restart the new app to finish migrating.