on
Glusterfs -high available redundant storage with Raspberry pi/Centos server
Overview
This post is about how to create a high available redundant storage (Glusterfs replicated volume) from Raspberrypi and a centos server. This is just for fun project, which i am experimenting with my new raspberrypi 2 device. This is not a perfect setup, like i am using a 2 nodes replicated volume without quorom,created brick from ext3 filesystem and on root directory etc.Do not use this setup in production 🙂
Architecture
In this i am using a wifi hotspot router, to act as a DHCP server and connected both the raspberrypi device (server1.vikki.in) using wifi adapter(Edimax 150 Mbps Wireless Nano USB Adaptor) and a laptop running 2 VM’s ( server2.vikki.in and client.vikki.in)in same wireless network (192.168.1.0)
For details about how to enable wifi interface in raspberrypi please go through the Link
Softwares used
Ubuntu 14.04
Centos 6.3
Raspbian wheezy
Glusterfs 3.7
Hardware used
Raspberry PI Model 2 – 1GB
Edimax 150 Mbps Wireless Nano USB Adaptor (EW-7811Un)
Cenda T-50 Power Bank 10000 mAh
sandisk ultra 16gb memory card
Wifi router
Laptop
Installation
Step 1 :
Login to Raspberry pi and run the below command to install glusterfs
Step 2 :
Login to the centos VM and do the following.
Download the glusterfs version 3.2.7. Since raspbian OS comes wit 3.2.7 , i am downloading the same version to avoid any conflicts.
Note : I tried a combination of version 3.2.7 and the latest version that comes with redhat EPL , but this doesn’t work out (peer probe connection failed)
Now download and install all the build dependencies
Extract the source file, navigate and do configure
And the finally make and install the gluster
Configuration
Login to raspberrypi and probe the centos server (server2.vikki.in)
server1 :
Check the peer status
server1 :
Similarly login to the centos server and probe the raspberry pi server(server1.vikki.in)
server2 :
server2 :
I have a brick /share1 of 1GB size mounted in both raspberrypi and centos server
Now create a replicated volume from any of the server . Here i am creating it from the raspberry pi server(server1.vikki.in)
server1 :
Creation of volume replicated_volume has been successful. Please start the volume to access data.
Now start the replicated volume
server1 :
Check the replicated volume info
Now the replicated volume is created . Login to the client (client.vikki.in) and mount the glusterfs volume
Client :
The replicated volume is successfully mounted in the client
Testing
create some files in gluster volume
Now go to both the server (raspberrypi,centos) and check the individual brick.
Now we can see the files are replicated in both the nodes .
Now bring down one of the server and check if the gluster volume is still accessible in client.
Discussion and feedback