SOLVED zpool import issues using GELI key

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Hi.

Specs in my signature.
Truenas version: 12.0-U8
Pools:
VMs-Plugins-Jails (da1, da3)
Volume1 (ada0, ada1, ada2)
Volume2 (ada3, ada4, ada5 + da0 as SLOG)

My boot flash drive failed (I know... I was intending to replace it with a SSD). I am temporarily replacing it with another flash drive until I source a SSD for boot.
As I loaded up my configuration file, only my VMs-Plugins-Jails pool was loading as it was the only volume not encrypted.
1648985068629.png

1648988997644.png

I then attached the geli key for Volume1 pool and imported it.
Code:
root@Nasgul:~ # ls -al /dev/ada*
crw-r-----  1 root  operator  0xab Apr  3 19:09 /dev/ada0
crw-r-----  1 root  operator  0xad Apr  3 19:09 /dev/ada0p1
crw-r-----  1 root  operator  0xaf Apr  3 19:09 /dev/ada0p2
crw-r-----  1 root  operator  0xb1 Apr  3 19:09 /dev/ada1
crw-r-----  1 root  operator  0xc2 Apr  3 19:09 /dev/ada1p1
crw-r-----  1 root  operator  0xc4 Apr  3 19:09 /dev/ada1p2
crw-r-----  1 root  operator  0xb3 Apr  3 19:09 /dev/ada2
crw-r-----  1 root  operator  0xc6 Apr  3 19:09 /dev/ada2p1
crw-r-----  1 root  operator  0xc8 Apr  3 19:09 /dev/ada2p2
crw-r-----  1 root  operator  0xb5 Apr  3 19:09 /dev/ada3
crw-r-----  1 root  operator  0xca Apr  3 19:09 /dev/ada3p1
crw-r-----  1 root  operator  0xcc Apr  3 19:09 /dev/ada3p2
crw-r-----  1 root  operator  0xb7 Apr  3 19:09 /dev/ada4
crw-r-----  1 root  operator  0xce Apr  3 19:09 /dev/ada4p1
crw-r-----  1 root  operator  0xd0 Apr  3 19:09 /dev/ada4p2
crw-r-----  1 root  operator  0xb9 Apr  3 19:09 /dev/ada5
crw-r-----  1 root  operator  0xd2 Apr  3 19:09 /dev/ada5p1
crw-r-----  1 root  operator  0xd4 Apr  3 19:09 /dev/ada5p2
root@Nasgul:~ # ls -al /dev/da*
crw-r-----  1 root  operator  0xbb Apr  3 19:09 /dev/da0
crw-r-----  1 root  operator  0xd6 Apr  3 19:09 /dev/da0p1
crw-r-----  1 root  operator  0xbc Apr  3 19:09 /dev/da1
crw-r-----  1 root  operator  0xd7 Apr  3 19:09 /dev/da1p1
crw-r-----  1 root  operator  0xd8 Apr  3 19:09 /dev/da1p2
crw-r-----  1 root  operator  0xbd Apr  3 19:09 /dev/da2
crw-r-----  1 root  operator  0xd9 Apr  3 19:09 /dev/da2p1
crw-r-----  1 root  operator  0xda Apr  3 19:09 /dev/da2p2
crw-r-----  1 root  operator  0xbe Apr  3 19:09 /dev/da3
crw-r-----  1 root  operator  0xbf Apr  3 19:09 /dev/da4
crw-r-----  1 root  operator  0xdb Apr  3 19:09 /dev/da4p1
crw-r-----  1 root  operator  0xdc Apr  3 19:09 /dev/da4p2
root@Nasgul:~ # geli status
            Name  Status  Components
mirror/swap0.eli  ACTIVE  mirror/swap0
mirror/swap1.eli  ACTIVE  mirror/swap1
mirror/swap2.eli  ACTIVE  mirror/swap2
root@Nasgul:~ # geli attach -p -k /recovery/pool_Volume1_encryption.key /dev/ada0p2
root@Nasgul:~ # geli attach -p -k /recovery/pool_Volume1_encryption.key /dev/ada1p2
root@Nasgul:~ # geli attach -p -k /recovery/pool_Volume1_encryption.key /dev/ada2p2
root@Nasgul:~ # geli status
            Name  Status  Components
mirror/swap0.eli  ACTIVE  mirror/swap0
mirror/swap1.eli  ACTIVE  mirror/swap1
mirror/swap2.eli  ACTIVE  mirror/swap2
      ada0p2.eli  ACTIVE  ada0p2
      ada1p2.eli  ACTIVE  ada1p2
      ada2p2.eli  ACTIVE  ada2p2
root@Nasgul:~ # zpool import -f -m -R /mnt Volume1
root@Nasgul:~ # zpool status
  pool: VMs-Plugins-Jails
 state: ONLINE
  scan: scrub repaired 0B in 00:06:01 with 0 errors on Wed Mar 16 03:06:01 2022
config:

        NAME                                            STATE     READ WRITE CKSUM
        VMs-Plugins-Jails                               ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/d6f5938c-b0ca-11ea-8c3e-0cc47a6be4ee  ONLINE       0     0     0
            gptid/0f05a577-7e04-11ea-b32f-0cc47a6be4ee  ONLINE       0     0     0

errors: No known data errors

  pool: Volume1
 state: ONLINE
  scan: scrub repaired 0B in 03:05:02 with 0 errors on Tue Mar 15 07:05:03 2022
config:

        NAME            STATE     READ WRITE CKSUM
        Volume1         ONLINE       0     0     0
          raidz1-0      ONLINE       0     0     0
            ada2p2.eli  ONLINE       0     0     0
            ada0p2.eli  ONLINE       0     0     0
            ada1p2.eli  ONLINE       0     0     0

errors: No known data errors

  pool: boot-pool
 state: ONLINE
config:

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

errors: No known data errors


The import is successful and I can now see the pool on the dashboard and Storage>Pools section. Using terminal via SSH, I can access the drive in the /mnt/Volume1 directory and all its subdirectories.
1648989708388.png

1649444758891.png

Code:
root@Nasgul:/mnt/Volume1 # ls
ADRIANE NDRIVE  CHOI NDRIVE     iocage          JOY NDRIVE      LEVI NDRIVE     VMs
apps            GIO NDRIVE      JAY NDRIVE      KRISTIAN NDRIVE NextCloud       YASMIN NDRIVE


However, after restarting TrueNAS, the Volume1 pool again appears as Locked and inaccessible.

Help appreciated.
 

Attachments

  • 1648989865064.png
    1648989865064.png
    1 MB · Views: 147
Last edited:
Joined
Oct 22, 2019
Messages
3,641
However, after restarting TrueNAS, the Volume1 pool again appears as Locked and inaccessible.

Why not import the GELI key with the GUI? From what I understand, it will copy the key to your boot drive and automatically use it to unlock the (legacy) GELI devices upon reboot.
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Why not import the GELI key with the GUI? From what I understand, it will copy the key to your boot drive and automatically use it to unlock the (legacy) GELI devices upon reboot.

I did try that but the disk dropdown option is empty.
1648991783950.png
 
Joined
Oct 22, 2019
Messages
3,641
I did try that but the disk dropdown option is empty.

Yikes. :oops:

Even before importing any pool, no disks are available when attempting a legacy GELI import? That is weird. I wonder if it's a bug?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Yikes. :oops:

Even before importing any pool, no disks are available when attempting a legacy GELI import? That is weird. I wonder if it's a bug?
The disks appear on the Storage>Disks section but appear as N/A. But it doesn't appear when I try to import the pool.
1648994251634.png
 
Joined
Oct 22, 2019
Messages
3,641
The disks appear on the Storage>Disks section but appear as N/A. But it doesn't appear when I try to import the pool.
It sounds like a bug.

Unless someone else can explain why they do not display in the drop-down menu during import?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Anyone have an idea?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Update.

So I was able to install and run TrueNAS on a spare 3TB WD Red drive I found but the pool still locks after rebooting. I had some issues with setting it as a boot drive via UEFI (with swap partition) as it is connected to the SAS controller and the option to enter the SAS LSI Configuration Utility (Ctrl + C) does not appear. After going to the BIOS and set the "Launch storage OpROM Policy" to enable, it was automatically set at the boot drive. The board is currently NOT set in IT mode.

This is what appears as I attach the GELI key to the Volume1 pool.
1649527850831.png

Should I try the Export/Disconnect option before attaching the GELI key and importing the pool?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Update.

So I tried the Export/Disconnect option. After doing so the option to import the pool via the GUI became available.
I followed the standard procedure to import the pool via GELI and voila it works! Problem resolved.
1650032300792.png
 
Top