Pool migration

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I hate to beat a dead horse but I'm being cautious as it's better to play it safe than live with regret.
Anyhow, I'm about to migrate from a 2x6x4TB pool to a 6x12TB pool and I've read the following threads...

My old pool is Data, the new pool is New-Data
The problem I ran into is when I run "zfs send -R Data@migrate | zfs receive New-Data" I get the following...

cannot receive new filesystem stream: destination 'New-Data' exists
must specify -F to overwrite it
warning: cannot send 'Data@manual-2022-05-27_17-43': signal received
warning: cannot send 'Data@migrate': Broken pipe

There is no data on New-Data, I just want to be sure -F isn't going to destroy anything.

Also, in one thread dalnew piped "pv -pets 36600000000000" to show the current status of the migration. I know using dd I add status=progress, is piping through pv the correct way to show the status?
 
Joined
Oct 22, 2019
Messages
3,641
The problem is, you can't "replace" the top-level root dataset of the destination pool.

How many datasets live directly under the top-level dataset Data?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
15 datasets.
ok, so suggestions then on how to copy it over or should I just rsync it?
 
Joined
Oct 22, 2019
Messages
3,641
Without having to resort to anything fancy, you can send/recv each top-level dataset one at a time, which will nest them directly under your destination's top-level root dataset (same hierarchy.)
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
^

Can also be achieved in the GUI.
Roughly -
* Select a snapshot.
- I made a new "manual" from the Storage->Pool-> [three dots] on the dataset -> (Create new snapshot) "manual"

* Create Replication Task.
- To use the last one created:

1653804383048.png


You'll have to specify the target dataset name, as it otherwise will error out. Like so:
Here is what it should look like when you're done and exited the menu:

1653804562088.png


Be weary of the option "set dataset as read only" option (default I think) on the target dataset.

Hope this helps,

Cheers, Dice

edit:
Thought I'd emphasize what's been mentioned already - that you can move all datasets from the old pool at once, but - they will not end up at root level of the new one directly.
 
Last edited:

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Thanks!
I thought about doing it that way too though I didn't see a recommendation for that option in any of the searches that came up.
I did do the snapshot replication and just said screw it and did the -F because after all there's nothing on the new drives and if it messed them up I wouldn't care, I'd just blow them away and start again and it seemed to work.
I then exported the pools, disconnected the old drives and zpool import New-Data Data, exported again and Imported from the gui, restarted the system for good measure and everything seems to be working.
The SAS drives do seem faster in comparison to the 12 SATA drives I was running.
I set the old drives aside just in case for a while. They're still good thus far but they are at their 5 year limit and I can't use SMART on them because they glitch and the server kicks them out. One time had two drives kicked out before I could finish resilvering everything.
Made me a bit nervous.

For reference here are the threads I used...
 
Joined
Oct 22, 2019
Messages
3,641
I did do the snapshot replication and just said screw it and did the -F because after all there's nothing on the new drives and if it messed them up I wouldn't care, I'd just blow them away and start again and it seemed to work.
Last time I tried that, it wouldn't even work with -F. Maybe because I was using native encryption for the destination's top-level root dataset? Hence I could only nest directly underneath.

Did you enable native encryption for Data-New upon pool creation?
 
Last edited:

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Ahh, that might be why I could do it. I was going from a encrypted pool to a unencrypted pool.
I decided to drop the encryption.
 
Top