How to mount glusterfs inside a OpenVZ container

clusterfuseopenvz

glusterfs uses fuse to mount a glusterfsd volume, wich works fine on any hardwarenode without virtualization.

But, I now try to mount the device inside a container

glusterfs --debug -f /etc/glusterfs/glusterfs.vol /storage

and get the following error(s):

fuse: failed to open /dev/fuse: Permission denied
[2009-06-20 18:36:29] D [fuse-bridge.c:2747:init] glusterfs-fuse: fuse_mount() failed with error Permission denied on mount point /storage

ls -al /dev/fuse is

crw-rw-rw- 1 root fuse 10, 229 20. Jun 16:35 /dev/fuse

and ls -al /storage is

drwxr-xr-x   2 root root 4096 20. Jun 17:14 storage

the kernel of that HN has fuse loaded… a uname is

2.6.18-14-fza-amd64 #1 SMP Mon Jan 5 17:36:46 UTC 2009 x86_64 GNU/Linux

Any suggestions?
Has anyone tried to mount a glusterfs inside a openvz container and got that up and running?

Thanks in advance.
Marcus

Best Answer

well, just found the solution on my own (http://wiki.openvz.org/FUSE)

I just needed to tune my container, by berforming the following in my HN:

# vzctl set $VEID --devices c:10:229:rw --save
# vzctl exec $VEID mknod /dev/fuse c 10 229

...and to complete, you need to set these

# vzctl set $VEID --capability sys_admin:on

to export a glusterfs volume from inside a OpenVZ container.

Related Topic