1、下载安装
官方网站 https://moosefs.com/download/
curl "http://ppa.moosefs.com/MooseFS-3-el6.repo" > /etc/yum.repos.d/MooseFS.repo
Master Servers:
yum install moosefs-master moosefs-cgi moosefs-cgiserv moosefs-cli
Chunkservers:
yum install moosefs-chunkserver
Metaloggers:
yum install moosefs-metalogger
Clients:
yum install moosefs-client
2、配置启动
Master Servers:
配置文件一般无需修改,一般安装两台起keepalived
启动命令-a自动修复-i忽略错误 mfsmaster -a -i
Chunkservers:
配置文件 vi /etc/mfs/mfschunkserver.cfg 修改MASTER_HOST为Maste的IP
vi /etc/mfs/mfshdd.cfg 增加要供写数据的盘挂载目录/data,此目录要有mfs用户权限
启动命令 mfschunkserver start,Chunkservers是数据存放的地方一般三个以上
Metaloggers:
配置文件vi /etc/mfs/mfsmetalogger.cfg 修改MASTER_HOST为Maste的IP
启动命令mfsmetalogger restart
Clients:
挂载命令 mfsmount /data1 -H 192.168.2.120 ,其中/data为本机挂载点,-H为Master Servers 的ip
3、状态查看
在客户端mfs挂载目录里面查文件存放信息,默认2副本
[root@CentOS-6 data1]# mfsgetgoal zabbix.repo
zabbix.repo: 2
[root@CentOS-6 data1]# mfssetgoal 3 zabbix.repo
zabbix.repo: goal: 3
[root@CentOS-6 data1]# mfsfileinfo zabbix.repo
zabbix.repo:
chunk 0: 0000000000000002_00000001 / (id:2 ver:1)
copy 1: 192.168.2.108:9422 (status:VALID)
copy 2: 192.168.2.109:9422 (status:VALID)
copy 3: 192.168.2.120:9422 (status:VALID)