Loading config onto new hardware, create duplicate pool structure (datasets, etc.) onto new drives

jt_again

Cadet
Joined
Mar 7, 2021
Messages
1
Hello folks -

Alternate title: What is the expected behavior when loading a config file to new (but effectively identical) hardware with empty drives?

I'm setting up a pair of identical systems (HP ProLiant DL380E G8 8-Bay 3.5" 2U Server, 6x 3TB 7.2K SAS 3.5'' 6Gbps Hard Disk Drive (mix of various enterprise brands), 2x HP 750W Platinum PSU, HP P420 512MB Raid Controller flashed to HBA mode, 32GB memory, Xeon E5-2430 v2 2.50GHz 6-Core) for a friend and I to run at our respective houses for media and data backup, with each system replicating a subset of its datasets over to the remote node for an offsite backup. To support this goal, I have a pool configuration with "local", "replicated", and "remote" primary datasets into which all of the rest of the data is stored; local is large data that I can recreate if I need to (VM images, etc.), and not backed up to the remote site. replicated is data that will be replicated to remote and intended to be restored. remote will be the (encrypted) remote data from the other system. I have quotas and space reservations configured on replicated and remote.

What I want to do is completely duplicate the setup from server A to server B, but not copy any of the data. In my mind, this is also a test for being able to come back from a complete hardware failure to the state of being able to recover from an offsite replicated snapshot. My secondary goal is to get both systems fully configured and replicating on my local network, and then intentionally wipe one of them and rebuild from scratch (preferably with minimal manual config steps) to show that I can recover from a hardware failure before we start using the systems in earnest.

This is my first foray into TrueNAS, and I've liked the process so far. I've set up the first system to about 90% operational (everything but the replication tasks), playing with config and capabilities and data organization until I liked what I've got, all the jails and applications working, etc. My intent was then to export the configuration off of that system (A), install a fresh copy of TrueNAS on system B, load the config from A onto B, reset a few passwords and jail IP addresses, and then have two systems with completely equal configuration, but no data on the second system, that can then be taken forward independently.

I didn't see anything about this on the forums, so I just went ahead and tried it - my hope was that re-loading the config would be like repeating all of the steps I had previously taken in the web gui (i.e., it would setup the pool on the fresh drives, reconfigure all my datasets, recreate the jails with the right pointers into the filesystem, etc.). However, while most of the user interface (except the jails) came back up fine, the pool shows up in the GUI as "Offline", and no further information. I guess this isn't surprising, since the typical use case of reloading a config is to use a new OS with an existing / exported pool.

I looked on the forums and google for any indication of how to copy the pool structure from one system to another, but couldn't find anything described other than replication tasks, which I was hoping to stay away from, since I don't want to duplicate the data, just the structure and organization. At the moment, I probably could use replication to copy across the pool structure along with the data (since there is only placeholder data at the moment), but I wouldn't want to do that in the future, since the alternate node will have my friend's data on it in his "local" and "replicated" folders...

I have seen that there are some CLI tools that can affect the permanent system configuration (For example, I'm using the scripts from danb35's excellent freenas-iocage-nextcloud & similar for configuring jails), but haven't looked in detail at the cli documentation (not sure where to start, actually); is that where I might need to look to do what I want? Or is my best option to just store a notes file for myself of the pool configuration (datasets & subdataset names, quotas, settings, etc.), and just rebuild them manually for the new server (and in case of full failure?)? I can't help feeling like there must be a better way than manually regenerating a storage configuration....

Thank you in advance for any input!
 
Top