[systemd-devel] What's the correct way to configure encrypted volume and mount point?

Lennart Poettering lennart at poettering.net
Wed Feb 11 12:03:04 PST 2015


On Thu, 05.02.15 10:08, John Lane (systemd at jelmail.com) wrote:

> On 02/02/15 20:54, Lennart Poettering wrote:
> > On Sat, 31.01.15 11:21, John Lane (systemd at jelmail.com) wrote:
> >
> >> Further to this, I tried manually creating a systemd-cryptsetup unit
> >> instead of putting an entry in /etc/crypttab.
> >> This allowed me to remove the "RequiresMountsFor" entry.
> > Yeah, I figure for your usecase a "WantsMountsFor=" setting would be
> > useful. ("Wants" is generally the softer variant of "Requires" for us).
> >
> > Added to the TODO list for now.
> >
> > Lennart
> >
> 
> I assume "WantsMountsFor" will work similarly to "RequiresMountsFor" in
> that it will add a "Wants" and "Requires" dependencies.

Well, no. It would add Wants= and After=, instead of Requires= and
After=. But I figure what you wrote was just a typo?

> So, I just did a quick test by adding "Wants" and "Requires" has no
> detrimental effect on my use-case. My custom unit works fine without the
> dependency (thanks to the use of an automount) but adding those
> dependencies doesn't stop it working as desired.
> 
> Will the TODO just replace the current use by the crypttab generator of
> "RequiresMountsFor" with "WantsMountsFor",
> or will an additional crypttab option (x-systemd-...) be required to
> make it configure it that way ?

I think we should switch over to use WantsMountsFor for this
unconditionally. After all we can always query the user as fallback...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list