Restoring Configuration after OS Drive Failure and TrueNAS upgrade

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
Newbie here - USB OS drive failed recently so I installed TrueNAS onto to mirrored SSDs (should have done this the first time.) Imported the ZFS pool which can be seen in the GUI with original data folder and jails showing the near terabyte of data in the pool. But no jails or users shares are configured, so the Apple and Samba shares are no longer accessible via the network. I never performed a backup of the configuration but understand it may be stored in the pool. The questions are: How can it be accessed to be restored? Can a configuration of an older version of FreeNAS even be imported into TrueNAS? Or do I have to reconfigure the jails and shares and if so, will I be able to access the data on the pool to reconstruct them? I am hoping there is a config file that can restore the previous configuration, but have searched high and low for how to do this to no avail. Also one of the pool disks is failing so that has to be replaced, but I would prefer to restore the configuration before rebuilding the pool, if possible. Any help or suggestions would be greatly appreciated.
 

Attachments

  • TrueNAS.png
    TrueNAS.png
    64 KB · Views: 367

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, try looking at this:
zfs list | grep .system
 

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
OK, try looking at this:
zfs list | grep .system
Hi, Thanks so much for the response. Evidently there are a couple of .system/config files... Any suggestions on how to import them to restore the configuration prior to upgrade/disk replacement?
 

Attachments

  • 20210309_105258.jpg
    20210309_105258.jpg
    306.2 KB · Views: 326

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You will need to see if that dataset is mounted (it will be under /var/db/system/)

If it's there, navigate under it to the appropriate version and take a copy of the .db file.

I have never personally done that, but I think it's as simple as then choosing to Upload the config (that .db file) from System | General.

If it's not mounted, we can talk about how we might get that to happen.
 

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
/var/db/system/

yields:

zsh: permission denied: /var/db/system/

Suggestions?

Thanks so much for your responses!
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
Thanks for all your help everyone! I decided to rebuild the shares (there were only a few). The same with the jails. File Server and Plex are the main applications in use, so in the end this seemed to be the simpler route. I will have to remember to save the configuration and a backup in an accessible location this time. It seems like there should be a way to extract a file from the pool in the GUI without having to import it form outside the server but my knowledge is limited in this regard.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It seems like there should be a way to extract a file from the pool in the GUI without having to import it form outside the server but my knowledge is limited in this regard.
There was a feature request in the system for it (although that's the old redmine system, not jira where the developers are currently looking).

What I do notice (@Kris Moore ) is that the 2 redmine issues were closed as duplicates of each other and thus neither was treated... perhaps it's time to revive one of them since this is an obviously useful feature.
 

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
Thanks for all the responses. This server business is very complex for someone who just wants to view movies via PLex and store files on a home server. I thought it would be a simple task to rebuild a couple of SMB shares since I could not access the configuration file. Which it was and I could map the shares easily and the data is visible, so good news, nothing lost so far. Unfortunately, I am having a permissions problem with the windows shares and cannot delete or add to the folders, although I do have permission to copy files from the folders. Most of the video tutorials are for previous versions of Freenas and I am having trouble finding where to edit permissions to allow access. Any help would be appreciated.
 

kbrvfx

Dabbler
Joined
Dec 6, 2020
Messages
28
Thanks for all the responses. This server business is very complex for someone who just wants to view movies via PLex and store files on a home server. I thought it would be a simple task to rebuild a couple of SMB shares since I could not access the configuration file. Which it was and I could map the shares easily and the data is visible, so good news, nothing lost so far. Unfortunately, I am having a permissions problem with the windows shares and cannot delete or add to the folders, although I do have permission to copy files from the folders. Most of the video tutorials are for previous versions of Freenas and I am having trouble finding where to edit permissions to allow access. Any help would be appreciated.

If you still have permission problems; have you configured the file ACL of the SMB?
 

Gitryst

Dabbler
Joined
Apr 4, 2017
Messages
11
Thanks for checking in. I've made progress! I was finally able to establish SSH for headless command prompt, but am not yet comfortable with the bad blocks set of commands, and am not quite clear on the "burn-in" process. I ended up with 2 unhealthy of 4 drives. I used Hard Disk Sentinel to surface test and re-initialize the unhealthy disks and ordered a fifth which is now a back up. The 2 unhealthy drives were not identified as such by Hard Disk Sentinel, but after re-initialization TrueNAS sees them as healthy. I am sorted with permissions and shares, pool is restored and Plex is working. I have no further issues at the moment. Thanks so much for the interest, I appreciate all the comments and the help that was offered.
 
Top