Skip to content

Instantly share code, notes, and snippets.

@apten-fors
Last active January 31, 2023 06:43
Show Gist options
  • Save apten-fors/02e1cc295a19fa09491cc466a4a5e1e8 to your computer and use it in GitHub Desktop.
Save apten-fors/02e1cc295a19fa09491cc466a4a5e1e8 to your computer and use it in GitHub Desktop.
Настройка glusterfs на Cetos7

Прописать соответствия ip и имени для всех серверов на каждом

vi /etc/hosts
192.168.0.1 node01
192.168.0.2 node02

yum -y install epel-release yum-priorities

выставить приоритет у epel репы

vi /etc/yum.repos.d/epel.repo
priority=10

на каждой ноде

	yum -y install centos-release-gluster

	yum -y install https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/userspace-rcu-0.10.1-4.el8.x86_64.rpm

	yum -y install glusterfs-server

	systemctl enable --now glusterd

	glusterfsd --version

на ноде 2

gluster peer probe node01

на ноде 1

gluster peer probe node02

gluster peer status

на каждой ноде

mkdir -p /srv/.bricks

на одной ноде

gluster volume create www replica 2 transport tcp node01:/srv/.bricks/www node02:/srv/.bricks/www force

gluster volume start www

на каждой ноде

	mkdir /srv/www

	echo localhost:/www /srv/www glusterfs defaults,_netdev 0 0 >> /etc/fstab

	mount /srv/www

gluster volume info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment