開發 GDash on CAKE3.0

Install Gluster

vim /etc/yum.repos.d/glusterfs-epel.repo
[glusterfs-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

[glusterfs-noarch-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/noarch
enabled=1
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

[glusterfs-source-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

 
yum install epel-release -y
yum install gdisk glusterfs{,-server,-fuse,-geo-replication} -y

 
 

Setting Up GlusterFS Client

modprobe fuse
dmesg | grep -i fuse

 
yum -y install openssh-server wget fuse fuse-libs openib libibverbs

 
iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 24007:24008 -j ACCEPT
iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 49152:49156 -j ACCEPT

 
vim /etc/yum.repos.d/glusterfs-epel.repo
[glusterfs-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

[glusterfs-noarch-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/noarch
enabled=1
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

[glusterfs-source-epel]
name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/epel-$releasever/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/EPEL.repo/pub.key

 
yum install epel-release -y
yum install glusterfs{,-fuse} -y

 
 

附錄. 好用的東東

使用remote host執行CLI

--remote=host=<HOST>
gluster --remote=host=node1 pool list

 
執行CLI,輸出xml
--xml
gluster pool list --xml

 
 

附錄. 題外話

Tuning the volume for virt-store

There are recommended settings available for virt-store. This provide good performance characteristics when enabled on the volume that was used for virt-store

 

Tuning glusterd to accept requests from QEMU

glusterd receives the request only from the applications that run with port number less than 1024 and it blocks otherwise. QEMU uses port number greater than 1024 and to make glusterd accept requests from QEMU, edit the glusterd vol file, /etc/glusterfs/glusterd.vol and add the following,

option rpc-auth-allow-insecure on
systemctl restart glusterd.service

 
Tuning glusterfsd to accept requests from QEMU

Enable the option allow-insecure on the particular volume

gluster volume set <VOL> server.allow-insecure on
systemctl restart glusterd.service

 
Tuning network

Disable offloading so TCP/IP functionality is NOT shifted to the LAN card. On both sender and receiver:

ethtool -K eth0 gso off
ethtool -K eth0 gro off
ethtool -K eth0 tso off

 
Turn off auto-tuning of the TCP receive buffer size. On the receiver:
sysctl net.ipv4.tcp_moderate_rcvbuf=0
or
echo 0 > /proc/sys/net/ipv4/tcp_moderate_rcvbuf

 
Tuning options for gluster volume
gluster volume set gv1 performance.io-thread-count 64  #default: 16
gluster volume set gv1 performance.write-behind-window-size 1GB  #default: 1MB
gluster volume set gv1 performance.cache-size 2GB  #default: 32MB 
gluster volume set gv1 performance.cache-max-file-size 16384PB
gluster volume set gv1 performance.cache-min-file-size 0
gluster volume set gv1 performance.cache-refresh-timeout 1
gluster volume set gv1 performance.read-ahead off  #(only for 1GbE)

 
Linux kernel tuning
echo 0 > /proc/sys/vm/swappiness

echo 1 > /proc/sys/vm/dirty_background_ratio
echo 2 > /proc/sys/vm/dirty_ratio

echo 256 > /sys/block/sdc/queue/nr_requests

 

 
 
 
 
 
 
 
 
 
 
 

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License