1
0
mirror of https://github.com/minio/docs.git synced 2025-04-25 17:22:39 +03:00
docs/source/administration/object-management/transition-objects-to-minio.rst
Daryl White 96224468c4
Add concept pages for Scanner and Healing (#1192)
Adds concept pages for healing and the scanner.
Updates other related files for better context.
    
Adds ref links and other related updates.
    
Closes #1168
2024-04-25 14:27:25 -04:00

8.2 KiB

Transition Objects to Remote MinIO Deployment

minio

Table of Contents

The procedure on this page creates a new object lifecycle management rule that transitions objects from a bucket on a primary MinIO deployment to a bucket on a remote MinIO deployment. This procedure supports cost-management strategies such as tiering objects from a "hot" MinIO deployment using NVMe storage to a "warm" MinIO deployment using SSD.

Requirements

Install and Configure mc

This procedure uses mc for performing operations on the MinIO cluster. Install mc on a machine with network access to both source and destination clusters. See the mc Installation Quickstart <mc-install> for instructions on downloading and installing mc.

Use the mc alias set command to create an alias for the source MinIO cluster. Alias creation requires specifying an access key for a user on the source and destination clusters. The specified users must have permissions <minio-lifecycle-management-transition-to-minio-permissions> for configuring and applying transition operations.

Required Source MinIO Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.

  • s3:PutLifecycleConfiguration
  • s3:GetLifecycleConfiguration

MinIO also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:

  • admin:SetTier
  • admin:ListTier

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:

/extra/examples/LifecycleManagementAdmin.json

Required Remote MinIO Permissions

Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, MinIO requires the remote tier credentials provide read, write, list, and delete permissions for the remote bucket.

For example, the following policy on the remote MinIO deployment provides the necessary permission for transitioning objects into and out of the remote tier:

/extra/examples/LifecycleManagementUser.json

Modify the Resource for the bucket into which MinIO tiers objects.

Refer to the minio-policy documentation for more complete guidance on configuring the required permissions.

Remote Bucket Must Exist

Create the remote bucket prior to configuring lifecycle management tiers or rules using that bucket as the target.

If the remote bucket contains existing data, use the prefix <mc ilm tier add --prefix> feature to isolate transitioned objects from any other objects on that bucket.

Considerations

Lifecycle Management Object Scanner

MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules.

Exclusive Access to Remote Data

Availability of Remote Data

Procedure

1) Configure User Accounts and Policies for Lifecycle Management

2) Configure the Remote Storage Tier

Use the mc ilm tier add command to add the remote MinIO deployment as the new remote storage tier:

mc ilm tier add minio TARGET TIER_NAME  \
   --endpoint https://HOSTNAME       \
   --access-key ACCESS_KEY           \
   --secret-key SECRET_KEY           \
   --bucket BUCKET                   \
   --prefix PREFIX                   \
   --storage-class STORAGE_CLASS     \
   --region REGION 

The example above uses the following arguments:

Argument Description
ALIAS <mc ilm tier add TARGET> The alias <mc alias> of the MinIO deployment on which to configure the MinIO remote tier.
TIER_NAME <mc ilm tier add TIER_NAME> The name to associate with the new MinIO remote storage tier. Specify the name in all-caps, e.g. MINIO_WARM_TIER. This value is required in the next step.
HOSTNAME <mc ilm tier add --endpoint> The URL endpoint for the MinIO storage backend.
ACCESS_KEY <mc ilm tier add --access-key> The access key MinIO uses to access the bucket. The access key must correspond to an IAM user with the required permissions <minio-lifecycle-management-transition-to-minio-permissions-remote>.
SECRET_KEY <mc ilm tier add --secret-key> The corresponding secret key for the specified ACCESS_KEY.
BUCKET <mc ilm tier add --bucket> The name of the bucket on the remote MinIO deployment to which the SOURCE transitions objects.

PREFIX <mc ilm tier add --prefix>

The optional bucket prefix within which MinIO transitions objects.

MinIO stores all transitioned objects in the specified BUCKET under a unique per-deployment prefix value. Omit this argument to use only that value for isolating and organizing data within the remote storage.

MinIO recommends specifying this optional prefix for remote storage tiers which contain other data, including transitioned objects from other MinIO deployments. This prefix should provide a clear reference back to the source MinIO deployment to facilitate ease of operations related to diagnostics, maintenance, or disaster recovery.

STORAGE_CLASS <mc ilm tier add --storage-class> The Erasure Coding storage class <minio-ec-storage-class> MinIO applies to objects transitions to the remote MinIO bucket. Specify one of the following supported storage classes:
  • STANDARD Recommended
  • REDUCED

REGION <mc ilm tier add --region>

The MinIO region of the specified BUCKET.

MinIO deployments typically do not require setting a region as part of setup. Only include this option if you explicitly set the MINIO_SITE_REGION configuration setting for the deployment.

3) Create and Apply the Transition Rule

4) Verify the Transition Rule

Use the mc ilm rule ls command to review the configured transition rules:

mc ilm rule ls ALIAS/PATH --transition
  • Replace ALIAS <mc ilm rule ls ALIAS> with the alias <mc alias> of the MinIO deployment.
  • Replace PATH <mc ilm rule ls ALIAS> with the name of the bucket for which to retrieve the configured lifecycle management rules.