centos 7 下將 nfs 服務設置爲開機自動啓動,systemctl enable nfs-idmapd.service,將提示如下錯誤:
Failed to execute operation: No such file or directory
解決方法:
/usr/lib/systemd/system/nfs-idmap.service 文件中增加
[Install]
WantedBy=multi-user.target
/usr/lib/systemd/system/nfs-lock.service 文件中增加
[Install]
WantedBy=nfs.target
參考:
https://www.centos.org/forums/viewtopic.php?t=53896