LinuxParty

NUESTRO SITIO necesita la publicidad para costear hosting y el dominio. Por favor considera deshabilitar tu AdBlock en nuestro sitio. También puedes hacernos una donación entrando en linuxparty.es, en la columna de la derecha.
Inicio desactivadoInicio desactivadoInicio desactivadoInicio desactivadoInicio desactivado
 

4 Configurar el cliente de GlusterFS

 

client1.example.com:

 

En el cliente, podemos instalar al cliente GlusterFS como sigue:

 

yum install glusterfs-client

 

Entonces creamos el siguiente directorio:

 

mkdir /mnt/glusterfs

 

Eso es todo! Ahora podemos instalar el sistema de archivos de GlusterFS a /mnt/glusterfs con el siguiente comando:

 

mount.glusterfs server1.example.com:/testvol /mnt/glusterfs

 

(En lugar de server1.example.com puede también utilizar server2.example.com o server3.example.com o server4.example.com en el comando anterior!)

 

Ahora debería ver la nueva cuota en las salidas de...

 

mount

 

[root@client1 ~]# mount
/dev/mapper/vg_client1-LogVol00 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
server1.example.com:/testvol on /mnt/glusterfs type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)
[root@client1 ~]#

 

... y...

df -h

 

[root@client1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_client1-LogVol00
                      9.7G  1.7G  7.5G  19% /
tmpfs                 499M     0  499M   0% /dev/shm
/dev/sda1             504M   39M  440M   9% /boot
server1.example.com:/testvol
                      116G  4.2G  106G  4% /mnt/glusterfs
[root@client1 ~]#

 

En lugar del montaje manual, puede modificar /etc/fstab para que se realice un montaje automático cuando se inicia el cliente.

 

Abra /etc/fstab y añadir la siguiente línea:

 

vi /etc/fstab

 

[...]
server1.example.com:/testvol /mnt/glusterfs glusterfs defaults,_netdev 0 0

 

(Otra vez, en lugar de server1.example.com puede también utilizar server2.example.com o server3.example.com o server4.example.com!)

 

Para probar si está funcionando su modificación en /etc/fstab, deberá reiniciar al cliente:

 

 

Después del reinicio, encontrará la participación en las salidas de...

 

bien escribiendo:

df -h

o

mount

 

 

 

5 Pruebas

 

Ahora vamos a crear unos archivos de prueba en el recurso compartido de GlusterFS:

 

client1.example.com:

 

touch /mnt/glusterfs/test1
touch /mnt/glusterfs/test2
touch /mnt/glusterfs/test3
touch /mnt/glusterfs/test4
touch /mnt/glusterfs/test5
touch /mnt/glusterfs/test6

 

Ahora vamos a ver el directorio /data de server1.example.com, server2.example.com, server3.example.com y server4.example.com. Te darás cuenta que cada nodo de almacenamiento tiene sólo una parte de los archivos/directorios que forman parte de la cuota de GlusterFS en el cliente:

 

server1.example.com:

ls -l /data

[root@server1 ~]# ls -l /data
total 0
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test1
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test2
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test5
[root@server1 ~]#

server2.example.com:

ls -l /data

[root@server2 ~]# ls -l /data
total 0
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test4
[root@server2 ~]#

server3.example.com:

ls -l /data

[root@server3 ~]# ls -l /data
total 0
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test6
[root@server3 ~]#

server4.example.com:

ls -l /data

[root@server4 ~]# ls -l /data
total 0
-rw-r--r-- 1 root root 0 2012-12-17 14:26 test3
[root@server4 ~]#


[ Anterior Almacenamiento distribuido a través de 4 nodos con Gluster FS en Linux CentOS 1 ]

 

 

Pin It

Escribir un comentario


Código de seguridad
Refescar



Redes:



 

Suscribete / Newsletter

Suscribete a nuestras Newsletter y periódicamente recibirás un resumen de las noticias publicadas.

Donar a LinuxParty

Probablemente te niegues, pero.. ¿Podrías ayudarnos con una donación?


Tutorial de Linux

Filtro por Categorías