Upgrade from v1 to v2
No Custom External Object Storage Usage
For file v1 environments that have not customized external object storage usage, first check the .minio.sys/format.json
file in the file v1 data directory. If the format
field contains xl
or xl-single
, you can upgrade using the smooth update method; otherwise, you need to perform a version upgrade through migration.
Smooth Update
-
First, stop the file v1 service.
-
Rename the /data/file directory to /data/minio (modify the actual path accordingly).
-
Refer to the MinIO deployment documentation to deploy the MinIO service.
- Essentially: Deploy the new MinIO service; the MinIO service reuses data from file v1.
-
Deploy the file v2 service using MinIO object storage.
Migration Update
-
Refer to the MinIO deployment documentation to deploy the MinIO service.
-
Enter the MinIO container (if in a cluster, enter any container).
-
Configure the connection information between the old file service and the new MinIO service.
mc alias set minio_old http://10.206.0.6:9001 storage RjfxxxxxxxxxihTkE
mc alias set minio_new http://10.206.0.6:9011 mingdao T7RxxxxxxxxxxdRky -
Create four buckets in MinIO.
mc mb minio_new/mdmedia
mc mb minio_new/mdoc
mc mb minio_new/mdpic
mc mb minio_new/mdpub -
Synchronize data from the file service to MinIO.
mc mirror minio_old/mdmedia minio_new/mdmedia
mc mirror minio_old/mdoc minio_new/mdoc
mc mirror minio_old/mdpic minio_new/mdpic
mc mirror minio_old/mdpub minio_new/mdpub-
If you encounter errors that prevent migration, you can add the
--watch
parameter to ignore errors and continue migration, for example:mc mirror --watch minio_old/mdmedia minio_new/mdmedia
. -
Generally, the
watch
parameter is not needed unless some files cannot be exported. Please record and contact technical support if you encounter export issues.
-
-
After migration, deploy the file v2 service using MinIO object storage.
Custom External Object Storage Usage
For file v1 environments that have already customized external object storage usage, upgrading to file v2 is much simpler. The general steps are as follows:
-
Download the file v2 version image.
-
Modify the source file.yaml file to specify the image version number as v2.
-
Modify the source file.yaml file to change the variable names
MINIO_ACCESS_KEY
andMINIO_SECRET_KEY
toENV_ACCESS_KEY_FILE
andENV_SECRET_KEY_FILE
, respectively, without changing the variable values.-
MINIO_ACCESS_KEY
-->ENV_ACCESS_KEY_FILE
-
MINIO_SECRET_KEY
-->ENV_SECRET_KEY_FILE
-
-
Restart the file service.