You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFE: Add _netdev concept to /etc/crypttab, similar to /etc/fstab in semantics, i.e. introduce remote-crypttab.target that is placed in late boot #4642
NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!
systemd version the issue has been seen with
systemd-231-11.fc26.x86_64
NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!
Used distribution
Fedora 26
Description of problem:
If we use an encrypted PV as the root disk and at the same time want to mount an encrypted iSCSI disk, we add both these entries to /etc/crypttab. Now while non-iSCSI disk is available for cryptsetup in very early booting stages, iSCSI is only available after network starts (later than /etc/crypttab is processed). This introduces a delay in boot.
Is an option similar to fstab's _netdev available? This would tell cryptsetup to process this concrete line later, when iSCSI is ready
How reproducible:
always
Steps to Reproduce:
enter both boot disk / LV and an iSCSI disk in /etc/crypttab
boot
Actual results:
cryptsetup will start (and process /etc/crypttab) before iSCSI has established connection with the target (network is not ready). This introduces delay in boot and the volume is not mounted.
Expected results:
Have cryptsetup distinguish between items it needs to process in early stages of boot (rootfs) and those that will be mounted later via iSCSI. The desired effect is similar to _netdev parameter in fstab.
hmm, not sure what you are asking for. Do you want a similar split as we have for local-fs.target vs. remote-fs.target (where the former is ordered into early-boot, but the later is ordered much later), but now want it for cryptsetup devices: so that some devices are set up and waited for in early-boot, and others can show up much later only, and are only waited for then?
I figure something like that made make sense, indeed.
Thanks for the response. So what I'm searching for is delaying processing of encrypted iSCSI-connected volumes until network is started.
/etc/crypttab is processed early during boot. While this is ok for non-iSCSI storage (we have that storage already available at that stage), iSCSI storage will become available only after network is available. And that is later than the moment /etc/crypttab is processed.
changed the title [-]RFE: Possibility to boot from encrypted non-iSCSI disks and mount encrypted iSCSI disks on the same machine[/-][+]RFE: Add _netdev concept to /etc/crypttab, similar to /etc/fstab in semantics, i.e. introduce remote-crypttab.target that is placed in late boot[/+]on Nov 23, 2016
We (clevis) need a change here as well. In our case, recovering the key requires network regardless of where the storage is. I don't see a reason to complicate crypttab. Can't we just move cryptsetup after sysinit? Or am I missing something?
Can't we just move cryptsetup after sysinit? Or am I missing something?
Encrypted container may be needed for local filesystem and we may not be able to infer dependency when generator runs (think about logical volume on top encrypted container where you do not know where volume group is located until we actually scan devices).
Can't we just move cryptsetup after sysinit? Or am I missing something?
Nah, we can't really. Think encrypted /var or so. Networking software (or some software ordered before it) might want /var around, but that means that specifiy crypto partition cannot be ordered late. Hence: for some partitions it might be safe to move them late, for others not. Which ones those are is not really possible to infer properly automatically, and hence we'd have _netdev.
Activity
poettering commentedon Nov 11, 2016
So you use LVM on top of LUKS on top of iscsi as root? yuck...
I figure this is something
dracutneeds to be made aware of. @haraldh can you comment? is this supported?poettering commentedon Nov 11, 2016
hmm, not sure what you are asking for. Do you want a similar split as we have for local-fs.target vs. remote-fs.target (where the former is ordered into early-boot, but the later is ordered much later), but now want it for cryptsetup devices: so that some devices are set up and waited for in early-boot, and others can show up much later only, and are only waited for then?
I figure something like that made make sense, indeed.
beneso commentedon Nov 15, 2016
Hi Lennart,
Thanks for the response. So what I'm searching for is delaying processing of encrypted iSCSI-connected volumes until network is started.
/etc/crypttab is processed early during boot. While this is ok for non-iSCSI storage (we have that storage already available at that stage), iSCSI storage will become available only after network is available. And that is later than the moment /etc/crypttab is processed.
Does that make sense to you?
[-]RFE: Possibility to boot from encrypted non-iSCSI disks and mount encrypted iSCSI disks on the same machine[/-][+]RFE: Add _netdev concept to /etc/crypttab, similar to /etc/fstab in semantics, i.e. introduce remote-crypttab.target that is placed in late boot[/+]npmccallum commentedon Jan 27, 2017
We (clevis) need a change here as well. In our case, recovering the key requires network regardless of where the storage is. I don't see a reason to complicate crypttab. Can't we just move cryptsetup after sysinit? Or am I missing something?
arvidjaar commentedon Jan 29, 2017
Encrypted container may be needed for local filesystem and we may not be able to infer dependency when generator runs (think about logical volume on top encrypted container where you do not know where volume group is located until we actually scan devices).
poettering commentedon Feb 1, 2017
Nah, we can't really. Think encrypted /var or so. Networking software (or some software ordered before it) might want /var around, but that means that specifiy crypto partition cannot be ordered late. Hence: for some partitions it might be safe to move them late, for others not. Which ones those are is not really possible to infer properly automatically, and hence we'd have _netdev.
cryptsetup-generator: use remote-cryptsetup.target when _netdev is pr…
cryptsetup-generator: use remote-cryptsetup.target when _netdev is pr…