首页 > 其他分享 >安装MinIO 单节点单驱动器

安装MinIO 单节点单驱动器

时间:2023-11-27 15:32:31浏览次数:47  
标签:minio default mnt dev 驱动器 root 节点 MinIO

MinIO 是一款基于 Go 语言的高性能对象存储服务。

MinIO 采用了 Apache License v2.0 开源协议,兼容亚马逊 S3 云存储服务接口,非常适合于存储大容量非结构化的数据,例如图片、视频、日志文件、备份数据和容器/虚拟机镜像等,而一个对象文件可以是任意大小,从几 kb 到最大 5T 不等。

MinIO 使用纠删码 erasure code 和校验和 checksum 来保护数据免受硬件故障和数据损坏。即便您丢失一半数量(N/2)的硬盘,仍然可以恢复数据。

准备磁盘

[root@minio1 ~]# mkfs.xfs /dev/sdb -L DISK1
meta-data=/dev/sdb               isize=512    agcount=4, agsize=655360 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=2621440, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

下载minio安装包:

[root@minio ~]# wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20231120224007.0.0.x86_64.rpm -O minio.rpm
--2023-11-22 23:31:46--  https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20231120224007.0.0.x86_64.rpm
Resolving dl.min.io (dl.min.io)... 138.68.11.125, 178.128.69.202
Connecting to dl.min.io (dl.min.io)|138.68.11.125|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35994002 (34M) [application/x-rpm]
Saving to: ‘minio.rpm’

100%[====================================================================================>] 35,994,002  5.34MB/s   in 10s    

2023-11-22 23:31:58 (3.29 MB/s) - ‘minio.rpm’ saved [35994002/35994002]

[root@minio ~]# ls
anaconda-ks.cfg  minio.rpm

使用yum安装

[root@minio ~]# yum install minio.rpm 
Loaded plugins: fastestmirror
Examining minio.rpm: minio-20231120224007.0.0-1.x86_64
Marking minio.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package minio.x86_64 0:20231120224007.0.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
 Package                  Arch                      Version                                   Repository                 Size
==============================================================================================================================
Installing:
 minio                    x86_64                    20231120224007.0.0-1                      /minio                     92 M

Transaction Summary
==============================================================================================================================
Install  1 Package

Total size: 92 M
Installed size: 92 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Verifying  : minio-20231120224007.0.0-1.x86_64                                                                          1/1 

Installed:
  minio.x86_64 0:20231120224007.0.0-1                                                                                         

Complete!

将磁盘挂载到 /mnt/disk1

[root@minio ~]# cd /mnt/
[root@minio mnt]# ls
[root@minio mnt]# 
[root@minio mnt]# mkdir disk1
[root@minio mnt]# 
[root@minio mnt]# mount /dev/mapper/vg_data-lv_data /mnt/disk1/
mount: /dev/mapper/vg_data-lv_data is already mounted or /mnt/disk1 busy
       /dev/mapper/vg_data-lv_data is already mounted on /mnt/disk1
[root@minio mnt]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/centos-root       14G  1.4G   13G  10% /
devtmpfs                     1.9G     0  1.9G   0% /dev
tmpfs                        1.9G     0  1.9G   0% /dev/shm
tmpfs                        1.9G  8.8M  1.9G   1% /run
tmpfs                        1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1                   1014M  142M  873M  14% /boot
tmpfs                        380M     0  380M   0% /run/user/0
/dev/mapper/vg_data-lv_data   99G   33M   99G   1% /mnt/disk1

配置自动挂载

[root@minio default]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Jul 30 21:32:18 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=efd96cea-98cc-4649-be5c-6c91f03dd845 /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
/dev/mapper/vg_data-lv_data     /mnt/disk1      xfs     defaults        0 0

创建用户并授权

[root@minio mnt]# groupadd -r minio-user
[root@minio mnt]# useradd -M -r -g minio-user minio-user
[root@minio mnt]# chown minio-user:minio-user /mnt/disk1
[root@minio mnt]#

创建配置文件 /etc/default/minio

[root@minio default]# cat /etc/default/minio 
# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment

MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=Zzbrkm2409@

# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.

MINIO_VOLUMES="/mnt/disk1"

# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine

# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).

#MINIO_SERVER_URL="http://minio.example.net:9000"

启动服务,并开机启动

[root@minio default]# systemctl start minio 
[root@minio default]# systemctl status minio 
● minio.service - MinIO
   Loaded: loaded (/usr/lib/systemd/system/minio.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2023-11-22 23:39:09 EST; 7s ago
     Docs: https://docs.min.io
  Process: 9424 ExecStartPre=/bin/bash -c if [ -z "${MINIO_VOLUMES}" ]; then echo "Variable MINIO_VOLUMES not set in /etc/default/minio"; exit 1; fi (code=exited, status=0/SUCCESS)
 Main PID: 9427 (minio)
   CGroup: /system.slice/minio.service
           └─9427 /usr/local/bin/minio server /mnt/disk1

Nov 22 23:39:09 minio systemd[1]: Started MinIO.
Nov 22 23:39:09 minio minio[9427]: MinIO Object Storage Server
Nov 22 23:39:09 minio minio[9427]: Copyright: 2015-2023 MinIO, Inc.
Nov 22 23:39:09 minio minio[9427]: License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Nov 22 23:39:09 minio minio[9427]: Version: RELEASE.2023-11-20T22-40-07Z (go1.21.4 linux/amd64)
Nov 22 23:39:09 minio minio[9427]: Status:         1 Online, 0 Offline.
Nov 22 23:39:09 minio minio[9427]: S3-API: http://192.168.3.110:9000  http://127.0.0.1:9000
Nov 22 23:39:09 minio minio[9427]: Console: http://192.168.3.110:41817 http://127.0.0.1:41817
Nov 22 23:39:09 minio minio[9427]: Documentation: https://min.io/docs/minio/linux/index.html
Nov 22 23:39:09 minio minio[9427]: Warning: The standard parity is set to 0. This can lead to data loss.
[root@minio default]# systemctl enable minio.service
Created symlink from /etc/systemd/system/multi-user.target.wants/minio.service to /usr/lib/systemd/system/minio.service.

开启防火墙策略

[root@minio default]# firewall-cmd --permanent --zone=public --add-port=9000/tcp
success
[root@minio default]# firewall-cmd --reload
success
[root@minio default]# firewall-cmd --permanent --zone=public --add-port=41817/tcp
success
[root@minio default]# firewall-cmd --reload
success

访问测试

安装MinIO 单节点单驱动器_minio

安装MinIO 单节点单驱动器_数据_02

标签:minio,default,mnt,dev,驱动器,root,节点,MinIO
From: https://blog.51cto.com/chenxuewen/8586575

相关文章

  • MinIO的简单使用
    MINIO介绍什么是对象存储?以阿里云OSS为例:对象存储服务OSS(ObjectStorageService)是一种海量、安全、低成本、高可靠的云存储服务,适合存放任意类型的文件。容量和处理能力弹性扩展,多种存储类型供选择,全面优化存储成本。优势就在于它可以存储大容量的非结构化数据。缺点:没有选......
  • 10_填充每个节点的下一个右侧节点指针
    填充每个节点的下一个右侧节点指针给定一个完美二叉树,其所有叶子节点都在同一层,每个父节点都有两个子节点。二叉树定义如下:structNode{intval;Node*left;Node*right;Node*next;}填充它的每个next指针,让这个指针指向其下一个右侧节点。如果找不到下一个......
  • 节点重启后初始化dpvs
    #加载大页内存echo2048>/sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepagesmount-thugetlbfsnodev/mnt/huge#加载vfio驱动modprobevfio-pci/usr/bin/chmoda+x/dev/vfio/usr/bin/chmod0666/dev/vfio/*echo1>/sys/module/vfio/param......
  • linux部署单节点clickhouse
    一、部署clickhouse1、配置yum源进行安装,详情看官网:https://clickhouse.com/docs/zh/getting-started/install2、使用rpm包安装。2.1、在https://packages.clickhouse.com/rpm/stable/或github中下载common-static、server和client三个rpm安装包。......
  • 构建树结构(节点级别,全路径)
    packageorg.example.tree;importorg.springframework.util.CollectionUtils;importjava.util.*;/***@ClassNameTreeUtils2*@DescriptionTODO*@Authorhrp*@Date2023/11/2314:39*/publicclassTreeUtils<NextendsTreeNode<T,RC,LC>,......
  • Docker Swarm动态扩容MINIO集群
    需求背景当一个minio集群的磁盘不够用的时候,可以有两种方式,第一个通过扩磁盘,第二种增加机器。但是不管是哪种方式,都不能去动原来集群的启动方式,那样集群就起不来了,会一直提示类似下面这种报错,ERRORUnabletoinitializebackend:/data1driveisalreadybeingusedinanother......
  • MySql存储树形结构,Java实现根据节点找到父节点,根据节点找到子节点
    目录数据表设计生成树(递归方式)根据节点cId返回所有的父节点pId数据表设计idparent_idnamelevel10食物121蔬菜231水果242茄果类352叶菜类363浆果类373瓜果类384番茄494辣椒4105生菜4116桑葚4id......
  • 本地MinIO存储服务Java远程调用上传文件
    MinIO是一款高性能、分布式的对象存储系统,它可以100%的运行在标准硬件上,即X86等低成本机器也能够很好的运行MinIO。它的优点包括高性能、高可用性、易于部署和管理、支持多租户等。Cpolar内网穿透提供了更高的安全性和隐私保护,通过使用加密通信通道,Cpolar技术可以确保数据传输的......
  • Exadata存储节点大量nvmecli进程,导致系统出现卡顿现象
    1、故障概要同事在执行Exadata巡检时,发现客户Exadata环境中的celadm01存储节点存在卡顿的现象。相同的命令,在其他的存储节点很快就返回输出结果,而celadm01这台存储节点需要很长时间才返回输出结果。 2、故障分析(1).检查主机负载情况。发现celadm01这台存储节点的负载(loadave......
  • Linux内核中NUMA内存节点和内存zone
      在现代大型服务器中多个内存节点机器一般都采用NUMA架构,而NUMA架构中不同的内存节点在Linux内核中使用pg_data_t类型(实际是structpglist_data)来表示表示。   Linux又为每个内存节点根据内存地址的高低划分了不同的区域类型如ZONE_DMA、ZONE_DMA32、ZONE_NORMAL,一个......