I recently helped a friend move his existing build from FreeNAS to Unraid, so I thought to write up this step-by-step in case anyone in the future is searching for how to migrate their data from FreeNAS/TrueNAS CORE to Unraid in the same build. In other words, transfer existing data from a ZFS zpool on unassigned disk(s) to a native Unraid array all in the same single box.
Note: This is for an internal transfer of data as he wasn’t looking for a brand spanking new build. If instead, you are “upgrading” to Unraid by building an entirely new build, I would recommend a network share transfer between the old TrueNAS build and new Unraid build. Simpler and easier then below.
- Ensure you have enough hard drives in the new Unraid array to transfer the existing data in the zpool. For example, my friend had 3x8TB HDDs for the Unraid array. One will be used for parity (size = size of largest HDD) while the other two will become disk1 and disk2. This is enough space to migrate the existing data in the 4x3TB HDDs for the zpool.
- Attach the new HDDs to your build.
- Assuming you have the necessary Unraid license, install and boot Unraid with a USB. Perform the initial setup (i.e. connect to webGUI, set up root password, register Unraid key)
- Build the Unraid array by assigning the new HDDs for the array (It is recommended to not include the parity and cache drive(s) for the bulk transfer, thanks faultline!)
- You can install the ZFS for Unraid plugin. This plugin allows you to interact with the ZFS file system of the zpool
- Open the Terminal on the Unraid WebGUI and start by importing the zpool with
zpool import pool(Note: pool is just the example name of the zpool)
- Check to see if the file system is properly imported with
- Mount the zpool somewhere like
zfs set mountpoint=/mnt/disks pool/filesystem
- Once the Unraid array is ready, copy over the content from the zpool onto the Unraid array. This is where it may get complicated as you may need to segment the data to copy depending on the available space in each disk on the Unraid array. Fortunately in my friend’s case, all his data could fit onto a single 8TB drive, so I used the rsync command for this purpose:
rsync -avh /mnt/disks/pool/ /mnt/disk1/
At this point, the data should now be sitting in the new Unraid array for use. The drives in the old FreeNAS zpool can now be reused either as part of the Unraid array or any other purpose now that the data has been safely copied.
Feel free to let me know if there is any issues with the above. If anyone has any recommended changes or suggestions to improve on my method, I would love to hear them.