Erinevus lehekülje "GlusterFS kasutamine Debianiga" redaktsioonide vahel

Allikas: Kuutõrvaja
(Tarkvara paigaldamine serveritesse)
(GlusterFS süsteemi kasutamine)
43. rida: 43. rida:
  
 
   # apt-get install glusterfs-client
 
   # apt-get install glusterfs-client
 +
 +
===GlusterFS seadistamine===
 +
 +
Mõlemad serverid tuleb seadistada samasuguselt ja mõlemad kliendid samuti samasuguselt.
 +
 +
====Serverite seadistamine====
 +
 +
Serverites sobib kasutada nt sellist seadistusfaili /etc/glusterfs/glusterfsd.vol
 +
 +
  volume posix
 +
    type storage/posix
 +
    option directory /srv/www
 +
  end-volume
 +
 
 +
  volume locks
 +
    type features/locks
 +
    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
 +
    subvolumes brick
 +
    option auth.addr.brick.allow *
 +
  end-volume
 +
 +
====Klientide seadistamine====
 +
 +
Serverites sobib kasutada nt sellist seadistusfaili /etc/glusterfs/glusterfs.vol
 +
 +
  volume remote1
 +
    type protocol/client
 +
    option transport-type tcp
 +
    option remote-host 192.168.10.55
 +
    option remote-subvolume brick
 +
  end-volume
 +
 
 +
  volume remote2
 +
    type protocol/client
 +
    option transport-type tcp
 +
    option remote-host 192.168.10.56
 +
    option remote-subvolume brick
 +
  end-volume
 +
 
 +
  volume replicate
 +
    type cluster/replicate
 +
    subvolumes remote1 remote2
 +
  end-volume
 +
 
 +
  volume writebehind
 +
    type performance/write-behind
 +
    option window-size 1MB
 +
    subvolumes replicate
 +
  end-volume
 +
 
 +
  volume cache
 +
    type performance/io-cache
 +
    option cache-size 512MB
 +
    subvolumes writebehind
 +
  end-volume
  
 
===GlusterFS süsteemi kasutamine===
 
===GlusterFS süsteemi kasutamine===

Redaktsioon: 27. juuni 2009, kell 17:06

Sissejuhatus

GlusterFS http://www.gluster.org/ failisüsteem on paralleelne võrgufailisüsteem.

Eesmärk

Olgu eesmärgiks seada käima selline asjakorraldus

                                    --|--------------|--------- teenuse kliendid internetis
                                      |              |
                              www-1  _|_            _|_  www-2
                                    |   |          |   |
        gfs-1:/srv/gfs -> /srv/www  |___|          |___|  gfs-2:/srv/gfs -> /srv/www
                                      |  \        /  |
                                      |    \    /    |
                                      |      \/      |
                                      |    /    \    |
                                      |  /        \  |
                               --|----|--------------|----|--
                                 |                        |   
                                _|_  gfs-1               _|_  gfs-2 
                               |   |                    |   | 
                               |___|                    |___| 
 
                            /dev/sdb -> /srv/gfs     /dev/sdb -> /srv/gfs

kus

  • veebiserverile www-1 on veebijuurikas ühendatud külge natuke erilisel moel, mõlemast GlusterFS serverist, kirjutamised tehakse mõlema füüsilise salvestusserveri gfs-1 ja gfs-2 failisüsteem
  • veebiserverile www-2 on veebijuurikas ühendatud külge sarnaselt

GlusterFS süsteemi ettevalmistamine

Arvestades süsteemi jõudlust ja redundantsust on mõttekas gfs-1 ja gfs-2 arvutitena kasutada füüsilisi arvuteid. Käesolevas tekstis on kasutatud Debian GNU/Linux Squeeze operatsioonisüsteemi, mis on küll 2009 juunis nn Debian testing kuid see-eest sisaldab paketihalduses kõike vajalikku GlusterFS kasutamiseks. Alternatiiv on paigaldada GlusterFS nt lähtetekstidest. Kuna GlusterFS lahendus tekitab võrgule tõenäoliselt koormust, siis on ettenägelik kasutada selle andmevahetuse jaoks eraldi võrgusegmenti, lisaks on see ka mõistliku turvakaalutlustel, sest GlusterFS ligipääsu kontrollimine töötab ip aadressi täpsusega.

Tarkvara paigaldamine serveritesse

GlusterFS serveritesse gfs-1 ja gfs-2 tuleb paigalda pakett

 # apt-get install glusterfs-server

Tarkvara paigaldamine klientidesse

 # apt-get install glusterfs-client

GlusterFS seadistamine

Mõlemad serverid tuleb seadistada samasuguselt ja mõlemad kliendid samuti samasuguselt.

Serverite seadistamine

Serverites sobib kasutada nt sellist seadistusfaili /etc/glusterfs/glusterfsd.vol

 volume posix
   type storage/posix
   option directory /srv/www
 end-volume
 
 volume locks
   type features/locks
   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
   subvolumes brick
   option auth.addr.brick.allow *
 end-volume

Klientide seadistamine

Serverites sobib kasutada nt sellist seadistusfaili /etc/glusterfs/glusterfs.vol

 volume remote1
   type protocol/client
   option transport-type tcp
   option remote-host 192.168.10.55
   option remote-subvolume brick
 end-volume
 
 volume remote2
   type protocol/client
   option transport-type tcp
   option remote-host 192.168.10.56
   option remote-subvolume brick
 end-volume
 
 volume replicate
   type cluster/replicate
   subvolumes remote1 remote2
 end-volume
 
 volume writebehind
   type performance/write-behind
   option window-size 1MB
   subvolumes replicate
 end-volume
 
 volume cache
   type performance/io-cache
   option cache-size 512MB
   subvolumes writebehind
 end-volume

GlusterFS süsteemi kasutamine

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

Töötab glusterfs protsess

 # ps aux | grep glusterfs
 root ... /usr/sbin/glusterfs --log-level=NORMAL --volfile=/etc/glusterfs/glusterfs.vol /mnt/glusterfs

Logi

TODO

Kasulikud lisamaterjalid