Download repo file from Gluster web site copy to /etc/yum.repos.d/
http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/glusterfs-epel.repo
[root@server ~]# chkconfig iptables off
[root@server ~]# chkconfig ip6tables off
Disable SELINUX
[root@server ~]# vi /etc/selinux/config
reboot
[root@server Downloads]# yum -y install glusterfs glusterfs-fuse glusterfs-geo-replication fuse fuse-devel fuse-libs fuse-ntfs-3g
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
glusterfs-epel | 1.3 kB 00:00
glusterfs-epel/primary | 2.7 kB 00:00
glusterfs-epel 7/7
glusterfs-swift-epel | 1.3 kB 00:00
glusterfs-swift-epel/primary | 2.5 kB 00:00
glusterfs-swift-epel 7/7
Setting up Install Process
No package fuse-devel available.
Package fuse-ntfs-3g-2010.10.2-1.el6.rf.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package glusterfs.x86_64 0:3.3.1-1.el6 will be installed
---> Package glusterfs-fuse.x86_64 0:3.3.1-1.el6 will be installed
---> Package glusterfs-geo-replication.x86_64 0:3.3.1-1.el6 will be installed
--> Processing Dependency: glusterfs-server = 3.3.1-1.el6 for package: glusterfs-geo-replication-3.3.1-1.el6.x86_64
--> Running transaction check
---> Package glusterfs-server.x86_64 0:3.3.1-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================
Installing:
glusterfs x86_64 3.3.1-1.el6 glusterfs-epel 1.8 M
glusterfs-fuse x86_64 3.3.1-1.el6 glusterfs-epel 64 k
glusterfs-geo-replication x86_64 3.3.1-1.el6 glusterfs-epel 104 k
Installing for dependencies:
glusterfs-server x86_64 3.3.1-1.el6 glusterfs-epel 540 k
Transaction Summary
======================================================================================================================================================================
Install 4 Package(s)
Total download size: 2.5 M
Installed size: 9.1 M
Downloading Packages:
(1/4): glusterfs-3.3.1-1.el6.x86_64.rpm | 1.8 MB 00:41
(2/4): glusterfs-fuse-3.3.1-1.el6.x86_64.rpm | 64 kB 00:01
(3/4): glusterfs-geo-replication-3.3.1-1.el6.x86_64.rpm | 104 kB 00:01
(4/4): glusterfs-server-3.3.1-1.el6.x86_64.rpm | 540 kB 00:07
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 46 kB/s | 2.5 MB 00:55
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : glusterfs-3.3.1-1.el6.x86_64 1/4
Installing : glusterfs-fuse-3.3.1-1.el6.x86_64 2/4
Installing : glusterfs-server-3.3.1-1.el6.x86_64 3/4
Installing : glusterfs-geo-replication-3.3.1-1.el6.x86_64 4/4
Installed products updated.
Verifying : glusterfs-fuse-3.3.1-1.el6.x86_64 1/4
Verifying : glusterfs-3.3.1-1.el6.x86_64 2/4
Verifying : glusterfs-server-3.3.1-1.el6.x86_64 3/4
Verifying : glusterfs-geo-replication-3.3.1-1.el6.x86_64 4/4
Installed:
glusterfs.x86_64 0:3.3.1-1.el6 glusterfs-fuse.x86_64 0:3.3.1-1.el6 glusterfs-geo-replication.x86_64 0:3.3.1-1.el6
Dependency Installed:
glusterfs-server.x86_64 0:3.3.1-1.el6
Complete!
[root@server ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.5.101 server.com
192.168.5.102 client
192.168.5.103 server0.com
gluster volume create lgv0 server.com:/data
gluster volume start lgv0
gluster volume info
[root@server ~]# gluster volume create lgv0 server.com:/data
Creation of volume lgv0 has been successful. Please start the volume to access data.
[root@server ~]# gluster volume start lgv0
Starting volume lgv0 has been successful
[root@server ~]# gluster volume info
Volume Name: lgv0
Type: Distribute
Volume ID: 08efd9f5-63f5-4982-89d0-6f150c5dee1f
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: server.com:/data
[root@server ~]# gluster volume set lgv0 auth.allow 192.168.5.102
Set volume successful
[root@server ~]#
Goto Client side
# yum install gluster-client -y
# mkdir /gluster-mount
# mount.glusterfs server.com:/lgv0 /mnt/gluster-mount
# mount -a
# df -HT
[root@client ~]# df -HT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
ext4 5.9G 2.8G 2.8G 50% /
tmpfs tmpfs 523M 91k 523M 1% /dev/shm
/dev/sda1 ext4 508M 35M 448M 8% /boot
server.com:/lgv0
9.7G 1.7G 7.5G 19% /mnt/glusterfs
[root@client ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Dec 21 06:44:38 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_server-lv_root / ext4 defaults 1 1
UUID=11534f37-3f19-4b75-a846-f08685dcdd97 /boot ext4 defaults 1 2
/dev/mapper/vg_server-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
server.com:/lgv0 /mnt/gluster-mount glusterfs defaults,_netdev 0 0
No comments:
Post a Comment