安裝Gluster和擴容

2021-06-23 01:05:52 字數 1814 閱讀 2657

以下技術應用於最優質的水果的鮮果籃

wget -l 1 -nd -nc -r -a.rpm

yum install glusterfs-libs-3.5.1-1.el6.x86_64.rpm glusterfs-api-3.5.1-1.el6.x86_64.rpm glusterfs-cli-3.5.1-1.el6.x86_64.rpm glusterfs-3.5.1-1.el6.x86_64.rpm glusterfs-fuse-3.5.1-1.el6.x86_64.rpm glusterfs-geo-replication-3.5.1-1.el6.x86_64.rpm glusterfs-server-3.5.1-1.el6.x86_64.rpm

run glusterd on each gluster server:

service glusterd start

chkconfig glusterd on

add rule into iptables file on each gluster server:

vi /etc/sysconfig/iptables:

-a input -m state --state new -m tcp -p tcp --dport 24007:24008 -j accept

-a input -m state --state new -m tcp -p tcp --dport 49152:49162 -j accept

service iptables restart

add hosts into hosts file on each gluster server:

vi hosts:

192.168.1.201  g1

192.168.1.202  g2

probe g2 and other servers from g1:

gluster peer probe g2

peer probe: success.

create distributed replicated volume:

gluster volume create test-volume replica 2 transport tcp g1:/exp1 g2:/exp2 g1:/exp3 g2:/exp4 force

start volume:

gluster volume start test-volume

install gluster client:

rpm -ivh glusterfs-libs-3.5.1-1.el6.x86_64.rpm

rpm -ivh glusterfs-3.5.1-1.el6.x86_64.rpm

rpm -ivh glusterfs-fuse-3.5.1-1.el6.x86_64.rpm

mount -t glusterfs vm9:/test-volume /mnt/glusterfs

注意:客戶端的/etc/hosts檔案要包含所有gluster節點。

expand volumn:

gluster volume add-brick test-volume g3:/exp5 g4:/exp6 g3:/exp7 g4:/exp8 force

rebalance:

gluster volume rebalance test-volume start

gluster volume rebalance test-volume start force

gluster volume rebalance test-volume status

注意:擴容後,客戶端的/etc/hosts檔案要包含所有gluster節點,否則會訪問不到漏了的節點上的檔案。

gluster 安裝配置基本指南

gluster 安裝配置基本指南 1 rpm安裝 複製gluster中的core 和 fuse模組,並進行安裝。rpm ivh glusterfs core 3.1.3 1.x86 64.rpm rpm ivh glusterfs fuse 3.1.3 1.x86 64.rpm 2 fuse測試並檢...

Centos7 9安裝Gluster儲存

操作節點為192.168.8.137 yum y install centos release gluster y yum y install glusterfs server y systemctl start glusterd.service systemctl enable glusterd....

ArrayList的擴容方式和擴容時機

arraylist的底層是乙個動態陣列,arraylist首先會對傳進來的初始化引數initalcapacity進行判斷,如果引數等於0,則將陣列初始化為乙個空陣列,如果不等於0,將陣列初始化為乙個容量為10的陣列。初始容量也可以自定義指定。隨著不斷新增元素,陣列大小增加,當陣列的大小大於初始容量的...