Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati

Versione 13 del 16/11/2008 12.04.20

Nascondi questo messaggio

BR Indice(depth=2)

Introduzione

Questa pagina contiene le istruzioni utili per installare il filesystem clusterizzato GlusterFS, capace di gestire molti petabytes di dati.

Installazione

  1. Scaricare all'interno della propria Home l'ultima versione di GlusterFS da [http://europe.gluster.org/glusterfs/ questo indirizzo].

  2. Scaricare una patch di Fuse pensata per aumentare le prestazioni di GlusterFS da [http://europe.gluster.org/glusterfs/fuse/ questo indirizzo].

$ cd /opt/source
$ mkdir glusterFS
$ wget http://europe.gluster.org/glusterfs/1.3/glusterfs-1.3.8pre6.tar.gz
$ wget http://europe.gluster.org/glusterfs/fuse/fuse-2.7.2glfs9.tar.gz
$ tar xvzf glusterfs-1.3.8pre6.tar.gz
$ tar xvzf fuse-2.7.2glfs9.tar.gz

Per prima cosa occorre installare Fuse (ricordandosi di effettuare un backup del modulo originale di fuse, se è già installato).

$ sudo mv /lib/modules/2.6.22-14/kernel/fs/fuse/fuse.ko /lib/modules/2.6.22-14/kernel/fs/fuse/fuse.ko.orig
$ cd fuse-2.7.2glfs9/
$ ./configure --prefix=/opt/fuse --enable-kernel-module
$ make
$ sudo make install
$ sudo ldconfig
$ sudo rmmod fuse
$ sudo modprobe fuse

Adesso è la volta di GlusterFS.

$ cd glusterfs-1.3.8pre6/
$ LDFLAGS='-L/opt/fuse/lib' CPPFLAGS='-I/opt/fuse/include' ./configure --prefix=/opt/glusterfs
$ make
$ sudo make install

Configurazione

Questa installazione fa uso di 2 servers ed 1 client. Prima occorre creare su entrambi i servers (chiamiamoli remote1 e remote2) la directory condivisa.

sudo mkdir -p /data/export

Su entrambi i servers (remote1 e remote2) editare il file /opt/glusterfs/etc/glusterfs/glusterfs-server.vol

# file: /opt/glusterfs/etc/glusterfs/glusterfs-server.vol
volume brick
  type storage/posix
  option directory /data/export
end-volume

volume server
  type protocol/server
  option transport-type tcp/server
  option auth.ip.brick.allow *
  subvolumes brick
end-volume

e sul client editare il file /opt/glusterfs/etc/glusterfs/glusterfs-client.vol

# file: /opt/glusterfs/etc/glusterfs/glusterfs-client.vol
volume remote1
  type protocol/client
  option transport-type tcp/client
  option remote-host ''remote1.indirizzo.ip''
  option remote-subvolume brick
end-volume

volume remote2
  type protocol/client
  option transport-type tcp/client
  option remote-host ''remote2.indirizzo.ip''
  option remote-subvolume brick
end-volume

volume mirror0
  type cluster/afr
  subvolumes remote1 remote2
end-volume

Infine avviare il demone su entrambi i servers

$ sudo /opt/glusterfs/sbin/glusterfsd -f /opt/glusterfs/etc/glusterfs/glusterfs-server.vol

e montare la directory remota sul client

$ sudo /opt/glusterfs/sbin/glusterfs -f /opt/glusterfs/etc/glusterfs/glusterfs-client.vol /mnt/glusterfs
$ # oppure
$ sudo /opt/glusterfs/sbin/glusterfs -s remote1.indirizzo.ip /mnt/glusterfs

Si può montare la directory anche con il comando mount

$ sudo mount -t glusterfs remote1.indirizzo.ip /mnt/glusterfs

Per montare la direcotry in modo automatico all'avvio del sistema, aggiungere una riga al file /etc/fstab

remote1.indirizzo.ip  /mnt/glusterfs   glusterfs   defaults         0   0

oppure

/opt/glusterfs/etc/glusterfs/glusterfs-client.vol  /mnt/glusterfs   glusterfs   defaults         0   0

ATTENZIONE: Non bisogna MAI tentare di scrivere direttamente nella directory gestita da GlusterFS, ovvero in questo esempio in /data/export !!

Ulteriori risorse


CategoryHomepage