You are not logged in.

#1 2026-01-18 18:52:22

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

[Solved] syncthing.service is added to a non-existent unit

Hi to all,
I've installed syncthing and I'm trying to start it as a user service on mount of the usb drive https://wiki.archlinux.org/title/Syncth … :_on_mount

I get the following warning when I execute systemctl --user enable syncthing

Created symlink '/home/ute/.config/systemd/user/run-media-ute-ntfs1gbSSD.mount.wants/syncthing.service' → '/home/ute/.config/systemd/user/syncthing.service'.
Unit /home/ute/.config/systemd/user/syncthing.service is added as a dependency to a non-existent unit run-media-ute-ntfs1gbSSD.mount.

systemctl --user list-units -t mount reports:

 UNIT                                              LOAD   ACTIVE SUB     DESCRIPTION                              
  -.mount                                           loaded active mounted Root Mount
  boot.mount                                        loaded active mounted /boot
  dev-hugepages.mount                               loaded active mounted /dev/hugepages
  dev-mqueue.mount                                  loaded active mounted /dev/mqueue
  efi.mount                                         loaded active mounted /efi
  run-credentials-systemd\x2djournald.service.mount loaded active mounted /run/credentials/systemd-journald.service
  run-media-ute-ntfs1gbSSD.mount                 loaded active mounted /run/media/ute/ntfs1gbSSD
  run-media-ute-ntfs1tb.mount                    loaded active mounted /run/media/ute/ntfs1tb
  run-user-1000-doc.mount                           loaded active mounted /run/user/1000/doc
  run-user-1000-gvfs.mount                          loaded active mounted /run/user/1000/gvfs
  run-user-1000.mount                               loaded active mounted /run/user/1000
  sys-fs-fuse-connections.mount                     loaded active mounted /sys/fs/fuse/connections
  sys-kernel-config.mount                           loaded active mounted /sys/kernel/config
  sys-kernel-debug.mount                            loaded active mounted /sys/kernel/debug
  sys-kernel-tracing.mount                          loaded active mounted /sys/kernel/tracing
  tmp.mount                                         loaded active mounted /tmp

this is the syncthing.service I've created in the

[Unit]
Description=Syncthing
BindsTo=run-media-ute-ntfs1gbSSD.mount

[Service]
ExecStart=/usr/bin/syncthing

[Install]
WantedBy=run-media-ute-ntfs1gbSSD.mount

Can you help me find why it doen't work please?

Last edited by Xwang (2026-01-19 21:54:31)

Offline

#2 2026-01-19 11:19:00

brumaire
Member
From: France
Registered: 2026-01-18
Posts: 7

Re: [Solved] syncthing.service is added to a non-existent unit

Hello. I think this may happen because « run-media-ute-ntfs1gbSSD.mount » is dynamically created by systemd. Therefore, there is no file corresponding to that unit on the disk ; hence the message you get when enabling the unit.

EDIT : Please ignore what's follow, it's bullshit, BindsTo is the correct way to do in that case. You can simply ignore the message about the unit not existing, it's not an error nor preventing what you want to do to work.

EDIT 2 : see for instance : https://github.com/Antynea/grub-btrfs/issues/163

---

I think (but I may be wrong, I'm no systemd expert) that using BindsTo for this intended usage is wrong. Instead you could try with :

[Unit]
...
WantsMountFor=/run/media/ute/ntfs1gbSSD
...

Please try and tell me if this works !

Last edited by brumaire (2026-01-19 11:56:58)

Offline

#3 2026-01-19 21:53:35

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: [Solved] syncthing.service is added to a non-existent unit

Indeed the service works as expected despite the message/warning.
Thank you, I'll set it as solved, I just wonder if this message should be added to the wiki to explain that it is "expected" in this scenario.

Offline

Board footer

Powered by FluxBB