一、安装fuse
cd /home/dcplatform/lx/fuse-2.8.3
./configure --prefix=/home/dcplatform/fuse
make
sudo make install
添加到环境变量
echo "export PKG_CONFIG_PATH=/home/dcplatform/fuse/lib/pkgconfig/" >> ~/.bash_profile
source ~/.bash_profile
二、安装mfs
cd /home/dcplatform/lx/mfs-1.6.20-2
./configure --prefix=/home/dcplatform/mfs/ --sysconfdir=/home/dcplatform/mfs/etc --localstatedir=/home/dcplatform/mfs/var/lib --with-default-user=dcplatform --with-default-group=dcplatform
make
make install
添加到环境变量
echo "PATH=\$PATH:/home/dcplatform/mfs/sbin:/home/dcplatform/mfs/bin" >> ~/.bash_profile
source ~/.bash_profile
三、master(10.131.18.4)
cp mfsmaster.cfg.dist mfsmaster.cfg
cp mfsexports.cfg.dist mfsexports.cfg
cp metadata.mfs.empty metadata.mfs
mfsmaster start
mfscgiserv start
四、master std(10.131.18.5)
sudo su - root
echo "10.125.70.17 mfsmaster" >> /etc/hosts
exit
cp mfsmetalogger.cfg.dist mfsmetalogger.cfg
mfsmetalogger start
五、chunck
sudo su - root
echo "10.125.70.17 mfsmaster" >> /etc/hosts
exit
cp /home/dcplatform/mfs/etc/mfschunkserver.cfg.dist /home/dcplatform/mfs/etc/mfschunkserver.cfg
cp /home/dcplatform/mfs/etc/mfshdd.cfg.dist /home/dcplatform/mfs/etc/mfshdd.cfg
sudo mkdir /opt/mfsdata/
sudo chown dcplatform:dcplatform /opt/mfsdata/
echo "/opt/mfsdata/" >> /home/dcplatform/mfs/etc/mfshdd.cfg
mfschunkserver start
六、mount
sudo su - root
echo "user_allow_other" >> /etc/fuse.conf
exit
sudo mkdir /opt/data_exchange_mfs/
sudo chown dcplatform:dcplatform /opt/data_exchange_mfs/
mfsmount /opt/data_exchange_mfs/ -H mfsmaster
7. 拷贝份数设置,只运行一次
mfsgetgoal /opt/data_exchange_mfs/
sudo mfssetgoal 3 /opt/data_exchange_mfs/
8.如果要取消mount
sudo umount /opt/data_exchange_mfs/