Fuse GlusterFS

From Linux-VServer

Jump to: navigation, search

GlusterFS is a userspace filesystem which can create network mirrors/stripes etc. While I have not fully investigated all the functionality of GlusterFS, this article will get you started fast and fill in the blanks. Doing this process taught me a little something about Linux VServer and its kernel interactions as well. This process is very short in terms of compile but the steps were spread out all over the place.

References
GlusterFS 10 minute Setup Doc | Fuse on OpenVZ | Fuse in VServer

Contents

ServerSystem

i686 server
CentOS 5
Kernel 2.6.22.19-vs2.3.0.34.1
internal IP 10.10.10.1
+Nat

Guest1

test01 10.10.10.2
test02 10.10.10.3

Stated Goal

Serve a gluster filesystem from test01 to test02

Fuse Patched

on server first you need the kernel source matching your kernel

yum install kernel-devel
mkdir /usr/local/src/fuse
cd /usr/local/src/fuse
wget http://ftp.zresearch.com/pub/gluster/glusterfs/fuse/fuse-2.7.3glfs10.tar.gz
rpmbuild -ta fuse-2.7.2glfs9.tar.gz
rpm -Uvh /usr/src/redhat/RPMS/$(uname -m)/fuse-*rpm
rmmod fuse
depmod -a
modprobe fuse

Copy the device into the guests

This is trick one. guest systems share the kernel so you are not going to be able to install any kernel modules inside the guest.

cp -a /dev/fuse /etc/vservers/test01/vdir/dev
cp -a /dev/fuse /etc/vservers/test02/vdir/dev

Create fuse group and ensure proper permissions

vserver test01 enter
groupadd -g 102 fuse
Personal tools