glusterfs 客户端访问

  1. 云栖社区>
  2. 博客>
  3. 正文

glusterfs 客户端访问

天飞.h 2015-12-03 11:33:23 浏览1523
展开阅读全文

访问glusterfs- 配置GlusterFS 客户端

访问glusterfs卷有多种方式.
1.使用Gluster Native Client 模式:这种方式提供了高并发,高性能,传输失败恢复机制,但只适用于GNU/Linux.
2.使用NFS协议:NFS v3 版本访问.在GNU/Linux系统已经大量测试过,NFS 也可以实现在其它操作系统上, FreeBSD,  Mac OS X, windows系列,包括Windows 7 (专业版本以上版本) ,Windows Server 2003. 这些NFS 实现方式使用的是gluster NFS server.

3.使用CIFS协议:适合windows系列操作系统使用,Microsoft Windows 的 SAMBA 客户端. 在这种访问模式下, 客户端必须安装Samba软件包.

Gluster Native Client

Gluster Native Client 是基于运行在用户空间的FUSE-based 客户端 . Gluster Native Client 是官方推荐的,是高并发读,高写入性能访问卷最佳模式 .

下面就基于这种模式安装测试

安装Gluster Native Client

在安装Gluster Native Client之前,必须确保FUSE模块已经在客户端操作系统上加载,执行下面的操作确认:

  1. 添加FUSE内核模块:

    点击(此处)折叠或打开

    1. [root@192_168_165_88 ~]# modprobe fuse
    2. [root@192_168_165_88 ~]# lsmod |grep fuse
    3. fuse 49237 4


  2. 验证FUSE模块已经被正确加载:

    点击(此处)折叠或打开

    1. [root@192_168_165_88 ~]# dmesg |grep -i fuse
    2. fuse init (API version 7.10)


Red Hat Package Manager (RPM) 系统安装

  1. 安装依赖包:


    点击(此处)折叠或打开

    1. [root@192_168_165_88 ~]# yum -y install openssh-server wget fuse fuse-libs openib libibverbs

    2. Transaction Summary
    3. =================================================================================================================================================
    4. Install 4 Package(s)
    5. Update 4 Package(s)
    6. Remove 0 Package(s)

    7. Total download size: 1.8 M

    8. Installed:
    9.   fuse.i386 0:2.7.4-8.el5 fuse-libs.i386 0:2.7.4-8.el5 libibverbs.i386 0:1.1.6-3.el5 openib.noarch 0:1.5.4.1-4.el5

    10. Updated:
    11.   openssh-server.i386 0:4.3p2-82.el5 wget.i386 0:1.11.4-3.el5_8.2

    12. Dependency Updated:
    13.   openssh.i386 0:4.3p2-82.el5 openssh-clients.i386 0:4.3p2-82.el5


  2. 确定在glusterfs服务器上开启TCP与UDP端口:24007,24008 .另外,还要打开brick的起始端口 49152 (instead of 24009 onwards as with previous releases). The brick ports assignment scheme is now compliant with IANA guidelines. For example: if you have five bricks, you need to have ports 49152 to 49156 open.

    You can use the following chains with iptables:

    $ sudo iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 24007:24008 -j ACCEPT $ sudo iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 49152:49156 -j ACCEPT

    Note

    If you already have iptable chains, make sure that the above ACCEPT rules precede the DROP rules. This can be achieved by providing a lower rule number than the DROP rule.

  3. 在每个客户端操作系统上安装glusterfs, glusterfs-fuse, and glusterfs-rdma RPM包. glusterfs 包含 Gluster Native Client.glusterfs-fuse 包含挂载FUSE 转换,glusterfs-rdma 包含 OpenFabrics  RDMA module for Infiniband.

    You can download the software at GlusterFS download page.

  4. Install Gluster Native Client on the client.

    $ sudo rpm -i glusterfs-3.3.0qa30-1.x86_64.rpm $ sudo rpm -i glusterfs-fuse-3.3.0qa30-1.x86_64.rpm $ sudo rpm -i glusterfs-rdma-3.3.0qa30-1.x86_64.rpm

    Note

    The RDMA module is only required when using Infiniband.




未完...
参考:http://gluster.readthedocs.org/en/latest/Administrator%20Guide/Setting%20Up%20Clients/

网友评论

登录后评论
0/500
评论
天飞.h
+ 关注