CentOS下無法掛載glusterfs原因及解決方案
執行的mount命令:
mount target_host:/volume_name current_path
執行mount命令後,提示錯誤資訊
/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儲存的地方至少都是兩台機器來配置完成的,在各自的機器上能夠正常的啟動相應的服務;然而,在執行gluster volume info命令查看定義的volume資訊時,會發現非本機儲存的機器狀態為offline,這時無論是在本地還是其他地方做mount時都不會成功,會提示timeout(連結逾時) -- 這就是問題所在(網路不通暢);
這時,需要處理機器間的網路設定,這裡有兩點:
1、查看各機器的iptables配置,備份之前的iptables配置(/etc/sysconfig/iptables),然後匯出生效的iptables(service iptables save),查看核對現有的與匯出前的配置是否存在不同,存在則修複,最後重啟iptables服務(service iptables restart);
2、查看各機器的IP配置是否發生變化(ifconfig),是否同一網段,若配置存在變動,則更改回原始配置,重啟網路服務(service network restart);
以上網路問題解決後,再次執行mount target_host:/volume_name current_path(一般不需要參數-t glusterfs)完成對gluster管理的volume的掛載;此時,如果掛載失敗,則加上-t參數,即mount-t glusterfs target_host:/volume_name current_path