Moving replicated dataset to another vdev

Status
Not open for further replies.

shnurov

Explorer
Joined
Jul 22, 2015
Messages
74
I currently have 2 servers replicating to each other - one issue I had was a lack of drives so here's what I'm trying to solve.

at work
6tb dataset (3.77tb used) - video. Replicated to 8tb drive called remote2
5tb dataset (1.46tb used) - archive-one. Replicated to 8tb drive called remote2

at home
3tb dataset (1.32tb used) - home. Replicated to 5tb dataset - the same one that hosts the dataset archive-one

So far it's not an issue, but I am foreseeing one coming by the end of the year and would like to solve it while I have time.

I want to add a 3tb drive to the 'work' server and have my home dataset be replicated directly there.

I also want to add a 4tb drive (already own it) to the 'home' server and have the archive-one dataset replicate there.

One thing I want to avoid is to have to resent EVERYTHING through WAN.
A quick calculation/previous attempts gives me: 35mbps upload = +/- 200gb/day... => 7-8 days of 100% saturation on the upload is not something I'm looking forward to.

Can I 'copy' the snapshots from one vdev to another and then repoint the replication to the new drive and it'll simply sync up? I did that already to move a dataset on the same server, but it wasn't a replication 'target'.
 

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
I'm wondering what would happen if you tried the following...

  • Using rsync, to create a copy of the complete volume at home, connect a USB hard drive to your laptop for example, and do the copy over the LAN. Won't be hugely fast but quicker than over a WAN.
  • Then, take the USB drive to work, create a volume on your work server, rsync the complete contents of the copied files over to the server. If you make sure none of the files change on the source then the source at home should (in theory) be identical to the destination, then try doing a ZFS replication over the WAN ??
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
Rsync will not work for this.

You should replicate the dataset from one vdev to the other locally. Then, as you mentioned point the replication to the new target. This works, I've done it - picks up like nothing happened.
 

shnurov

Explorer
Joined
Jul 22, 2015
Messages
74
Right - so yeah - it's much easier than expected.

Doing a
Code:
zfs send -R pool_A@AUTO-SNAPSHOTS | zfs receive -F pool_B


Worked wonders - then I just re-pointed the ZFS replication to the new pool and it picked up.
ZFS is fantastic. Hopefully it will also auto-delete stale snapshots - will keep that monitored!
 

elangley

Contributor
Joined
Jun 4, 2012
Messages
109
Also, you won't just be able to add another drive to your pool. You have to add them in pairs to maintain redundancy.
 
Status
Not open for further replies.
Top