Re: /etc/fstab dependences migrated between units due to automount feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 31 Aug 2019, Daniel Otero Oubiña wrote:
> I forgot to say that the devices on crypttab are also configured with
> `noauto`, that's why I was adding the dependences manually.

Even with `noauto`, the manual dependency isn't needed. The dependencies I 
described were all about the block device, not the filesystem, so when the 
filesystem is actually mounted isn't relevant.

> The strange behavior for me is that, if I do not put the `x-systemd.automount`
> everything works fine: the devices are not decrypted until I try to mount
> the final filesystem. But when I add the automount feature, the devices get
> automatically decrypted at boot, because the dependencies are moved from
> the .mount to the .automount.
> 
> This can be solved manually with custom units, but I would like to know if
> there is an explanation for this behavior.

When these fstab options were added, the use case that originally brought 
them up was dependencies between mount units:

  https://bugzilla.redhat.com/show_bug.cgi?id=812826
  https://bugzilla.redhat.com/show_bug.cgi?id=1164334
  https://github.com/systemd/systemd/commit/3519d230c8bafe834b2dac26ace49fcfba139823  

If a particular fstab entry has both x-systemd.automount and 
x-systemd.requires=something.mount, then the Requires= dependency would 
have to be applied on the corresponding automount unit.

So I'm not sure how systemd can cater for your request. It would be weird 
for dependencies on only _some_ unit types to be transferred from the 
mount unit to the automount unit.

But really, I keep reiterating: you don't need this explicit cryptsetup 
dependency at all. Do you have some use case where it's actually needed?
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux