您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
systemctl stop firewalld.service //关闭防火墙
setenforce 0 //关闭selinux
yum install gcc gcc-c++ zlib-devel -y //安装环境包
useradd -s /sbin/nologin mfs //建立程序用户
mount.cifs //192.168.80.2/shares/mfs /mnt/ //挂载软件包
cd /mnt/
tar zxvf mfs-1.6.27-5.tar.gz -C /opt/ //解压软甲包到opt目录
cd /opt/mfs-1.6.27/ //进入解压目录
./configure \ //配置
--prefix=/usr/local/mfs \ //指定安装路径
--with-default-user=mfs \ //指定用户
--with-default-group=mfs \ //指定组
--disable-mfschunkserver \ //关闭节点服务(在存储节点使用)
--disable-mfsmount //关闭挂载功能(在客户端使用)
make && make install //编译安装
cd /usr/local/mfs/etc/mfs/ //进入安装路径
cp mfsmaster.cfg.dist mfsmaster.cfg //更名开启master配置文件
cp mfsexports.cfg.dist mfsexports.cfg //更名开启挂载权限配置文件
cp mfsmetalogger.cfg.dist mfsmetalogger.cfg //更名开启源数据日志文件配置
cd ../../var/mfs/
cp metadata.mfs.empty metadata.mfs //master服务器运行时产生的源数据将写入此文件
ln -s /usr/local/mfs/sbin/mfsmaster /usr/local/sbin/ //建立链接文件,方便系统识别命令
mfsmaster start //启动服务
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
initializing mfsmaster modules ...
loading sessions ... file not found
if it is not fresh installation then you have to restart all active mounts !!!
exports file has been loaded
mfstopology configuration file (/usr/local/mfs/etc/mfstopology.cfg) not found - using defaults
loading metadata ...
create new empty filesystemmetadata 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 //成功启动
ps -ef | grep mfs //查看进程是否开启
mfs 15839 1 0 15:20 ? 00:00:00 mfsmaster start //进程已开启
root 15844 1570 0 15:22 pts/0 00:00:00 grep --color=auto mfs
mfsmaster -s //停止服务
sending SIGTERM to lock owner (pid:15839)
waiting for termination ... terminated //成功关闭
ps -ef | grep mfs //查看进程是否关闭
root 15847 1570 0 15:23 pts/0 00:00:00 grep --color=auto mfs
/usr/local/mfs/sbin/mfsmaster start //再次启动服务
systemctl stop firewalld.service //关闭防火墙
setenforce 0 //关闭salinux
useradd -s /sbin/nologin mfs //创建程序用户
yum install zlib-devel gcc gcc-c++ -y //安装环境包
mount.cifs //192.168.80.2/shares/mfs /mnt/ //挂载软件包
cd /mnt/
tar zxvf mfs-1.6.27-5.tar.gz -C /opt/ //解压
cd /opt/mfs-1.6.27/ //进入解压后文件目录
./configure \ //配置
--prefix=/usr/local/mfs \ //指定安装路径
--with-default-user=mfs \ //指定用户
--with-default-group=mfs \ //指定组
--disable-mfschunkserver \ //关闭节点服务(在存储节点使用)
--disable-mfsmount //关闭挂载功能(在客户端使用)
make && make install //编译安装d /usr/local/mfs/etc/mfs/
cd /usr/local/mfs/etc/mfs/
cp mfsmetalogger.cfg.dist mfsmetalogger.cfg //更名开启源数据日志文件配置
vim mfsmetalogger.cfg //编辑配置文件
...
MASTER_HOST = 192.168.80.10 //指定master地址
...
:wq
/usr/local/mfs/sbin/mfsmetalogger start //启动服务
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
initializing mfsmetalogger modules ...
mfsmetalogger daemon initialized properly //成功启动
ps -ef | grep mfs //查看进程是否开启
mfs 16180 1 0 16:11 ? 00:00:00 /usr/local/mfs/sbin/mfsmetalogger start
root 16182 1897 0 16:12 pts/0 00:00:00 grep --color=auto mfs
systemctl stop firewalld.service //关闭防火墙
setenforce 0
yum install zlib-devel gcc gcc-c++ -y //安装环境包
useradd -s /sbin/nologin mfs //创建程序用户
mount.cifs //192.168.80.2/shares/mfs /mnt/ //挂载软件包
cd /mnt/
tar zxvf mfs-1.6.27-5.tar.gz -C /opt/ //解压软件包
cd /opt/mfs-1.6.27/
./configure \
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfsmaster \ //禁用主服务
--disable-mfsmount //禁用挂服务
make && make install //编译安装
cd /usr/local/mfs/etc/mfs/
cp mfschunkserver.cfg.dist mfschunkserver.cfg //节点服务配置文件
cp mfshdd.cfg.dist mfshdd.cfg //提供硬盘空间配置文件
vim mfschunkserver.cfg //编辑配置文件
...
MASTER_HOST = 192.168.80.10 //指向主服务器
...
:wq
vim mfshdd.cfg //编辑硬盘空间配置文件
...
/data //编辑数据存放路径
:wq
mkdir /data //创建数据存放目录
chown -R mfs:mfs /data //添加属主属组
/usr/local/mfs/sbin/mfschunkserver start //启动
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
initializing mfschunkserver modules ...
hdd space manager: path to scan: /data/
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 //成功开启
ps -ef | grep mfs //查看程序是否启动
mfs 6127 1 0 16:58 ? 00:00:00 /usr/local/mfs/sbin/mfschunkserver start
root 6153 1467 0 17:00 pts/0 00:00:00 grep --color=auto mfs
systemctl stop firewalld.service //关闭防火墙
setenforce 0 //关闭selinux
yum install gcc gcc-c++ zlib-devel -y //安装环境包
mount.cifs //192.168.80.2/shares/mfs /mnt/ //挂载文件目录
cd /mnt/
tar zxvf fuse-2.9.2.tar.gz -C /opt/ //解压与主服务器挂载插件
cd /opt/fuse-2.9.2/
./configure //直接配置即可
make && make install //编译安装
vim /etc/profile //编辑环境变量文件
...
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH //添加环境变量声明
:wq
source /etc/profile //重新加载化境变量
useradd -s /sbin/nologin mfs //创建程序用户
cd /mnt/
tar zxvf mfs-1.6.27-5.tar.gz -C /opt/ //解压环境包
cd /opt/mfs-1.6.27/
./configure \ //配置
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfsmaster \ //禁用主服务
--disable-mfschunkserver \ //禁用chunk服务
--enable-mfsmount //开启挂载服务
make && make install //编译安装
mkdir /opt/mfs //创建挂载点,挂载master空间
modprobe fuse //加载fuse模块到内核
/usr/local/mfs/bin/mfsmount /opt/mfs -H 192.168.80.10 //挂载master空间
df -hT //查看磁盘空间
...
192.168.80.10:9421 fuse.mfs 37G 0 37G 0% /opt/mfs //成功挂载
vim /etc/profile //添加环境变量,优化启动
...
export PATH=/usr/local/mfs/bin:$PATH //编辑环境变量声明
:wq
source /etc/profile //重新加载环境变量文件
mfsgetgoal -r /opt/mfs //Mfsgetgoal命令用来查询文件被复制的份数,利用-r命令可以对整个目录进行递归,goal是指文件被复制的份数
/opt/mfs:
directories with goal 1 :
mfssetgoal -r 2 /opt/mfs //指定复制两份
/opt/mfs:
inodes with goal changed: 1
inodes with goal not changed: 0
inodes with permission denied: 0
/usr/local/mfs/sbin/mfscgiserv //执行启动监控
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。