Constitution du cluster Filers
- node-seaweed-c01
Spécification du client
- vCPU : 2
- RAM : 2Go
- Disque : 32Go (Système)
- OS : RockyLinux
Installation des prérequis
[root@node-seaweed-c01 ~]# dnf update -y [root@node-seaweed-c01 ~]# yum install git make wget fuse -y [root@node-seaweed-c01 ~]# dnf install tar dnf-utils
Installation paquet GO
[root@node-seaweed-c01 ~]# wget -c https://go.dev/dl/go1.22.0.linux-amd64.tar.gz [root@node-seaweed-c01 ~]# tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz [root@node-seaweed-c01 ~]# echo 'export GOROOT=/usr/local/go' | tee -a /etc/profile export GOROOT=/usr/local/go [root@node-seaweed-c01 ~]# echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile export PATH=$PATH:/usr/local/go/bin [root@node-seaweed-c01 ~]# source /etc/profile [root@node-seaweed-c01 ~]# go version go version go1.21.6 linux/amd64
Installation paquet seaweedfs
[root@node-seaweed-c01 ~]# git clone https://github.com/chrislusf/seaweedfs.git [root@node-seaweed-c01 ~]# cd ~/seaweedfs [root@node-seaweed-c01 seaweedfs]# make install [root@node-seaweed-c01 seaweedfs]# cp ~/go/bin/weed /usr/local/bin/ [root@node-seaweed-c01 seaweedfs]# cp ~/go/bin/weed /sbin/mount.weed [root@node-seaweed-c01 seaweedfs]# weed version version 30GB 3.62 linux amd64
Ajout du client au DNS infrastructure
[root@node-seaweed-c01 ~]# nslookup node-seaweed-c01
Volume
[root@node-seaweed-c01 seaweedfs]# mkdir /seaweedVolumeW
Installation « fuse » seaweed
[root@node-seaweed-c01 home]# git clone https://github.com/seaweedfs/fuse.git [root@node-seaweed-c01 home]# cd fuse [root@node-seaweed-c01 fuse]# go get github.com/seaweedfs/fuse go: downloading golang.org/x/sys v0.0.0-20210817142637-7d9622a276b7
Création du service collection « data » – Volume SeaWee Write
[root@node-seaweed-c01 seaweedfs]# vi /etc/systemd/system/seaweedVolumeW.service [Unit] Description=SeaweedFS VolumeW After=network.target [Service] Type=simple User=root Group=root ExecStart=weed mount -filer=node-seaweed-f01:8888,node-seaweed-f02:8888,node-seaweed-f03:8888,node-seaweed-f04:8888 -dir=/seaweedVolumeW -filer.path=/seaweedVolumeW/data -collection=data -cacheCapacityMB=4000 -cacheDir=/tmp -chunkSizeLimitMB=4 -volumeServerAccess=direct WorkingDirectory=/usr/local/bin/ SyslogIdentifier=seaweedfs-VolumeW [Install] WantedBy=multi-user.target
Démarrage du Volume
[root@node-seaweed-c01 ~]# systemctl daemon-reload [root@node-seaweed-c01 ~]# systemctl enable seaweedVolumeW [root@node-seaweed-c01 ~]# systemctl status seaweedVolumeW
[root@node-seaweed-c01 ~]# df -Th | grep fuse
Check Cluster seaweed
[root@node-seaweed-c01 ~]# for i in {1..3};do curl -I http://node-seaweed-m0$i:9333/cluster/healthz;done
Nettoyage des Collections existantes
[root@node-seaweed-c01 /]# curl http://node-seaweed-m01:9333/col/delete?collection
Test d’écriture de fichier
Téléchargement d’un fichier
[root@node-seaweed-c01 ~]# cd /seaweedVolumeW [root@node-seaweed-c01 seaweedVolumeW]# wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso
[root@node-seaweed-c01 seaweedVolumeW]# ls –al
Vue des « block » sur les volumes
Fichier « debian » stocké sous forme « block » et répliqué sur les deux DC et Rack.
Stockage des différents « block » du fichier « debian » sur les volumes
node-seaweed-v01
- http://node-seaweed-v01:8080/ui/index.html
Volumes 1 de node-seaweed-v01 – (DC1 – Rack1) et ID : 9-11
- http://node-seaweed-v01:8081/ui/index.html
Volumes 2 de node-seaweed-v01 – (DC1 – Rack2) et ID : 8-9
node-seaweed-v02
- http://node-seaweed-v02:8080/ui/index.html
Volumes 1 de node-seaweed-v02 – (DC2 – Rack1) et ID : 11-12
- http://node-seaweed-v02:8081/ui/index.html
Volumes 2 de node-seaweed-v02 – (DC2 – Rack2) et ID : 8-10
node-seaweed-v03
- http://node-seaweed-v03:8080/ui/index.html
Volumes 1 de node-seaweed-v03 – (DC1 – Rack1) et ID : 8
- http://node-seaweed-v03:8081/ui/index.html
Volumes 2 de node-seaweed-v03 – (DC1 – Rack2) et ID : 10-12
node-seaweed-v04
- http://node-seaweed-v04:8080/ui/index.html
Volumes 1 de node-seaweed-v04 – (DC2 – Rack1) et ID : 9-10
- http://node-seaweed-v04:8081/ui/index.html
Volumes 2 de node-seaweed-v04 – (DC2 – Rack2) et ID : 11-12
Views: 1