OpenMediaVault-Plugin-Developers/openmediavault-luksencryption

Existing NFS mounts remain unavailable after unlocking

imgrant opened this issue · 7 comments

Shared folders exported via NFS in OMV that reside on a filesystem inside a LUKS container cannot be exported at startup, as the LUKS container is locked. When manually unlocked after booting, the NFS mount remains unavailable – TODO: the unlocking process needs to trigger a reload of the NFS server and possibly also take care of any bind mounts for the shared folder.

See also issue 8

This also happens to OMV shared folder mounts that come from the encrypted disk. In OMV4, they are mounted via systemd, which fails if the base device is not yet decrypted and isn't restarted on manual decryption.

But as this ticket is 2 years old now ....

This is going to be a constant issue. For now closing as this needs a big change in the plugin.
I maintain a separate version that takes care of it, but i don't think is ready for the rest of the users to be official

https://forum.openmediavault.org/index.php/Thread/21553-Plugin-test-openmediavault-luksencryption-v2/

As I have the same issue regardings my NFS exports:
IMHO it would be sufficient to have an option to add a custom script after unlocking the LUKS device (if possible).
I do not believe that it is the task of the plugin to consider all eventualities. OMV is too complex for that.
(refers to #8)

It shouldn’t be difficult. A quick though it would be just a one liner using run-parts on the php backend over a .d folder passing a few obvious environmental var or positional arguments.
We can add it to the next big release of omv depending on the porting difficulty because we have to redo the frontend and we still don’t have access to the framework.

Awesome, thx 👍
In the meantime - a small hint for the other participants:
You can help yourself by creating a script and setting up a scheduled job. You can then call this script manually from the UI (it doesn't have to be enabled for manual runs). The output from the script will be shown in the UI.