# GlusterFS

**GlusterFS** 是一个自由开源的横向扩展网络文件系统，它将多台服务器的存储整合为一个全局可访问的单一存储池，在通用硬件的用户空间中运行。它由 Gluster 公司创建，该公司成立于 2005 年，目标是利用开源软件和通用硬件简化存储；2011 年 10 月，红帽（Red Hat）以约 1.36 亿美元现金收购了该公司。<sup>[1](https://www.redhat.com/en/about/press-releases/red-hat-to-acquire-gluster)</sup> 该项目称该文件系统适用于云存储和媒体流等数据密集型任务，并报告称已有数千家组织在生产环境中使用，涵盖媒体、医疗、政府、教育、Web 2.0 和金融服务等领域。<sup>[2](https://docs.gluster.org/en/latest/Administrator-Guide/GlusterFS-Introduction/)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | Gluster 成立于 2005 年；红帽于 2011 年 10 月 4 日宣布以约 1.36 亿美元现金收购<sup>[1](https://www.redhat.com/en/about/press-releases/red-hat-to-acquire-gluster)</sup> |
| 架构 | 用户空间文件系统，通过 FUSE 与内核 VFS 交互；无中心元数据服务器，客户端自行计算文件位置并直接与存储砖通信<sup>[3](https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/)</sup><sup> • </sup><sup>[4](https://hysenlabs.com/en/projects/gluster-glusterfs)</sup> |
| 卷类型 | 分布式、复制式、纠删码式（擦除编码）和分布式复制式<sup>[5](https://cd-linux.club/2024/09/03/nfs-vs-cephfs-vs-glusterfs-shared-storage-decision-matrix-benchmarks/)</sup> |
| 地理复制 | 跨地理位置的异步复制，在 GlusterFS 3.2 中引入<sup>[6](https://docs.gluster.org/en/main/Quick-Start-Guide/Architecture/)</sup> |
| 客户端访问 | 原生 GlusterFS 客户端、传统 NFS，或面向 Windows 客户端的 SMB/CIFS<sup>[7](https://docs.gluster.org/en/latest/Install-Guide/Overview/)</sup> |
| 发布模式 | 自 Gluster 10 起每年发布一个大版本，小版本更新维护 12 个月；任意时间点支持最近两个版本<sup>[8](https://docs.gluster.org/en/latest/release-notes/)</sup><sup> • </sup><sup>[9](https://www.gluster.org/release-schedule/)</sup> |
| 许可证 | 采用 GPLv2 和 LGPLv3+ 双许可证<sup>[10](https://github.com/gluster/glusterfs)</sup> |

## 架构

GlusterFS 完全在用户空间中运行。为了与内核的虚拟文件系统（VFS）交互，它使用 FUSE（用户空间文件系统），这是一个内核模块，支持内核 VFS 与非特权用户应用程序之间的交互。当客户端对挂载的文件系统发起系统调用时，VFS 将请求发送给 FUSE 内核模块，后者通过 /dev/fuse 将其传递给客户端用户空间中的 GlusterFS 进程。<sup>[3](https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/)</sup>

客户端和服务端进程由层层堆叠的**翻译器**构建而成，每个翻译器实现 GlusterFS 支持的文件系统操作（fops）。文档中记载的翻译器类型包括：存储（最底层，在本地文件系统上存储和访问数据）、调试（错误与调试接口及统计信息）、集群（处理与存储砖和节点读写相关的数据分布和复制）、加密（对存储数据进行即时加解密）和协议（客户端/服务端通信协议）。<sup>[3](https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/)</sup>

**存储砖**是节点导出的一个目录，卷由存储砖组成。GlusterFS 取消了专用元数据服务器：元数据内嵌在文件存储本身之中，文件位置通过哈希算法（DHT，分布式哈希表）计算得出，因此每个存储砖平等参与，元数据层面不存在单点故障。<sup>[5](https://cd-linux.club/2024/09/03/nfs-vs-cephfs-vs-glusterfs-shared-storage-decision-matrix-benchmarks/)</sup> 由于客户端根据卷布局计算文件位置并直接与存储砖通信，该设计消除了元数据瓶颈，也消除了任何保存全局状态的地方。<sup>[4](https://hysenlabs.com/en/projects/gluster-glusterfs)</sup>

## 卷类型

卷由存储砖按多种拓扑结构组合而成：<sup>[5](https://cd-linux.club/2024/09/03/nfs-vs-cephfs-vs-glusterfs-shared-storage-decision-matrix-benchmarks/)</sup>

- **分布式**：文件按哈希分散到各存储砖，无冗余。
- **复制式**：每个文件写入 N 个存储砖，以容量为代价提供高可用性。
- **纠删码式**：擦除编码，思路类似 RAID 6。
- **分布式复制式**：最常见的生产选择，结合了分布式和复制式两种布局。

**一致性与脑裂。** 当自动文件复制（AFR）模块无法确定副本中哪一份是正确的时，文件即处于脑裂状态；这可能在网络分区后出现，也可能在不同客户端写入不同存储砖时出现，或存储砖进程宕机后恢复但未完成修复时出现。<sup>[11](https://docs.gluster.org/en/latest/Administrator-Guide/Split-brain-and-ways-to-deal-with-it/?trk=article-ssr-frontend-pulse_little-text-block)</sup> 在副本数为 2 的卷中，无法在不损失可用性的前提下防止脑裂。文档中记载的降低风险的方法是使用副本数为 3 的卷和仲裁卷，两者都使用客户端法定人数选项：默认情况下，如果副本子卷未达到法定人数，该子卷将变为只读。<sup>[11](https://docs.gluster.org/en/latest/Administrator-Guide/Split-brain-and-ways-to-deal-with-it/?trk=article-ssr-frontend-pulse_little-text-block)</sup> 在副本数为 3 的卷中，cluster.quorum-type 选项默认设置为 auto，意味着 3 个存储砖中至少 2 个在线才允许写入。<sup>[11](https://docs.gluster.org/en/latest/Administrator-Guide/Split-brain-and-ways-to-deal-with-it/?trk=article-ssr-frontend-pulse_little-text-block)</sup>

**仲裁卷**是复制卷的一个特殊子集，旨在防止脑裂，同时提供与普通副本数为 3 的卷相同的一致性保证，而不消耗 3 倍空间。仲裁配置在每个副本子卷中使用 2 个数据存储砖加 1 个仲裁存储砖；仲裁存储砖仅存储文件和目录名称（树形结构）及扩展属性，不存储文件数据，因此 `ls -l` 显示的文件大小为零字节。它还存储 Gluster 元数据，如 `.glusterfs` 文件夹及其内容。启用仲裁功能会自动将客户端法定人数配置为 auto。<sup>[12](https://docs.gluster.org/en/latest/Administrator-Guide/arbiter-volumes-and-quorum/)</sup>

## 地理复制

地理复制提供跨不同地理位置的数据异步复制，在 GlusterFS 3.2 中引入。<sup>[6](https://docs.gluster.org/en/main/Quick-Start-Guide/Architecture/)</sup> 会话可以配置为通过局域网、广域网、互联网或以级联方式跨多个站点镜像数据。<sup>[13](https://docs.gluster.org/en/v3/Administrator%20Guide/Geo%20Replication/)</sup> 文档中记载的主节点和从节点的最低要求包括 GNU/Linux、GlusterFS 3.6 或更高版本、Python 2.6 或更高版本、主节点侧 OpenSSH 4.0 或更高版本，以及 rsync 3.0.7 或更高版本。<sup>[13](https://docs.gluster.org/en/v3/Administrator%20Guide/Geo%20Replication/)</sup> 检查点功能报告在检查点时间之前创建或修改的所有数据是否已同步，主节点日志文件位于每个主节点的 `/var/log/glusterfs/geo-replication` 目录下。<sup>[13](https://docs.gluster.org/en/v3/Administrator%20Guide/Geo%20Replication/)</sup>

## 性能特征

DHT 设计对大文件效果良好，但对小文件工作负载不利：创建 10,000 个小文件意味着在整个集群中进行 10,000 次哈希查找，且翻译器栈为每次操作增加可测量的延迟。<sup>[5](https://cd-linux.club/2024/09/03/nfs-vs-cephfs-vs-glusterfs-shared-storage-decision-matrix-benchmarks/)</sup> 在并行文件系统读写单个大文件的比较中，GlusterFS 的读取吞吐量快于 Ceph，但慢于 BeeGFS 和 OrangeFS；其写入吞吐量快于 BeeGFS 和 Ceph，但慢于 OrangeFS。<sup>[14](https://scinet.supercomputing.org/community/documents/19/INDIS16_paper08.pdf)</sup>

与 Ceph 相比，两个系统共享相同的总体理念——基于开源、通用硬件的存储，内部复制和算法式文件放置——但在细节上有所不同：GlusterFS 使用基于环的一致性哈希，而 Ceph 使用 CRUSH；GlusterFS 在文件 I/O 路径中只有一种服务器，而 Ceph 有两种。在一个理论上更有利于 Ceph 的基准测试中，GlusterFS 反而胜出；作者将此归因于 Ceph 在某些操作时需要在文件系统和块（RADOS）层联系两台服务器，而 GlusterFS 只需要一次往返。<sup>[15](https://www.gluster.org/glusterfs-vs-ceph/)</sup> 在设计层面，Ceph 在其对象存储之前放置了元数据服务和放置算法，并从这一基础提供块、对象和文件存储，使其成为虚拟机块卷的更自然选择；GlusterFS 无需运行任何元数据层，对于跨几台服务器的 POSIX 文件系统而言是更简单的方案。<sup>[4](https://hysenlabs.com/en/projects/gluster-glusterfs)</sup>

## 发布与支持状态

Gluster 的发布分为大版本和小版本。大版本除错误修复外还包含新功能，小版本则改进稳定性。从 Gluster 10 起，大版本周期从 6 个月改为 1 年，小版本每隔一个月发布一次，持续 12 个月；任意时间点支持最近两个版本，最新的处于“当前”状态，前一个处于“维护”状态。<sup>[8](https://docs.gluster.org/en/latest/release-notes/)</sup><sup> • </sup><sup>[9](https://www.gluster.org/release-schedule/)</sup> Gluster 11.0 于 2023 年 2 月 14 日发布，GitHub 上发布的最新版本是 11.2。<sup>[9](https://www.gluster.org/release-schedule/)</sup><sup> • </sup><sup>[16](https://github.com/gluster/glusterfs/releases)</sup>

在商业方面，红帽 Gluster 存储（Red Hat Gluster Storage）有明确的支持生命周期，至 2024 年 12 月 31 日结束，此后产品达到生命周期终点；RHGS 3.5 是最后一个受支持的发布系列，3.5 之前的版本不再受支持。<sup>[17](https://access.redhat.com/support/policy/updates/rhs)</sup>

## References

1. [Red Hat to Acquire Gluster, Red Hat press release (4 October 2011)](https://www.redhat.com/en/about/press-releases/red-hat-to-acquire-gluster)
2. [GlusterFS Introduction, Gluster Docs](https://docs.gluster.org/en/latest/Administrator-Guide/GlusterFS-Introduction/)
3. [Architecture, Gluster Docs Quick Start Guide](https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/)
4. [GlusterFS: distributed storage setup and alternatives, Hysen Labs](https://hysenlabs.com/en/projects/gluster-glusterfs)
5. [NFS vs CephFS vs GlusterFS: The Shared Storage Decision Matrix, CD-Linux](https://cd-linux.club/2024/09/03/nfs-vs-cephfs-vs-glusterfs-shared-storage-decision-matrix-benchmarks/)
6. [Architecture (geo-replication note), Gluster Docs](https://docs.gluster.org/en/main/Quick-Start-Guide/Architecture/)
7. [Install Guide Overview, Gluster Docs](https://docs.gluster.org/en/latest/Install-Guide/Overview/)
8. [Release Notes index, Gluster Docs](https://docs.gluster.org/en/latest/release-notes/)
9. [Release Schedule, gluster.org](https://www.gluster.org/release-schedule/)
10. [gluster/glusterfs repository, GitHub](https://github.com/gluster/glusterfs)
11. [Split brain and ways to deal with it, Gluster Docs](https://docs.gluster.org/en/latest/Administrator-Guide/Split-brain-and-ways-to-deal-with-it/?trk=article-ssr-frontend-pulse_little-text-block)
12. [Arbiter volumes and quorum options, Gluster Docs](https://docs.gluster.org/en/latest/Administrator-Guide/arbiter-volumes-and-quorum/)
13. [Geo Replication, Gluster Docs Administrator Guide](https://docs.gluster.org/en/v3/Administrator%20Guide/Geo%20Replication/)
14. [Performance Evaluations of Parallel File Systems, INDIS Workshop (SC16)](https://scinet.supercomputing.org/community/documents/19/INDIS16_paper08.pdf)
15. [GlusterFS vs. Ceph, gluster.org](https://www.gluster.org/glusterfs-vs-ceph/)
16. [Releases, gluster/glusterfs, GitHub](https://github.com/gluster/glusterfs/releases)
17. [Red Hat Gluster Storage Life Cycle, Red Hat Customer Portal](https://access.redhat.com/support/policy/updates/rhs)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Cloud, virtualization, and containers › Distributed storage and file systems

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/glusterfs

English original: https://www.edgepedia.org/glusterfs
