Editing
Fuse GlusterFS
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
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 <br> [http://www.gluster.org/docs/index.php/Install_and_run_GlusterFS_v1.3_in_10mins GlusterFS 10 minute Setup Doc] [http://wiki.openvz.org/FUSE | Fuse on OpenVZ] [http://www.paul.sladen.org/vserver/archives/200705/0084.html | Fuse in VServer] ===ServerSystem=== <pre> i686 server CentOS 5 Kernel 2.6.22.19-vs2.3.0.34.1 internal IP 10.10.10.1 +Nat </pre> ===Guest1=== <pre> test01 10.10.10.2 pkgmgmt internalize test02 10.10.10.3 pkgmgmt internalize </pre> ===Stated Goal=== Serve a gluster filesystem from test01 to test02 ===Fuse Patched=== on server first you need the kernel source matching your kernel <pre> yum install kernel-devel </pre> <pre> 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 </pre> ==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. <pre> cp -a /dev/fuse /etc/vservers/test01/vdir/dev cp -a /dev/fuse /etc/vservers/test02/vdir/dev </pre> ==Create fuse group and ensure proper permissions== This is the GID that the Cent RPM will use for fuse <pre> vserver test01 enter groupadd -g 102 fuse chmod g+rw /dev/fuse chgrp fuse /dev/fuse </pre> ==Compile fuse WITHOUT kernel module== This is trick two. Being that the guest cant load a kernel module it can not install one either. This is why I am guessing yum list fuse will not list any packages inside the guest. Also I had trouble with the RPM build technique inside the guest, this time i elected to use the ./configure method <pre> 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 tar -xzf fuse-2.7.3glfs10.tar.gz cd fuse-2.7.3glfs10 ./configure && make && make install exit </pre> ==Adding capabilities== The guest has to have special capabilities in order to mount file systems. INSERT TOKEN SECURITY LESSON HERE :) <pre> /etc/vservers/test01/ccapabilities SECURE_MOUNT SECURE_REMOUNT BINARY_MOUNT </pre> <pre> /etc/vservers/test01/bcapabilities SYS_ADMIN </pre> ==Restart both vservers== <pre> vserver test01 stop vserver test01 start vserver test02 stop vserver test02 start </pre> ==Install GlusterFS== <pre> mkdir /usr/local/src/gluster cd /usr/local/src/gluster wget http://ftp.zresearch.com/pub/gluster/glusterfs/1.3/glusterfs-1.3.9.tar.gz tar -xzf glusterfs-1.3.8.tar.gz cd glusterfs-1.3.8 ./configure make && make install </pre> Now you can configure and start gluster. This is a simple NFS like configuration. Client machine: [10.10.10.2] <pre> $ vi /etc/glusterfs/glusterfs-server.vol $ cat /etc/glusterfs/glusterfs-server.vol volume brick type storage/posix option directory /tmp/export end-volume volume server type protocol/server subvolumes brick option transport-type tcp/server # For TCP/IP transport option auth.ip.brick.allow * end-volume $ glusterfsd -f /etc/glusterfs/glusterfs-server.vol </pre> Client machine: [10.10.10.3] <pre> $ mkdir /mnt/glusterfs $ vi /etc/glusterfs/glusterfs-client.vol $ cat /etc/glusterfs/glusterfs-client.vol volume client type protocol/client option transport-type tcp/client option remote-host 10.10.10.2 option remote-subvolume brick end-volume $ glusterfs -f /etc/glusterfs/glusterfs-client.vol /mnt/glusterfs </pre> Now you have it network mount between two vserver guests. [[Category:Documentation]]
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information