General Information
Description: GlusterFS is a scalable network filesystem. Uses common off the shelf hardware. It is free and open source.
Checklist
These examples all assume that there are:
/data/glusterfs/<volume-name>/<brick#>/brick
yum install xfsprogs
mkfs.xfs -i size=512 /dev/mapper/vgdata-lvdata1
mkdir -p /data/glusterfs/myvol/brick1
## XFS Mount Used for GlusterFS /dev/mapper/vgdata-lvdata1 /data/glusterfs/myvol/brick1 xfs defaults 1 2
mount -a
mkdir /data/glusterfs/myvol/brick1/brick
Installation steps taken for the glusterfs servers and clients.
On the Gluster Servers:
wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
yum install glusterfs-server
service glusterd start
chkconfig glusterd on
On the Gluster Clients:
wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
yum install glusterfs glusterfs-fuse
Configuration steps to setup gluster servers and clients.
gluster peer probe server2
gluster volume create myvol server1:/data/glusterfs/myvol/brick1/brick server2:/data/glusterfs/myvol/brick1/brick
gluster volume create myvol replica 2 transport tcp server1:/data/glusterfs/myvol/brick1/brick server2:/data/glusterfs/myvol/brick1/brick
gluster volume create myvol replica 2 transport tcp server1:/data/glusterfs/myvol/brick1/brick server2:/data/glusterfs/myvol/brick1/brick server3:/data/glusterfs/myvol/brick1/brick server4:/data/glusterfs/myvol/brick1/brick
gluster volume start myvol
mount -t glusterfs server1:/myvol /mnt
vim /etc/fstab ## Gluster mounts server1:/myvol /data glusterfs defaults 0 0
gluster peer status
gluster volume info
gluster peer probe <server-name>
gluster peer detach <server-name>
gluster volume add-brick myvol server5:/data/glusterfs/myvol/brick1/brick
gluster volume remove-brick myvol server2:/data/glusterfs/myvol/brick1/brick start gluster volume remove-brick myvol server2:/data/glusterfs/myvol/brick1/brick status gluster volume remove-brick myvol server2:/data/glusterfs/myvol/brick1/brick commit
gluster volume replace-brick myvol server3:/data/glusterfs/myvol/brick1/brick server5:/data/glusterfs/myvol/brick1/brick commit force
gluster volume start myvol
gluster volume stop myvol
Data can be re-balanced live and should be done after adding/removing nodes to the volume. There are two types of rebalance options:
gluster volume rebalance myvol fix-layout start
gluster volume rebalance myvol start
gluster volume rebalance status
gluster volume set myvol auth.allow 10.1.2.*