使用GlusterFS在四个存储节点划分Mandriva 2010.0

本教程将介绍如何在四个单个存储服务器(运行Mandriva)中进行数据条带化(逻辑顺序数据的分段,例如单个文件,以便可以以循环方式将段分配给多个物理设备,从而并行分配) 2010.0)与GlusterFS 。 客户端系统(Mandriva 2010.0)也将能够访问存储,就像它是本地文件系统一样。 GlusterFS是一种能够缩放到几个peta字节的集群文件系统。 它将Infiniband RDMA或TCP / IP互连的各种存储砖聚合成一个大型并行网络文件系统。 存储砖可以由诸如具有SATA-II RAID和Infiniband HBA的x86_64服务器的任何商品硬件制成。

请注意,这种存储不提供任何高可用性/容错功能,如复制存储的情况。

我不会保证这将为您工作!

1初步说明

在本教程中,我使用五个系统,四个服务器和一个客户端:

  • server1.example.com:IP地址192.168.0.100 (服务器)
  • server2.example.com:IP地址192.168.0.101 (服务器)
  • server3.example.com:IP地址192.168.0.102 (服务器)
  • server4.example.com:IP地址192.168.0.103 (服务器)
  • client1.example.com:IP地址192.168.0.104 (客户端)

所有五个系统应该能够解析其他系统的主机名。 如果这不能通过DNS完成,您应该编辑/ etc / hosts文件,使其在所有五个系统上如下所示:

vi /etc/hosts
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1
192.168.0.101   server2.example.com     server2
192.168.0.102   server3.example.com     server3
192.168.0.103   server4.example.com     server4
192.168.0.104   client1.example.com     client1

(也可以在以下设置中使用IP地址而不是主机名,如果您希望使用IP地址,则不需要关心主机名是否可以解决。)

2设置GlusterFS服务器

server1.example.com/server2.example.com/server3.example.com/server4.example.com:

GlusterFS可作为Mandriva 2010.0的软件包提供,因此我们可以安装如下:

urpmi glusterfs-server

命令

glusterfs --version

现在应该显示您刚刚安装的GlusterFS版本(在这种情况下为2.0.6):

[root@server1 administrator]# glusterfs --version
glusterfs 2.0.6 built on Sep 20 2009 06:40:50
Repository revision: v2.0.6
Copyright (c) 2006-2009 Z RESEARCH Inc. <http://www.zresearch.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
[root@server1 administrator]#

接下来我们创建几个目录:

mkdir /data/
mkdir /data/export
mkdir /data/export-ns

现在我们创建GlusterFS服务器配置文件/etc/glusterfs/glusterfsd.vol ,它定义将导出哪个目录( / data / export )以及允许哪个客户端连接( 192.168.0.104 = client1.example.com ):

vi /etc/glusterfs/glusterfsd.vol
volume posix
  type storage/posix
  option directory /data/export
end-volume

volume locks
  type features/locks
  subvolumes posix
end-volume

volume brick
  type performance/io-threads
  option thread-count 8
  subvolumes locks
end-volume

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

请注意,可以使用通配符的IP地址(如192.168。* ),并且可以指定多个以逗号分隔的IP地址(例如192.168.0.104,192.168.0.105 )。

之后我们重新启动GlusterFS服务器:

/etc/init.d/glusterfsd restart
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏