You are not logged in.

#1 2021-07-11 04:11:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,621
Website

[Solved] systemd no longer lists auto-mounted drives

I'm not sure when this stopped working, but for the longest time I have triggered an rsync script whenever a specific USB drive was plugged in.

Now, currently on systemd 248.3-2, the drive is mounted, but not shown in `systemctl list-units -t mount`, so no script is triggered.

The service file exists in /etc/systemd/system/media-Apollo.mount.wants/syncmusic.service and the drive is visible in `mount` and just by listing content of /media.

So, my questions: is this a (recent) change in systemd behaviour? How do I debug further?

The service file, for completeness:

 [Unit]
Description=Update music on Apollo
Requires=media-Apollo.mount
After=media-Apollo.mount

[Service]
ExecStart=/usr/local/bin/syncmusic

[Install]
WantedBy=media-Apollo.mount
                                                                                               

Last edited by jasonwryan (2021-07-12 05:52:27)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#2 2021-07-11 06:25:55

willemw
Member
Registered: 2013-02-19
Posts: 65

Re: [Solved] systemd no longer lists auto-mounted drives

I have devmon (udevil) + usdisk2 setup. Systemd 248.3-2. My USD HDD does show up:

$ systemctl list-units -t mount
  run-media-willem-WDElements.mount                                         loaded active mounted /run/media/willem/WDElements

Maybe devmon or similar is something you could use in addition.

I find that unmounting a disk that is monitored by smartd is a hassle. Smartd will generate errors about the "missing" drive it wants to scan. Devmon does not "help" you with that.

Last edited by willemw (2021-07-11 06:52:31)

Offline

#3 2021-07-12 05:52:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,621
Website

Re: [Solved] systemd no longer lists auto-mounted drives

Today's update to 249-2 restores the functionality: `systemctl list-units -t mount` now correctly lists automounted drives...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB