GlusterFS简单安装与配置
2014-09-15 17:22
337 查看
服务器:
IP:192.168.5.50
客户端:
IP:192.168.10
服务器端配置:
1、建立共享目录:
[root@test50 gdisk1]# pwd
/home/pubserver/gdisk1
2、建立服务目录:
/home/pubserver/gluster
3、服务端配置:
[root@test50 gdisk1]# cat /etc/glusterfs/server.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/dir1 # Export this directory
#end-volume
### Add network serving capability to above brick.
#volume server
#type protocol/server
#option transport-type tcp/server
#option bind-address 192.168.5.50 # Default is to listen on all interfaces
#option listen-port 6996 # Default is 6996
#subvolumes brick
#option auth.addr.brick.allow * # Allow access to “brick” volume
#end-volume
volume brick
type storage/posix
option directory /home/pubserver/gdisk1
end-volume
volume server
type protocol/server
option transport-type tcp
option transport.socket.bind-address 192.168.5.50
option transport.socket.listen-port 6996
subvolumes brick
option auth.addr.brick.allow 192.168.5.*
end-volume
4、启动服务
glusterfsd -f /etc/glusterfs/server.vol -l glusterfs.log
日志文件:glusterfs.log
客户端配置:
1、建立客户端的目录:
[root@localhost glusterfs]# pwd
/home/pubserver/glusterfs
2、配置客户端:
[root@localhost glusterfs]# cat /etc/glusterfs/client.vol
volume client
type protocol/client
option transport-type tcp
option remote-host 192.168.5.39
option transport.socket.remote-port 6996
option remote-subvolume brick
end-volume
3、启动客户端:
glusterfs -l glusterfs.log -f /etc/glusterfs/client.vol /mnt/
如果提示:mount Transport endpoint is not connected
这个错误,很可能是防火墙没有关闭的原因。
4、查看挂载文件:
[root@localhost glusterfs]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 48G 8.9G 36G 20% /
tmpfs 935M 80K 935M 1% /dev/shm
/dev/sda1 291M 81M 195M 30% /boot
/etc/glusterfs/client.vol
18G 3.3G 14G 20% /mnt
注:服务端的目录 /home/pubserver/gdisk1 被挂载到客户端的/mnt目录上。
服务器:
IP:192.168.5.50
客户端:
IP:192.168.10
服务器端配置:
1、建立共享目录:
[root@test50 gdisk1]# pwd
/home/pubserver/gdisk1
2、建立服务目录:
/home/pubserver/gluster
3、服务端配置:
[root@test50 gdisk1]# cat /etc/glusterfs/server.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/dir1 # Export this directory
#end-volume
### Add network serving capability to above brick.
#volume server
#type protocol/server
#option transport-type tcp/server
#option bind-address 192.168.5.50 # Default is to listen on all interfaces
#option listen-port 6996 # Default is 6996
#subvolumes brick
#option auth.addr.brick.allow * # Allow access to “brick” volume
#end-volume
volume brick
type storage/posix
option directory /home/pubserver/gdisk1
end-volume
volume server
type protocol/server
option transport-type tcp
option transport.socket.bind-address 192.168.5.50
option transport.socket.listen-port 6996
subvolumes brick
option auth.addr.brick.allow 192.168.5.*
end-volume
4、启动服务
glusterfsd -f /etc/glusterfs/server.vol -l glusterfs.log
日志文件:glusterfs.log
客户端配置:
1、建立客户端的目录:
[root@localhost glusterfs]# pwd
/home/pubserver/glusterfs
2、配置客户端:
[root@localhost glusterfs]# cat /etc/glusterfs/client.vol
volume client
type protocol/client
option transport-type tcp
option remote-host 192.168.5.39
option transport.socket.remote-port 6996
option remote-subvolume brick
end-volume
3、启动客户端:
glusterfs -l glusterfs.log -f /etc/glusterfs/client.vol /mnt/
如果提示:mount Transport endpoint is not connected
这个错误,很可能是防火墙没有关闭的原因。
4、查看挂载文件:
[root@localhost glusterfs]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 48G 8.9G 36G 20% /
tmpfs 935M 80K 935M 1% /dev/shm
/dev/sda1 291M 81M 195M 30% /boot
/etc/glusterfs/client.vol
18G 3.3G 14G 20% /mnt
注:服务端的目录 /home/pubserver/gdisk1 被挂载到客户端的/mnt目录上。
相关文章推荐
- glusterfs简单安装配置
- glusterfs安装和简单配置
- 安装VS.NET插件AnkhSVN,通过简单配置让其支持.svn和_svn,并其很好的支持web project
- 在win下打造linux环境: cygwin的安装和简单配置
- cygwin的安装和简单配置
- MY SQL简单安装配置
- windows2008安装及简单配置
- Linux下Apache2.0简单安装、配置、测试过程
- cygwin的安装和简单配置
- 第四篇:glassfish的简单安装配置(windows)
- FreeNAS的安装和简单配置(杀猫)
- 安装VS.NET插件AnkhSVN,通过简单配置让其支持.svn和_svn,并其很好的支持web project
- lomboz插件的安装配置及开发简单的应用系统
- cygwin的安装和简单配置(转)
- 简单建立安装和配置symantec内部LiveUpdate服务器的方法
- Apache + MySQL + PHP + phpMyAdmin在WinXP的简单安装和配置
- Win2000 Server 上安装配置JDK,Tomcat,SqlServer2000和JDBC,运行管理JSP简单网站的实验
- MapGuide 的在项目中运用的简单说明及安装与配置
- MYSQL简单安装配置
- ISA防火墙简单安装配置实例