SOLVED Rebuild pool from drives possible? because upload configuration failed to bring the pool online

titust1

Explorer
Joined
May 10, 2022
Messages
66
Hi, first of all, don't blame me for risking my data because the data is safely backed up.
I had a Truenas Scale installed on one SSD boot disk, it was fully functional, it had and LSI HBA (IT mode) and 3 x HDDs.
I've saved the config db and password. Recently the partition table of my boot SSD got corrupted somehow.
So on the same PC I installed Truenas Scale as a Proxmox VM and passed through the HBA to the new Truenas VM. The Disks menu lists correctly my 3 HDDs which are part of my pool. I'm doing this because I want to change from a physical to a virtualized Truenas installation.
I uploaded the saved config db, my password changed as before, and in the GUI the pool is there, but it's offline for some reason that I ignore.
This is for sure due to the HW change, although I though Truenas is using the disks SN not the linux sdx name...
zpool status only show the boot pool. I am pretty sure the 3 drives that are part of the pool are still pristine.
I don't how to display the status of an offline pool, to have more info about why it's offline. So I need help
- Is there a way I can rebuild the pool from the data stored on the drives?
- Or can I import a pool that wasn't exported, for instance because the server died, by using using zpool import -f
- Is there a solution here? In fact this is a Truenas boot disk failure recovery exercise. I shouldn't be the first one to have it.
 
Last edited:

titust1

Explorer
Joined
May 10, 2022
Messages
66
root@diskstation[~]# zpool import
pool: Z-Pool
id: 9092168430889232775
state: UNAVAIL
status: The pool was last accessed by another system.
action: The pool cannot be imported due to damaged devices or data.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY
config:
Z-Pool UNAVAIL missing device
raidz1-0 ONLINE
221e12ae-18cc-4ba9-b8bb-dc900a78a185 ONLINE
1613cb3c-b16b-400c-8522-cfd16ad3a679 ONLINE
7ec5cb4b-f45d-404d-b353-983ec843df05 ONLINE
logs
a33cd9e5-6212-463d-8826-dc4e0dff2df6 UNAVAIL


Yes, I forgot there was a LOG assigned to the pool that I don't have anymore, it was on a partition of the boot disk.
Is it possible to get rid of it from the pool? then I guess the pool will go online
 

titust1

Explorer
Joined
May 10, 2022
Messages
66
What's the output of zpool import?
I tried
zpool remove Z-Pool a33cd9e5-6212-463d-8826-dc4e0dff2df6
but it says Z-Pool no such pool or device
 

titust1

Explorer
Joined
May 10, 2022
Messages
66
Hi guys,
I managed to fix the issue myself. Due to the fact that I wasn't scared to lose the data, I tried a few things and it worked:
1. In the GUI I exported/detached the pool without deleting the data and removing the shares.
2. I forced the import of my pool (Z-Pool)
Code:
zpool import -f -R /mnt/Z-Pool -m Z-Pool
-m allows a pool import when there is a missing log device. There was no error, but the pool didn't show up in the GUI
3. I removed the missing slog device from the pool
Code:
zpool remove Z-Pool a33cd9e5-6212-463d-8826-dc4e0dff2df6
There was no error, so I guess it was successful
4. I went again and uploaded the config file from tar, and after reboot Z-pool was there, healthy without a log device attached
So basically I fixed two issues, the missing log device and the fact that I changed the system
 
Top