Erinevus lehekülje "Glusterfs kasutamine Gentooga" redaktsioonide vahel
17. rida: | 17. rida: | ||
Teise ip 192.168.1.11 | Teise ip 192.168.1.11 | ||
− | Installime mõlemale glusterfs'i | + | Installime mõlemale serverile glusterfs'i |
saab seda aadressilt http://ftp.zresearch.com/pub/gluster/glusterfs/ | saab seda aadressilt http://ftp.zresearch.com/pub/gluster/glusterfs/ | ||
27. rida: | 27. rida: | ||
− | + | Mõlemale serverile loome kaks faili glusterfs.vol ja glusterfs_client.col | |
+ | Mõlemad failid on kummagil serveril täpselt sama sisuga. | ||
+ | |||
+ | Mõlemale serverile tuleb luua ka kaust /home/export kus hoitakse reaalselt faile | ||
+ | ja /mnt/gluster kuhu fuse abil ühendatakse glusterfs | ||
+ | |||
+ | |||
+ | /etc/glusterfs.vol | ||
### Export volume "brick" with the contents of "/home/export" directory. | ### Export volume "brick" with the contents of "/home/export" directory. | ||
33. rida: | 40. rida: | ||
type storage/posix # POSIX FS translator | type storage/posix # POSIX FS translator | ||
option directory /home/export # Export this directory | option directory /home/export # Export this directory | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
end-volume | end-volume | ||
Redaktsioon: 27. august 2007, kell 11:14
sissejuhatus
probleem
1. On olemas veebiserver mis peaks olema töökorras 99% ajast. Et välistada erinevaid softi-raua vigu peaks hoidma üleval kahte.
2. Ühest veebiserverist jääb väheks klientide teenindamisel. Oleks vaja koormust jaotada. Samas veebiserveri sisu muutub pidevalt ja vaja on erinevate serverite infot hoida sünkroonis.
On olemas kaks veebiserverit.
Esimese ip 192.168.1.10 Teise ip 192.168.1.11
Installime mõlemale serverile glusterfs'i
saab seda aadressilt http://ftp.zresearch.com/pub/gluster/glusterfs/
tar -xf glusterfs-1.3.0.tar.gz ./configure --prefix=/usr --disable-ibverbs make make install
Mõlemale serverile loome kaks faili glusterfs.vol ja glusterfs_client.col
Mõlemad failid on kummagil serveril täpselt sama sisuga.
Mõlemale serverile tuleb luua ka kaust /home/export kus hoitakse reaalselt faile ja /mnt/gluster kuhu fuse abil ühendatakse glusterfs
/etc/glusterfs.vol
### Export volume "brick" with the contents of "/home/export" directory. volume brick type storage/posix # POSIX FS translator option directory /home/export # Export this directory end-volume ### Add network serving capability to above brick. volume server type protocol/server subvolumes brick brick-afr option transport-type tcp/server # For TCP/IP transport option auth.ip.brick.allow * # access to "brick" volume option auth.ip.brick-afr.allow * # access to "brick" volume end-volume
localhost gluster # cat /etc/glusterfs_client.vol ### Add client feature and attach to remote subvolume of server1 volume brick1 type protocol/client option transport-type tcp/client # for TCP/IP transport option remote-host 192.168.1.10 # IP address of the remote brick option remote-subvolume brick # name of the remote volume end-volume ### Add client feature and attach to remote subvolume of brick2 volume brick2 type protocol/client option transport-type tcp/client # for TCP/IP transport option remote-host 192.168.1.11 # IP address of the remote brick option remote-subvolume brick # name of the remote volume end-volume ### Add AFR feature to brick1 volume afr type cluster/afr subvolumes brick1 brick2 #option replicate *.html:2,*.db:1,*:2 # Do not leave space before or after "," and ":" option replicate *:2 end-volume
localhost gluster # cat /etc/conf.d/local.start #!/bin/bash # /etc/conf.d/local.start glusterfsd -f /etc/glusterfs.vol glusterfs -f /etc/glusterfs_client.vol -l /var/log/glusterfs.log -L ERROR /mnt/gluster