Answer the question
In order to leave comments, you need to log in
How to make LUKS partition open only after network is up?
Good afternoon.
There is Debian 10. LUKS section with a key in the form of a file. I want to host this key on a VPS and access it via NFS. How can this be implemented?
If you do it in the traditional way, this section does not open at startup, because. the service that does this does not see the key, because no network at this moment.
Answer the question
In order to leave comments, you need to log in
I understand what the problem is. I have NFS mount set up via autofs. If you transfer its mount to mount via fstab, then everything is ok. When loading, the nfs partition is mounted, luks is opened through the key from there, and this luks is already mounted via fstab. How can this be done via autofs mount?
if systemd, then write in the script the requirement of a working network
[Unit]
Wants=network-online.target
After=network-online.target
Another option is to put a dependency on nfs mounts
even better dependency on the existence of the path to the specified key file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question