您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。