入门的就不提了,直接从入门之后的说起。。。
源码安装3.2 . 从3.0.8开始 glusterfs 这玩意本来文档就少的可怜,到了3.2压根就表明一点点。。
感觉gluster 不重视这快了,重点发展那个虚拟化平台。。 想了解个所以然 只有通过看代码。。。
3.2 中你会发现少了 scheduler 包括里面的
alu random rr 等 loadbalance Translators 可恶的是 doc 里面的 tanslator-options 压根没提
社区询问得到回复。。。
Are Booster removed from the glusterfs 3.1.0 ?
1 Answer •3 days agoUnfollow
▲
▼
Vijay Bellur
0 votes
Booster is not supported in all 3.x versions
1 Comment |3 days ago
但是做集群的时候依依旧 分布到各个bricks上。 这个后面代码分析。
输入 glusterd 会自动启动并且根据配置信息恢复 服务器的vol peer等信息。
配置文件路径 /etc/glusterd/
/etc/glusterd/vols : 这里面放置了 gluster> volume create 的卷组信息。
比如建立了一个 名叫kko 的卷组,就可以在
/etc/glusterd/vols/kko
下发现关于这个vols的信息。
drwxr-xr-x 4 root root 4096 2011-05-14 02:19 ./
drwxr-xr-x 3 root root 4096 2011-05-18 18:55 ../
-rw-r--r-- 1 root root 895 2011-05-13 04:37 kko.192.168.100.33.home-g1.vol
drwxr-xr-x 2 root root 4096 2011-05-13 04:37 bricks/
-rw-r--r-- 1 root root 15 2011-05-18 18:53 cksum
-rw-r--r-- 1 root root 174 2011-05-13 04:37 info
-rw-r--r-- 1 root root 895 2011-05-13 04:37 kko.192.168.100.54.home-g1.vol
-rw-r--r-- 1 root root 1043 2011-05-13 04:37 kko-fuse.vol
drwxr-xr-x 2 root root 4096 2011-05-18 18:53 run/
其中 kko.192.168.100.54.home-g1.vol 就是关于该bricks的 Translators信息。
我尝试把 这个文件隐藏之后,发现卷组的 bricks丢失 ,只有在你对该挂载点操作的时候,会发现奇怪的问题。。
回复该vol配置,需要重启gluster 后,一切恢复
看一下 执行glusterd 会出现哪些进程
root@ubuntu:/etc/glusterd/vols/kko# ps -ef|grep glusterfsd
root 3579 1 6 19:14 ? 00:00:00 glusterd
root 3631 1 0 19:14 ? 00:00:00 /usr/local/sbin/glusterfsd --xlator-option kko-server.listen-port=24010 -s localhost --volfile-id kko.192.168.100.33.home-g1 -p /etc/glusterd/vols/kko/run/192.168.100.33-home-g1.pid -S /tmp/3e01b34f148d44fd35cc9726bef4c035.socket --brick-name /home/g1 --brick-port 24010 -l /usr/local/var/log/glusterfs/bricks/home-g1.log
root 3635 1 4 19:14 ? 00:00:00 /usr/local/sbin/glusterfs -f /etc/glusterd/nfs/nfs-server.vol -p /etc/glusterd/nfs/run/nfs.pid -l /usr/local/var/log/glusterfs/nfs.log
从这里可以看到gluster的一些秘密:
他使用 -f
/etc/glusterd/nfs/nfs-server.vol
来表示当前服务端的信息。 所以可以直接修改这个文件。
客户端没有发现这个文件,那是要自己写么 client的日志文件可以看到
写道
root@ubuntu:/etc/glusterd/vols#
root 1962 1 0 18:57 ? 00:00:02 /usr/local/sbin/glusterfs --log-level=INFO --volfile-id=/kko --volfile-server=192.168.100.54 /mnt/szxm
这里 没有指定 log ,那么就在默认的地方
root@ubuntu:/usr/local/var/log/glusterfs
drwxr-xr-x 2 root root 4096 2011-05-17 22:00 ./
drwxr-xr-x 3 root root 4096 2011-05-16 01:27 ../
-rw-r--r-- 1 root root 14018 2011-05-17 02:33 bak_mnt-szxm.log
-rw-r--r-- 1 root root 0 2011-05-17 21:48 .cmd_log_history
-rw-r--r-- 1 root root 4554 2011-05-18 19:32 mnt-szxm.log
-rw-r--r-- 1 root root 534 2011-05-16 01:54 usr-local-etc-glusterfs-glusterfs.vol.log
这个用挂载点命令的文件
写道
[2011-05-18 19:32:00.904344] I [fuse-bridge.c:3218:fuse_thread_proc] 0-fuse: unmounting /mnt/szxm
[2011-05-18 19:32:17.808040] W [write-behind.c:3023:init] 0-kko-write-behind: disabling write-behind for first 0 bytes
[2011-05-18 19:32:17.837283] I [client.c:1935:notify] 0-kko-client-0: parent translators are ready, attempting connect on transport
[2011-05-18 19:32:17.837939] I [client.c:1935:notify] 0-kko-client-1: parent translators are ready, attempting connect on transport
Given volfile:
+------------------------------------------------------------------------------+
1: volume kko-client-0
2: type protocol/client
3: option remote-host 192.168.100.33
4: option remote-subvolume /home/g1
5: option transport-type tcp
6: end-volume
7:
8: volume kko-client-1
9: type protocol/client
10: option remote-host 192.168.100.54
11: option remote-subvolume /home/g1
12: option transport-type tcp
13: end-volume
14:
15: volume kko-dht
16: type cluster/distribute
17: subvolumes kko-client-0 kko-client-1
18: end-volume
19:
20: volume kko-write-behind
21: type performance/write-behind
22: subvolumes kko-dht
23: end-volume
24:
25: volume kko-read-ahead
26: type performance/read-ahead
27: subvolumes kko-write-behind
28: end-volume
29:
30: volume kko-io-cache
31: type performance/io-cache
32: subvolumes kko-read-ahead
33: end-volume
34:
35: volume kko-quick-read
36: type performance/quick-read
37: subvolumes kko-io-cache
38: end-volume
39:
40: volume kko-stat-prefetch
41: type performance/stat-prefetch
42: subvolumes kko-quick-read
43: end-volume
44:
45: volume kko
46: type debug/io-stats
47: option latency-measurement off
48: option count-fop-hits off
49: subvolumes kko-stat-prefetch
50: end-volume
+------------------------------------------------------------------------------+
原来从服务端那边获得了。。。
把 其中的 volume 信息复制出来,保存在 一个 client.vol 文件中
然后执行
glusterfs -f /etc/glusterd/client.vol /mnt/szxm
Everything is fine !~
发现peer启动之后 ,不能自动感知, 如果你手动修改了 vols信息, 该volume 就会出现问题
下面是解析配置文件的步骤
会产生一个线程 ,用于监听信号 如nginx 那样
[New Thread 0xb4c1bb70 (LWP 8767)]
[New Thread 0xb5ef6b70 (LWP 8766)]
[New Thread 0xb6943b70 (LWP 8765)]
glusterfs_sigwaiter
glusterfs_volumes_init
#0 parse_opts (key=16777219, arg=0x0, state=0xbffff0b4) at glusterfsd.c:455
#1 0xb7eb4532 in ?? () from /lib/libc.so.6
#2 0xb7eb4d67 in argp_parse () from /lib/libc.so.6
#3 0x0804cdb1 in parse_cmdline (argc=1, argv=0xbffff7f4, ctx=0x8074008) at glusterfsd.c:1033
#4 0x0804d38b in main (argc=1, argv=0xbffff7f4) at glusterfsd.c:1454
glusterfs_volumes_init()
gf_log_volume_file()
fp = get_volfp (ctx);
glusterfs_process_volfp()
preprocess()/*这里会对配置文件做一些统计处理*/
这里可以看到 gluster 其实先读取了
/usr/local/etc/glusterfs
文件中的工作目录,然后在进行上面提到的操作
root@ubuntu:/usr/local/etc/glusterfs# cat glusterd.vol
volume management
type mgmt/glusterd
option working-directory /etc/glusterd
option transport-type socket,rdma
option transport.socket.keepalive-time 10
option transport.socket.keepalive-interval 2
end-volume
所以你可以把你的 配置文件工程在这里修改。。 好奇怪的设计。。。。
以上仅限于服务端 , 客户端无所谓 不用我解释吧。。
- 大小: 101.4 KB
分享到:
相关推荐
gluster volume create <name> replicate <n> <ip>:<path> <ip2>:<path> # create replicated distributed fs ##火花 etcdctl get /services/spark-master # has master IP source /run/flannel/subnet.env sudo ...
按步骤运行的步骤: git clone [your fork for this repo] 创建一个虚拟环境: virtualenv <virtual> 激活virtual-env: source <virtual>/bin/activate cd [the-fork] for [the-fork] 运行pip3 in
离线安装包,亲测可用
glusterfs 管理手册 3.3.0 非常好用的分布式文件系统
关于Glusterfs分布式文件系统的总结
glusterfs安装包-centos6.6
GlusterFS 101培训主要针对企业内训,同时面向IT主管、运维人员、测试人员、研发人员以及售前售后人员,提供GlusterFS相关基本原理、系统运维、软件测试、研发定制、解决方案等培训内容。
2. GlusterFS concepts 3. Introduction to GlusterFS 4. Introduction to DHT - the distribution model 5. Scalability and reliability in GlusterFS 6. Features in DHT 7. Performance translators 8. Demo 9. ...
GlusterFS学习笔记.docx
glusterfs 结构体系分析,挺好的文档。
一些重要的概念与进程前面提到了一些 glusterfs 的数据内存模型,还有一些 posxi 接口的实现,那么 glusterfs 当中其中还有一些其他比较重要
通过keepalived,实现多台GlusterFS高可用的存储配置方案。2个节点的GlusterFS无法避免脑裂问题,多台GlusterFS如何提供统一的挂载服务,通过该技术方案,完美的实现了VIP方式的高可用的GlusterFS存储方案。
Glusterfs5.0 Ubuntu 18.04离线安装包和安装说明,测试可用
GlusterFS分布式文件系统架构介绍,EHA算法介绍,5中分布式卷的详细介绍,性能测试对比
GlusterFS与Ceph是不一样的存贮系统,GlusterFS更加针对分布式文件系统,虽然目前开发者也正在努力增加块与对象存贮服务。 由于两者在设计理念等各个方面有所不同,单纯的测试比较从功能应用的角度来说意义不大(如...
GlusterFS文件系统的搭建和使用,运维操作
GlusterFS入门学习,了解分布式存储系统
这篇文章主要是自己对英文版的GlusterFS系统管理手册进行翻译,并加入一些自己的理解!希望大家能一起学习一起进步!
GlusterFS,glusterfs,分布式文件系统
glusterfs分布式文件系统3.7.9====稳定版====全家桶安装包