On 23/07/2025 10:16, Stefan Monnier wrote:
Max Nikulin [2025-07-23 08:58:56] wrote:
On 23/07/2025 07:11, Stefan Monnier wrote:
On one of my (Debian stable) machines, all the partitions that aren't
mentioned in /etc/fstab end up mounted in /media/root/<UUID>, and that's
apparently a "feature" of `udisks2`.
Is it another attempt to solve the earlier raised issue?
Aha! I did have the impression of a "déjà vu", but I usually keep notes
about such things and there wasn't anything in my notes. Weird.
You suspected vgchange. Have you managed to trigger mount in response to
some command? If system logs are not verbose enough then monitoring
D-Bus might help.
In any case, yes `udisksctl dump` shows clearly that it's under its control.
Do you mean "UserspaceMountOptions: uhelper=udisks2"? The tool
reports (almost) all available drives and partitions even if they are
mounted "directly" without udisks.
But I can't find anything in the docs about controlling whether
something gets mounted or not, all I find are options to control *how*
it's mounted (and to give the right to some users, but `root` always
has the rights, anyway).
I do not expect that udisks mounts anything itself just because new
partition appeared in the system. Automounting in response to some event
is handled by other tools and should be documented there.
The tool running in your case might support UDISKS_AUTO udev hint and
its counterpart in udisks.
<https://storaged.org/doc/udisks2-api/latest/udisks.8.html#id-1.2.4.7>
It is just a hint however and udisks just expose it to other tools.
On 23/07/2025 20:49, Stefan Monnier wrote:
May it happen that it is not really automounting, but some package script
running on "apt upgrade" or some cron task or systemd timer specific to
the board?
I don't know what's the difference between what you describe and
"automounting". What I mean by "automounting" is not the `autofs` kind
of mounting on demand, but really just having the drives mounted without
any explicit action on my part that requests it.
In the context of udisks, I associate automounting with the feature of
desktop environments (that is often enabled by default) when a drive is
mounted when it is plugged in.
I consider mounting partitions by os-prober (to be clear, it is
unrelated to udisks and it should unmount them) as an *implicit* action
rather than *explicit* one in response to update-grub directly invoked
by user or indirectly called during package update.
In a similar way I would not call it automounting if once a day
antivirus scans all connected drives. However I would expect that it
unmounts partition that were not mounted before.