Skip to main content
added 26 characters in body; edited tags
Source Link
don_crissti
  • 85.7k
  • 31
  • 234
  • 262

If I use this command : mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1

mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1 

all works correctly. But if I try to mount througthrough the systemdsystemd 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.mountsystemctl 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 through the systemdvia a systemd mount unit.

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 throug 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 through the systemd

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.

Post Reopened by Guss, thrig, CommunityBot, chaos, dr_
Post Closed as "Not suitable for this site" by Jeff Schaller, garethTheRed, Anthon, Stephen Kitt, MelBurslan
Fixed code
Source Link
GAD3R
  • 69.9k
  • 32
  • 147
  • 216

If I use this command : mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1 all works correctly. But if I try to mountthrougmount throug the systemd mount it fails.
I've

I've created a file /etc/systemd/system/mnt-d1.mount/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 through the systemd

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 mountthroug 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 through the systemd

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 throug 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 through the systemd

Source Link
Oleksandr
  • 1.2k
  • 4
  • 15
  • 24

Systemd mount fails. Where= setting doesn't match unit name

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 mountthroug 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 through the systemd