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

John Lane systemd at jelmail.com
Thu Jan 29 09:31:02 PST 2015


I am looking for some advice about configuring encrypted volumes with
systemd that I want to open on demand (noauto).

I can add entries into /etc/crypttab and /etc/fstab for the device, for
example

# <name>       <device>                                    
<password>              <options>
data        UUID=deadbeef....                           
none                    noauto

and

# <file system>    <dir>    <type>    <options>    <dump>    <pass>
/dev/mapper/data /home/myuser/data ext4 noauto 0 0

But the device doesn't unlock when I do

$ mount /home/myuser/data
mount: special device /dev/mapper/keyring does not exist

But it does if I use

$ systemctl start home-myuser-data.mount

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 |/etc/fstab| is the preferred
approach" so I'm wondering if there's something I missed from my
crypttab or fstab entries?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150129/8357acfb/attachment.html>


More information about the systemd-devel mailing list