GlusterFS 3.5.3 Combat

Source: Internet
Author: User
Tags glusterfs gluster

Recently studying in Glusterfs


I'm using a distributed replication strategy.


Two servers

g1:10.100.15.111

g2:10.100.15.112


client:10.0.6.149


G1\g2 There is not a host on a 10G hard disk, for storing in user data, respectively, is mounted under the/data.


The operation steps are as follows, the operation all on the G1 server, and two days server Gluster server all start, the communication is normal:

1. Create a storage pool first

Gluster peer probe 10.100.15.112

#这里注意下啊, the document said can use the domain name, with the hosts unsuccessful, do not know whether it is necessary to directly analyze the external.


2. View status

Gluster Peer Status


You will see the host that you just added, and the status is connected.


3. Create a volume

Gluster Volume Create Test-volume Replica 2 transport TCP 10.100.15.111:/data/test-volume 10.100.15.112:/data/ Test-volume


Test-volume is a volume name and can be called casually.

Replica is the data distribution strategy, 2 refers to 1 copies of data, two machines to save a copy.


Glusterfs is not recommended to use/data/directly, so the Test-volume directory is created inside.


Such a cluster is done. Next, when this replication cluster is full, how to scale up.


It's my test. A 10G hard drive was added to the g1\g2 and mounted on the/DATA2


4. Add Brick

Gluster volume Add-brick Test-volume 10.100.15.111:/data2/test-volume 10.100.15.112:/data2/test-volume


After this is added, the client sees that the mounted disk is changed from 10G to 20G, but this time the client writes to the file. All the files are no longer written in the/data directory, but through the policy written in the/DATA2 and/data two directory, two directories are replicated and synchronized with each other.


Next, this glusterfs distributed scheduling strategy

Official Document: Http://gluster.org/community/documentation/index.php/Translators/cluster/unify#GlusterFS_Schedulers


There are several what switch ah, random ah, RR Ah, what else nufa Ah, Alu AH

We are mainly the main talk about the Alu this scheduling.


The ALU is a very advanced scheduling strategy.

The ALU has a lot of sub-scheduling policies, what disk space, disk read-write, disk rate. Based on these sub-policies, the files are written on that disk.


Why is it that the ALU advanced, is it through, these sub-strategies, constantly make the scheduling policy changes.


Let's take a look at some examples of the options given in the official documentation


Option Scheduler Alu

That means, using that strategy

Option Alu.limits.min-free-disk 5%

This option tells Glusterfs to limit the disk's minimum free space, like the example above, we usually when the available space is nearly full, to a certain extent will be expanded, but after the expansion of the space after the size of the inconsistency problem, the subsequent expansion of the hard disk may take a long time to catch up, Or use the rebalance function to auto-balance, which may fill the previous disk, this option is to tell it when the disk space use 95% do not write data to this hard disk.


Option Alu.limits.max-open-files 10000

This option does not quite understand what scenario the application is in, and the translation document means that when the number of open files is greater than 10000, the file is no longer created. Don't quite understand. may also use a lot.


Option Alu.order Disk-usage:read-usage:write-usage:open-files-usage:disk-speed-usage

This means that the ALU uses only those sub-strategies, but does not know if it is a sequential priority issue?


Sub-policy options

Option Alu.disk-usage.entry-threshold 2GB

Option Alu.disk-usage.exit-threshold 60MB

That is, when a hard disk capacity of more than 2GB, began to use this scheduling strategy, or the above example said:/data capacity is greater than/data2 capacity of 2G, then began to write files/data2, know that they have a capacity gap less than 60MB, exit this sub-Dispatch

Option Alu.open-files-usage.entry-threshold 1024

Option Alu.open-files-usage.exit-threshold 32

This is almost the same as above. Open file data volume start.

Option Alu.read-usage.entry-threshold 20%

Option Alu.read-usage.exit-threshold 4%

This is when the reading rate between two hard drives is greater than 20% using this strategy.

Option Alu.write-usage.entry-threshold 20%

Option Alu.write-usage.exit-threshold 4%

This is the Write

Option Alu.disk-speed-usage.entry-threshold

Option Alu.disk-speed-usage.exit-threshold

This is the disk speed, and it is not recommended to set this value on the document.



These are mainly to make the distribution more balanced.


Okay, here's the line, there's a lot of holes in this thing.


Understand or have the wrong place, welcome to correct me.


Discussions are also welcome.

This article is from the "Big Son" blog, please be sure to keep this source http://chris1986.blog.51cto.com/8067169/1584264

GlusterFS 3.5.3 Combat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.