1. Качаем свежую версию с
http://download.gluster.org/pub/gluster/glusterfs/LATEST/
2. Распаковываем, собираем устанавливаем
./configure --enable-fusermount make mkdir ../glusterfs-3.2.6-pkg make DESTDIR=../glusterfs-3.2.6-pkg install cd ../glusterfs-3.2.6-pkg ARCH=`arch` make ../glusterfs-3.2.6-$ARCH.txz install ../glusterfs-3.2.6-$ARCH.txz
3.
ln -s /usr/local/etc/glusterfs /etc
3.2 Корень для файлов сервера к примеру /mnt/Files
4. Файл серверной части /etc/glusterfs/glusterfsd.vol
volume posix
type storage/posix
option directory /mnt/Files
end-volume
volume locks
type features/locks
subvolumes posix
end-volume
volume Files
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume
volume server
type protocol/server
option transport-type tcp
option auth.login.Files.allow user # Будем подключаться по связке login+password
option auth.login.user.password secret_pass
subvolumes Files
end-volume
5. Файл клиентской части /etc/glusterfs/glusterfs.vol
volume lserver
type protocol/client
option transport-type tcp
option username user
option password secret_pass
option remote-host 10.0.0.1 # server1.com
option remote-subvolume Files
end-volume
volume ls-router
type protocol/client
option transport-type tcp
option username user
option password secret_pass
option remote-host 10.0.0.199 # server2.com
option remote-subvolume Files
end-volume
volume replicate
type cluster/replicate
subvolumes lserver ls-router
end-volume
volume writebehind
type performance/write-behind
option cache-size 1MB
subvolumes replicate
end-volume
volume cache
type performance/io-cache
option cache-size 512MB
subvolumes writebehind
end-volume
6. Запуск обоих частей на обоих серверах, Для примера каталог монтирования будет в /tmp/glusterfs /tmp/gluster-Files/
#Серверный процесс:
glusterfsd -f /etc/glusterfs/glusterfsd.vol
#Клиентский процесс
glusterfs -f glusterfs.vol /tmp/gluster-Files/
7. Проверяем на первом узле:
netstat -atp | grep gluster tcp 0 0 *:24007 *:* LISTEN 20724/glusterfsd tcp 0 0 lserver.lservice.:24007 lserver.lservice.o:exp2 ESTABLISHED 20724/glusterfsd tcp 0 0 lserver.lservice.o:exp2 lserver.lservice.:24007 ESTABLISHED 20780/glusterfs tcp 0 0 lserver.lservice.:24007 ls-router:1023 ESTABLISHED 20724/glusterfsd tcp 0 0 lserver.lservice.o:exp1 ls-router:24007 ESTABLISHED 20780/glusterfs
На втором узле
netstat -atp | grep gluster tcp 0 0 *:24007 *:* LISTEN 32403/glusterfsd tcp 0 0 ls-router.lservic:24007 ls-router.lservice:exp2 ESTABLISHED 32403/glusterfsd tcp 0 0 ls-router.lservic:24007 lserver.lservice.l:exp1 ESTABLISHED 32403/glusterfsd tcp 0 0 ls-router.lservice:1023 lserver.lservice.:24007 ESTABLISHED 4353/glusterfs tcp 0 0 ls-router.lservice:exp2 ls-router.lservic:24007 ESTABLISHED 4353/glusterfs