SOLVED Messed up and replaced wrong drive, import pool based on offline drive?

tarian

Dabbler
Joined
Apr 28, 2021
Messages
12
I messed up and offlined the wrong drive. Replaced the correct drive and now the pool won't import.

It looks like the offline drive is out of sync with the rest of the pool.
I tried using zpool import Backup-NAS -T <txg of offline drive>.
It didn't work and I am not sure if I am specifying the correct TXG.

Can someone help me validate if -T will work in my situation?
1646725905576.png

1646725892517.png


I can restore from backup but it will be difficult.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't think there's a lot you can do with more than one disk missing from RAIDZ1.

Backing out transactions won't bring an offline drive online.

Either see if the partition is there in glabel status

or have a look at zdb -l /dev/da1p2 (if the offline disk is da1... adjust accordingly for the right disk identifier)
 

tarian

Dabbler
Joined
Apr 28, 2021
Messages
12
Ya, the offline disk (da2) has the partition and stuff. I set it offline shutdown TrueNAS, Replaced the drive I meant to put offline (da7) (the current unavailable one) and started TrueNAS. That got me to that state. I thought I would have been able to just online the offline drive and things would be fine but the pool won't import without the drive online and I can't online the drive without the pool imported. Should ZFS auto online the drive when it tries to import the pool? Would da2's txg being out of sync with the rest of the pool cause it to not recognize the drive?
I recreated the pool and started a restore from my source/backups. So now I am mainly asking for academic purposes.
 
Top