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-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

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: r2 - 29 Sep 2019, AdminUser
This site is powered by FoswikiCopyright © by Eddy Vervest