Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deploy KVM virtualization platform using GFS cluster (instance!!)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

4 GFS node servers as GlusterFS cluster, providing storage services to KVM clients for virtualization

Server Role IP Address Disk Space gfs-node1192.168.142.15240G+40Ggfs-node2192.168.142.15440G+40Ggfs-node3192.168.142.16240G+40Ggfs-node4192.168.142.16340G+40Gkvm-client192.168.142.16340G Step 1: Deploy GFS Node Server

1. Add a new disk to each of the four GFS node servers

2. Deployment of GFS nodes using scripts

#!/ bin/bashsystemctl stop firewalld.servicesetenforce 0#format disks echo "the disks exist list:"fdisk -l| grep 'disk/dev/sd[a-z $>' echo "==================================================| grep -o 'sd[b-z]'| uniq` quitdo case $VAR in sda) fdisk -l /dev/sda break ;; sd[b-z]) #create partitions echo "n p w" | fdisk /dev/$VAR #make filesystem mkfs.xfs -i size=512 /dev/${VAR}"1" &> /dev/null #mount the system mkdir -p /data/${VAR}"1" &> /dev/null echo -e "/dev/${VAR}"1" /data/${VAR}"1" xfs defaults 0 0\n" >> /etc/fstab mount -a &> /dev/null break ;; quit) break;; *) echo "wrong disk,please check again";; esacdone#grant execution chmod +x a.sh #execute script./ a.sh #Pay attention to modifying the host address!!! cat >>/etc/hosts

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report