<div dir="ltr"><div>Thanks for your help, Andrei. I filed an issue here: <br><br>cryptsetup generator emits RequiresMountsFor for crypto keyfile which prevents keyfile being placed on removable storage · <br>Issue #3816 · systemd/systemd<br><a href="https://github.com/systemd/systemd/issues/3816">https://github.com/systemd/systemd/issues/3816</a><br><br></div>I used your explanation as it was better and more clear than anything I could have written.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 1:47 AM, Andrei Borzenkov <span dir="ltr"><<a target="_blank" href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On Tue, Jul 26, 2016 at 7:57 AM, Dave T <<a href="mailto:davestechshop@gmail.com">davestechshop@gmail.com</a>> wrote:<br>
> Is systemd expected to stop / unmount an encrypted device when another<br>
> device containing the keyfile used to mount it (e.g., a removable USB drive)<br>
> is removed?<br>
><br>
> when I umount and then remove the USB disk, I see the following line in<br>
> journalctl:<br>
><br>
>> Jul 25 22:11:20 mserver systemd[1]: systemd-cryptsetup@aluks.service:<br>
>> Installed new job systemd-cryptsetup@aluks.service/stop<br>
><br>
<br>
</span>Well, cryptsetup generator emits RequiresMountsFor for keyfile; which<br>
implies that when filesystem that holds this file is unmounted, it<br>
also stops cryptsetup service.<br>
<br>
Which is of course wrong because filesystem is required only once,<br>
when crypto container is setup.<br>
<br>
Please file an issue on github.<br>
<span class="gmail-"><br>
><br>
> I will send more logs when I find out exactly how to reproduce this on<br>
> another system.<br>
><br>
> In the mean time, I appreciate any information on why systemd-cryptsetup<br>
> might stop a service when a different storage device is removed.<br>
><br>
> Also, would the mount options in fstab impact this behavior? Currently I am<br>
> not using systemd.automount on this machine. Should I? My mount options are<br>
> similar to:<br>
><br>
>><br>
>> rw,noatime,nodiratime,compress=lzo,ssd,space_cache,subvolid=123,subvol=@myid<br>
>> 0 0<br>
><br>
><br>
> Thanks<br>
><br>
</span>> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
> <a target="_blank" rel="noreferrer" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
><br>
</blockquote></div><br></div></div></div>