martes, 6 de octubre de 2009

Instalar GlusterFS (Parte 2)

Innstalación del CLiente

Instalar Dependencias
aptitude install sshfs build-essential flex bison byacc libdb4.6 libdb4.6-dev

Descargar, compilar e instlar Fuse
cd /tmp
wget ftp://ftp.zresearch.com/pub/gluster/glusterfs/fuse/fuse-2.7.4glfs11.tar.gz
tar -zxvf fuse-2.7.4glfs11.tar.gz
cd fuse-2.7.4glfs11
./configure
make && make install


Descargar, compilar e instlar GlusterFS
cd /tmp
wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.7.tar.gz
tar xvfz glusterfs-2.0.7.tar.gz
cd glusterfs-2.0.7



Por defecto se instala en /usr/etc/glusterfs , vamos a modificar esto haciendo prefix='' en el archivo configure.
vim configure

server1:/tmp/glusterfs-2.0.7# ./configure



GlusterFS configure summary
===========================
FUSE client : yes
Infiniband verbs : no
epoll IO multiplex : yes
Berkeley-DB : yes
libglusterfsclient : yes
mod_glusterfs : no ()
argp-standalone : no

Instalamos:
make && make install
ldconfig
glusterfs --version


Ejemplo de configuración de GlusterFS (cliente)

vi /etc/glusterfs/glusterfs.vol


Ejemplo:

volume remote
type protocol/client
option transport-type tcp
option remote-host server1.example.com # can be IP or hostname
option remote-subvolume brick
end-volume

volume writebehind
type performance/write-behind
option window-size 4MB
subvolumes remote
end-volume

volume cache
type performance/io-cache
option cache-size 512MB
subvolumes writebehind
end-volume



glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs

o

mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs


mount

df -h

vi /etc/fstab


[...]
/etc/glusterfs/glusterfs.vol /mnt/glusterfs glusterfs defaults 0 0

init 6

Instalar GlusterFS (Parte 1)

Innstalación del Server

Instalar Dependencias
aptitude install sshfs build-essential flex bison byacc libdb4.6 libdb4.6-dev

Descargar, compilar e instlar GlusterFS
cd /tmp
wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.7.tar.gz
tar xvfz glusterfs-2.0.7.tar.gz
cd glusterfs-2.0.7

Por defecto se instala en /usr/etc/glusterfs , vamos a modificar esto haciendo prefix='' en el archivo configure.
vim configure

server1:/tmp/glusterfs-2.0.7# ./configure



GlusterFS configure summary
===========================
FUSE client : no
Infiniband verbs : no
epoll IO multiplex : yes
Berkeley-DB : yes
libglusterfsclient : yes
mod_glusterfs : no ()
argp-standalone : no

Instalamos:
make && make install
ldconfig
glusterfs --version


Ejemplo de configuración de GlusterFS (server)

vi /etc/glusterfs/glusterfsd.vol


Ejemplo:

volume posix
type storage/posix
option directory /data/export
end-volume

volume locks
type features/locks
option mandatory-locks on
subvolumes posix
end-volume

volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume

volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow 192.168.0.101 # Edit and add list of allowed clients comma separated IP addrs(names) here
subvolumes brick
end-volume



update-rc.d glusterfsd defaults

/etc/init.d/glusterfsd start