Distributed File System Moosefs installation steps

Source: Internet
Author: User
Tags deprecated

1. Installation 1.1 Prepare the installation environment

First choose a better server to do master, if you can choose a backup server as Master best. Then the other servers become chunkserver.

For the sake of explaining the problem, I choose here:

Master server 1 Units 192.168.2.98

Chunkserver server 2 units 192.168.2.222 and 192.168.2.223

Client server 1 Units 192.168.2.55

1.2 Installation Steps

(1). fuse-2.8.5.tar.gz

(2). mfs-1.6.20-2.tar.gz

Although Fuse is used only by the client, we install the fuse module on all computers for uniform installation steps.

Put both fuse-2.8.5.tar.gz and mfs-1.6.20-2.tar.gz in the/OPT directory.

1.2.1 Create User:

[Email protected]]# groupadd MFS

[[Email protected]]# useradd-g MFS MFS

Because the default running user for Moosefs is MFS, it is created first.

1.2.2 Installing fuse:

[[Email protected]]# ls/opt/

Fuse-2.8.3.tar.gz mfs-1.6.20-2.tar.gz

[Email protected]]# tar-zxvf fuse-2.8.3.tar.gz

[[Email protected]]# CD fuse-2.8.3

[Email protected]]#./configure

[Email protected]]#./make

[Email protected]]#./make Install

[Email protected]]# CD.

Follow the steps above to install fuse.

1.2.3 Installing Moosefs:

[[Email protected]]# ls/opt

fuse-2.8.3 fuse-2.8.3.tar.gz mfs-1.6.20-2.tar.gz

[Email protected]]# tar-zxvf mfs-1.6.20-2.tar.gz

[[Email protected]]# CD mfs-1.6.20-2

[Email protected] mfs-1.6.20-2]#./configure--prefix=/usr/local/mfs--with-default-user=mfs--with-default-group= Mfs

[[email protected] mfs-1.6.20-2]# make

[[email protected] mfs-1.6.20-2]# make install

2. Configuration Instructions

First put all the configuration files into the/etc/mfs directory

[Email protected]]# mkdir-p/etc/mfs

[[Email protected]]# cd/opt/mfs-1.6.20-2

[Email protected]]# CP./mfsdata/mfshdd.cfg/etc/mfs/

[Email protected]]# CP./mfsdata/mfsexports.cfg/etc/mfs/

[Email protected]]# CP./mfsdata/mfschunkserver.cfg/etc/mfs/

[Email protected]]# CP./mfsdata/mfsmaster.cfg/etc/mfs

[Email protected]]# CP./mfsdata/mfsmetalogger.cfg/etc/mfs

[Email protected]s]# mkdir-p/data/mfs

[Email protected]]# chmod-r 777/data/mfs

Down to edit the configuration file:

[Email protected] mfs]# VI mfsmaster.cfg

# Working_user =mfs

# Working_group =mfs

# syslog_ident =mfsmaster

# lock_memory = 0

# Working_user =mfs

# Working_group =mfs

# syslog_ident =mfsmaster

# lock_memory = 0

# nice_level = 19

Exports_filename =/etc/mfs/mfsexports.cfg

#上面这行必须配置了指向正确的路径

Data_path =/data/mfs

#上面这行为你打算保存数据的目录

# back_logs = 50

#REPLICATIONS_DELAY_INIT = 300

#REPLICATIONS_DELAY_DISCONNECT = 3600

#MATOML_LISTEN_HOST = *

#MATOML_LISTEN_PORT = 9419

#MATOCS_LISTEN_HOST = *

#MATOCS_LISTEN_PORT = 9420

#MATOCU_LISTEN_HOST = *

#MATOCU_LISTEN_PORT = 9421

# chunks_loop_time= 300

# chunks_del_limit= 100

#CHUNKS_WRITE_REP_LIMIT = 1

#CHUNKS_READ_REP_LIMIT = 5

#REJECT_OLD_CLIENTS = 0

# deprecated, Tobe removed in Moosefs 1.7

# Lock_file =/var/run/mfs/mfsmaster.lock

[Email protected] mfs]# VI mfschunkserver.cfg

# Working_user =mfs

# Working_group =mfs

# syslog_ident =mfschunkserver

# lock_memory = 0

# nice_level = 19

Data_path =/data/mfs

#上面这行为你要保存数据的目录

#MASTER_RECONNECTION_DELAY = 5

# bind_host = *

Master_host = 192.168.2.85 #这行为master服务器的地址

# Master_port =9420

# master_timeout =60

#CSSERV_LISTEN_HOST = *

#CSSERV_LISTEN_PORT = 9422

Hdd_conf_filename =/etc/mfs/mfshdd.cfg

# Hdd_test_freq =10

# deprecated, Tobe removed in Moosefs 1.7

# Lock_file =/var/run/mfs/mfschunkserver.lock

# back_logs = 50

# csserv_timeout =5

[Email protected] mfs]# VI mfsmetalogger.cfg

# Working_user =mfs

# Working_group =mfs

# syslog_ident =mfsmetalogger

# lock_memory = 0

# nice_level = 19

Data_path =/data/mfs

# back_logs = 50

#META_DOWNLOAD_FREQ = 24

#MASTER_RECONNECTION_DELAY = 5

Master_host = 192.168.2.85 #这行为master服务器的地址

# Master_port =9419

# master_timeout =60

# deprecated, Tobe removed in Moosefs 1.7

# Lock_file =/var/run/mfs/mfsmetalogger.lock

2.1 Starting the master server

[Email protected] mfs]# Cp/usr/local/mfs/var/mfs/metadata.mfs.empty/data/mfs/metadata.mfs

[[Email protected]]#/usr/local/mfs/sbin/mfsmaster-c/etc/mfs/mfsmaster.cfg Start

Working Directory:/data/mfs

Lockfile Createdand Locked

Initializingmfsmaster modules ...

Loading sessions ... ok

Sessions File Hasbeen loaded

Exports file Hasbeen loaded

Loading metadata ...

Create new Emptyfilesystemmetadata file has been loaded

No charts datafile-initializing empty charts

Master <->metaloggers Module:listen on *:9419

Master <->chunkservers Module:listen on *:9420

Main Master Servermodule:listen on *:9421

Mfsmaster daemoninitialized properly

[Email protected]]# ps-aux|grep Mfsmaster

2.2 Starting the backup server for master

[Email protected] mfs]#/usr/local/mfs/sbin/mfsmetalogger-c/etc/mfs/mfsmetalogger.cfg start

Working Directory:/data/mfs

Lockfile Createdand Locked

Initializingmfsmetalogger modules ...

Mfsmetaloggerdaemon initialized properly

2.3 Starting the Chunkserver server

The Chunkserver server needs to use the Mfshdd.cfg configuration file, which is designed to allow the server to manage multiple hard disks while placing data on them.

[Email protected]]# VI mfshdd.cfg

# mount points OFHDD drives

#

/mnt/hd1

/mnt/hd2

#etc.

Once you have edited the above configuration file, you can start chunkserver with the following command.

[[email protected] mfs]#/usr/local/mfs/sbin/mfschunkserver-c/etc/mfs/mfschunkserver.cfg start

Moosefs also brings a web monitoring tool that you need to start Mfscgiserv

The start command is as follows:

[Email protected] mfs]#/usr/local/mfs/sbin/mfscgiserv

You can then enter the following address in your browser to see how your data is saved.

http://192.168.2.55:9425/mfs.cgi

2.4 Mounting the Client

[Email protected] mfs]# mkdir-p/mnt/mfs

[Email protected] mfs]# chmod-r 777/mnt/mfs

[Email protected] mfs]#/usr/local/mfs/bin/mfsmount/mnt/mfs/-H 192.168.2.85

[Email protected] mfs]# df–h

If the command can see

mfs#192.168.2.85:9421 such a line, on behalf of the success of the mount, down can be used, the official installation is complete.

http://blog.csdn.net/langeldep/article/details/6654448

Distributed File System Moosefs installation steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.