Constitution du cluster Volumes
- node-seaweed-v05
Spécification
- IP : 10.100.0.172
- vCPU : 2
- RAM : 2Go
- Disque : 8Go (Système)
- Disque sdb : 50Go (Volume01)
- Disque sdc : 50Go (Volume02)
- OS : Rockylinux
Installation des prérequis
[root@node-seaweed-v05 ~]# dnf update -y [root@node-seaweed-v05 ~]# yum install git make wget tar dnf-utils -y
Installation paquet GO
[root@node-seaweed-v05 ~]# wget -c https://go.dev/dl/go1.22.0.linux-amd64.tar.gz [root@node-seaweed-v05 ~]# tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz [root@node-seaweed-v05 ~]# echo 'export GOROOT=/usr/local/go' | tee -a /etc/profile export GOROOT=/usr/local/go [root@node-seaweed-v05 ~]# echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile export PATH=$PATH:/usr/local/go/bin [root@node-seaweed-v05 ~]# source /etc/profile [root@node-seaweed-v05 ~]# go version go version go1.21.6 linux/amd64
Installation paquet seaweedfs
[root@node-seaweed-v05 ~]# git clone https://github.com/chrislusf/seaweedfs.git [root@node-seaweed-v05 ~]# cd ~/seaweedfs [root@node-seaweed-v05 seaweedfs]# make install [root@node-seaweed-v05 seaweedfs]# cp ~/go/bin/weed /usr/local/bin/ [root@node-seaweed-v05 seaweedfs]# weed version version 30GB 3.62 linux amd64
Régles Firewall
[root@node-seaweed-v05 ~]#firewall-cmd --remove-service={cockpit,dhcpv6-client} --permanent [root@node-seaweed-v05 ~]#firewall-cmd --add-port={8080,18080,8081,18081}/tcp --permanent [root@node-seaweed-v05 ~]#firewall-cmd --reload
Préparation Disque « Volume »
[root@node-seaweed-v05 seaweedfs]# lsblk
Partition /dev/sdb et sdc
[root@node-seaweed-v05 seaweedfs]# parted -s /dev/sdb mklabel msdos [root@node-seaweed-v05 seaweedfs]# parted -s /dev/sdc mklabel msdos [root@node-seaweed-v05 seaweedfs]# parted -s /dev/sdb mkpart primary 1MiB 100% [root@node-seaweed-v05 seaweedfs]# parted -s /dev/sdc mkpart primary 1MiB 100% [root@node-seaweed-v05 seaweedfs]# lsblk
Disque /dev/sdb1 (volume01)
[root@node-seaweed-v05 seaweedfs]# pvcreate /dev/sdb1 [root@node-seaweed-v05 seaweedfs]# vgcreate seaweed01 /dev/sdb1 [root@node-seaweed-v05 seaweedfs]# lvcreate -n data01 -l 100%FREE seaweed01 [root@node-seaweed-v05 seaweedfs]# "
Disque /dev/sdc1 (volume02)
[root@node-seaweed-v05 seaweedfs]# pvcreate /dev/sdc1 [root@node-seaweed-v05 seaweedfs]# vgcreate seaweed02 /dev/sdc1 [root@node-seaweed-v05 seaweedfs]# lvcreate -n data02 -l 100%FREE seaweed02 [root@node-seaweed-v05 seaweedfs]# ls /dev/mapper/
Formatage des disques de données
[root@node-seaweed-v05 seaweedfs]# mkfs.ext4 /dev/mapper/seaweed01-data01 [root@node-seaweed-v05 seaweedfs]# mkfs.ext4 /dev/mapper/seaweed02-data02 [root@node-seaweed-v05 seaweedfs]# lsblk
Montage des disques de données
[root@node-seaweed-v05 seaweedfs]# mkdir -p /seaweedfs/Volume01 [root@node-seaweed-v05 seaweedfs]# mkdir -p /seaweedfs/Volume02 [root@node-seaweed-v05 seaweedfs]# echo "/dev/mapper/seaweed01-data01 /seaweedfs/Volume01 ext4 defaults 0 1" >> /etc/fstab [root@node-seaweed-v05 seaweedfs]# echo "/dev/mapper/seaweed02-data02 /seaweedfs/Volume02 ext4 defaults 0 1" >> /etc/fstab [root@node-seaweed-v05 seaweedfs]# systemctl daemon-reload [root@node-seaweed-v05 seaweedfs]# mount /seaweedfs/Volume01 [root@node-seaweed-v05 seaweedfs]# mount /seaweedfs/Volume02 [root@node-seaweed-v05 seaweedfs]# df -h |grep -i sea
Ajout nouvel host « volume » v05 au DNS Infrastructure
[root@node-seaweed-v05 ~]# nslookup node-seaweed-v05
Création des services node-seaweed-v05
Sur node-seaweed-v05 – Volume01 (DC1 et Rack1)
[root@node-seaweed-v05 ~]# vi /etc/systemd/system/seaweedvolume01.service [Unit] Description=SeaweedFS Volume After=network.target [Service] Type=simple User=root Group=root ExecStart=weed volume -mserver=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333,node-seaweed-m04:9333,node-seaweed-m05:9333 -dataCenter=dc1 -rack=rack1 -dir=/seaweedfs/Volume01 -port=8080 -max=2 -ip=node-seaweed-v05 WorkingDirectory=/usr/local/bin/ SyslogIdentifier=seaweedfs-volume [Install] WantedBy=multi-user.target
Sur node-seaweed-v05 – Volume02 (DC2 et Rack2)
[root@node-seaweed-v05 ~]# vi /etc/systemd/system/seaweedvolume02.service [Unit] Description=SeaweedFS Volume After=network.target [Service] Type=simple User=root Group=root ExecStart=weed volume -mserver=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333,node-seaweed-m04:9333,node-seaweed-m05:9333 -dataCenter=dc2 -rack=rack2 -dir=/seaweedfs/Volume02 -port=8081 -max=2 -ip=node-seaweed-v05 WorkingDirectory=/usr/local/bin/ SyslogIdentifier=seaweedfs-volume [Install] WantedBy=multi-user.target
Inventaire actuel
Démarrage des Volumes de Sur node-seaweed-v05
[root@node-seaweed-v05 ~]# systemctl daemon-reload [root@node-seaweed-v05 ~]# systemctl enable seaweedvolume01 [root@node-seaweed-v05 ~]# systemctl enable seaweedvolume02 [root@node-seaweed-v01 ~]# systemctl start seaweedvolume01 [root@node-seaweed-v01 ~]# systemctl start seaweedvolume02 [root@node-seaweed-v01 ~]# systemctl status seaweedvolume01
[root@node-seaweed-v01 ~]# systemctl status seaweedvolume02
Inventaire des Volumes sur le node master
Taille du Volume sur le Client Linux
Avant le nouvel hosts « volume » node-seaweed-v05
[root@node-seaweed-c01 ~]# df -Th | grep fuse
Avec l’ajout du nouvel host « volume » node-seaweed-v05
[root@node-seaweed-c01 ~]# df -Th | grep fuse
La taille du volume seaweedFS est passée de 469G => 585G grâce à l’ajout du nouveau nœud « node-seaweed-v05 »
Views: 1