GlusterFS

From Gentoo Linux Wiki
Jump to: navigation, search

Filesystems TOC

Filesystem.png

GlusterFS is a cluster file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. GlusterFS is based on a stackable user space design without compromising performance. For a list of features, see GlusterFS Features.

Contents

[edit] Installation

[edit] FUSE support (prerequisites)

Filesystems in Userspace (aka FUSE) is required in order to be able to mount GlusterFS in a local directory. If this functionality is desired, be sure to have fuse enabled in your kernel and sys-fs/fuse installed for the required userland tools, as well as the "fuse" USE-flag set on sys-cluster/glusterfs.

[edit] Installing Gluster

Just unmask (if necessesary) and emerge glusterfs:

emerge -av sys-cluster/glusterfs

[edit] Running a simple Gluster setup

Note: This is a very simple setup on one machine only, primarily listed so first-time users can have a very basic working setup to play around with Gluster. It avoids explicitly configuring glusterfsd, and only uses the most basic configuration for glusterd. For actual setups involving multiple machines, please refer to the reading material linked under the #External links.

The first thing to do is to get the init script for glusterd working. You will need a simple configuration file for glusterd, like the following:

File: /etc/glusterfs/glusterd.vol
volume management
  type mgmt/glusterd
  option working-directory /var/lib/glusterd
  option transport-type socket,rdma
  option transport.socket.keepalive-time 10
  option transport.socket.keepalive-interval 2
end-volume
Run the init script and make sure it did not display any errors:
/etc/init.d/glusterd start

With glusterd running, you can now use the "gluster" command to create, activate and configure volumes.

First, run
gluster help
to see the basics of what this tool can do. Then, run the following command with <hostname_goes_here> replaced with your actual hostname:
gluster volume create testvolume <hostname_goes_here>:/testbrick
Activate the volume with
gluster volume start testvolume
Create a new folder to mount the gluster filesystem in:
mkdir /mnt/gluster
Mount your gluster volume:
mount -t glusterfs -o log-level=DEBUG,log-file=/var/log/glusterfs/glusterfsd.log <hostname_goes_here>:/testvolume /mnt/gluster
Then check
mount
or
df -h
.

If one of these does not list your glusterfs, then something went wrong, and you should check the log file specified in the mount command that you just used. Also try restarting glusterd.

If they do list the mounted glusterfs, then everything should be all right, and you should now be able use your local one-machine "cluster" file-system through the directory it is mounted on. Now (optionally) grab some coffee, and then refer to the #External links in order to configure an actual production volume, glusterfsd, add more machines to the cluster, and so on.

[edit] External links

Personal tools