Moosefs分布式文件系统安装
Moosefs分布式文件系统安装
目录
Moosefs分布式文件系统安装 ........................................................................................................ 1
一、 准备工作 ................................................................................................................... 1
1、 上传安装包 ........................................................................................................... 1
2、 检查系统环境 ....................................................................................................... 1
二、 安装fuse ................................................................................................................... 1
3、 解压安装tar包 .................................................................................................... 1
4、 编译安装fuse ....................................................................................................... 2
三、 安装Moosefs分布式文件系统 ............................................................................... 2
5、 创建用户和组 ....................................................................................................... 2
6、 编译安装Moosefs文件系统 ............................................................................... 2
四、 配置MooseFS文件系统 .......................................................................................... 3
1、 挂载文件系统 ....................................................................................................... 3
2、 修改MooseFS配置文件 ...................................................................................... 4
五、 管理MooseFS文件系统 .......................................................................................... 5
1、 启动MooseFS文件系统 ....................................................................................... 5
2、 挂接MooseFS 文件系统到挂接点 /mnt/mfs ................................................ 6
一、 准备工作
1、
2、 上传安装包 检查系统环境
[root@localhost src]# yum install gcc flex bison openssl-devel –y
--确保这几个软件有安装,不然在后续安装过程中会出错
二、 安装fuse
3、 解压安装tar包
[root@localhost src]# tar -zxvf fuse-2.8.1.tar.gz
[root@localhost src]# tar zxvf glusterfs-3.3.0.tar.gz
4、 编译安装fuse
[root@localhost src]# cd fuse-2.8.1
[root@localhost fuse-2.8.1]# ./configure --正常情况出现如下信息
[root@localhost fuse-2.8.1]# make && make install --正常情况出现如下信息
[root@localhost fuse-2.8.1]# echo $? --确认是否正常安装,0表示正常,其他为异常情况
三、 安装Moosefs分布式文件系统
5、 创建用户和组
[root@glusterfs2 moosefs-2.0.68]# groupadd mfs
[root@glusterfs2 moosefs-2.0.68]# useradd -g mfs mfs
6、 编译安装Moosefs文件系统
[root@glusterfs2 src]# cd moosefs-2.0.68
[root@glusterfs2 moosefs-2.0.68]# ./configure --prefix=/usr/ --sysconfdir=/etc
--localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs
[root@glusterfs2 moosefs-2.0.68]# make && make install
四、 配置MooseFS文件系统
1、 挂载文件系统
A、创建目录,并创建镜像文件
[root@mysql01 home]# mkdir /home/test
[root@mysql01 home]# dd if=/dev/zero of=/home/test/mfschunks1 bs=1024 count=1 seek=$((2*1024*1024-1))
记录了1+0 的读入
记录了1+0 的写出
1024字节(1.0 kB)已复制,4.2529e-05 秒,24.1 MB/秒
[root@mysql01 test]# dd if=/dev/zero of=/home/test/mfschunks2 bs=1024 count=1 seek=$((2*1024*1024-1))
记录了1+0 的读入
记录了1+0 的写出
1024字节(1.0 kB)已复制,4.284e-05 秒,23.9 MB/秒
[root@mysql01 test]#
B、创建挂载点,并挂载镜像文件
[root@mysql01 test]# mkdir -p /mnt/mfschunks1
[root@mysql01 test]# mkdir -p /mnt/mfschunks2
[root@mysql01 test]# mount -t ext3 -o loop /home/test/mfschunks1 /mnt/mfschunks1
[root@mysql01 test]# mount -t ext3 -o loop /home/test/mfschunks2 /mnt/mfschunks2
2、 修改MooseFS配置文件
A、赋予权限
[root@mysql01 test]# chown -R mfs:mfs /mnt/mfschunks1
[root@mysql01 test]# chown -R mfs:mfs /mnt/mfschunks2
[root@mysql01 test]# cd /etc/mfs/
[root@mysql01 test]# cp mfsexports.cfg.dist mfsexports.cfg
[root@mysql01 test]# cp mfsmaster.cfg.dist mfsmaster.cfg
[root@mysql01 test]# cp mfschunkserver.cfg.dist mfschunkserver.cfg
[root@mysql01 test]# cp mfshdd.cfg.dist mfshdd.cfg
其中mfsexports.cfg 与 mfsmaster.cfg 为主控服务 master 配置文件;
mfschunkserver.cfg 与 mfshdd.cfg 为chunk server 配置文件。
mfsexports.cfg 指定那些客户端主机可以远程挂接MooseFS 文件系统,以及授予挂接客户端什么样的访问权限
B、修改mfsexports.cfg配置文件,192.168.86.0/24允许挂载网段
[root@mysql01 mfs]# vi mfsexports.cfg
# Allow everything but "meta".
192.168.86.0/24 / rw,alldirs,maproot=0:0
C、修改mfshdd.cfg配置文件,将需要共享的文件添加至配置文件
[root@mysql01 mfs]# vi mfshdd.cfg
# This file keeps definitions of mounting points (paths) of hard drives to use with chunk server.
# A path may begin with extra '*', which means this hard drive is 'marked for removal' and all data will be replicated to other hard drives (usually on other ch unkservers).
# It is possible to specify optional space limit (after each mounting point), there are two ways of doing that:
# - set space to be left unused on a hard drive (this overrides the default setting from
mfschunkserver.cfg)
# - limit space to be used on a hard drive
# Space limit definition: [0-9]*(.[0-9]*)?([kMGTPE]|[KMGTPE]i)?B?, add minus in front for the first option.
#
# Examples:
#
# use ha …… 此处隐藏:4403字,全部文档内容请下载后查看。喜欢就下载吧 ……
- 基于PLC控制的航空电镀生产线自动输送
- 中考预测课内外文言文对比阅读2
- 2018-2023年中国商业智能(BI)产业市场
- 中国金融体制改革研究2011new
- 外窗淋水试验方案
- 精益生产(Lean Production)
- 学校安全事故处置和信息报送制度
- Chapter 5 Human Resources Management
- 【小学数学】人教版小学六年级上册数学
- 初中数学解题方法与技巧
- 山东省创伤中心建设与管理指导原则(试
- 函数与数列的极限的强化练习题答案
- 10分钟淋巴按摩消脂
- 网络应急演练预案
- 服装设计入门基础知识
- 初二数学分式计算题练习
- (人教新课标)高二数学必修5第二章 数列
- 最新自主创业项目
- 北京大学 无机化学课件 4第4章 配合物
- 贸易公司业务管理制度




