User-Profile-Image
hankin
  • 5
  • centos7
  • docker
  • mysql
  • PostgreSQL
  • git/gitlab
  • ELK
  • python
    • python-Tornado
    • python-django
  • redis
  • nginx
  • kvm
  • proxmox
  • mongo
  • kubernetes
  • prometheus
  • GlusterFs
  • nfs
  • freeswitch
  • httpd
  • shell脚本
  • linux
  • fastdfs
  • nextcloud
  • openssl
  • openvpn
  • rabbitmq
  • sqlite
  • svn
  • java
  • ubuntu
  • vue2
  • wordpress
  • php
  • IOT物联网
  • 项目
  • 故障处理
  • 树莓派
  • 博客存档
  • 未分类
  • 杂项
  • #1742(无标题)
  • 新视野
  • 分类
    • 项目
    • 树莓派
    • 杂项
    • 未分类
    • 新视野
    • 故障处理
    • 博客存档
    • 交换机
    • wordpress
    • vue2
    • ubuntu
    • svn
    • sqlite
    • shell脚本
    • redis
    • rabbitmq
    • python-django
    • python
    • proxmox
    • prometheus
    • PostgreSQL
    • php
    • openvpn
    • openssl
    • nginx
    • nfs
    • nextcloud
    • mysql
    • mongo
    • linux
    • kvm
    • kubernetes
    • java
    • IOT物联网
    • httpd
    • GlusterFs
    • git/gitlab
    • freeswitch
    • fastdfs
    • ELK
    • docker
    • centos7
  • 页面
    • #1742(无标题)
  • 友链
      请到[后台->主题设置->友情链接]中设置。
Help?

Please contact us on our email for need any support

Support
    首页   ›   GlusterFs   ›   正文
GlusterFs

gluster创建存储卷

2022-10-28 23:33:27
856  0 0

使用glusterd创建跨主机的存储卷
官方文档 https://docs.gluster.org/en/latest/Administrator-Guide/Setting-Up-Volumes/
其他文档 https://www.hellodemos.com/hello-glusterfs/glusterfs-gluster-quick-start-3.html

目前官方文档只支持5种类型的卷

1 Distributed
2 Replicated
3 Distributed Replicated 
4 Dispersed
5 Distributed Dispersed

1 分布 Distributed(默认)

不指定类型,默认创建Distribute分布式卷。
所有文件分布在三节点上,文件唯一,没有副本

创建
gluster volume create volume-t1 master:/test/t1 node01:/test/t1 node02:/test/t1
启动
gluster volume start volume-t1
挂载
mkdir /t1 && mount -t glusterfs master:/volume-t1 /t1

2 副本 Replicated

文件复制到3个节点中,每个节点内容一样
gluster volume create volume-t3 replica 3 master:/test/t3 node01:/test/t3 node02:/test/t3

gluster volume create <VOLNAME> replica 2 arbiter 1 host1:brick1 host2:brick2 host3:brick3
#仲裁器卷是副本 3 卷,其中第三块砖充当仲裁器砖。此配置具有防止发生脑裂的机制

3 分布副本 Distributed Replicated

三个主机,每个主机一块磁盘,创建3个副本和3个分片的卷
每个主机的 {brick1 brick2 brick3} 为分片,构成整个文件夹的所有文件,
master的 brick1 、node01的brick1 、node02的brick1 为副本,保存的文件都是同样的

gluster volume create recording replica 3  arbiter 1  \
  master:/test/brick1 \
  node01:/test/brick1 \
  node02:/test/brick1 \
  node01:/test/brick2 \
  node02:/test/brick2 \
  master:/test/brick2 \
  node02:/test/brick3 \
  master:/test/brick3 \
  node01:/test/brick3

4 Dispersed

......

5 Distributed Dispersed

......

6 条带

将文件切割成数据块,分别存储到 各个节点中 ( 类似raid 0 )
gluster volume create volume-t4 stripe 3 master:/test/t4 node01:/test/t4 node02:/test/t4
#已废弃,无法创建
评论 (0)

点击这里取消回复。

欢迎您 游客  

Copyright © 2025 网站备案号 : 蜀ICP备2022017747号
smarty_hankin 主题. Designed by hankin
主页
页面
  • #1742(无标题)
博主
tang.show
tang.show 管理员
linux、centos、docker 、k8s、mysql等技术相关的总结文档
215 文章 3 评论 215582 浏览
测试
测试