<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I am looking for some advice about configuring encrypted volumes
with systemd that I want to open on demand (noauto).<br>
<br>
I can add entries into /etc/crypttab and /etc/fstab for the device,
for example<br>
<br>
# <name>
<device>
<password> <options><br>
data UUID=deadbeef....
none noauto<br>
<br>
and <br>
<br>
# <file system> <dir> <type>
<options> <dump> <pass><br>
/dev/mapper/data /home/myuser/data ext4 noauto 0 0<br>
<br>
But the device doesn't unlock when I do<br>
<br>
$ mount /home/myuser/data<br>
mount: special device /dev/mapper/keyring does not exist<br>
<br>
But it does if I use<br>
<br>
$ systemctl start home-myuser-data.mount<br>
<br>
I'm guessing that "mount" doesn't effect systemd and, therefore, the
dependency isn't actioned. But the docs for systemd.mount state that
"configuring mount points through <code class="filename">/etc/fstab</code>
is the preferred approach" so I'm wondering if there's something I
missed from my crypttab or fstab entries?<br>
<br>
Thanks.
</body>
</html>