User Tools

Site Tools


glusterfs

GlusterFS

I use glusterfs to mirror a directory between cluster members.

cd /usr/src
wget -c ftp://gluster.org/pub/gluster/glusterfs/3.0/LATEST/glusterfs-3.*.tar.gz

aptitude install build-essential flex bison fuse-utils

tar xvzf glusterfs-3.*.tar.gz
cd glusterfs-3.*

./configure --sysconfdir=/etc --localstatedir=/var && make -j2 && make install

cd /etc/glusters
glusterfs-volgen -n data -r 1 -a 10.1.1.* server1:/data server2:/data

ln -s server1-data-export.vol glusterfsd.vol
ln -s data-tcp.vol glusterfs.vol

update-rc.d glusterfsd defaults

<strong>glusterfs.vol</strong>:

...
volume mirror-0
    type cluster/replicate
    subvolumes server1-1 server2-1
    option read-subvolume `hostname`-1
end-volume
...

<strong>/etc/fstab</strong>:

/etc/glusterfs/glusterfs.vol  /nas  glusterfs  defaults  0  0
glusterfs.txt · Last modified: 2020/02/13 22:55 (external edit)

free spam filter