Gluster in containers

Create node in LXC

mknod /dev/fuse c 10 229

Add repository

apt-get -y install software-properties-common
add-apt-repository ppa:gluster/glusterfs-3.6

Install gluster software

apt-get update
apt-get -y install glusterfs-client glusterfs-server

Peer with other nodes

gluster peer probe node1

Create a volume

Create a stripped volume ("raid 1")
gluster volume create volume0 stripe 3 node{0..2}:/var/gluster-storage force

Create a distributed volume (no redundancy)
gluster volume create volume0 node{0..2}:/var/gluster-storage force

Create a replica volume ("raid 0")
gluster volume create volume0 replica 3 node{0..2}:/var/gluster-storage force

Create a disperse volume ("raid 5", but not working with 3.6.5?? somehow)
gluster volume create volume0 disperse node{0..2}:/var/gluster-storage force

Start the what-ever-kind-of-volume created
gluster volume start volume0

... and finally mount the volume
mount -t glusterfs node1:/volume0 /mnt/volume0

In case of trouble

gluster volume stop volume0
gluster volume delete volume0
setfattr -x trusted.glusterfs.volume-id /var/gluster-storage
setfattr -x trusted.gfid /var/gluster-storage
rm -rf /var/gluster-storage/.glusterfs
Topic revision: r5 - 21 Oct 2017, AdminUser - This page was cached on 23 Aug 2019 - 13:43.

This site is powered by FoswikiCopyright © by Eddy Vervest