新闻详情

新闻详情

首页 / 资讯中心 / 详情

GlusterFS 集群部署记录 文档

发布时间:2026/9/25 19:55:58来源:尧图网络
GlusterFS 集群部署记录 文档
部署日期2026-09-22部署方式基于项目脚本GFS脚本-尹斌自动化执行软件版本CentOS 7.9 GlusterFS 7.9一、集群拓扑主机名IP角色数据盘brick 路径状态node110.10.10.41存储节点/dev/sdb~sde各10G/tat/sdeglusterd 运行中node210.10.10.42存储节点/dev/sdb~sde各10G/tat/sdeglusterd 运行中node310.10.10.43存储节点/dev/sdb~sde各10G/tat/sdeglusterd 运行中node410.10.10.44存储节点/dev/sdb~sde各10G/tat/sdeglusterd 运行中client10.10.10.40客户端无挂载点 /test/dis-rep已挂载卷网络VMware NAT网关 10.10.10.2主机名解析通过 /etc/hosts5 条映射。二、部署过程1. 环境准备5 台克隆机均完成关闭 firewalld、禁用 SELinux、设置主机名hostnamectl set-hostname。写入 /etc/hosts 的 5 条映射10.10.10.40 client / .41 node1 / .42 node2 / .43 node3 / .44 node4。验证任意节点互 ping 主机名全部可达。2. 存储节点数据盘源机初始仅 1 块系统盘按脚本要求给 node1~4 各补挂 4 块 10G 虚拟数据盘。每台执行printf n\np\n1\n\n\nw\n | fdisk /dev/sd$imkfs.xfs -f /dev/sd${i}1mkdir -p /tat/sd$iecho /dev/sd${i}1 /tat/sd$i xfs defaults 0 0 /etc/fstabmount -a结果/dev/sdb~sde 分区为 sdb1~sde1xfs 挂载到 /tat/sdb~sde。3. yum 源配置关键原机只有一个本地源 local.repobaseurlfile:///mnt缺少 glusterfs-server 包且 yum 缓存失效后 local 源不可用报 repodata/repomd.xml 错误。处理改用阿里云源base / updates / extras / epel / gluster7并将失效 local.repo 改名停用。其中 GlusterFS 7 来自 CentOS Storage SIG 镜像baseurlhttps://mirrors.aliyun.com/centos/7/storage/x86_64/gluster-7/4. 安装服务端node1~4yum install -y glusterfs-server glusterfs glusterfs-fuse glusterfs-rdmasystemctl enable glusterd systemctl start glusterd结果4 台 glusterd 均 activeglusterfs 7.9。5. 组建集群node1gluster peer probe node2gluster peer probe node3gluster peer probe node4gluster peer status # 3 个 peer 全部 Connected遇到问题刚 probe 完 node3 处于 Accepted peer request、node4 被识别为残留 IP建卷报 Host nodeX is not in Peer in Cluster state。等待状态收敛后重试成功。6. 创建分布式复制卷node1gluster volume create dis-rep replica 2 \node1:/tat/sde node2:/tat/sde node3:/tat/sde node4:/tat/sde forcegluster volume start dis-rep结果Type Distributed-Replicate2×2 4 brick全部 online。7. 客户端部署clientyum install -y glusterfs glusterfs-fusemkdir -p /test/dis-repmount.glusterfs node1:dis-rep /test/dis-rep结果挂载成功挂载点 20G。写入 5 个测试文件 test1~5.txt各 5M hello.txt 验证读写。三、验证结果1. 客户端视角[rootclient ~]# ls -lh /test/dis-rep/test1.txt test2.txt test3.txt test4.txt test5.txt hello.txt 各 5Mdf -h | grep dis-rep → node1:dis-rep 20G /test/dis-rep2. 数据分布体现「分布式复制卷」特性存储节点brick 内文件node1test1.txt test3.txt test4.txtnode2test1.txt test3.txt test4.txt与 node1 一致复制node3test2.txt test5.txtnode4test2.txt test5.txt与 node3 一致复制复制关系node1↔node2 成组、node3↔node4 成组replica 2。分布关系test1/3/4 在一组test2/5 在另一组分布式。3. 卷状态gluster volume info dis-rep → Type: Distributed-Replicate, Status: Startedgluster volume status dis-rep → 4 brick 全部 online状态列 Y四、问题与解决记录问题现象解决本地源缺 glusterfs-serveryum 找不到 glusterfs-server改用阿里云 Storage SIG gluster-7 源local 源缓存失效yum 报 file:///mnt repodata/repomd.xml 错误改名停用 local.repopeer 状态未收敛建卷报 nodeX not in Peer in Cluster等待 5~10 秒或重新 probe克隆机 DHCP 残留 IPnode4 在 peer 列表显示为 10.10.10.135不影响集群静态 IP 已生效五、后续建议可继续做「自愈实验」手动 kill 一个 brick 的 glusterfsd 进程验证复制卷高可用与 heal。如需让各节点只保留静态 IP可执行systemctl restart network清理 DHCP 残留地址。
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

2026年广东三层高真空烤箱厂家怎么选,欧瑞动力科技正规资质受信赖 2026/9/25 22:38:23

2026年广东三层高真空烤箱厂家怎么选,欧瑞动力科技正规资质受信赖

2026年广东三层高真空烤箱厂家怎么选,欧瑞动力科技正规资质受信赖惠州市欧瑞动力自动化科技有限公司成立于2010年,是一家深耕真空烘烤细分赛道的新能源装备制造商,业务覆盖锂电池、超级电容、固态电池、半导体新材料领域的核心除水烘干装备研…

阅读更多 →
河南防爆柜源头生产厂家哪家售后好?中荣防爆广受信赖排名前五 2026/9/25 22:38:17

河南防爆柜源头生产厂家哪家售后好?中荣防爆广受信赖排名前五

在高危化工、石化、油田、制药等行业的生产场景中,防爆柜是保障电气安全、规避爆炸风险的核心设备,而完善的售后保障,直接关系到项目的顺利验收与后续长期稳定运行。不少行业采购都有过踩坑的经历,买到售后薄弱的产品,…

阅读更多 →
岳阳君山区看实木家具,南翔万商四楼成品家具品牌集合店有哪些 2026/9/25 22:38:10

岳阳君山区看实木家具,南翔万商四楼成品家具品牌集合店有哪些

岳阳哪里买成品家具推荐靠谱的店,岳阳买红木成套家具哪家款式多,岳阳买沙发推荐哪家成品家具店,不少君山区的业主近期都在问,君山区看实木家具,南翔万商四楼成品家具品牌集合店有哪些?现在岳阳本地业主选成品家具&…

阅读更多 →
highlight.io 视角下的 Web 应用调试流程(上篇):从 Bug 分类到修复的完整方法论 2026/9/25 22:37:45

highlight.io 视角下的 Web 应用调试流程(上篇):从 Bug 分类到修复的完整方法论

可观测性后端 【免费下载链接】highlight highlight.io: The open source, full-stack monitoring platform. Error monitoring, session replay, logging, distributed tracing, and more. 项目地址: https://gitcode.com/gh_mirrors/hi/highlight 点击查看 免费下…

阅读更多 →
Codeg移动端:iOS/Android客户端3步连接,随时随地审批权限并管理AI编码会话 2026/9/25 22:37:45

Codeg移动端:iOS/Android客户端3步连接,随时随地审批权限并管理AI编码会话

Codeg移动端:iOS/Android客户端3步连接,随时随地审批权限并管理AI编码会话 【免费下载链接】codeg Collaborative multi-agent AI coding workspace: aggregate sessions from Claude Code, Codex, OpenCode, Pi, Grok Build, etc. Desktop app, self-ho…

阅读更多 →
用 Claude opus-4.8 做需求拆解:从一句“加个文件上传”到可评审接口方案(TaoToken 统一 Key 接入版) 2026/9/25 22:37:38

用 Claude opus-4.8 做需求拆解:从一句“加个文件上传”到可评审接口方案(TaoToken 统一 Key 接入版)

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉