ZFS Replication for Full data duplication backup

djb

Explorer
Joined
Nov 15, 2019
Messages
76
Hello everyone,

i have play a little with ZFS replication, and i’m a little skeptic about the benefits.
Of course we can see the benefits of a snapshot, when we can revert back to a point of time. Having said that, doing ZFS replication on another server, seems useless because we can replicate in same host / different pool, or even same host / same pool / different dataset !

What i was really looking forward is to have really duplicated data on a physically different server. So i have setup a ZFS Replication to another server following tutorials and manual. While everything is ok, i created a share on the second server where the ZFS replication send to. I can say the data was there, but some files are not opening correctly with error of corruption, can’t find file etc…

To my understanding ZFS Replication is a way to revert back to a state through the snapshots, but data is not readily available to the second server. My target is to full data duplicate 100%. Do i miss something ? Is there any other method to achieve this through ZFS replication ?

Thank you.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
That's what it should have given you. Mine does, with no effort other than creating the destination pool/datasets and the recursive replication to copy off primary server pool to the secondary. The secondary server's datasets are ReadOnly otherwise the replication will be invalidated and have to be done from scratch.

I consider the second server to be a cold standby. If the first one explodes I would have to manually flip ReadWrite and enable the SMB shares for it to replace the original. I'm actually more likely to use it as a source to replicate the datasets back to a rebuilt primary server.

I've not seen anything like the corruption/can't find file errors. You don't get those on the same files on the primary? Is the secondary's pool healthy?
 

djb

Explorer
Joined
Nov 15, 2019
Messages
76
@JaimieV thanks for your commends.
The secondary pool is healthy. corruption is mostly on word, excel files. I double check everything. permissions are full open.
The same files are OK on the first pool !!

My target is also to have a cold standby as you describe it, i didn't manage to make a working configuration for that up to today, even i check the manual, help and also video tutorials, following everything carefully even with fresh install truenas core 12.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Very strange, I've only ever seen such data errors in a pool (yeah, one of mine....) with way too many failures going on at the same time that I then pulled the wrong disk out of. The way ZFS works, you simply should not be able to get data errors on a healthy pool.

What I would suggest is to blank the backup server's pool (it's clearly no good so no need to keep it), check smartctl results and run burnin tests on the disks in that server (there are some suggested methods in the Storage forum stickes) and run a fresh complete replication, see if that heals the issue.
 

djb

Explorer
Joined
Nov 15, 2019
Messages
76
@JaimieV yes, a fresh complete replication heals the issue.
Seems that is not clear from the interface (or i did something wrong) whether you can replicate on a storage pool or dataset that is already in use. I have notice that a new dataset is most of the times fixing the problem. Who knows :P Thanks a lot my friend.
 
Top