Gluster

De $1

 

Opensource

Solution de stockage réseau en cluster

 

 

Installation ubuntu 12.04 Lts

apt-get update && apt-get ugprade

 

  • Installation Webmin
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.620_all.deb

dpkg -i webmin_1.620_all.deb

apt-get install -f

 

  • Installation ifenslave (bonding)
apt-get install ifenslave

 

  • Editer le fichier /etc/modules
vi /etc/modules 

Rajouter :

bonding
 

reboot

 

Exemple de fichier /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth2
iface eth2 inet static
    address 192.168.XXX.XXX
        netmask 255.255.255.0
    network 192.168.XXX.0
    broadcast 192.168.XXX.255
    gateway 192.168.XXX.XXX
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.XXX.XXX
    dns-search parisy.lan

#eth0 is manually configured, and slave to the "bond0" bonded NIC
auto eth0
iface eth0 inet manual
bond-master bond0

#eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
bond-master bond0

# bond0 is the bonded NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address 192.168.XXX.XXX
netmask 255.255.255.0
# bond0 uses standard IEEE 802.3ad LACP bonding protocol
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-slaves none


 

  • Installation xfs
apt-get install xfs xfsprogs

 

  • Installation de ntp
apt-get install ntp

 

  • Installation de Gluster
apt-get install python-software-properties

add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.4

apt-get update

apt-get install glusterfs-server

 

 

  • Création des 4 "bricks" Gluster
root@gluster02:~# mkdir /mnt/volume01
root@gluster02:~# mkdir /mnt/volume02
root@gluster02:~# mkdir /mnt/volume03
root@gluster02:~# mkdir /mnt/volume04

 

  • Montage automatique des "bricks"
nano /etc/fstab

On rajoute ces lignes

/dev/sdb1       /mnt/volume01   xfs     defaults        0       0
/dev/sdc1       /mnt/volume02   xfs     defaults        0       0
/dev/sdd1       /mnt/volume03   xfs     defaults        0       0
/dev/sde1       /mnt/volume04   xfs     defaults        0       0
 

On monte les bricks

mount all

 On modifie les droits

root@gluster02:~# chmod 777 /mnt/volume01
root@gluster02:~# chmod 777 /mnt/volume02
root@gluster02:~# chmod 777 /mnt/volume03
root@gluster02:~# chmod 777 /mnt/volume04
 

 

  • Si vous avez plusieurs SAN Gluster

On ajoute le 2ème node

gluster peer probe IP_du_node

 

  • Création du volume Gluster
root@gluster02:~# gluster volume create datas stripe 2 replica 2 transport tcp gluster02:/mnt/volume01 gluster02:/mnt/volume02 gluster02:/mnt/volume03 gluster02:/mnt/volume04
Multiple bricks of a replicate volume are present on the same server. This setup is not optimal.
Do you still want to continue creating the volume?  (y/n) y
Creation of volume datas has been successful. Please start the volume to access data.
 

On démarre le volume

root@gluster02:~# gluster volume start datas
Starting volume datas has been successful

 

  • Paramétrages additionnels
root@gluster02:~# gluster volume set datas performance.cache-size 2048MB
Set volume successful
root@gluster02:~# gluster volume set datas performance.write-behind-window-size 1024MB
Set volume successful
root@gluster02:~# gluster volume set datas features.quota-timeout 5
Set volume successful
root@gluster02:~# gluster volume set datas performance.cache-refresh-timeout 5
Set volume successful
root@gluster02:~# gluster volume set datas performance.quick-read off 
Set volume successful
gluster volume set datas nfs.disable on 
gluster volume set datas performance.io-thread-count 32 

 

 

/etc/glusterfs.vol

.

volume gluster1
  type protocol/client
  option transport-type tcp
  option remote-host gluster1
  option remote-subvolume /glusterfs/brick
  option username <username>
  option password <password>
end-volume

volume gluster2
  type protocol/client
  option transport-type tcp
  option remote-host gluster2
  option remote-subvolume /glusterfs/brick
  option username <username>
  option password <password>
end-volume

volume replicate
  type cluster/replicate
  subvolumes gluster1 gluster2
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 400MB
  subvolumes writebehind
end-volume

 

 

Montage gluster au démarrage du SAN

Editer /etc/init.d/rc.local

Rajouter à la fin :

mount -t glusterfs 127.0.0.1:/datas /opt/gluster

 

Installation d'un "vrai" serveur NFS

apt-get install nfs-kernel-server

Editer /etc/exports

/opt/gluster    192.168.XXX.0/255.255.255.0(fsid=0,no_root_squash,rw,nohide)
/etc/init.d/nfs-kernel-server restart

 

Sur le client

Editer le fichier /etc/fstab

192.168.XXX.XXX:/datas   /mnt/gluster01  nfs     nfsvers=3       0       0

 

 

 Supprimer un paramétrage du volume Gluster

[root@wingu1 ~]# gluster volume reset homes performance.cache-size 

reset volume successful

 

 

 

 

http://www.gluster.org/

http://download.gluster.com/pub/gluster/

Ports

Check your firewall setting to open ports 111 for portmap requests/replies and Gluster NFS server requests/replies. Gluster NFS server operates over the following port numbers: 38465, 38466, and 38467.

Cette page n'a encore aucun contenu. Enrichissez Yakakliker en y contribuant vous aussi.

FichierTailleDateAttaché par 
 Gluster FS Tutorial - Part 2_ Gluster and Big Data_ Gluster for Devs and Sys Admins Presentation.pdf
Aucune description
1008.71 Ko07:25, 20 Mai 2013franckActions
 Gluster-Storage-Platform-3.0.4-Release-Notes.pdf
Aucune description
358.24 Ko17:11, 15 Jun 2010franckActions
mountgluster.sh
Aucune description
110 octets09:46, 29 Mai 2013franckActions
 network-reconfiguration-howto.pdf
Aucune description
65.38 Ko17:12, 15 Jun 2010franckActions
Images (0)
 
Commentaires (0)
Vous devez être connecté pour poster un commentaire.