This is the multi-page printable view of this section. .
Module: MINIO
Min.IO: S3-Compatible Open-Source Multi-Cloud Object Storage
Configuration | Administration | Playbook | Dashboard | Parameter
MinIO is an S3-compatible object storage server. It’s designed to be scalable, secure, and easy to use. It has native multi-node multi-driver HA support and can store documents, pictures, videos, and backups.
Pigsty uses MinIO as an optional PostgreSQL backup storage repo, in addition to the default local posix FS repo.
If the MinIO repo is used, the MINIO module should be installed before any PGSQL modules.
MinIO requires a trusted CA to work, so you have to install it in addition to NODE module.
Beware than MinIO mandates HTTPS access, so please ensure that the MinIO service domain (default to sss.pigsty) correctly points to the MinIO server node:
- You can ask your SA to add a DNS record in the intranet DNS server
- If you enable the DNS server on the Infra node, you can add records in
dns_records - You can also add static resolution records to all nodes in
node_etc_hosts
Example:
prod.yml
Configuration
You have to define a MinIO cluster before deploying it. There are some parameters for MinIO.
- Single-Node Single-Drive
- Single-Node Multi-Drive
- Multi-Node Multi-Drive
- Expose Service
- Access Service
- Expose Admin
Single-Node Single-Drive
Reference: deploy-minio-single-node-single-drive
To define a singleton MinIO instance, it’s straightforward:
The only required params are minio_seq and minio_cluster, which generate a unique identity for each MinIO instance.
Single-Node Single-Driver mode is for development purposes, so you can use a common dir as the data dir, which is /data/minio by default.
Beware that in multi-driver or multi-node mode, MinIO will refuse to start if using a common dir as the data dir rather than a mount point.
Single-Node Multi-Drive
Reference: deploy-minio-single-node-multi-drive
To use multiple disks on a single node, you have to specify the minio_data in the format of {{ prefix }}{x...y}, which defines a series of disk mount points.
This example defines a single-node MinIO cluster with 4 drivers: /data1, /data2, /data3, /data4. You have to mount them properly before launching MinIO:
Multi-Node Multi-Drive
Reference: deploy-minio-multi-node-multi-drive
The extra minio_node param will be used for a multi-node deployment:
The ${minio_cluster} and ${minio_seq} will be replaced with the value of minio_cluster and minio_seq respectively and used as MinIO nodename.
Expose Service
MinIO will serve on port 9000 by default. If a multi-node MinIO cluster is deployed, you can access its service via any node.
It would be better to expose MinIO service via a load balancer, such as the default haproxy on NODE, or use the L2 vip.
To expose MinIO service with haproxy, you have to define an extra service with haproxy_services:
Access Service
To use the exposed service, you have to update/append the MinIO credential in the pgbackrest_repo section:
Expose Admin
MinIO will serve an admin web portal on port 9001 by default.
It’s not wise to expose the admin portal to the public, but if you wish to do so, add MinIO to the infra_portal and refresh the nginx server:
Check the MinIO demo config and special Vagrantfile for more details.
Administration
Here are some common MinIO mcli commands for reference, check MinIO Client for more details.
Create Cluster
To create a defined minio cluster, run the minio.yml playbook on minio group:
Client Setup
To access MinIO servers, you have to configure client mcli alias first:
You can manage business users with mcli as well:
CRUD
You can CRUD minio bucket with mcli:
Or perform object CRUD:
Playbook
There’s a built-in playbook: minio.yml for installing the MinIO cluster. But you have to define it first.
minio.yml
minio-id: generate minio identityminio_os_user: create os user miniominio_install: install minio/mcli rpmminio_clean: remove minio data (not default)minio_dir: create minio directoriesminio_config: generate minio configminio_conf: minio main configminio_cert: minio ssl certminio_dns: write minio dns records
minio_launch: launch minio serviceminio_register: register minio to prometheusminio_provision: create minio aliases/buckets/usersminio_alias: create minio client aliasminio_bucket: create minio bucketsminio_user: create minio biz users
Trusted ca file: /etc/pki/ca.crt should exist on all nodes already. which is generated in role: ca and loaded & trusted by default in role: node.
You should install MINIO module on Pigsty-managed nodes (i.e., Install NODE first)
Dashboard
There are two dashboards for MINIO module.
MinIO Overview: Overview of one single MinIO cluster
MinIO Instance: Detail information about one single MinIO instance
Parameter
There are 15 parameters in MINIO module.
| Parameter | Type | Level | Comment |
|---|---|---|---|
minio_seq |
int | I | minio instance identifier, REQUIRED |
minio_cluster |
string | C | minio cluster name, minio by default |
minio_clean |
bool | G/C/A | cleanup minio during init?, false by default |
minio_user |
username | C | minio os user, minio by default |
minio_node |
string | C | minio node name pattern |
minio_data |
path | C | minio data dir(s), use {x…y} to specify multi drivers |
minio_domain |
string | G | minio external domain name, sss.pigsty by default |
minio_port |
port | C | minio service port, 9000 by default |
minio_admin_port |
port | C | minio console port, 9001 by default |
minio_access_key |
username | C | root access key, minioadmin by default |
minio_secret_key |
password | C | root secret key, minioadmin by default |
minio_extra_vars |
string | C | extra environment variables for minio server |
minio_alias |
string | G | alias name for local minio deployment |
minio_buckets |
bucket[] | C | list of minio bucket to be created |
minio_users |
user[] | C | list of minio user to be created |
1 - Metrics
MINIO module has 79 available metrics
| Metric Name | Type | Labels | Description |
|---|---|---|---|
| minio_audit_failed_messages | counter | ip, job, target_id, cls, instance, server, ins |
Total number of messages that failed to send since start |
| minio_audit_target_queue_length | gauge | ip, job, target_id, cls, instance, server, ins |
Number of unsent messages in queue for target |
| minio_audit_total_messages | counter | ip, job, target_id, cls, instance, server, ins |
Total number of messages sent since start |
| minio_cluster_bucket_total | gauge | ip, job, cls, instance, server, ins |
Total number of buckets in the cluster |
| minio_cluster_capacity_raw_free_bytes | gauge | ip, job, cls, instance, server, ins |
Total free capacity online in the cluster |
| minio_cluster_capacity_raw_total_bytes | gauge | ip, job, cls, instance, server, ins |
Total capacity online in the cluster |
| minio_cluster_capacity_usable_free_bytes | gauge | ip, job, cls, instance, server, ins |
Total free usable capacity online in the cluster |
| minio_cluster_capacity_usable_total_bytes | gauge | ip, job, cls, instance, server, ins |
Total usable capacity online in the cluster |
| minio_cluster_drive_offline_total | gauge | ip, job, cls, instance, server, ins |
Total drives offline in this cluster |
| minio_cluster_drive_online_total | gauge | ip, job, cls, instance, server, ins |
Total drives online in this cluster |
| minio_cluster_drive_total | gauge | ip, job, cls, instance, server, ins |
Total drives in this cluster |
| minio_cluster_health_erasure_set_healing_drives | gauge | pool, ip, job, cls, set, instance, server, ins |
Get the count of healing drives of this erasure set |
| minio_cluster_health_erasure_set_online_drives | gauge | pool, ip, job, cls, set, instance, server, ins |
Get the count of the online drives in this erasure set |
| minio_cluster_health_erasure_set_read_quorum | gauge | pool, ip, job, cls, set, instance, server, ins |
Get the read quorum for this erasure set |
| minio_cluster_health_erasure_set_status | gauge | pool, ip, job, cls, set, instance, server, ins |
Get current health status for this erasure set |
| minio_cluster_health_erasure_set_write_quorum | gauge | pool, ip, job, cls, set, instance, server, ins |
Get the write quorum for this erasure set |
| minio_cluster_health_status | gauge | ip, job, cls, instance, server, ins |
Get current cluster health status |
| minio_cluster_nodes_offline_total | gauge | ip, job, cls, instance, server, ins |
Total number of MinIO nodes offline |
| minio_cluster_nodes_online_total | gauge | ip, job, cls, instance, server, ins |
Total number of MinIO nodes online |
| minio_cluster_objects_size_distribution | gauge | ip, range, job, cls, instance, server, ins |
Distribution of object sizes across a cluster |
| minio_cluster_objects_version_distribution | gauge | ip, range, job, cls, instance, server, ins |
Distribution of object versions across a cluster |
| minio_cluster_usage_deletemarker_total | gauge | ip, job, cls, instance, server, ins |
Total number of delete markers in a cluster |
| minio_cluster_usage_object_total | gauge | ip, job, cls, instance, server, ins |
Total number of objects in a cluster |
| minio_cluster_usage_total_bytes | gauge | ip, job, cls, instance, server, ins |
Total cluster usage in bytes |
| minio_cluster_usage_version_total | gauge | ip, job, cls, instance, server, ins |
Total number of versions (includes delete marker) in a cluster |
| minio_cluster_webhook_failed_messages | counter | ip, job, cls, instance, server, ins |
Number of messages that failed to send |
| minio_cluster_webhook_online | gauge | ip, job, cls, instance, server, ins |
Is the webhook online? |
| minio_cluster_webhook_queue_length | counter | ip, job, cls, instance, server, ins |
Webhook queue length |
| minio_cluster_webhook_total_messages | counter | ip, job, cls, instance, server, ins |
Total number of messages sent to this target |
| minio_cluster_write_quorum | gauge | ip, job, cls, instance, server, ins |
Maximum write quorum across all pools and sets |
| minio_node_file_descriptor_limit_total | gauge | ip, job, cls, instance, server, ins |
Limit on total number of open file descriptors for the MinIO Server process |
| minio_node_file_descriptor_open_total | gauge | ip, job, cls, instance, server, ins |
Total number of open file descriptors by the MinIO Server process |
| minio_node_go_routine_total | gauge | ip, job, cls, instance, server, ins |
Total number of go routines running |
| minio_node_ilm_expiry_pending_tasks | gauge | ip, job, cls, instance, server, ins |
Number of pending ILM expiry tasks in the queue |
| minio_node_ilm_transition_active_tasks | gauge | ip, job, cls, instance, server, ins |
Number of active ILM transition tasks |
| minio_node_ilm_transition_missed_immediate_tasks | gauge | ip, job, cls, instance, server, ins |
Number of missed immediate ILM transition tasks |
| minio_node_ilm_transition_pending_tasks | gauge | ip, job, cls, instance, server, ins |
Number of pending ILM transition tasks in the queue |
| minio_node_ilm_versions_scanned | counter | ip, job, cls, instance, server, ins |
Total number of object versions checked for ilm actions since server start |
| minio_node_io_rchar_bytes | counter | ip, job, cls, instance, server, ins |
Total bytes read by the process from the underlying storage system including cache, /proc/[pid]/io rchar |
| minio_node_io_read_bytes | counter | ip, job, cls, instance, server, ins |
Total bytes read by the process from the underlying storage system, /proc/[pid]/io read_bytes |
| minio_node_io_wchar_bytes | counter | ip, job, cls, instance, server, ins |
Total bytes written by the process to the underlying storage system including page cache, /proc/[pid]/io wchar |
| minio_node_io_write_bytes | counter | ip, job, cls, instance, server, ins |
Total bytes written by the process to the underlying storage system, /proc/[pid]/io write_bytes |
| minio_node_process_cpu_total_seconds | counter | ip, job, cls, instance, server, ins |
Total user and system CPU time spent in seconds |
| minio_node_process_resident_memory_bytes | gauge | ip, job, cls, instance, server, ins |
Resident memory size in bytes |
| minio_node_process_starttime_seconds | gauge | ip, job, cls, instance, server, ins |
Start time for MinIO process per node, time in seconds since Unix epoc |
| minio_node_process_uptime_seconds | gauge | ip, job, cls, instance, server, ins |
Uptime for MinIO process per node in seconds |
| minio_node_scanner_bucket_scans_finished | counter | ip, job, cls, instance, server, ins |
Total number of bucket scans finished since server start |
| minio_node_scanner_bucket_scans_started | counter | ip, job, cls, instance, server, ins |
Total number of bucket scans started since server start |
| minio_node_scanner_directories_scanned | counter | ip, job, cls, instance, server, ins |
Total number of directories scanned since server start |
| minio_node_scanner_objects_scanned | counter | ip, job, cls, instance, server, ins |
Total number of unique objects scanned since server start |
| minio_node_scanner_versions_scanned | counter | ip, job, cls, instance, server, ins |
Total number of object versions scanned since server start |
| minio_node_syscall_read_total | counter | ip, job, cls, instance, server, ins |
Total read SysCalls to the kernel. /proc/[pid]/io syscr |
| minio_node_syscall_write_total | counter | ip, job, cls, instance, server, ins |
Total write SysCalls to the kernel. /proc/[pid]/io syscw |
| minio_notify_current_send_in_progress | gauge | ip, job, cls, instance, server, ins |
Number of concurrent async Send calls active to all targets (deprecated, please use ‘minio_notify_target_current_send_in_progress’ instead) |
| minio_notify_events_errors_total | counter | ip, job, cls, instance, server, ins |
Events that were failed to be sent to the targets (deprecated, please use ‘minio_notify_target_failed_events’ instead) |
| minio_notify_events_sent_total | counter | ip, job, cls, instance, server, ins |
Total number of events sent to the targets (deprecated, please use ‘minio_notify_target_total_events’ instead) |
| minio_notify_events_skipped_total | counter | ip, job, cls, instance, server, ins |
Events that were skipped to be sent to the targets due to the in-memory queue being full |
| minio_s3_requests_4xx_errors_total | counter | ip, job, cls, instance, server, ins, api |
Total number of S3 requests with (4xx) errors |
| minio_s3_requests_errors_total | counter | ip, job, cls, instance, server, ins, api |
Total number of S3 requests with (4xx and 5xx) errors |
| minio_s3_requests_incoming_total | gauge | ip, job, cls, instance, server, ins |
Total number of incoming S3 requests |
| minio_s3_requests_inflight_total | gauge | ip, job, cls, instance, server, ins, api |
Total number of S3 requests currently in flight |
| minio_s3_requests_rejected_auth_total | counter | ip, job, cls, instance, server, ins |
Total number of S3 requests rejected for auth failure |
| minio_s3_requests_rejected_header_total | counter | ip, job, cls, instance, server, ins |
Total number of S3 requests rejected for invalid header |
| minio_s3_requests_rejected_invalid_total | counter | ip, job, cls, instance, server, ins |
Total number of invalid S3 requests |
| minio_s3_requests_rejected_timestamp_total | counter | ip, job, cls, instance, server, ins |
Total number of S3 requests rejected for invalid timestamp |
| minio_s3_requests_total | counter | ip, job, cls, instance, server, ins, api |
Total number of S3 requests |
| minio_s3_requests_ttfb_seconds_distribution | gauge | ip, job, cls, le, instance, server, ins, api |
Distribution of time to first byte across API calls |
| minio_s3_requests_waiting_total | gauge | ip, job, cls, instance, server, ins |
Total number of S3 requests in the waiting queue |
| minio_s3_traffic_received_bytes | counter | ip, job, cls, instance, server, ins |
Total number of s3 bytes received |
| minio_s3_traffic_sent_bytes | counter | ip, job, cls, instance, server, ins |
Total number of s3 bytes sent |
| minio_software_commit_info | gauge | ip, job, cls, instance, commit, server, ins |
Git commit hash for the MinIO release |
| minio_software_version_info | gauge | ip, job, cls, instance, version, server, ins |
MinIO Release tag for the server |
| minio_up | Unknown | ip, job, cls, instance, ins |
N/A |
| minio_usage_last_activity_nano_seconds | gauge | ip, job, cls, instance, server, ins |
Time elapsed (in nano seconds) since last scan activity. |
| scrape_duration_seconds | Unknown | ip, job, cls, instance, ins |
N/A |
| scrape_samples_post_metric_relabeling | Unknown | ip, job, cls, instance, ins |
N/A |
| scrape_samples_scraped | Unknown | ip, job, cls, instance, ins |
N/A |
| scrape_series_added | Unknown | ip, job, cls, instance, ins |
N/A |
| up | Unknown | ip, job, cls, instance, ins |
N/A |
2 - FAQ
Fail to launch multi-node / multi-driver MinIO cluster.
In Multi-Driver or Multi-Node mode, MinIO will refuse to start if the data dir is not a valid mount point.
Use mounted disks for MinIO data dir rather than some regular directory. You can use the regular directory only in the single node, single drive mode.
How to deploy a multi-node multi-drive MinIO cluster?
How to add a member to the existing MinIO cluster?
You’d better plan the MinIO cluster before deployment… Since this requires a global restart
Check this: Expand MinIO Deployment
How to use a HA MinIO deployment for PGSQL?
Access the HA MinIO cluster with an optional load balancer and different ports.
Here is an example: Access MinIO Service
