I started with a basic Ubuntu 22.10 installation, where I chose in the installer to use ZFS as my volume manager.
I wanted to encrypt my home folder.
I followed the article (and comments, including Christoph Hagemann's) from:
https://talldanestale.dk/2020/04/06/zfs-and-homedir-encryption/
To achieve:
- Home directory (a ZFS rpool mount) is encrypted
- You are only prompted for password if you are trying to login to that user
- So PC can boot fine to login screen without intervention
- Password prompt authenticates you as the user and decrypts the home folder's rpool
- SSH users get the same experience as physical users
- You can power on the PC, then SSH in
- Once rpool is unlocked: subsequent SSH login can use key exchange instead of password
- Once all sessions log out: rpool is encrypted and unmounted again
so your zpool disappeared? after a reboot for example.
this happened to me with
nvme1
.doesn't show up in
zfs list
orzpool list
:zfs list zpool list NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT bpool 1.88G 262M 1.62G - - 0% 13% 1.00x ONLINE - rpool 3.62T 2.03T 1.59T - - 3% 56% 1.00x ONLINE - sdb 7.27T 380G 6.89T - - 0% 5% 1.00x ONLINE - # where is nvme1
but still shows up in fdisk?
then try:
cd /dev/disk/by-id
looks like it's still in
/dev/disk/by-id
:birch@tree-diagram:/dev/disk/by-id $ ls | grep nvme nvme-CT4000P3PSSD8_2242E67C5015 nvme-CT4000P3PSSD8_2242E67C5015_1 nvme-CT4000P3PSSD8_2242E67C5015_1-part1 nvme-CT4000P3PSSD8_2242E67C5015_1-part2 nvme-CT4000P3PSSD8_2242E67C5015_1-part3 nvme-CT4000P3PSSD8_2242E67C5015_1-part4 nvme-CT4000P3PSSD8_2242E67C5015-part1 nvme-CT4000P3PSSD8_2242E67C5015-part2 nvme-CT4000P3PSSD8_2242E67C5015-part3 nvme-CT4000P3PSSD8_2242E67C5015-part4 nvme-CT4000P3PSSD8_2325E6E60AC2 nvme-CT4000P3PSSD8_2325E6E60AC2_1 nvme-CT4000P3PSSD8_2325E6E60AC2_1-part1 nvme-CT4000P3PSSD8_2325E6E60AC2_1-part9 nvme-CT4000P3PSSD8_2325E6E60AC2-part1 nvme-CT4000P3PSSD8_2325E6E60AC2-part9 nvme-nvme.c0a9-323234324536374335303135-43543430303050335053534438-00000001 nvme-nvme.c0a9-323234324536374335303135-43543430303050335053534438-00000001-part1 nvme-nvme.c0a9-323234324536374335303135-43543430303050335053534438-00000001-part2 nvme-nvme.c0a9-323234324536374335303135-43543430303050335053534438-00000001-part3 nvme-nvme.c0a9-323234324536374335303135-43543430303050335053534438-00000001-part4 nvme-nvme.c0a9-323332354536453630414332-43543430303050335053534438-00000001 nvme-nvme.c0a9-323332354536453630414332-43543430303050335053534438-00000001-part1 nvme-nvme.c0a9-323332354536453630414332-43543430303050335053534438-00000001-part9
I think
zpool import
lists what's importable?okay, let's import it:
that worked:
start a repair, for good measure:
check zpool status:
okay, decrypt & mount it the usual way: