glusterfs 客户端访问

访问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
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GlusterFS是一个分布式文件系统,可以将多个存储节点组合成一个统一的存储池。通过配置本地yum源安装glusterfs相应软件并启动服务,可以在节点上安装glusterfsglusterfs-server、glusterfs-fuse和glusterfs-rdma等软件包,并启动glusterd服务。\[1\] 在挂载和卸载卷方面,可以使用mount命令以glusterfs方式挂载卷,也可以指定传输方式进行挂载。例如,使用以下命令挂载卷: mount -t glusterfs -o transport=rdma server1:/test-volume /mnt/glusterfs 卸载卷可以使用umount命令。\[2\] GlusterFS的工作原理是,客户端或应用程序通过GlusterFS的挂载点访问数据,Linux系统内核通过VFS API接收请求并处理,然后将数据递交给FUSE内核文件系统。FUSE文件系统将数据通过/dev/fuse设备文件递交给GlusterFS客户端客户端通过网络将数据传递至远端的GlusterFS服务器,并写入到服务器存储设备上。\[3\] 综上所述,GlusterFS是一个分布式文件系统,可以通过配置本地yum源安装相应软件并启动服务来使用。可以使用mount命令挂载和卸载卷,并了解GlusterFS的工作原理。 #### 引用[.reference_title] - *1* *3* [GlusterFS部署](https://blog.csdn.net/Rikkatang/article/details/110131327)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [GlusterFS常用命令集](https://blog.csdn.net/WF_crystal/article/details/128726402)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值