November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

GLUSTER ON CENTOS 6.5

cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.45 cluster1.rmohan.com cluster1
192.168.1.41 cluster2.rmohan.com cluster2
192.168.1.42 cluster3.rmohan.com cluster3

 

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*

rpm –import https://fedoraproject.org/static/0608B895.txt
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install yum-priorities
vi /etc/yum.repos.d/epel.repo

priority=10
[epel]
name=Extra Packages for Enterprise Linux 6 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

glusterfsd –version
gluster peer probe cluster2.rmohan.com
gluster peer status
mkdir /data
gluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:/data cluster2.rmohan.com:/data
gluster volume start testvol

netstat -tap | grep glusterfsd
gluster volume info
mkdir /data/test
mkdir /data/test1
mkdir /data/test2
mkdir /data/test3
gluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:/data cluster2.rmohan.com:/data
gluster volume start testvol
gluster peer status

mkdir /data/test3
ls -la
cd /data/
vi test

 
Client
yum install glusterfs-client
mkdir /mnt/glusterfs
mount.glusterfs cluster1.rmohan.com:/testvol /mnt/glusterfs/
mount
df -h
cd /mnt/glusterfs/
ls -la

vi /etc/fstab

server1.example.com:/testvol /mnt/glusterfs glusterfs defaults,_netdev 0 0

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>