教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 范文大全 > 资料大全 >

Moosefs分布式文件系统安装

来源:网络收集 时间:2026-10-01
导读: Moosefs分布式文件系统安装 目录 Moosefs分布式文件系统安装 ........................................................................................................ 1 一、 准备工作 .............................................................

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字,全部文档内容请下载后查看。喜欢就下载吧 ……

Moosefs分布式文件系统安装.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/fanwen/1816766.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150份
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150份
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)