systemctl 啟動(dòng) systemd 單元時(shí)出現(xiàn)下面的錯(cuò)誤# systemctl start aliyun-nas.mountFailed to start aliyun-nas.mount: Unit is not loaded properly: Invalid argument.See system logs and 'systemctl status aliyun-nas.mount' for details.# systemctl status aliyun-nas.mountsystemd[1]: aliyun-nas.mount's Where= setting doesn't match unit name. Refusing.請(qǐng)問如何解決?
1 回答

慕后森
TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊
這里涉及2個(gè)問題:
systemd 的 unit 文件名要與 Where 中的掛載路徑一致,對(duì)于
aliyun-nas.mount
,Where 中要寫Where=/aliyun/nas
如果連字符作為目錄名的一部分,需要進(jìn)行編碼,對(duì)于
aliyun-nas.mount
,unit 文件名要用aliyun\x2dnas.mount
,Where 中要寫Where="/aliyun-nas"
(注:一定要加雙引號(hào))
添加回答
舉報(bào)
0/150
提交
取消