Install and run GlusterFS v1.4 in 10mins
From GlusterDocumentation
FIXME: in progress
NOTE: Any new users trying out GlusterFS, its advised to get these bare minimum configurations working properly before configuring GlusterFS for higher performance and different storage solutions.
Contents |
Requirements
- fuse-devel
- ibverbs-devel (with OFED stack) Optional - Used if Infiniband hardware is present
Download
Get the latest one from the above link.
Install
<VERSION> code should be same as the latest you downloaded from site.
bash# rpm -Uvh glusterfs-<VERSION>.rpm bash# glusterfs --version glusterfs <VERSION> built on Dec 8 2008 00:04:12 Repository revision: glusterfs--mainline--<BRANCH-ID>--patch-<PATCH-LEVEL> Copyright (c) 2006, 2007, 2008 Z RESEARCH Inc. <http://www.zresearch.com> GlusterFS comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
Congratulations :) You are done with installation.
Execution
After installation is complete, the problem that the majority of people face is how to get glusterfs working. To run GlusterFS, you need a volume file, or volfile, which defines the behavior and features for glusterfs.
We will start with a bare minimum volfile (this volfile is very basic and it is just to get the feel of GlusterFS).
Example
In this basic example, let us assume you have two machines, '192.168.0.1' and '192.168.0.2'. Let 192.168.0.1 be the server and 192.168.0.2 be the client. (Make sure to have IPs changed according to your setup requirements if needed. One can use 'localhost')
Server machine: [192.168.0.1]
NOTE: After editing the file it should have the content as shown by the cat command, and this holds true for all the given examples below.
bash# emacs /etc/glusterfs/glusterfs-server.vol bash# 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 option auth.addr.brick.allow 192.168.0.* end-volume bash# mkdir /tmp/export bash# glusterfsd -f /etc/glusterfs/glusterfs-server.vol
Client machine: [192.168.0.2]
bash# mkdir /mnt/glusterfs bash# emacs /etc/glusterfs/glusterfs-client.vol bash# cat /etc/glusterfs/glusterfs-client.vol volume client type protocol/client option transport-type tcp option remote-host 192.168.0.1 option remote-subvolume brick end-volume bash# modprobe fuse bash# glusterfs -f /etc/glusterfs/glusterfs-client.vol /mnt/glusterfs
You should now be able to see the exported directory '192.168.0.1:/tmp/export' as /mnt/glusterfs on the client machine.
Where to go from here
You can now refer to many other detailed volume spec file examples on the different ways that you can configure your GlusterFS cluster.
Refer to Install GlusterFS from Source page for checking details of installing from source.
Refer to GlusterFS Command-line Arguments for a complete list of options.
Refer to Mounting a GlusterFS Volume to see various ways of mounting a volume.
FAQ
- When I run the glusterfs command, it exited normally, but I don't see the process running. Any guesses whats wrong?
There is more than one possible reason for what went wrong. Please refer to the glusterfs log file at /var/log/glusterfs/glusterfs*.log.
If you specified a prefix during installation, the log file may not be in /var/log/glusterfs/. Instead try looking in the prefix path you specified during installation for the log files. Otherwise, you can choose to run the glusterfs command with -l /dev/stdout to get the logs to display on screen when you run the command. Hope that was helpful.
NOTE
- You need to be logged in as 'root' (or execute command with 'sudo' ) to install, mount filesystem.
- On many systems, modifying (or turning off) iptables may be required to get GlusterFS working.
Refer
For more extensive documentation/details refer GlusterFS wiki.


