Creating Gluster Storage Server with ucarp [ Virtual ip Manager ]
######## Server Side ########
# yum groupinstall "Development Tools" "Development Libraries"
# yum -y install fuse fuse-libs libibverb
# wget http://download.gluster.org/pub/gluster/glusterfs/LATEST/glusterfs-3.3.0.tar.gz
# rpmbuild -ta glusterfs-3.3.0.tar.gz
# cd /usr/src/redhat/RPMS/x86_64
# yum install *.rpm --nogpgcheck
# chkocnfig glusterd on
# gluster peer prob 10.173.20.40
# gluster peer status
# gluster volume create codebase replica 2 transport tcp 10.173.20.30:/codebase 10.173.20.40:/codebase
# gluster volume start codebase
# gluster volume info
enabling epel repo
# wget http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm ivh epel-release-5-4.noarch.rpm
# vi /etc/yum.repos.d/epel.repo
# yum install ucarp
# cp /etc/ucarp/vip-001.conf.example /etc/ucarp/vip-001.conf
# vi /etc/ucarp/vip-001.conf
#ID
ID=001
# Network Interface
BIND_INTERFACE=eth0
#Real IP
SOURCE_ADDRESS=10.173.20.30
# Virtual IP
VIP_ADDRESS=10.173.20.99
# Carp Password
PASSWORD=redhat
# service ucarp start
# chkconfig ucarp on
###### Client Side #######
# yum -y install fuse fuse-libs libibverb
# scp 10.173.20.30:/usr/src/redhat/RPMS/x86_64/*.rpm .
# yum install *.rpm --nogpgcheck
# chkocnfig glusterd on
# gluster peer status
# gluster volume info
/etc/yum.repos.d/
# scp 10.173.20.30:/etc/yum.repos.d/epel* .
# yum install ucarp
# vi /etc/ucarp/vip-001.conf
#ID
ID=001
# Network Interface
BIND_INTERFACE=eth0
#Real IP
SOURCE_ADDRESS=10.173.20.40
# Virtual IP
VIP_ADDRESS=10.173.20.99
# Carp Password
PASSWORD=redhat
# mount -t glusterfs 10.173.20.99:/codebase /var/www/html
[root@server ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
ext3 19G 8.8G 8.6G 51% /
/dev/sda1 ext3 99M 13M 81M 14% /boot
tmpfs tmpfs 502M 0 502M 0% /dev/shm
glusterfs#10.173.20.99:/codebase
fuse 19G 3.8G 14G 22% /var/www/html
# vi /etc/fstab
10.173.20.99:/codebase /var/www/html glusterfs defaults 0 0
# mount -a
Comments
Post a Comment