[iyunv@node1 mfs]# /usr/local/mfs/sbin/mfsmaster start
open files limit has been set to: 16384
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
initializing mfsmaster modules ...
exports file has been loaded
mfstopology configuration file (/usr/local/mfs/etc/mfstopology.cfg) not found - using defaults
loading metadata ...
metadata file has been loaded
no charts data file - initializing empty charts
master <-> metaloggers module: listen on *:9419
master <-> chunkservers module: listen on *:9420
main master server module: listen on *:9421
mfsmaster daemon initialized properly
[iyunv@node1 mfs]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9419 0.0.0.0:* LISTEN 8109/mfsmaster
tcp 0 0 0.0.0.0:9420 0.0.0.0:* LISTEN 8109/mfsmaster
tcp 0 0 0.0.0.0:9421 0.0.0.0:* LISTEN 8109/mfsmaster
二、安装Metalogger Server:
前面已经介绍了,Metalogger Server 是 Master Server 的备份服务器。因此,Metalogger Server 的安装步骤和 Master Server 的安装步骤相同。并且,最好使用和 Master Server 配置一样的服务器来做 Metalogger Server。这样,一旦主服务器master宕机失效,我们只要导入备份信息changelogs到元数据文件,备份服务器可直接接替故障的master继续提供服务。
1、从master把包copy过来:
[iyunv@node2 mfs]#/usr/local/mfs/sbin/mfsmetalogger start
open files limit has been set to: 4096
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
initializing mfsmetalogger modules ...
mfsmetalogger daemon initialized properly
[iyunv@node3 ~]# useradd mfs
[iyunv@node3 ~]# yum install zlib-devel -y
[iyunv@node3 ~]# cd /usr/local/src/
[iyunv@node3 src]# tar zxvf v3.0.96.tar.gz
[iyunv@node3 moosefs-3.0.96]# ./configure --prefix=/usr/local/mfs --with-default-user=mfs --with-default-group=mfs --disable-mfsmaster --disable-mfsmount
[iyunv@node3 moosefs-3.0.96]# make && make install
2、配置check server:
1
2
3
4
5
[iyunv@node3 moosefs-3.0.96]# cd /usr/local/mfs/etc/mfs/
You have new mail in /var/spool/mail/root
[iyunv@node3 mfs]# cp mfschunkserver.cfg.sample mfschunkserver.cfg
[iyunv@node3 mfs]# vim mfschunkserver.cfg
MASTER_HOST = 172.25.0.29
3、配置mfshdd.cfg主配置文件
mfshdd.cfg该文件用来设置你将 Chunk Server 的哪个目录共享出去给 Master Server进行管理。当然,虽然这里填写的是共享的目录,但是这个目录后面最好是一个单独的分区。
1
2
3
4
[iyunv@node3 mfs]# cp /usr/local/mfs/etc/mfs/mfshdd.cfg.sample /usr/local/mfs/etc/mfs/mfshdd.cfg
You have new mail in /var/spool/mail/root
[iyunv@node3 mfs]# vim /usr/local/mfs/etc/mfs/mfshdd.cfg
/mfsdata
4、启动check Server:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[iyunv@node3 mfs]# mkdir /mfsdata
[iyunv@node3 mfs]# chown mfs:mfs /mfsdata/
You have new mail in /var/spool/mail/root
[iyunv@node3 mfs]# /usr/local/mfs/sbin/mfschunkserver start
open files limit has been set to: 16384
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
setting glibc malloc arena max to 4
setting glibc malloc arena test to 4
initializing mfschunkserver modules ...
hdd space manager: path to scan: /mfsdata/
hdd space manager: start background hdd scanning (searching for available chunks)
main server module: listen on *:9422
no charts data file - initializing empty charts
mfschunkserver daemon initialized properly