GlusterFS

Netkiller Linux Storage 手札

File System, Network File System, Distributed Filesystem...

Mr. Neo Chan, 陈景峰(BG7NYT)

中国广东省深圳市宝安区龙华镇溪山美地
518109
+86 755 29812080
+86 755 29812080
<openunix@163.com>

 

版权 2010, 2011 Netkiller(Neo Chan). All rights reserved.

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

 

文档出处: http://netkiller.sourceforge.net/ | http://netkiller.github.com

文档最近一次更新于 Mon Jul 18 02:09:37 UTC 2011

2010-11-18

系列文档

下面是我多年积累下来的经验整理文档供大家参考:

Netkiller Linux (Basics) 手札 | Netkiller Linux (Advanced) 手札 | Netkiller CentOS 手札 | Netkiller FreeBSD 手札 | Netkiller Shell 手札

Netkiller Linux Web 手札 | Netkiller Linux Monitoring 手札 | Netkiller Linux Storage 手札 | Netkiller Mail System 手札 | Netkiller Version 手札

Netkiller Architect 手札 | Netkiller Developer 手札 | Netkiller Security 手札 | Netkiller Database 手札 | Netkiller MySQL 手札 | Netkiller LDAP 手札

Netkiller Intranet & IDC 手札 | Netkiller Cisco IOS 手札 | Netkiller Studio Linux 手札 | Netkiller Management 手札 | Netkiller Docbook & Latex 手札

 

Download PDF Document 下载PDF文档1 | Download PDF Document 下载PDF文档2

GlusterFS

http://www.gluster.org/

$ apt-cache search glusterfs
glusterfs-client - clustered file-system (client package)
glusterfs-dbg - GlusterFS debugging symbols
glusterfs-examples - example files for the glusterfs server and client
glusterfs-server - clustered file-system (server package)
libglusterfs-dev - GlusterFS development libraries and headers (development files)
libglusterfs0 - GlusterFS libraries and translator modules
    

5.1. glusterfs-server

$ sudo apt-get install glusterfs-server
$ sudo cp /etc/glusterfs/glusterfsd.vol /etc/glusterfs/glusterfsd.vol.orig
	    
$ cat /etc/glusterfs/glusterfsd.vol
### file: server-volume.vol.sample

#####################################
###  GlusterFS Server Volume File  ##
#####################################

#### CONFIG FILE RULES:
### "#" is comment character.
### - Config file is case sensitive
### - Options within a volume block can be in any order.
### - Spaces or tabs are used as delimitter within a line.
### - Multiple values to options will be : delimitted.
### - Each option should end within a line.
### - Missing or commented fields will assume default values.
### - Blank/commented lines are allowed.
### - Sub-volumes should already be defined above before referring.

### Export volume "brick" with the contents of "/home/export" directory.
volume brick
  type storage/posix                   # POSIX FS translator
  option directory /home/export        # Export this directory
end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp
# option transport-type unix
# option transport-type ib-sdp
# option transport.socket.bind-address 192.168.1.10     # Default is to listen on all interfaces
# option transport.socket.listen-port 6996              # Default is 6996

# option transport-type ib-verbs
# option transport.ib-verbs.bind-address 192.168.1.10     # Default is to listen on all interfaces
# option transport.ib-verbs.listen-port 6996              # Default is 6996
# option transport.ib-verbs.work-request-send-size  131072
# option transport.ib-verbs.work-request-send-count 64
# option transport.ib-verbs.work-request-recv-size  131072
# option transport.ib-verbs.work-request-recv-count 64

# option client-volume-filename /etc/glusterfs/glusterfs-client.vol
  subvolumes brick
# NOTE: Access to any volume through protocol/server is denied by
# default. You need to explicitly grant access through # "auth"
# option.
  option auth.addr.brick.allow * # Allow access to "brick" volume
end-volume
$ sudo mkdir /home/export
$ sudo /etc/init.d/glusterfs-server start
$ sudo /etc/init.d/glusterfs-server status
 * GlusterFS server is running.
	    

5.2. glusterfs-client

 

$ sudo apt-get install glusterfs-client
$ sudo cp /etc/glusterfs/glusterfs.vol /etc/glusterfs/glusterfs.vol.orig
        
# cat /etc/glusterfs/glusterfs.vol
### file: client-volume.vol.sample

#####################################
###  GlusterFS Client Volume File  ##
#####################################

#### CONFIG FILE RULES:
### "#" is comment character.
### - Config file is case sensitive
### - Options within a volume block can be in any order.
### - Spaces or tabs are used as delimitter within a line.
### - Each option should end within a line.
### - Missing or commented fields will assume default values.
### - Blank/commented lines are allowed.
### - Sub-volumes should already be defined above before referring.

### Add client feature and attach to remote subvolume
volume client
  type protocol/client
  option transport-type tcp
# option transport-type unix
# option transport-type ib-sdp
  option remote-host 192.168.80.1         # IP address of the remote brick
# option transport.socket.remote-port 6996              # default server port is 6996

# option transport-type ib-verbs
# option transport.ib-verbs.remote-port 6996              # default server port is 6996
# option transport.ib-verbs.work-request-send-size  1048576
# option transport.ib-verbs.work-request-send-count 16
# option transport.ib-verbs.work-request-recv-size  1048576
# option transport.ib-verbs.work-request-recv-count 16

# option transport-timeout 30          # seconds to wait for a reply
                                       # from server for each request
  option remote-subvolume brick        # name of the remote volume
end-volume

### Add readahead feature
#volume readahead
#  type performance/read-ahead
#  option page-size 1MB     # unit in bytes
#  option page-count 2       # cache per file  = (page-count x page-size)
#  subvolumes client
#end-volume

### Add IO-Cache feature
#volume iocache
#  type performance/io-cache
#  option page-size 256KB
#  option page-count 2
#  subvolumes readahead
#end-volume

### Add writeback feature
#volume writeback
#  type performance/write-behind
#  option aggregate-size 1MB
#  option window-size 2MB
#  option flush-behind off
#  subvolumes iocache
#end-volume
mkdir /mnt/glusterfs

glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs
or
mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs
        

fstab

/etc/glusterfs/glusterfs.vol  /mnt/glusterfs  glusterfs  defaults  0  0
        

5.3. Testing

client

touch /mnt/glusterfs/test1
touch /mnt/glusterfs/test2
	    

server

# ll /mnt/glusterfs
total 0
-rw-r--r-- 1 root root 0 Jun 16 11:57 test1
-rw-r--r-- 1 root root 0 Jun 16 11:57 test2
	    

5.4. RAID

http://www.gluster.com/community/documentation/index.php/GlusterFS_User_Guide

http://www.gluster.com/community/documentation/index.php/Storage_Server_Installation_and_Configuration

ref:http://www.howtoforge.com/high-availability-storage-cluster-with-glusterfs-on-ubuntu-p2

5.4.1. Mirror

例 6.1. Mirror

glusterfs-volgen --name store1 --raid 1 gluster1:/home/export gluster2:/home/export
            	

5.4.2. Strip

例 6.2. Strip

glusterfs-volgen --name store1 --raid 0 gluster1:/home/export gluster2:/home/export
时间: 2024-07-29 04:53:58

GlusterFS的相关文章

GlusterFS分布式文件系统的安装配置教程

GlusterFS主要应用在集群系统中,具有很好的可扩展性.软件的结构设计良好,易于扩展和配置,通过各个模块的灵活搭配以得到针对性的解决方案.可解决以下问题:网络存储,联合存储(融合多个节点上的存储空间),冗余备份,大文件的负载均衡(分块). 由于缺乏一些关键特性,可靠性也未经过长时间考验,还不适合应用于需要提供 24 小时不间断服务的产品环境.目前适合应用于大数据量的离线应用,下面一起来看GlusterFS分布式文件系统的安装配置 GlusterFS是一个开源的分布式文件系统,用户可以使用多台

GlusterFS on ZFS on CentOS 6.x x64

原文如下, 但是这里有几点不推荐按照原文来做. 1. zfs set sync=disabled sp1  (不推荐) 如果没有UPS的话, 不推荐关闭sync, 因为任何异常都可能会导致数据丢失.              sync=standard | always | disabled            Controls  the  behavior  of  synchronous  requests  (e.g. fsync, O_DSYNC).              1. s

分布式存储系统GlusterFS安装配置

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://navyaijm.blog.51cto.com/4647068/1258250 一.前言 前段时间我同事玩GlusterFS,下午总算有点时间了,也玩玩,GlusterFS是一个开源的分布式文件系统,于2011年被红帽收购.它具有高扩展性.高性能.高可用性.可横向扩展的弹性特点,无元数据服务器设计使glusterfs没有单点故障隐患,详细介绍请查看官网:www.gluster.o

oVirt 3.4.3-1 add glusterfs volume by ovirt-engine web bug

oVirt 3.4.3-1 的glusterfs volume管理接口可能有点问题, 不能直接通过oVirt engine来添加glusterfs volume. 目前建议手工管理glusterfs volume, 然后直接在Storage中新建glusterfs 的 domain. on 172.16.3.150 and 172.16.3.40 exec # yum install glusterfs{,-server,-fuse,-geo-replication} on 172.16.3.1

分布式文件系统GlusterFS

转自于:http://www.cnblogs.com/zitjubiz/archive/2012/11/30/Distributed_File_System_glusterFS.html GlusterFS是"一套可扩展的开源集群文件系统,并能够轻松为客户提供全局命名空间.分布式前端以及高达数百PB级别的扩展性."这种说法口 气可不小,但GlusterFS也确实把解决大问题--真正的"大"问题当作己任.事实上,Gluster的最大容量为72 brontobyte(没

GlusterFS分布式文件系统

GlusterFS分布式文件系统 刘爱贵 2014/12/27 GlusterFS简介GlusterFS原理剖析GlusterFS应用场景GlusterFS开放问题 GlusterFS分布式文件系统

基于GlusterFS集群文件系统集成系统能称为“超融合系统(HCI)”吗?

   Gartner认为超融合系统是提供共享的计算与存储资源的平台,它基于软件定义存储.软件定义计算.商业化的硬件和统一的管理界面.因此,超融合系统是基于通用服务器资源,计算.存储.网络和管理的高度融合,而不是简单的集成. 联想针对超融合给出的核心概念就是将两个或多个组件组合天然地整合在一个独立的单元中,而不是简单地捆绑在一起.例如: Lenovo AIO,Nutanix将计算和存储融合到单一节点中,具有以下优点:独立单元的扩展,本地I/O处理,通过融合来消除传统计算/存储的竖井式结构. 现在很

GlusterFS的安装及使用

点击链接:Glusterfs 官方示例 一.安装glusterfs-server #在要做分布式文件系统的主机上都需要安装 yum install -y glusterfs-server #所有安装了glusterfs-server的主机,设置服务开机自启动 systemctl enable glusterd #启动glusterfs服务,centos7为例 systemctl start glusterd 二.配置节点 #在任意一台主机上操作,将需要做集群的主机名或IP添加至glusterfs

GlusterFS vs. Ceph:两大主流开源存储对比

   存储世界最近发生了很大变化.十年前,光纤通道SAN管理器是企业存储的绝对标准,但现在的存储必须足够敏捷,才能适应在新的基础架构即服务云环境内运行. GlusterFS和Ceph是在现代云环境中表现最出色的两个敏捷存储系统. 在讲述GlusterFS和Ceph的相同点和区别之前,我们先谈一谈云环境中敏捷存储的一些关键点. 纵向升级和横向扩展.在云环境中,很容易向服务器添加更多存储空间和扩展可用存储池.Ceph和GlusterFS都符合这一需求,让新的存储设备可以轻松融入现有存储产品环境. 高

oVirt 3.4.3-1 cann&#039;t create disk image in GlusterFS DATA STORAGE BUG

前面刚遇到一个不能使用gluster的bug,  http://blog.163.com/digoal@126/blog/static/16387704020147623132332/ 现在又一个, 现在这个是我手工创建的glusterfs volume, 然后在ovirt的storage中新建一个domain, 使用DATA/GlusterFS挂载, 挂载成功了. 但是在后面就出问题了, 创建虚拟机时, 如果选择使用GlusterFS的domain, 新建disk image会失败. 有其他的