We recently embarked on a lab project to migrate from 8x 4TB HDDs to 4x 16TB HDDs. Based on our experience and questions we encountered on Reddit, we decided to share a write-up on the process.
Our NAS has 8 physical bays with no extra space to add the new drives. To work around this limitation, we purchased a 4-Bay Hard Drive Enclosure (DAS – Direct Attached Storage) with USB-C & 10 Gbps Speed.
Using this DAS, we were able to:
Important: Two datasets cannot share the same name. If a dataset named data
already exists, name the new one data_2
(or something else temporarily).
When configuring Replication Task/ZFS snapshot replication, pay close attention to the "Destination Dataset Read-only Policy" setting to avoid issues later. Here’s a breakdown of the available options:
readonly=on
after replication completes.readonly=on
.In our case, we overlooked this setting, and after transferring the data, we realized the dataset was stuck in read-only mode.To fix this, we had to:
shzfs list
data
with datasets backups
and binaries
:shzfs set readonly=off data
zfs set readonly=off data/backups
zfs set readonly=off data/binaries
Additionally, before renaming or switching pools, disable all externally available services like:
data_2
to data
via the shell:shzpool import data_2 data
shzpool export data
This method allowed us to seamlessly migrate data from the old drives to the new ones using TrueNAS replication. By ensuring proper replication settings and handling dataset renaming correctly, we avoided downtime and maintained all shares and configurations.
Let us know if you have any questions or need any assistance with your Company's IT infrastructure or Business Processes, thanks!