Fork me on GitHub
Suzf  Blog

Tag GlusterFS

How-to expand GlusterFS replicated clusters by one server

This has come up several times in the last week. "I have 2n servers with 2 or 4 bricks each and I want to add 1 more server. How do I ensure the new server isn't a replica of itself?" This isn't a simple thing to do. When you add bricks, replicas are added with each set of bricks in the replica count. For "replica 2", each 2 new bricks added forms a replica pair. To prevent your two new bricks on the new server from being replicas of themselves, you'll need to move an old brick to the new server. This is done with the replace-brick command. replica_expansion So first we move server1:/data/brick2 to server3:/data/brick2
gluster volume replace-brick $volname $from $to start
Monitor for completion
watch gluster volume replace-brick $volname $from $to status
Once it's completed then commit the change
gluster volume replace-brick $volname $from $to commit
Check your data to ensure it's all working right. If not, panic! Well, I suppose you could come join us in the IRC channel to help you figure out why, but it really should just work. First thing we're going to tell you is to check the logs, so might as well do that too. Ok, now that your data's all moved, your volume is completely operational and all it's circuits are functioning perfectly, you're ready to add your two new bricks. Save yourself some time and just format the brick store that's mounted at server1:/data/brick2. You'll have to wipe it and it's xattrs anyway, so that's much quicker.
gluster volume add-brick $volname server1:/data/brick2 server3:/data/brick1
gluster volume rebalance $volname start
And you're all set.

GlusterFS 集群文件系统介绍

来源: 作者:久坐尘埃


GlusterFS是Scale-Out存储解决方案Gluster的 核心,它是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端。GlusterFS借助TCP/IP或 InfiniBand RDMA网络将物理分布的存储资源聚集在一起,使用单一全局命名空间来管理数据。GlusterFS基于可堆叠的用户空间设计,可为各种不同的数据负载提 供优异的性能。


图1 GlusterFS统一的挂载点

GlusterFS 支持运行在任何标准IP网络上标准应用程序的标准客户端,如图2所示,用户可以在全局统一的命名空间中使用NFS/CIFS等标准协议来访问应用数据。 GlusterFS使得用户可摆脱原有的独立、高成本的封闭存储系统,能够利用普通廉价的存储设备来部署可集中管理、横向扩展、虚拟化的存储池,存储容量 可扩展至TB/PB级。

[译]Glusterfs Quick Start Guide

Step 1 – Have at least two nodes

在这两个节点上系统为 Fedora 22 (or later)这里以 Ubuntu 14.04.4 LTS 为例


--  eva

-- cali

内部网络互连 至少俩块硬盘,一个安装 OS,一个用来做 GlusterFS 的存储(sdb)。你会想从操作系统安装单独的GlusterFS存储,这将模拟真实的部署。 注意: GlusterFS 在 /var/lib/glusterd 下存储它的动态生成的配置文件。如果在任何时候GlusterFS无法写入这些文件(例如,当备份文件已满),它会给您的系统带来异常的行为; 或者更糟,完全把你的系统脱机。明智的做法是对目录创建单独的分区,例如 /var/log 以确保不会发生这种情况。