-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headless system slow trying to mount encrypted pool #12259
Comments
The generator use the If we could in some manner declare in the manifest file that it's not for automatic mount and the generator does not put local-fs dependency in this case, would be very good. |
|
That's good, it allow me to manually mount before call my service (target) to start all services. But it makes my service somewhat weak, depending on things done before it's started. It also makes things different from Would a patch that in the case of
Then |
Well, the mount generator has been rewritten as a C program in the interim, so you might want to check if it has the behavior you desire (I think it might), and propose a patch to that (or, if you really want it in 2.0 and prior, two separate patches). I'm not familiar with the innards and expectations of either incarnation of the generator, though, so I have no idea whether such a change would seem unreasonable. |
Is this version with the C program used in some stable Ubuntu version already? |
It would be in the 2.1 release, which is currently on rc7, so no, I wouldn't think so. |
It looks like the behavior I want is done there https://github.com/openzfs/zfs/blob/master/etc/systemd/system-generators/zfs-mount-generator.c#L534 I'll close that issue and maintain myself the custom version for now. |
I'm creating an Ubuntu raspberry pi machine which following characteristics:
All of this is based in this (non-ZFS) tutorial: https://blog.iwakd.de/headless-luks-decryption-via-ssh
But I had a problem. Boot is slow.
I have discovered the it's due that
zfd-mount-generator
generates service depending onlocal-fs.target
so it asks 3 times withsystemd-ask-password
on the headless boot, each with 90 seconds timeout.A way to make things better was to edit the generator using
systemd-ask-password --timeout=5
. It still looses 15 seconds, but when I manually start mydecrypt.target
service I had the time to insert the password.Another way (which I preferred) was to comment the dependencies on
local-fs.target
generated.But anyway I has to edit the generator code, which I want to avoid.
Could you create some way to make that setup easier?
Maybe if I just remove automount from the dataset and manually mount it before start
decrypt.target
would also resolve the problem, but I'm not sure it would be the best way to do it.The text was updated successfully, but these errors were encountered: