ZFS Replication

Associate
Joined
4 Jan 2010
Posts
208
Location
Oswaldtwistle, Lancashire
Happy Thursday all.

I would like to request advice with regards to moving data between ZFS pools on different machines.

I currently have a 2-bay server with a ZFS Mirror looking after my data. I have acquired a second server with 4 bays, and an additional 2 hard disks of the same size of those in the 2-bay. It is my plan to use all 4 drives in the new server (2 mirrors in the same pool), but my problem is that I don't have an intermediate way of moving the data from one machine to the other.

What would be the most practical means of moving all data from box 1 to box 2, then incorporating the original 2 disks into the new pool in box 2?

Thanks, and peace out.
 
The easiest option is to just add the new mirror to the existing pool (after having moved it to box 2) without restriping your existing data; if current performance from a single mirror is adequate for your expected use then that's not a problem, and new data will be striped across mirrors (in proportion to the free space available on each mirror, IIRC). I've done this before and had no issues.

If for some reason you need the extra performance of striping across both mirrors, then I'd factor in that fifth disk (e.g. in an external USB enclosure) that you use for backing up your pool (you do have one, don't you?).

My plan would be: make a fresh backup onto this external backup pool, then make a new pool consisting of a raid0 stripe with your two new disks, restore from your backup to this new pool. Test that the data on your new pool matches your old pool, and you'll know that your new pool is OK as well as proving that your backup works. Only once happy with your new pool, destroy your old one and zpool attach the old drives to the new ones to turn your new pool a stripe of two mirrors (c.f. raid1+0).
 
It was my intention to stripe across both mirrors for maximum benefit, if possible to do so.

I do keep both a local and a remote backup of the critical data, which is only a few hundred Gigabytes. The rest can be re-acquired in the event of a doomsday scenario.

Based on your suggestion, I have created a fresh local and remote copy of all critical data. If I were to remove 1 of the disks from the existing pool, could I then add it as a single disk 'mirror' then replicate the rest of the data? Once completed, I could add in the second disk from the old pool and complete the 2+2 mirror?
 
I like to test the integrity of my backup data and that my restore procedure works; a disk upgrade is just one of those points where it's less inconvenient than usual to test, which is why my plan goes down that route.

Your proposed plan would work too; my preference is to leave existing stuff intact until the last possible moment to minimise the impact of any trouble caused by or coincident with the change.
 
Back
Top Bottom