Edoceo is available to provide support for these services, contact us for more information.
Install GlusterFS, FUSE and other requirements.
emerge -pv fuse glusterfs [ebuild N ] sys-fs/fuse-2.8.5 492 kB [ebuild N ] sys-cluster/glusterfs-3.1.1 USE="-emacs -extras fuse (-infiniband) -static-libs -vim-syntax" 2,024 kB
Ensure the proper modules are loaded.
On Gluster Server systems ensure that the glusterd daemon is started on boot.
rc-config add glusterd default
This setup will simply use a single system as a Gluster server, similar to a singluar NFS type system. Replace, $name, $host, $path with proper value, $path can reference an existing directory.
gluster volume create $name transport tcp $host:$path gluster volume start $name
Simple huh? Now when glusterd is stop/started this volume will be retained.
If you are curious about this information look in /var/lib/glusterd.
Almost too easy, simply mount it. $host is the Gluster server, $name is the name of the exported volumne and $path is the local path to mount to.
root@desk # mount -t glusterfs $host:$name $path # eg: root@desk # mount -t glusterfs carbon:raid /mnt/raid
In the most simplest configuration GlusterFS can be used in similar fashion to NFS. This configuration has a central GlusterFS server that allows multiple clients to connect. One nice thing to notice is that the clients have no configuration on themselves. The client configuration information is obtained from the server on demand.
This is a single server (but could be more) and it exports only one directory from it's file-system. This directory could be itself mounted on top of LVM or some RAID devices, or whatever posix compatible volume type you choose. There are two methods available, one using a single server side volfile and one that creates a volfile for the server and each of the exports.
# file: /etc/glusterfs/central-server.vol # low level volume volume posix type storage/posix # this is the directory on this host we want to export option directory /mnt/raid end-volume # layer locking on top volume big type features/locks subvolumes posix end-volume # and export as server volume server type protocol/server # allow everyone option auth.addr.big.allow * option client-volume-filename /etc/glusterfs/glusterfs-client.vol option transport-type tcp/server # option volume-filename.big-key /etc/glusterfs/red.vol subvolumes lock end-volume
This file is created on the server and clients will reference it when mounting
volume big
type protocol/client
option transport-type tcp
option remote-host carbon # IP address of the remote brick
option remote-subvolume big # name of the remote volume
end-volume
# volume red
# type protocol/client
# option transport-type tcp
# option remote-host 192.168.0.1 # IP address of the remote brick
# option remote-subvolume red # name of the remote volume
# end-volume
This machine needs no special configuration for Gluster, just the gluster installation. Below we will mount the exported share, and show an example of automounting
root@host # glusterfs --volfile-server=gfs00 /mnt/raid