I have a TrueNAS pool being used for the apps I want to create a new pool with new hard drives but I don't want to change any app configs how do I clone it and if possible I want to change it from mirror to RAID-Z1.
1 Answers
The app configs are typically stored in the ix-apps dataset of the pool used by the Apps. It is seen as mounted on the /mnt directory of the TrueNAS system as /mnt/.ix-apps, i.e., ZFS pool attribute ALTROOT is set to /mnt for the pool.
The following steps worked for me on TrueNAS 25.04.0. It may work for you if you are using this version.
- Unset the current pool for Apps, if the Apps Service is already running (let's refer to it as
pool1). Take care to stop any running app(s) and ensure they are in stopped state before the pool is unset. (This will unmount theix-appsdataset on pool1) - Create a pool with the disk/VDEV configuration that you want to make as the new pool for Apps (let's refer to it as
pool2) - Set it as the pool for Apps. (This will create the
ix-appsdataset onpool2and mount it on/mnt/.ix-apps) - Then unset
pool2as the pool for Apps. (This will unmount thepool2/ix-appsdataset) - Replicate the
pool1/ix-appsdataset to thepool2/ix-appsdataset. (In the replication wizard: On Page 1 - Both Source and Destination location are set to be on this system. Source dataset is set topool1/ix-apps. Destination dataset is set topool2/ix-apps. Do not check the/mntcheckbox on Source dataset. Check "Recursive" option for the snapshots on Source dataset. On Page 2 - Select "Run Once". Uncheck "Make Destination Dataset Read-Only". Set "Destination Snapshot Lifetime" : Same as source.) - Run the replication job.
- Set
pool2as the pool for Apps again. (You may see the Apps Service is running and also the individual app(s) now. Run the app(s) and verify the app(s) are running) - Export
pool1. (Uncheck both options "Destroy data on the pool" and "Delete any saved TrueNAS configurations on the pool" before starting the export. Confirm the option Export/Disconnect)
Note: If you happen to get an error in the replication job in step 6 - like: ReplicationError("Target dataset 'pool2/ix-apps/truenas_catalog' does not have matching snapshots but has data and replication from scratch is not allowed. Refusing to overwrite existing data.") then go into the Linux CLI on the TrueNAS console and run the following commands:
zfs destroy pool2/ix-apps/truenas_catalogzfs create -o aclmode=discard -o acltype=posix -o casesensitivity=sensitive -o atime=off -o canmount=noauto -o dedup=off -o exec=on -o normalization=none -o overlay=on -o setuid=on -o snapdir=hidden -o xattr=sa pool2/ix-apps/truenas_catalog
Then re-run the replication job and go to the next step.
These are unsupported/undocumented steps and may not work for all apps. For some apps if there are any additional application settings/user data that are not stored in the ix-apps dataset, investigation will be required to find out on which zfs dataset the additional settings/data related to the app(s) is stored on the Apps pool. That dataset will then have to be replicated or recreated as appropriate.
- 93
- 9