Recover data and/or config files (faulty OS SSD)

Yulaiho

Cadet
Joined
Nov 25, 2022
Messages
4
Hello, I'm new here.
I've been searching for a solution to a problem for one day now, reading countless topics on this forum and elsewhere. I might be dumb enough to not find an answer to a common problem, but the fact I don't know how Linux-based systems work, the chances of getting something by myself are pretty slim. Sorry in advance.

1. One year ago I set up the small NAS to store some personal data and work data that I usually work on on my Windows PC.
2. I installed TrueNAS (I believe version 12) and everything ran smoothly for one year. I haven’t unfortunately backed up any keys or exported any pools or anything. I unfortunately don't know the name of the pool, though in such cases I tend to leave the names and the settings as default (don't need anything specific nor complicated).
3. A couple of days ago the SSD where TrueNAS is installed became faulty. It’s a S.M.A.R.T. error which is recognized in the POST process when I turn up the machine.
4. Currently, when I turn it on, it gives that error, I enter the BIOS, I exit, and it still loads the main menu of TrueNAS
4b. I've disabled the SMART check from the BIOS, and it of course still loads the TrueNAS main menu.
5. If I try to boot it normally (or in safe mode), it gives me an error:

error 1 lba 33555512
failed to clear pad2 area of primary vdev
/
FreeBSD/x86 boot
Default: boot-pool/ROOT/default:/boot-zfsloader
boot:
and then

Solaris: NOTICE: Cannot find the pool label for 'boot-pool'
Mounting from zfs:boot-pool/ROOT/default failed with error 5.

Loader variables:
vfs.root.mountfrom=zfs:boot-pool/ROOT/default

It is very likely that I can't find a proper answer because I don't know the language used. If so, I'm sorry if I couldn't find an answer myself and "needed" to open this thread.

Bonus point: Yesterday I took away that faulty SSD, replaced it with a new one. Installed TrueNAS 13 via USB successfully. When I try to create the pool, of course it doesn’t let me import anything because I had not exported anything before. I’m afraid that if I create a new pool, it will need to format the storage drives.

Questions:
1. Is there a way to export the pools from this situation (maybe from console?), so that I can go on with the new SSD with its fresh installation, and import the pool from there?
2. Is there a way to connect the faulty SSD somewhere to manually extract the config files needed to recover that pool?

Any help is much appreciated. Thank you so much.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I’m afraid that if I create a new pool, it will need to format the storage drives.
You're correct. Do not create a new pool.
When I try to create the pool, of course it doesn’t let me import anything because I had not exported anything before.
This doesn't sound right, though. What happens if you run zpool import at the shell? What about zpool status?
 

Yulaiho

Cadet
Joined
Nov 25, 2022
Messages
4
I will not do anything with the new SSD for now, got it.

How do I access the shell? Sorry. I can access a shell from the bootable USB, by choosing [1] Install and then [2] Shell.
In that case, with "import" I get:

pool: mypool
id: [numbers]
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and the '-f' flag.
see config: mypool ONLINE mirror-0 ONL...e and working, but not imported? Could it be?
 

Yulaiho

Cadet
Joined
Nov 25, 2022
Messages
4
I don't know why it cropped the message like this.
I meant:

config: mypool ONLINE
mirror-0 ONLINE
gptid/-numbers here- ONLINE
gptid/-slightly different numbers here- ONLINE

So, it appears the pool is there AND online too! I should "just" import it, right? How can I do that? Sorry, I don't want to mess this one up. Thanks
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I should "just" import it, right?
Correct. You should be able to do that through the GUI. Go to Storage -> Pools -> Add and select Import an existing pool, then click Next. You should be able to select your pool and import it that way.
 

Yulaiho

Cadet
Joined
Nov 25, 2022
Messages
4
The only problem is that it doesn't actually work. I can only access the shell through the installation process via USB bootable drive.
I've tried the
zpool import -f
line and it seemed to work. I rebooted and it gave the same error:
Solaris: NOTICE: Cannot find the pool label for 'boot-pool'
Mounting from zfs:boot-pool/ROOT/default failed with error 5.
Now, anyway, it's resilvering. I'll let it finish and try to start it up again (I guess?). Still 4 hours to go.


Question: if I "export" the pool via shell (I believe I can do it with the command "zpool export"), can I turn the machine off, switch the faulty SSD with the new one (where TrueNAS has been successfully installed and works), and import from there? Or: where does the export take place? Not in the same SSD where the OS is?
Because if that's possible, it might be (too) easy.

Last resort, just in case I can't fix it: can I connect the drives to anything else to manually backup some data?
Thank you for the patience.
 
Top