Bug#941758: systemd: StopWhenUnneeded has stopped working for a mount unit

Michael Biebl biebl at debian.org
Sat Oct 5 01:20:48 BST 2019


Am 04.10.19 um 22:57 schrieb Jonathan Dowland:
> Package: systemd
> Version: 241-7~deb10u1
> Severity: normal
> 
> I have a mount unit as follows
> 
>     [Unit]
>     Requires=systemd-cryptsetup at backup.service
>     StopWhenUnneeded=true
> 
>     [Mount]
>     What=/dev/phobos_backup/backup
>     Where=/backup
>     Type=xfs
>     Options=defaults,noauto,inode64
> 
> It is depended upon by a half-dozen other systemd service units (backup jobs)
> which are triggered via systemd timers. (Just Requires=backup.mount and
> After=backup.mount).
> 
> With systemd 232-25+deb9u12 (and possibly earlier), this worked fine:
> the backup jobs started, the filesystem was mounted, the backup jobs
> finished, the filesystem was unmounted.
> 
> With 241-7~deb10u1, the filesystem is never unmounted. Systemd is aware
> of this, status reports
> 
>    Active: active (mounted) since Fri 2019-10-04 20:00:01 BST; 1h 53min ago
> 
> (As a side-note: I think you can imagine why I have this arrangement. An
> improvement for me would be for /backup to always be mounted but in a
> different namespace from the rest of the system, and for the backup
> services to run in that namespace. I don't think this is presently
> possible with systemd.)

Do you know about automount units?
They would be the perfect fit for your use case.
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20191005/8996e0f7/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list