Migrating from Old Pool to a Completly New Pool

Hello,

  • I currently have a 2x4TB Mirror with unsuitable WD Red Drives which I want to retire.
  • I am getting 4x4TB Seagate Ironwolf Pros.
  • I want to build a RAID-Z1 Setup with those.
  • I want to migrate all the data from the Mirror Pool to the new RAID-Z1 Pool.
  • My Mirror Pool contains multiple sub Datasets which I want to be the same on the RAID-Z1 Pool.
  • All Drives can be connected to my NAS
  • I am running TrueNAS-SCALE-24.04.2.5

Side Note: I want to migrate my install first with all my app setups(I have quite a few custom apps) working and then migrate to EE.

I want to replace the Old Pool with the New Pool By transfering all the Data and all the Datasets.

What would be my best option?
For mountpoints for Apps would an inplace switch work if I rename my old poll to a different name and rename my new dataset to the name of the old pool?

This made possible transfer everything fast with ZFS replication (let’s call A your old pool, B the new one)

  • perform a backup (always a good choice)
  • shutdown down the server
  • add all the disks
  • create the new raidz1 pool B
  • added with edit stops all apps or VM
  • setup an insite push replication task, A as source, B as target. Recursive and full file system options must be selected
  • run the job just once, will be pretty fast
  • when finished, export your A pool WITHOUT nor erase configuration and wipe disks (so you still have your data in)
  • rename B pool with the previous A pools name
1 Like

This looks very promising.

I am struggling with finding most of these options in the UI.

Where do I find the backup option and the insite push replicaiton task?

You will need to stop your apps from running (and updating data) during this process.

(If you know what you are doing you can keep your apps running during the initial replication, then stop the apps and do an update replication, Then swap the pool names and reboot and start your apps again.)

2 Likes

Yep forgot this step! Agree 100%, better always stop app before, or can happen some inconsistence, same for VM. Edited previous post

@HuggieBo replication task are under data protection menu!

1 Like

Can the renaming be done in the gui or do I have to use the cli?

The option is greyed out when I press on edit dataset.

Afaik, only by cli

https://forums.truenas.com/t/howto-rename-a-zfs-pool

Hello,

I have just finished this and want to give a guide of what I did and what mistakes to avoid.

Pool a will be the old Pool
Pool b will the new Pool

  1. Power Off Device
  2. Connect all new Drives
  3. Power On
  4. Create a new Pool of the new drives.
  5. Stop all VMs, Services and Apps.
  6. Apps → Settings → Unset Pool
  7. Data Protection → ReplicationTask → Add
    7.1 Dataset A to Dataset B
    7.2 Select Recursive if you want to recreate all the datasets and its data in the new pool and nothing else.
    7.3 Select Full File System under Advanced if you want to replicate everything, like older Snapshots.
    7.4 Select Run Once
    7.5 Wait Until its finished
  8. Ensure the replecation was succesfull
  9. Export Pool A. Ensure that you do not delete the Pool
  10. Export Pool B. Ensure that you do not delete the Pool
  11. Storage → Import Pool. In the Dropdown will be the exported Pools listed, followed by some Numbers. Take note of the Numbers of Pool B.
  12. Use the shell and run the following commands
    12.1 sudo zpool list to ensure that none of the Pools you exported are listed
    12.2 sudo zpool import <Pool B Name> <Pool A Name> This will rename Pool B to Pool A
    12.3 sudo zpool export <Pool A Naem> Export the renamed Pool again, as it will not mount under truenas if its not imported under the GUI.
  13. Storage → Import Pool → Pool A Name | numbers matching from step 11
  14. Apps → Settings → Choose Pool

Viola you just inplace replaced your old Pool

2 Likes

Is there any reason to use the “full file system” option in the replication setup? Also does this actually move 100% of all data or do you need to make snapshots first? Never used replication so not entirely sure how it works under the hood and the addition of it working off of snapshots or something like that adds a layer of confusion and concern that I might lose some data doing this myself.

Is important because

Selecting Full Filesystem Replication means the task completely replicates the chosen Source, including all dataset properties, snapshots, child datasets, and clones. When using this option, we recommended allocating additional time for the replication task to run.

Same for recursive flag

If you don’t have snapshot the task will do It