gluster简介

glusterfs是基于fuse设计的文件系统,与其它文件系统有两个最终要的不同之处:

  1)用户层的文件系统,开发简单,稳定性好(不会搞死内核);

  2)层次式的调用,组件形式的开发;

因为对glusterfs的学习还在初级阶段,因此从头开始写起!

1。安装

     可以使用源码安装,先安装fuse,再安装glusterfs;

     安装fuse

     ./configure;

     make install;

     modprobe fuse;

    安装glusterfs:

    sh autogen.sh

    ./configure --disable bdb(要不要那个自己选,可以用./configure --help看)

    make install

2. 写vol

   server.vol

volume brick
type storage/posix
option directory /export
end-volume

volume server
type protocol/server
subvolumes colon-o
option transport-type tcp
option auth.addr.brick.allow *
end-volume

client.vol

volume client1
type protocol/client
option transport-type tcp
option remote-host 192.168.1.1 //sever address
option remote-subvolume brick
end-volume

volume client2
type protocol/client
option transport-type tcp
option remote-host 192.168.1.2 //sever address
option remote-subvolume brick
end-volume

volume distribute
type cluster/distribute
subvolumes client1 client2
end-volume

3.启动服务
server端服务:glusterfsd -f $GLUSTERFSPATH/server.vol
客户端挂载:glusterfs -f $GLUSTERFSPATH/client.vol /mnt/glusterfs

启动客户端后就可以使用glusterfs文件系统了,客户端所写的文件会被放置到这两个server上,放置的原则是按照文件名hash。



 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值