Minio Storage: Understanding Installation Steps and How it Works

Minio Storage

The continuous proliferation of data across various sectors requires resilient and expandable storage solutions. Conventional file-oriented systems frequently encounter difficulties when attempting to manage enormous datasets. Object storage, an architecture for distributed storage, has surfaced as a viable substitute, providing streamlined operations for retrieving and administrating unstructured data.

MinIO is a high-performance, open-source object storage server specifically engineered for private cloud implementation. The system exhibits remarkable scalability, rendering it optimal for the economical storage and administration of substantial volumes of data.

This comprehensive guide examines the fundamental capabilities of MinIO, including an analysis of its structure, implementation possibilities, and real-world applications. After covering the fundamentals of object storage, you will receive a comprehensive tutorial on installing and utilizing MinIO. This will enable you to utilize its functionalities to store data effectively.

MinIO Overview: What is it?

For cloud-native settings, MinIO is an open-source, fast object storage server. This software lets you store and manage unstructured data in a spread, scalable, and affordable way.

Unlike conventional file-based systems, MinIO utilizes object storage architecture, which encounters difficulties with enormous databases. This architectural choice confers several significant benefits:

  • Scalability: MinIO can handle growing amounts of data by adding more nodes to the cluster. This is called horizontal scaling.

  • Value for Money: Because MinIO is open source, there are no license fees, and it makes good use of storage, so there is little extra cost.

  • Flexibility: MinIO permits multiple deployment choices, such as on-premise, cloud, and hybrid environments, to meet the needs of a wide range of users.

  • Durability: MinIO guarantees the availability and integrity of your stored objects by providing robust data replication and consistency algorithms.

  • API Compatibility: Integration with Pre-existing S3-Based Tools and Applications: The Amazon S3 API provided by MinIO facilitates a smooth integration process.

MinIO is an appealing option for a multitude of use cases due to its attributes, which comprise:

  • Cloud-native application data storage: MinIO is a dependable and expandable infrastructure for cloud-native applications that produce substantial volumes of unstructured data.

  • Big data analytics platforms: MiniIO can efficiently store the enormous datasets that big data analytics platforms need.

  • Backup and archiving: MinIO provides a secure and economical long-term data storage and archiving solution.

  • Media repositories: MinIO offers a resilient infrastructure for storing and administrating audio, video, and image repositories.

Minio Logo

How Object Storage Works?

Conventional file storage employs a hierarchical framework comprising folders and files to arrange data. Although this methodology is well-known, it can be laborious and unproductive when confronted with enormous datasets, particularly unstructured data such as backups, media, or log files.

Object storage employs a fundamentally different methodology. Here's a breakdown of its key principles:

  • Objects: Data is no longer saved in files within folders. Instead, it is organized into self-contained entities known as objects. Each object contains the actual data and vital descriptive information known as metadata.

  • Metadata: The metadata of an object comprises essential information such as its name, size, date of creation, and any tags designated by the user. This extensive metadata makes object storage highly searchable, allowing for better data categorization and retrieval.

  • Flat Storage Pool: Objects are kept in a large, flat address space known as a storage pool. This removes complex folder hierarchies and simplifies data access and management.

  • Unique Identifiers: Each object is given a unique identification that serves as its address in the storage pool. This enables efficient retrieval of certain things without exploring folder structures.

  • HTTP API: Object storage often uses a standardized API built on the Hypertext Transfer Protocol (HTTP). This facilitates interaction with diverse applications and tools, allowing them to communicate easily with object storage systems.

An illustration of an object storage system could resemble:

/ /images/ imge1.png image2.jpg /videos/ video1.mp4 /users/ /john.doe/ 3rd quarter revenue report.docx

Here is how these principles are put into action:

  • Data Upload: When you upload data to object storage, it is split into objects. Metadata is appended, and a unique identifier is generated.

  • Storage: The object is subsequently placed in the flat storage pool.

  • Data Retrieval: To retrieve an object, simply provide its unique identifier. The object storage system locates and delivers the object using this ID.

Installing MinIO Service: Steps to Follow

The MinIO server is a binary file or a .deb package that can be utilized for installation. It will be installed in this section utilizing the .deb package.

ssh sammy@your-server-ip

Step 2: Updating the package database.

sudo apt update

Step 3: Now update the system

sudo apt upgrade

Now confirm the installation with you.

Throughout the upgrade procedure, your terminal may display a screen (see image below) soliciting your input regarding the configuration file of the OpenSSH server. To prevent the modifications you have made to the configuration file from being overwritten, click Enter to accept the red-highlighted default option ("keep the version that is currently installed")

Minio Package Configuration

Then, obtain the most recent .deb package for the MinIO server from the MinIO downloads website.

wget https://dl.min.io/server/minio/release/linux-amd64/minio_20220523184511.0.0_amd64.deb

Your working directory will be populated with the minio_20220523184511.0.0_amd64.deb file. To install the downloaded file, utilize the dpkg command employed to manage.deb packages:

sudo dpkg -i minio_20220523184511.0.0_amd64.deb

By specifying -i, the package will be installed.

This command creates a systemd initialization script and a minio command, both utilized to launch the MinIO server.

Working with MinIO

Using various methods, one can communicate with the MinIO server and administer buckets and objects. Below, we shall examine three methods.

The MinIO Client

In contrast to Unix file-handling commands like cp and ls, the MinIO client is also specifically engineered to operate on remote storage systems. It possesses complete compatibility with AWS S3 and emulates the syntax of the AWS client application.

Configure the MinIO client to connect with a cloud storage system before using it.

$ mc alias set docker_minio http://127.0.0.1:9000 minioadmin minioadmin

The alias for a containerized deployment of MinIO accessible via localhost and port 9000 is generated by writing this command. In this deployment, the default access and secret keys are minioadmin.

The admin sub-command can be employed to validate the connection.

$ mc admin info docker_minio 127.0.0.1:9000 Uptime: 3 minutes Version: 2023-05-04T21:44:30Z Network: 1/1 OK Drives: 1/1 OK Pool: 1 Pools: 1st, Erasure sets: 1, Drives per erasure set: 1 1 drive online, 0 drives offline

We can now begin performing fundamental operations like creating containers and objects. Numerous sub-commands of the MinIO client resemble well-known Unix commands:

  • Cp: Performs a file or object copy operation between file systems.

  • Ls: List objects or files contained in a container.

  • Mb: Establish a container (similar to the Linux command mkdir).

  • Mv: Transfer an object or file from one file system to another using the mv command.

  • Rb: Eliminate a container (similar to the Linux command rmdir).

  • Rm: Eliminate an object or file.

Most of these sub-commands are compatible with cloud storage and local file systems. To illustrate, the subsequent command sequence may be employed to generate a novel bucket, transfer an object from one bucket to another, and finally delete a bucket:

$ mc mb user1 $ mc cp ~/Resume.pdf prattm $ mc mb user2 $ mc cp user1/Resume.pdf user2 $ mc rb user1 $ mc ls user2 [2023-05-15 21:39:10 MDT] 491K Resume.pdf

The MinIO Console

Managing data in a MinIO deployment is also possible via the web-based administration console. To initiate the containerized deployment, launch a web browser and navigate to the address: http://127.0.0.1:9001. The default credentials for logging in are minioadmin/minioadmin.

We can then proceed to construct our initial bucket:

Creating new bucket

It is possible that not every option, including versioning, will be suitable to deploy Minio. You can now access the Object Browser and select the newly created bin. This interface contains a variety of options. Child buckets can be generated by selecting the Create new path icon.

Creating new path

Additionally, you can upload files as new objects within the bucket:

Creating new objets

The functionality of the MinIO administration console is generally identical to that of the command-line client. Nonetheless, there are a few minor distinctions.

Firstly, unlike the command-line client, transferring objects between containers using the client is not feasible.

Furthermore, several sub-commands are exclusive to the command-line interface and are not in the administration console. For instance, the diff, du, and pipe sub-commands imitate standard Unix commands but lack equivalents in the administration console.

The MinIO Java SDK

Implementing MinIO via the Java SDK will be the last method examined. We begin by incorporating the necessary dependency into our application:

<dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>8.5.2</version> </dependency>

Implementing the Java SDK begins with the creation of a client instance:

MinioClient minioClient = MinioClient.builder() .endpoint("http://127.0.0.1:9000") .credentials("minioadmin", "minioadmin") .build();

The functionality of this client is identical to that of the command-line interface and administrative console. To illustrate, one may establish a bucket:

minioClient.makeBucket( MakeBucketArgs .builder() .bucket("user1") .build());

Following that, an object file can be uploaded to the specified bucket:

minioClient.putObject(PutObjectArgs .builder() .bucket("user1") .object("Resume.pdf") .stream(new FileInputStream("/tmp/Resume.pdf") .build());

Finally, we'll learn how to retrieve an object from a bucket:

try (InputStream stream = minioClient.getObject(GetObjectArgs .builder() .bucket("user2") .object("Resume.pdf") .build())) { // Read the stream }

This merely represents a fraction of the Java SDK. Also, remember that identical codes can be utilized with Amazon S3 since MinIO is completely S3-compliant.

Minio System requirements

Depending on the deployment scenario and particular requirements, the system prerequisites for operating MinIO may differ. The subsequent elements warrant careful consideration, for example:

Hardware

  • Processor: While x86-64 and ARM64 architectures are the most prevalent, MinIO is compatible with many processors. Servers featuring multiple cores are recommended for maximum performance. The MinIO documentation advises a minimum of four cores per server for production situations.

  • Ram: The quantity and intricacy of the high performance object storage requirements dictate the compulsory memory (RAM). Larger deployments are advised to utilize larger memory allocations, as stated in the documentation for MinIO. A minimum of 8GB RAM per server is suggested.

  • Storage: MinIO uses Hard Disk Drives and Solid-State Drives (SSDs) as storage media. HDDs have slower read/write speeds despite greater capacities and reduced cost. SSD or NVMe storage is advised for performance-critical applications. The quantity of data that you intend to store will dictate the appropriate storage capacity.

  • Network: MinIO facilitates communication between servers and client applications via the network. Ensure that your network's speed can handle the expected data transfer rates. Try to get at least 1GbE network connectivity. For high-performance deployments, 10GbE or higher is suggested.

Software

MinIO is compatible with various Linux operating systems, such as Ubuntu, Debian, CentOS, and Red Hat Enterprise Linux. The most recent compatibility details are available in the MinIO documentation.

Reference hardware configurations are provided by MinIO, highlighting suggested arrangements for various performance criteria. These are available on the MinIO website.

Deployment Scenarios

MinIO allows for flexible deployment, adapting to various needs and infrastructure configurations. Here's a summary of its key deployment scenarios:

Stand Alone Mode

This is the most basic deployment option, suitable for development settings, testing, or smaller installations with modest data quantities. A single MinIO server instance handles object storage on its drives in stand-alone mode.

Pros

  • Simple to set up and administer.

  • Smaller deployments demand fewer resources.

Cons

  • Scalability is limited for high data volumes.

  • There is no built-in redundancy; even a single server failure can result in data loss.

Distributed Mode

MinIO provides a distributed option for bigger deployments with significant data volumes and redundancy needs. In this scenario, multiple MinIO servers form a cluster and collaborate to store and manage objects. Data is replicated among servers to ensure its availability even if one fails.

Pros

  • High scalability is required to manage enormous data volumes.

  • Built-in redundancy improves data availability.

Cons

  • More complicated to set up and administer than stand-alone mode.

  • Additional hardware resources are required for each server in the cluster.

NAS Gateway Mode

By acting as a Network Attached Storage (NAS) gateway, the MinIO minio instance enables object storage integration with existing NAS devices. This allows for the cost-effectiveness and scalability of object storage to be utilized in conjunction with the current NAS infrastructure.

Pros

  • Integrates object storage into current NAS deployments.

  • Scalability and efficiency are key features of NAS storage.

Cons

  • The NAS device may require additional configuring.

  • The capability of the underlying NAS gear may limit performance.

Deploying Minio

The specific minio deployment method depends on your chosen scenario and environment. Here's a brief overview of the common approaches:

1. Package Manager

For Debian-based systems, you can leverage the package manager for a straightforward installation. This method is suitable for stand-alone deployments on single servers.

2. Standalone Binary

MinIO offers standalone minio server binaries for various architectures. This method provides flexibility for deployment on different operating systems or environments without package managers.

3. Docker

Docker containers offer a lightweight and portable deployment option. This approach simplifies deployment and management, especially for distributed deployments with container orchestration tools like Kubernetes.

4. Kubernetes

MinIO can be deployed as a Kubernetes operator, enabling seamless integration with Kubernetes environments and leveraging its features for scaling and management.

5. Cloud Deployments

MinIO provides pre-built images for cloud platform instances like AWS, Azure, and GCP. These options simplify deployment and leverage cloud-specific features for scalability and management.

Ready to Harness the Power of MinIO?

VPSServer offers high-performance VPS hosting that is excellent for running MinIO and other cloud-native apps. Our configurable plans provide adequate resources, such as powerful processors, fast NVMe SSDs, and dependable network access, resulting in a smooth and quick MinIO implementation.

Furthermore, our expert assistance is available 24 hours a day, seven days a week to help you through your MinIO journey.

Visit VPSServer today to learn more about our VPS hosting plans and how MinIO may help you meet your object storage needs!

Frequently Asked Questions

How are files stored in MinIO?

Blob storing, retrieval, and search functions are made possible by object storage platforms such as MinIO. MinIO Object Storage uses buckets to arrange things. A filesystem's folder or directory is comparable to a bucket, which can store infinite things.

Is MinIO a blob storage?

It is suitable for production scenarios and compliant with the Azure Blob Storage API.

Is MinIO the same as S3?

MinIO and S3 are both object storage solutions, but they differ in who manages them. S3 is a cloud storage service offered by Amazon Web Services (AWS), while MinIO is an open-source software that you can install and run on your infrastructure or a VPS like VPSServer. Although not the same, MinIO offers S3 API compatibility, allowing you to use familiar S3 tools and applications seamlessly with MinIO.

Rimsha Ashraf
The author
Rimsha Ashraf

Rimsha Ashraf is a Technical Content Writer and Software Engineer by profession (available on LinkedIn and Instagram). She has written 1000+ articles and blogs and has completed over 200 projects on various freelancing platforms. Her research skills and knowledge she specializes in topics such as Cyber Security, Cloud Computing, Machine Learning, Artificial Intelligence, Blockchain, Cryptocurrency, Real Estate, Automobile, Supply Chain, Finance, Retail, E-commerce, Health & Wellness, and Pets. Rimsha is available for long-term work, and invites potential clients to view her portfolio on her website RimshaAshraf.com.