CentOS系統(tǒng)在掛載Glusterfs的時(shí)候提示錯(cuò)誤,導(dǎo)致Glusterfs掛載不了,出現(xiàn)該問(wèn)題主要是機(jī)器網(wǎng)絡(luò)不流暢造成的,下面小編就給大家介紹下CentOS無(wú)法掛載Glusterfs的解決方法。
![](/d/20211018/9f01ed9ab11df57caab3ca31d356ae8f.gif)
執(zhí)行的mount命令:
mount target_host:/volume_name current_path
執(zhí)行mount命令后,提示錯(cuò)誤信息
/usr/sbin/start-statd: line 8: systemctl: command not found
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use ‘-o nolock’ to keep locks local, or start statd.
mount.nfs: Operation not permitted
一般情況下,用到Glusterfs存儲(chǔ)的地方至少都是兩臺(tái)機(jī)器來(lái)配置完成的,在各自的機(jī)器上能夠正常的啟動(dòng)相應(yīng)的服務(wù);然而,在執(zhí)行g(shù)luster volume info命令查看定義的volume信息時(shí),會(huì)發(fā)現(xiàn)非本機(jī)存儲(chǔ)的機(jī)器狀態(tài)為offline,這時(shí)無(wú)論是在本地還是其他地方做mount 時(shí)都不會(huì)成功,會(huì)提示timeout(鏈接超時(shí)) —— 這就是問(wèn)題所在(網(wǎng)絡(luò)不通暢);
這時(shí),需要處理機(jī)器間的網(wǎng)絡(luò)配置,這里有兩點(diǎn):
1、查看各機(jī)器的iptables配置,備份之前的iptables配置(/etc/sysconfig/iptables),然后導(dǎo)出生效的iptables(service iptables save),查看核對(duì)現(xiàn)有的與導(dǎo)出前的配置是否存在不同,存在則修復(fù),最后重啟iptables服務(wù)(service iptables restart);
2、查看各機(jī)器的IP配置是否發(fā)生變化(ifconfig),是否同一網(wǎng)段,若配置存在變動(dòng),則更改回原始配置,重啟網(wǎng)絡(luò)服務(wù)(service network restart);
以上網(wǎng)絡(luò)問(wèn)題解決后,再次執(zhí)行mount target_host:/volume_name current_path(一般不需要參數(shù)-t glusterfs)完成對(duì)gluster管理的volume的掛載;此時(shí),如果掛載失敗,則加上-t參數(shù),即mount -t glusterfs target_host:/volume_name current_path
上面就是CentOS掛載Glusterfs失敗后原因及解決方法的介紹了,出現(xiàn)該問(wèn)題后不妨查看下各機(jī)器間的網(wǎng)絡(luò)配置吧。