如何正确命名systemd mount单元?
我试图通过systemd启动后自动挂载CephFS 我有下一个单位: [Unit] SourcePath=/etc/fstab DefaultDependencies=no After=remote-fs-pre.target After=network.target Wants=network.target After=network-online.target Wants=network-online.target Conflicts=umount.target Before=umount.target [Mount] What=ceph-node1:6789,ceph-node2:6789,ceph-node3:6789:/dev Where=/mnt/cephfs-dev Type=ceph Options=name=devuser,secretfile=/etc/ceph/cephuser.secret [Install] WantedBy=remote-fs.target 据我所知, Where=设置必须与单元名称匹配。 我接下来做: [root@centos system]# systemd-escape -p –suffix=mount '/mnt/cephfs-dev' mnt-cephfs\x2ddev.mount [root@centos system]# vi /etc/systemd/system/mnt-cephfs\\x2ddev.mount 但是出了点问题: [root@centos system]# systemctl status mnt-ceph\\x2ddev.mount ● mnt-ceph\x2ddev.mount – /mnt/cephfs-dev Loaded: error (Reason: Invalid argument) Active: inactive (dead) Where: /mnt/cephfs-dev What: ceph-node1:6789,ceph-node2:6789,ceph-node3:6789:/dev […]