pool import: force and use TXG at the same time

jfeldt

Member
Jul 19, 2015
48
9
8
53
(The following is on Solaris 11.4 on x86_64)

Hey everyone, I am hoping someone can help me with a problem I have. There was some combination of power outage and power supply failure that produced corruption across my pool, making it unusable. I tried swapping out all hardware components piece by piece and now have a new system and new Solaris 11.4 install that I am trying to import the old pool on. One of my drives is no longer responding, but the rest seem fine. My vdevs are raid-z2, so I still want to import the pool without that drive, then zfs replace and re-silver.


I see a good uberblock transaction group (TXG) candidate right after a known good scrub that I want to import at. However, it will not import without the force option (I believe since the one drive is not responding. I can't find a combination of command-line parameters to let me both use a TXG and the force option, is there a way to do so, or some other way to achieve what I want?

root@server:~# zdb -h -e otherpool
2022-05-24.11:18:50 [internal pool scrub done txg:7214505] complete=1 logs=0 metas=0
2022-05-26.18:30:54 [internal pool load txg:7243626] pool load otherpool; active ub txg=7243625 ts=1653536729 hostid=Oxcd2d6d

root@server:~# zpool import -f -T 7243625 otherpool
cannot import 'otherpool': one or more devices is currently unavailable

root@server:~# zpool import -f -F -T 7243625 otherpool
cannot import 'otherpool': one or more devices is currently unavailable

This works, but I don't want the current TXG, I want to go back in time:
root@server:~# zpool import -f -F otherpool
Pool otherpool returned to its state as of Sat Jul 30 03:04:20 2022.


Thanks!
 

gea

Well-Known Member
Dec 31, 2010
2,833
992
113
DE
I suppose you cannot select different TXG as this is an emergency switch to import a damaged pool. Prior states can then be selected by snaps.

Is this the new Solaris 11.4 CBE (newest OS state) or the old initial 11.4. If not you may update (pkg update, confirm licence)
 

jfeldt

Member
Jul 19, 2015
48
9
8
53
I suppose you cannot select different TXG as this is an emergency switch to import a damaged pool. Prior states can then be selected by snaps.

Is this the new Solaris 11.4 CBE (newest OS state) or the old initial 11.4. If not you may update (pkg update, confirm licence)
Thanks for the reply! I used the import -T method a few years ago to rescue a damaged pool, and was hoping I'd be able to use it again to help get me to a good place. This was with straight Solaris 11.4. Good idea to try 11.4 CBE, I'll upgrade and see if that changes anything.