USB Drive read-only; Having trouble recovering configuration data

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
I've searched quite a bit for a solution for my issue, but I haven't found any that are a close enough match for me to be able to apply the solutions, so here I am asking what's likely going to be obvious for others. My apologies, but I could really use the help.

My system halted and failed to restart NYE. Upon further investigation, my 32GB SanDisk USB marked itself read only (a common issue with these apparently). I have installed the latest FreeNAS on a new USB drive (also 32GB) but I've been having a lot of trouble figuring out how to import my configuration from the old read-only drive. I do no have another backup of my config (that I can locate)... shame on me, but that's where I'm at.

In the new FreeNAS environment, everything I tried to follow for mounting the drive failed. I tried importing the drive and the mount failed (exit code 1) with the message: /dev/da1p2: Invalid argument. I tried this using a FreeBSD live cd image (mounting to a /tmp dir) and got failures that were not all that different.

I'm going to assume the errors are coming from whatever is causing the USB failure, but it's just as likely that I'm not doing it right.

Any suggestions for recovering my previous configuration? Any secondary suggestions for getting the most out of importing/recovering my data? I don't have a ton of users, but I've always had a little bit of trouble with Plex and user permissions that I recently got working decent enough before the crash... so that's my primary motivation for config recovery.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
So if I'm following correctly, I need to import my zfs pool to this new install to attempt to find it. I don't recall changing the defaults of anything like that, but I did originally do the install 18 months ago on an earlier version of FreeNAS.
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
I imported both of my pools; back in the day I thought I was being all organized and called my volume "Data", and there is a folder by that name on that pool that has my files on it, but does not resemble what would have been created by default (possibly due to my using the same name, or the version of FreeNAS I originally installed, or something weird I did because some walkthrough told me to). So... I'm guessing I'll be in the bucket of people that can't be helped by those particular instructions.

So, I'm back to seeing if there is a way to recover the Freenas-v1.db file from the original USB :/
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
No, you want to look at the first picture in that post - you need to go to /var/db/system and look for the configs - study the second picture.

You won't see it in the gui - you can ,look for it in shell but SSH would be best.

Here's mine from shell:
1578071869947.png
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
I should have mentioned that I'd already done that, and my two "configs-xxx" directories are empty (so I assume that data was not being stored on my pools).

Screen Shot 2020-01-03 at 11.30.31 AM.png
 

blueether

Patron
Joined
Aug 6, 2018
Messages
259
You said you importhed both pools?

You may have to move the system dataset in the GUI to the other pool and then look again?
1578083634616.png
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
I had a pool for my files, and another for Jails (a single SSD). I was able to import both of them, but didn't find anything on either. I'll look at the commands you've shared above and see if I can apply them to my environment here shortly.
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
Not really sure what your post/image was directing me to do, but here was the output of the same commands.

Screen Shot 2020-01-03 at 8.52.01 PM.png
 

blueether

Patron
Joined
Aug 6, 2018
Messages
259
Wasn't really telling to run the command, just pointing out where the system dataset ends up when it's mounted into a [user] pool.

Did you have 2 pools? have you tried to shift the system dataset into that pool and then checking like in the post that @Redcoat pointed out.
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
Unless I'm misunderstanding, I read the post indicated above (and those that came before/after it) and the place where I was left behind is in looking into those directories; mine were empty where the example Chris Moore posted had old configs in it. Now, if I'm supposed to take an action on the current (new) installation to 'sift the system dataset into that pool' (meaning one of my pools from before), I suppose I don't know how to do that exactly.

Is the idea there being that telling the system to store the system data into that pool will surface some dormant information that is already there, but not visible?
 

blueether

Patron
Joined
Aug 6, 2018
Messages
259
Is the idea there being that telling the system to store the system data into that pool will surface some dormant information that is already there, but not visible?
That is the idea, there is probably a way to do it without redoing the system dataset but i'vve not used unix in anger in over 10 years.

in the GUI go to system/dataset and set as the other pool that you have and then list the <new> dirs as above and see if there are some saved config db
 

Version3

Dabbler
Joined
Jan 3, 2020
Messages
10
well, the idea did 'work' in that in started populating backups in one of those folders in /var (as in the post above), but it only has a backup with today's date on it. I'm guessing it wasn't storing this data where I'd like previously, so there is nothing to pull over and surface.

I appreciate the help... I'll just have to manually set up users and install Plex again and let it run as it does. I'm just glad I didn't lose all of my data.
 
Top