How to recover the zpool encryption key after OS disk failure

truenas_admin@truenas[/mnt/oldboot/root]$ ls -l /mnt/oldboot/root/data
total 0

Is there anything in here at all?

ls -l /mnt/oldboot/root

nothing.

Did the mount command give any errors?

Do you see it mounted?

mount | grep oldboot

there is a full directory stack in /mnt/oldboot/root though.

truenas_admin@truenas[/mnt/oldboot/root]$ ls
audit  boot  data  etc   initrd.img      lib    media  opt       proc  run   srv  tmp  var      vmlinuz.old
bin    conf  dev   home  initrd.img.old  lib64  mnt    packages  root  sbin  sys  usr  vmlinuz
1 Like
truenas_admin@truenas[/mnt]$ mount | grep oldboot
oldboot/ROOT/25.04.1 on /mnt/oldboot/root type zfs (ro,nodev,relatime,xattr,noacl,casesensitive)
1 Like

But you said this when I asked:

there is nothing in /mnt/oldboot/root/data

Okay. The way you replied to my second post was confusing.

Back on track:

ls -l /mnt/oldboot/root/data
truenas_admin@truenas[/mnt/oldboot/root]$ ls -l /mnt/oldboot/root/data
total 0

I found it.

With Core, everything is under a single dataset. With SCALE, they went “granular”.

Go ahead and unmount.

umount /mnt/oldboot/root

And mount this instead:

mount -t zfs -o ro oldboot/ROOT/25.04.1/data /mnt/oldboot/data

@cutiejim you should be able to reply again! :+1:

Here are the new steps again, in the order to be issued:

mkdir /mnt/recovery

cd /mnt/recovery

zpool import -f -o readonly=on -R /mnt/oldboot -d /dev/sdg3 -N 2650431139805676226 oldboot

mount -t zfs -o ro oldboot/ROOT/25.04.1/data /mnt/oldboot/data
1 Like
truenas_admin@truenas[/mnt/oldboot]$ mount -t zfs -o ro oldboot/ROOT/25.04.1/data /mnt/oldboot/data
filesystem 'oldboot/ROOT/25.04.1/data' cannot be mounted at '/mnt/oldboot/data' due to canonicalization error: No such file or directory
truenas_admin@truenas[/mnt/oldboot]$ sudo mount -t zfs -o ro oldboot/ROOT/25.04.1/data /mnt/oldboot/data
filesystem 'oldboot/ROOT/25.04.1/data' cannot be mounted at '/mnt/oldboot/data' due to canonicalization error: No such file or directory
truenas_admin@truenas[/mnt/oldboot]$ pwd
/mnt/oldboot
truenas_admin@truenas[/mnt/oldboot]$ sudo mkdir /mnt/oldboot/data
truenas_admin@truenas[/mnt/oldboot]$ sudo mount -t zfs -o ro oldboot/ROOT/25.04.1/data /mnt/oldboot/data
filesystem 'oldboot/ROOT/25.04.1/data' cannot be mounted using 'mount'.
Use 'zfs set mountpoint=legacy' or 'zfs mount oldboot/ROOT/25.04.1/data'.
See zfs(8) for more information.

Did you do all the above steps?

You shouldn’t even be inside the /mnt/oldboot path anyways.

yes. i unmounted oldboot and made new directory /mnt/recovery

having trouble making the new mount happen

All the steps? Including the import?

truenas_admin@truenas[/]$ sudo zpool import -f -o readonly=on -R /mnt/oldboot -d /dev/sdg3 -N 2650431139805676226 oldboot

and i get:

cannot import '2650431139805676226': no such pool available

should i go back and do the zfs list commands again since i rebooted everything?