Migrate data to a new FreeNAS box

Status
Not open for further replies.

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
After a bunch of advice and help from this forum I have discovered the issues with my 3.5-year-old FreeNAS box which is using consumer grade hardware, non-ecc memory, and consumer grade drives. (Turns out the non-ecc memory was causing checksum errors with bad writes to the drives and the drives themselves are reaching EOL)

Thankfully I have seen the light and have built a new Supermicro box, 64gb ECC memory, 2x 8-core xenon processors and 24-hot-swap-bays. I have spent the last two weeks doing burn-in and testing on the ram and processors etc. Everything is checking out great, I am getting 110mb/s transfer speed with a single drive in a test setup.

Later this week 6x 4tb WD Red Pro drives will be showing up to be setup in a new RAIDz2 (which I plan on testing as well) The goal is to migrate the data from the existing FreeNAS box to the new one. As far as I can tell I can either,

1) Setup the new server and rsync between both boxes
2) Setup the new server with the new RAIDz2 (6x4tb) and physically move the old RAIDz2(8x2tb) vdev to the new server, then rsync between them

Does anyone have a suggestion or guide I could follow for using rsync to migrate my data? I also have a plex jail that would be nice, but isn't critical to migrate.

It should be noted that I am discontinuing the use of my old server until I am ready to transfer the data as check sum errors and scrubs seem to be way to frequent.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Snapshot and Replication, just like PG mentioned. I think I have a post around here somewhere that goes through the steps.
 

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
Snapshot and Replication, just like PG mentioned. I think I have a post around here somewhere that goes through the steps.
How much time will making a snapshot take approximately (8tb)? I'm trying not to stress the drives any more than they have to be at this point.

Also, will the exact Vdev structure be copied exactly? Mine looks something like
OldVdev
- OldVdev
- - Media Share
- - Backup PC A
- - Backup PC B
- - Backup PC C
- - Jails
- - - Plex

I assume I would create my Vdev on the new drives and it would create something like
NewVdev
- NewVdev

Then the replication would move just the datasets from the old Vdev to the new one like
NewVdev
- NewVdev
- - Media Share
- - Backup PC A
- - Backup PC B
- - Backup PC C
- - Jails
- - - Plex

I plan on testing this out if possible, an additional links or articles to read beyond the documentation would be great.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Couple things. Snapshots take less than a second. It's the replication that will take some time. For 8TB, I'd guesstimate 6-ish hours (for a local copy, meaning not over the network).
Second, vdevs are not the things with names.

PoolName (which is made up of 1 or more vdevs)
- DatasetName (same as PoolName)
- - MediaDataset
- - ADataset
- - BDataset


I say that because what you you trying to do, while very simple and straightforward, has the ability to do some catastrophic damage if you aren't careful in your naming conventions and understanding of what's going on.

I wrote up exactly what you are trying to do within the past couple months, something like (moving to a new dataset or pool, or migrating to new drives). The nice part is that there is a way to rename the new pool/dataset to the same as the old if you so desire.
 

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
Couple things. Snapshots take less than a second. It's the replication that will take some time. For 8TB, I'd guesstimate 6-ish hours (for a local copy, meaning not over the network).
Second, vdevs are not the things with names.

PoolName (which is made up of 1 or more vdevs)
- DatasetName (same as PoolName)
- - MediaDataset
- - ADataset
- - BDataset


I say that because what you you trying to do, while very simple and straightforward, has the ability to do some catastrophic damage if you aren't careful in your naming conventions and understanding of what's going on.

I wrote up exactly what you are trying to do within the past couple months, something like (moving to a new dataset or pool, or migrating to new drives). The nice part is that there is a way to rename the new pool/dataset to the same as the old if you so desire.
Thanks for the clarification. I think this might be the thread you are referring to? https://forums.freenas.org/index.php?threads/best-method-for-upgrading-pool.38962/

To clarify, I have a single pool made up of a single vdev RAIDz2 (8x 2tb) and I am moving to a new system with a new pool with a new RAIDz2 (6x4tb) vdev that I plan on expanding in the future with additional 6xdrive vdevs.

From what you are saying though I should end up with something like this...
Old Pool
- Old Pool Dataset
- - Media Dataset
- - Dataset A
- - Dataset B...

and then ZFS copy "Old Pool Dataset" to the "NewPool" on the new server and end up with

New Pool
- Old Pool Dataset
- - Media Dataset
- - Dataset A
- - Dataset B...
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
That's it!! (post 8)

yes, except that the new tree will be:

New Pool
- New Pool Dataset

You can't make these different names from each other. That why I export from the GUI, import via CLI (using the option to change the name), export via CLI, and then import via GUI.
 

Fei

Explorer
Joined
Jan 13, 2014
Messages
80
Hi pcmofo

You can try to use zfs send&recv on CLI.

1. zfs snapshot -r <old pool>@<snapshot name>
2.zfs send -R <old pool>@<snapshot name> | ssh root@<remote host> zfs recv -Fv <New Pool>
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
2.zfs send -R <old pool>@<snapshot name> | ssh root@<remote host> zfs recv -Fv <New Pool>
If it's on the same box, like I believe the OP it attempting, you can skip the ssh part to speed things up a bit (major difference if you have an old CPU):

2.zfs send -R <old pool>@<snapshot name> | zfs recv -Fv <New Pool>
 

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
If it's on the same box, like I believe the OP it attempting, you can skip the ssh part to speed things up a bit (major difference if you have an old CPU):

2.zfs send -R <old pool>@<snapshot name> | zfs recv -Fv <New Pool>
I have the option to remove the old drives and install them in the new system or leave them in the old system. Either way I need the data from the existing old pool and data set to move to a new pool and dataset. The names or structures don't need to be preserved.
 

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
That's what I would do if I had enough drive ports, which apparently you do.
I do, and I plan on loading the drives as a backup pool anyway once I finish the transfer so... I think I will give that a go as soon as I get my new pool tested.

Thanks for the suggestion!
 
Last edited:

pcmofo

Explorer
Joined
Mar 2, 2012
Messages
98
I was able to import my old pool into the new server successfully and then create a snaapshot and use ZFS send to copy the data to the new pool.

zfs send -Rv OldPool/dataset@snaptshot | zfs receive -Fv newPool/newdatasetname

That did the trick for me. I did each sub-dataset individually and I got transfer speeds as high as 400MB/s between pools.

I somehow messed up my Plex jail so that has to be started from scratch :-(

I also had a number of permissions to fix as the old and new user names are identical, I basically ended up incrementing my user number to resolve it.

All in all it went smoothly and was only slightly nerve racking hoping the old pool wouldn't die during transfer.

Thanks again everyone for their help and suggestions!
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
Piggybacking/hijacking this thread. I am looking to transfer data from my existing v0.7.x FreeNAS to my new build... once the build is finished.

I do not want my entire pool, only some of the data. So I assume I will want to create a pool on my new FreeNAS with appropriate datasets. Then I can copy the data to my new dataset.

What is the best utility to use for this copy? Should I use RSYNC to just copy the files? Is there a better approach?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I do not want my entire pool, only some of the data.
If you want to transfer entire datasets, using zfs send and zfs receive to transfer snapshots would probably be the best way. If you what you want is only parts of datasets, rsync might be better.
 
Status
Not open for further replies.
Top