Migrate to a new FreeNAS box

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Hello community, I need to migrate to a new FreeNAS box. I know there are already questions with several procedures as response, but each procedure is for a specific configuration (e.g. people who can move drive from old box to the new one).

My configuration is the follow:
OLD NAS: 3x2Tb - RAIDZ1
NEW NAS: 4x4Tb - RAIDZ2

Both boxes are connected to the same network, so I can just copy/past the file between the SMB shares, but I woul like to keep the file attributes (like creation date), plus I have 2,5 Tb in use and this will take very long time.

Please, I'm a newbie, is there any simple procedure I can apply to move all data from old nas to the new one?

Thank you
Lucas
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
ok... Tried with ZFS Replication but I got this error:
please move system dataset of remote side to another pool

So, most probably I'll end up with use the rsync command between the servers:
Code:
rsync -arvPhz --progress /mnt/tank/share/ root@192.168.5.147:/mnt/tank/share


Any other advice is appreciated!
Lucas
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you can connect all the disks (both pools) to the same computer, you can do a much faster transfer between the pools instead of needing to go across the network.

I would suggest using zfs send and zfs receive and you can do a forum search to find many examples of how to use that. The short of it is, you take a snapshot of the pool to copy, and use the zfs send command to send that snapshot to the new pool where it is written with the zfs receive command. Since it is all internal to the same system (if you can do that) it runs very fast.

These are the commands I used the last time I did this in my system:

To take the snapshot:
zfs snapshot -r Emily@manual-8Feb2019

To send the snapshot to the other pool:
zfs send -R Emily@manual-8Feb2019 | zfs receive -F Backup
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Thank you, unfortunately I cannot move the old pool to the new box. Btw, I tried in a test environment the zfs send between local pools and it works perfect. I also tried to send to another server using:
zfs send -R tank@manual-21Giu2019 | ssh 192.168.5.147 zfs receive -F tank
but I got "cannot unmount '/var/db/system': Device busy"

I'm not in hurry, and I have "only" 2,5 Tb to move. I believe I can use rsync for it. Btw, I'll continue to test the zfs send, just in case I need it in future. Any advice here ?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The fundamental problem is that a .system dataset exists on the receiving pool, which ZFS replication won't overwrite. Set it to be on the boot pool on the receiving machine and you should be fine.
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Thank you very much, it works perfect. I'm restoring snapshot between two FreeNAS testing machines. Now, what I have to do, is comparing speed between scp, rsync and snapshot restore, obviously across the network. Let's see about 10 Gb transfer/restore...
 
Top