If I use this command :
mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1 all works correctly. But if I try to mount through the systemd mount it fails.
I've created a file /etc/systemd/system/mnt-d1.mount with the following content:
[Unit] Description = Disk 1 [Mount] What = LABEL=d1 Where = /srv/node/d1 Type = xfs Options = noatime,nodiratime,logbufs=8 [Install] WantedBy = multi-user.target After that I run these commands:
systemctl daemon-reload systemctl start mnt-d1.mount The last one showed me:
Failed to start mnt-d1.mount: Unit mnt-d1.mount failed to load: Invalid argument. See system logs and 'systemctl status mnt-d1.mount' for details. systemctl status mnt-d1.mount showed me:
May 16 18:13:52 object1 systemd[1]: Cannot add dependency job for unit mnt-d1.mount, ignoring: Unit mnt-d1.mount failed to ...ectory. May 16 18:24:05 object1 systemd[1]: mnt-d1.mount's Where= setting doesn't match unit name. Refusing. Please help me to mount a disk via a systemd mount unit.