首页 > 系统运维 > mfs安装配置
您的足迹
  • 你没有浏览过任何文章或者你没有开启cookies。

mfs安装配置

环境介绍:

用途 ip 系统
1 master 192.168.1.73 Centos 6.3 x64
2 metalog 192.168.1.74 Centos 6.3 x64
3 chunkserver1 192.168.1.75 Centos 6.3 x64
4 chunkserver2 192.168.1.76 Centos 6.3 x64
5 client 192.168.1.68 Centos 5.8 x64

软件准备:

1.mfs-1.6.26.tar.gz

2.yum -y fuse fuse-devel zlib-devel

安装配置步骤:

1.master服务器安装配置

useradd mfs -s /sbin/nologin
./configure --prefix=/usr/local/mfsm --with-default-user=mfs --with-default-group=mfs \
--disable-mfschunkserver --disable-mfsmount --mandir=/usr/share/man
make 
make install

master主要2个配置文件mfsmaster.cfg和mfsexports.cfg,具体解释可以man查看,我测试用的配置如下:
mfsmaster.cfg如下:

 WORKING_USER = mfs
 WORKING_GROUP = mfs
 SYSLOG_IDENT = mfsmaster
 LOCK_MEMORY = 0
 NICE_LEVEL = -19

 EXPORTS_FILENAME = /usr/local/mfsm/etc/mfsexports.cfg

# TOPOLOGY_FILENAME = /usr/local/mfsm/etc/mfstopology.cfg

 DATA_PATH = /usr/local/mfsm/var/mfs

 BACK_LOGS = 50
 BACK_META_KEEP_PREVIOUS = 1

 REPLICATIONS_DELAY_INIT = 300
 REPLICATIONS_DELAY_DISCONNECT = 3600

 MATOML_LISTEN_HOST = *
 MATOML_LISTEN_PORT = 9419

 MATOCS_LISTEN_HOST = *
 MATOCS_LISTEN_PORT = 9420

 MATOCL_LISTEN_HOST = *
 MATOCL_LISTEN_PORT = 9421

 CHUNKS_LOOP_CPS = 100000
 CHUNKS_LOOP_TIME = 300

 CHUNKS_SOFT_DEL_LIMIT = 10
 CHUNKS_HARD_DEL_LIMIT = 25
 CHUNKS_WRITE_REP_LIMIT = 2
 CHUNKS_READ_REP_LIMIT = 10

# REJECT_OLD_CLIENTS = 0

# deprecated:
# CHUNKS_DEL_LIMIT - use CHUNKS_SOFT_DEL_LIMIT instead
# LOCK_FILE - lock system has been changed, and this option is used only to search for old lockfile

mfsexports.cfg如下:

# Allow everything but "meta".
*                       /       rw,alldirs,maproot=0,password=pass

# Allow "meta".
*                       .       rw

其他默认没变。
mfsmaster启动和停止:
启动:/usr/local/mfsm/sbin/mfsmaster start
停止:/usr/local/mfsm/sbin/mfsmaster -s
2.metalog服务器日志安装配置

useradd mfs -s /sbin/nologin
./configure --prefix=/usr/local/mfslog --with-default-user=mfs --with-default-group=mfs \
--disable-mfschunkserver --mandir=/usr/share/man --disable-mfsmount
make 
make install

metalog日志主要配置文件:mfsmetalogger.cfg,配置如下:

 WORKING_USER = mfs
 WORKING_GROUP = mfs
 SYSLOG_IDENT = mfsmetalogger
 LOCK_MEMORY = 0
 NICE_LEVEL = -19

# DATA_PATH = /usr/local/mfslog/var/mfs

 BACK_LOGS = 50
# BACK_META_KEEP_PREVIOUS = 3
 META_DOWNLOAD_FREQ = 2

# MASTER_RECONNECTION_DELAY = 5

 MASTER_HOST = 192.168.1.73
 MASTER_PORT = 9419

 MASTER_TIMEOUT = 60

# deprecated, to be removed in MooseFS 1.7
# LOCK_FILE = /var/run/mfs/mfsmetalogger.lock

启动和停止:

启动:/usr/local/mfslog/sbin/mfsmetalogger start
停止:/usr/local/mfslog/sbin/mfsmetalogger -s

3.chunkserver服务器安装配置

useradd mfs -s /sbin/nologin
./configure --prefix=/usr/local/mfsd --with-default-user=mfs --with-default-group=mfs \
--disable-mfsmaster --disable-mfsmount --mandir=/usr/share/man
make 
make install

chunkserver主要配置文件:mfschunkserver.cfg和mfshdd.cfg,配置分别如下:
mfschunkserver如下:

 WORKING_USER = mfs
 WORKING_GROUP = mfs
 SYSLOG_IDENT = mfschunkserver
# LOCK_MEMORY = 0
# NICE_LEVEL = -19

# DATA_PATH = /usr/local/mfsd/var/mfs

# MASTER_RECONNECTION_DELAY = 5

# BIND_HOST = *
 MASTER_HOST = 192.168.1.73
 MASTER_PORT = 9420

# MASTER_TIMEOUT = 60

 CSSERV_LISTEN_HOST = *
 CSSERV_LISTEN_PORT = 9422

 HDD_CONF_FILENAME = /usr/local/mfsd/etc/mfshdd.cfg
# HDD_TEST_FREQ = 10

# deprecated, to be removed in MooseFS 1.7
# LOCK_FILE = /var/run/mfs/mfschunkserver.lock
# BACK_LOGS = 50
# CSSERV_TIMEOUT = 5

mfshdd.cfg如下:

# mount points of HDD drives
#
#/mnt/hd1
#/mnt/hd2
#etc.
/data

chunkserver挂载到/data目录的磁盘,最好是单独一块磁盘或分区,格式化后直接挂载上去。
启动和停止如下:
启动:/usr/local/mfsd/sbin/mfschunkserver start
停止:/usr/local/mfsd/sbin/mfschunkserver -s

4.client端安装

useradd mfs -s /sbin/nologin
./configure --prefix=/usr/local/mfsc --with-default-user=mfs --with-default-group=mfs \
--disable-mfsmaster --disable-mfschunkserver --mandir=/usr/share/man
make 
make install

挂载命令如下:
/usr/local/mfsc/bin/mfsmount -h 192.168.1.73 -p
密码在master中配置。

挂载mfsmeta文件系统,此文件系统可以用来恢复数据。

mfsmount -m /mnt/mfsmeta/ -H 192.168.1.73

本篇主要简单安装配置,下一篇进行一些HA测试及恢复测试。

  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks
Feed