Commit 2fb1755
committed
Fix encrypted ZFS persistence issue
Problem: VMs with encrypted ZFS storage were reformatting the disk on
every reboot, even with KMS or local key provider enabled.
Root cause: The is_disk_initialized() check required both LUKS header
AND zpool detection for encrypted ZFS (line 1057-1058). However, zpool
import is attempted on the raw encrypted device (/dev/vdb1) before LUKS
is opened, which always fails since the ZFS pool is inside the LUKS
container.
Solution: For any encrypted filesystem (ext4 or ZFS), only check for
LUKS header presence, since the actual filesystem can only be detected
after opening LUKS. This aligns encrypted ZFS handling with encrypted
ext4, which was already using this approach.
Testing: Verified that ext4 encrypted storage persists correctly with
KMS key provider. ZFS testing pending after build completes.1 parent 745b168 commit 2fb1755
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1059 | 1060 | | |
1060 | | - | |
| 1061 | + | |
1061 | 1062 | | |
1062 | 1063 | | |
1063 | 1064 | | |
| |||
0 commit comments