all posts tagged rhs

by on February 16, 2014

Running GlusterFS inside docker container

As a part of GlusterFS 3.5 testing and hackathon, I decided to put GlusterFS inside a docker container.So I installed docker on my Fedora20 desktop

$ yum install docker-io -y
$ systemctl enable docker.service
ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/'
$ systemctl start docker.service
$ docker version
Client version: 0.7.6
Server version: 0.7.6

and then started a Fedora container

$ docker run -i -t mattdm/fedora /bin/bash

Once I am inside the container I installed GlusterFS packages

bash-4.2# yum install glusterfs glusterfs-server -y

And then tried to create volume

bash-4.2# /usr/sbin/glusterd
bash-4.2# gluster volume create vol force

but I got following error:-

volume create: vol: failed: Glusterfs is not supported on brick:
Setting extended attributes failed, reason: Operation not permitted.

From above error it looked as setting up extended attributes are not supported, which is a basic need to use GlusteFS. So I tried to test them manually. I was able to set extended attributes in user namespace but not in trusted namespace.

bash-4.2# yum install attr -y
bash-4.2# setfattr -n user.foo1 -v "bar" a
bash-4.2# touch a; setfattr -n trusted.foo1 -v "bar" a
setfattr: a: Operation not permitted

With some internet search I figured out that CAP_SYS_ADMIN is needed for setting up extended attributes in trusted namespace and to get that inside docker we need to run an image with –privileged=true option like

$ docker run --privileged=true -i -t mattdm/fedora /bin/bash

With that I was able to create the volume and start it

bash-4.2# gluster volume create vol force
bash-4.2# gluster volume start vol

But when I tried to mount the volume I got following error:-

E [mount.c:267:gf_fuse_mount] 0-glusterfs-fuse: cannot open /dev/fuse (No such file or directory)

this turned out to be image specific problem, which I am using (mattdm/fedora). I had to mknod for /dev/fuse

bash-4.2# mknod /dev/fuse c 10 229

and after that I was able to mount volume.

On Fedroa 20 for docker version 0.7.6 the default storage driver for docker is device-mapper on which extended attributes are supported. AUFS storage driver does not support extended attributes as of now.I have tried with btrfs storage driver with docker 0.8 as well and was able to use GlusterFS. To use btrfs storage driver, we need to start docker daemon with following command :-

$ docker -d -s btrfs

Above will only work if Docker is running on a btrfs partition already prepared by the host system.

by on September 16, 2013

GlusterFS presentation @LSPE-IN, Yahoo!

Last  Saturday on 14th September’13 I gave on GlusterFS presentation at LSPE-IN. The title for the presentation was Performance Characterization in Large distributed file system with GlusterFS . Few days before the talk I looked at the attendee list to get  the feel of the audience. I felt  that not many of them have used GlusterFS by now. So I decided rather than covering lots of performance part I should cover the concepts of GlusterFS and talk about the performance challenges which can be there by design like file-system in user-space etc.

I am glad I did that as there were only 4 folks from ~70 attendees who have used GlusterFS before.

By going through the concepts the audience were able to compare GlusterFS with other solutions in the market. They asked interesting question about hashing algorithm, replication etc.


I attended the meetup till lunch. Other than giving the presentation I attended a keynote on Challenges in scaling cloud storage  by Srivibhavan (Vibhav) Balaram in which he talked about the challenges in cloud storage and  QoS in cloud environment. I also attended “Scaling using event driven programming with Perl, A tutorial”  Aveek Mishra.

This was again a very informative and well managed event. I’ll look forward to attend and present in future meet-ups.