CentOS 掛載 GlusterFS 卷時出現 rpc.statd is not running、Operation not permitted 或 timeout 錯誤,多數源於節點間網路不通或防火牆阻擋。本文提供系統性排查與修復流程,助您快速恢復掛載。

# mount target_host:/volume_name current_path
/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
同時執行 gluster volume info 發現遠端節點狀態為 offline,確認網路連通性異常。
# 備份現有規則
cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak
# 存儲當前生效規則
service iptables save
# 對比差異並修復
# 重啟防火牆
service iptables restart
# 查看網卡配置
ifconfig
# 確認各節點在同一網段,若 IP 變更需修正後重啟網路
service network restart
網路恢復後,先嘗試不指定檔案系統類型掛載:
mount target_host:/volume_name current_path
若失敗,再加上 -t glusterfs:
mount -t glusterfs target_host:/volume_name current_path
GlusterFS 掛載失敗 90% 以上源於節點間網路隔離。優先檢查防火牆、IP 配置、主機名解析,再考慮服務狀態與版本相容性。