Recover pool after (failed) migration from TrueNAS Core to TrueNas Scale

I tried to switch from truenas core to scale (Dragonfish-24.04.2).
After an initial successfull installation, the pool was missing.

I followed the tutorial from: https://www.youtube.com/watch?v=AFiQXJ-i0s0
Those were the steps I did:

  1. Upgraded to the latest TrueNAS Core version
  2. Backup the configuration
  3. Backup the pool_tank_encryption.key
  4. Pluged in the USB-stick with TrueNAS Scale and followed the installation wizard

After upgrading the pool was missing. I searched the forum and it was mentioned, that I should restore the old config and the pool will come up. So I did that, but it was not working. Only the shares were back up, but not the data pool.
Then I did a new installation (my thought process was: It will pick up the pool, as it did the first time).
But now I can only create a new pool within the UI and I don’t know if this will scrape my data.

My goal: I would like to reconstruct/recover/rebuild the pool without losing the data on the drives (4TB * 5 Times ). As far as I remember the original pool (named tank) was RAID 3.

Hardware:
TRUENAS-MINI-3.0-X+
62 GB RAM
Intel(R) Atom™ CPU C3758 @ 2.20GHz
Disks:

  • 3,64 TiB * 5 Times (those contains the data)
  • 1 SSD (447,13GiB)
  • 1 SSD (14,91 GiB)

Also I tried to run zpool status -v but it just says zsh: command not found: zpool.
Unfortunatly I’m mainly used the GUI unit now from TrueNAS. Any help would be much appriciated.

Prefix with sudo whenever you get that error: sudo zpool status -v
And also lsblk so we know if the drives are here.

Thank you for your fast reply.

sudo worked: here is the output from the two commands:

admin@truenas[~]$ sudo zpool status -v
[sudo] password for admin: 
  pool: boot-pool
 state: ONLINE
config:

        NAME         STATE     READ WRITE CKSUM
        boot-pool    ONLINE       0     0     0
          nvme0n1p3  ONLINE       0     0     0

errors: No known data errors
admin@truenas[~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   3.6T  0 disk 
├─sda1        8:1    0     2G  0 part 
└─sda2        8:2    0   3.6T  0 part 
sdb           8:16   0   3.6T  0 disk 
├─sdb1        8:17   0     2G  0 part 
└─sdb2        8:18   0   3.6T  0 part 
sdc           8:32   0   3.6T  0 disk 
├─sdc1        8:33   0     2G  0 part 
└─sdc2        8:34   0   3.6T  0 part 
sdd           8:48   0   3.6T  0 disk 
├─sdd1        8:49   0     2G  0 part 
└─sdd2        8:50   0   3.6T  0 part 
sde           8:64   0   3.6T  0 disk 
├─sde1        8:65   0     2G  0 part 
└─sde2        8:66   0   3.6T  0 part 
sdf           8:80   0 447.1G  0 disk 
└─sdf1        8:81   0 447.1G  0 part 
sdg           8:96   0  14.9G  0 disk 
├─sdg1        8:97   0     1M  0 part 
├─sdg2        8:98   0   512M  0 part 
└─sdg3        8:99   0  14.4G  0 part 
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0     1M  0 part 
├─nvme0n1p2 259:2    0   512M  0 part 
└─nvme0n1p3 259:3    0 232.4G  0 part 
admin@truenas[~]$ 
admin@truenas[~]$

The drives are all there, including the two SATA SSDs, which are not boot devices. SLOG and L2ARC?
Now you can try sudo zpool import

Was it old style GELI encryption, by any chance?

1 Like

sudo zpool import gives the following output:

admin@truenas[~]$ sudo zpool import
[sudo] password for admin: 
no pools available to import
admin@truenas[~]$

I’m not familiar with the terms SLOG and L2ARC. I will look it up, but I assume I did not use those features.

Regarding the GELI encryption: It should not be. I think it is the modern one with AES.

GELI is specific to FreeBSD. It’s unrelated to, nor does it care about, ZFS or ZFS encryption.

Thanks for the clarification. I think I did not use that. I only checked the encrypted pool checkbox. Other than that I did not set up any encryption.

Are you sure you didn’t use encryption in Core FreeNAS?

Prior to TrueNAS Core 12 (le FreeNAS 11 and earlier), the only “encryption” available was via GELI.

Unfortunatly I can’t tell for sure. I bought the NAS in 2020 and migrated from FreeNAS to TrueNAS via the GUI-Updater.
Is there any way I can check this? Because right now, TrueNAS Scale is running at this NAS.

The pool_tank_encryption.key seems to be totally random.

So what are these SSDs? Other pools? Empty drives?
Anyway we now have a suspect: You may have encrypted the pool long ago in FreeNAS/TrueNAS CORE and GELI is neither supported nor even understood under SCALE. If so, you have to reinstall CORE and find a way to migrate the data to a new pool.

1 Like

One SSD was unused and the other one I tried to create a read-cache a long time ago, but this did not work, and it was also unused.

Thank you for the advice. Is there some kind of tutorial how I would to that?
I assume I can install CORE the same way as I did with SCALE?

If you suggest I will download CORE and tell you as soon as I have installed it.
Would it be possible to restore the configuration file from CORE to recover the pool?

Yes. (Or put back the old boot drive, if you had installed a new one for SCALE.)

That’s the whole point of the configuration file. And, whatever you do, do NOT lose that encryption key!

2 Likes

Ok thank you very much I will try this and post the result here.

I tried to install CORE but run into some weird issues.

I installed it at the same drive as SCALE before (see picture attached).

Afterwards I had troubles booting from it and I had to change the Boot Mode into UEFI.

Now it boots up and the TrueNAS Core Menu comes up. If I choose 1 to boot into the environment it gives the following error:

How do I get CORE back on this device?

-----EDIT------
I tried the options and it showed the following output:


I have no idea what this even means.

Check the boot USB, or try a different USB thumb drive, and try to install anew again, all in UEFI mode. (It’s 2024, “Legacy” mode should not even exist on vaguely recent motherboards!)

BTW, the two Micron 5200, one of which is massively overprovisionned to 16 GB, look like they were intended for L2ARC and SLOG. Once you’re out of the woods, you may want to restore the 16 GB drive to its full capacity. The pair could serve as a small application pool.

Thank you I will try this tomorrow morning.

I did use another usb in order to install CORE once again. Also I changed the BIOS setup to only boot from UEFI and installed it with UEFI. I created no swap. The installation says it is a success. After reboot the TrueNAS Core Menu pops up for a few seconds and then it boots into CORE.

The result is still the same: It shows:
Mounting from zfs:boot-pool/ROOT/default failed with error 45

I found this thread here: Mounting from zfs:freenas-boot/ROOT/11.1-U7-1 failed with error 45 | TrueNAS Community
but I don’t know where I should write the following command: midclt call update.set_train FreeNAS-11.3-STABLE

I assume I need another version (as the iso is labeled TrueNAS-13.0-U6.2.iso) and I need the shell within the GUI?

After booting and choosing 1 to boot the TrueNAS Core I land within an mountroot> envionment. Any idea how to fix that, or what I should write there?

13.0U6 still has the Web shell; 13.3 lost it.
If you had an earlier version of TrueNAS CORE installed, I’d suggest installing it as it were, and then updating. One issue at a time.

1 Like

Thanks for your suggestion. I tried 13.0U6 but it’s still the same. The problem I have is, that it doesn’t boot up properly.
I can’t upload a video here (unfortunately) therefore I uploaded it to Watch PXL_20240908_184448749.TS | Streamable where you can see the whole boot process.

I don’t see anything wrong besides the error 45 which I didn’t find out how to fix yet.