In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the Gluster cluster high availability configuration and node addition and deletion example analysis, the article is very detailed, has a certain reference value, interested friends must read it!
1. Gluster high availability configuration 1. Gluster node service planning
IP address planning
# vi / etc/hosts200.192.100.101 glusternode1 # Node 1 address 200.192.100.102 glusternode2 # Node 2 address 200.192.100.100 glustervip # gluster Service address
Volume Bricks planning
Execute on node 1, node 2:
# mkdir / storage#mount / dev/vg01/lvstorage / storage2. Configure and install high availability
Install keepalived on node 1 and node 2:
# yum install keepalived#vi / etc/keepalived/keepalived.conf! Configuration File for keepalivedvrrp_script chk_gluster {script "/ etc/keepalived/check_gluster.sh" interval 2 global_defs {router_id LVS_DEVEL} vrrp_instance VI_1 {state MASTER # slave server to be changed to BACKUP interface eth0 virtual_router_id 101 Priority 100 # standby server priority should be lowered to advert_int 1 authentication {auth_type PASS auth_pass Pass2020wd} track_script {chk_gluster} virtual _ ipaddress {200.192.100.100 if 24}}: wq#vi / etcswap keepalivedbat checkbox gluster.shrunk bind bind bashnumbles $(netstat-lnupt | grep glusterd | wc-l) if [$num-eq 0] Then systemctl start glusterd gluster volume start storage force if [$(netstat-lnupt | grep glusterd | wc-l)-eq 0]; then systemctl stop keepalived fifi:wq# gives script permission chmod + x / etc/keepalived/check_gluster.sh3. Configure gluster distributed storage
Add Node 2: gluster peer probe glusternode2 to Node 1
Add Node 1: gluster peer probe glusternode1 to Node 2
View node status
Gluster peer status
Create a replication volume:
# create replication volume gluster volume create storage replica 2 glusternode1:/storage glusternode2:storage# boot volume storagegluster volume start storage# view volume status gluster volume status# view volume information gluster volume info storage4. Start high availability and mount volumes through gluster service addresses
Execute on node 1 and 2
Systemctl enable keepalivedsystemctl start keepalived
Mount-t glusterfs glustervip:/storage / home/data
Second, Gluster node fault handling 1. Suppose glusternode1 fails
View the service IP on glusternode2 has been elegant
Ip-a | grep 200.192.100.100gluster volume status # check the status and find that glusternode1 has been disconnected
Delete the node on the glusternode1
# remove brickgluster volume remove-brick iso replica 1 glusternode1:/storage forcegluster volume statusgluster peer statusgluster peer detach glusternode1 on glusternode1 # remove gluster peer statusgluster volume status from glusternode1 node
When the glusternode1 node fault repair is completed, add the node back to
Gluster peer probe glusternode1 # add Node gluster peer status# add Node brick back to gluster volume add-brick iso replica 2 glusternode1:/storage forcegluster volume status above is all the content of the article "Gluster Cluster High availability configuration and sample Analysis of Node additions and deletions". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.