使用glusterfs前, 请先阅读
1. http://blog.163.com/digoal@126/blog/static/163877040201476115823746/
2. http://blog.163.com/digoal@126/blog/static/16387704020147623132332/
3. http://blog.163.com/digoal@126/blog/static/16387704020147632024869/
4. http://wiki.ovirt.org/Features/GlusterFS_Storage_Domain
特别需要提醒设置volume的gid, uid和server.allow-insecure.
避免遇到oVirt BUG.
本文所述glusterfs server和oVirt HOST可以分离, 只是测试环境用到了HOST. 如果使用oVirt WEB来创建gluster volume的话, 那么必须先把gluster server host加入oVirt HOST. 本文则不需要, 因为Glusterfs server是手工管理的.
1. 不要使用根目录.
2. 在gluster server服务器安装必要的包(这些包在ovirt yum repo中)
yum install -y glusterfs-server glusterfs-geo-replication vdsm-gluster
glusterfs-3.5.2-1.el6.x86_64
vdsm-gluster-4.14.11.2-0.el6.noarch
glusterfs-cli-3.5.2-1.el6.x86_64
glusterfs-geo-replication-3.5.2-1.el6.x86_64
glusterfs-fuse-3.5.2-1.el6.x86_64
glusterfs-api-3.5.2-1.el6.x86_64
glusterfs-rdma-3.5.2-1.el6.x86_64
glusterfs-server-3.5.2-1.el6.x86_64
glusterfs-libs-3.5.2-1.el6.x86_64
3. 在oVirt HOST主机安装可挂载glusterfs的包, 省得麻烦就全装好了.
yum install -y glusterfs-server glusterfs-geo-replication vdsm-gluster
glusterfs-3.5.2-1.el6.x86_64
vdsm-gluster-4.14.11.2-0.el6.noarch
glusterfs-cli-3.5.2-1.el6.x86_64
glusterfs-geo-replication-3.5.2-1.el6.x86_64
glusterfs-fuse-3.5.2-1.el6.x86_64
glusterfs-api-3.5.2-1.el6.x86_64
glusterfs-rdma-3.5.2-1.el6.x86_64
glusterfs-server-3.5.2-1.el6.x86_64
glusterfs-libs-3.5.2-1.el6.x86_64
4. 在glusterfs server各个主机, 创建glusterfs目录, 不要使用根分区.
mkdir /data01/gfs_b1
5. 开启glusterd服务
service glusterd start
6. peer probe(只需要在其中一台节点, 将其他节点添加进来即可)
on 172.16.3.150 exec : # gluster peer probe 172.16.3.40
7. 创建卷, 卷名gfs1
gluster volume create gfs1 rep 2 transport tcp 172.16.3.150:/data01/gfs_b1 172.16.3.40:/data01/gfs_b1
8. 激活卷
gluster volume start gfs1
9. 在oVirt engine WEB, storage添加domain.
[参考]
1. http://blog.163.com/digoal@126/blog/static/163877040201476115823746/
2. http://blog.163.com/digoal@126/blog/static/16387704020147623132332/
3. http://blog.163.com/digoal@126/blog/static/16387704020147632024869/