Comments (8)
You're almost certainly taking snapshots on the target side, and ending up with target snapshots taken locally which have the same names as source snapshots. This will especially happen if you run Sanoid with "production" templates on the target side as well as the source side.
If you run Sanoid on the target, you need to use the "backup" template (or just make sure autosnap is set to false) - new snapshots are supposed to replicate in from source, not be taken locally.
from sanoid.
Thanks for the quick response! Here is the setup I have
host1:
- pool/dataset1 - mounted dataset for data on
host1
- pool/dataset2 - unmounted dataset for data from
host2
synced here for HA
host2:
- pool/dataset1 - unmounted dataset for data from
host1
synced here for HA - pool/dataset2 - mounted dataset for data on
host2
I have sanoid configured as follows on host1:
[pool/dataset1]
use_template = template_local
recursive = yes
[pool/dataset2]
use_template = template_remote
recursive = yes
#############################
# templates below this line #
#############################
[template_local]
hourly = 48
daily = 10
monthly = 2
yearly = 0
autosnap = yes
autoprune = yes
[template_remote]
hourly = 48
daily = 10
monthly = 2
yearly = 0
autosnap = no
autoprune = yes
and on host2:
[pool/dataset2]
use_template = template_local
recursive = yes
[pool/dataset1]
use_template = template_remote
recursive = yes
#############################
# templates below this line #
#############################
[template_local]
hourly = 48
daily = 10
monthly = 2
yearly = 0
autosnap = yes
autoprune = yes
[template_remote]
hourly = 48
daily = 10
monthly = 2
yearly = 0
autosnap = no
autoprune = yes
Do I have something wrong with the logic in the sanoid config files? Sanoid on host1
should only be making snapshots in pool/dataset1
and sanoid on host2
should only be making snapshots in pool/dataset2
.
from sanoid.
Something has taken a snapshot with the same name but different content on host2 than on host1, be it Sanoid - with or without an earlier configuration that doesn't match the one shown here - or something else.
The error message you've given here - "most recent snapshot does not match incremental source" - can't be thrown any other way, that I'm aware of. Keep in mind also that Syncoid uses the -F argument for its zfs receive
component in recent versions, which positively keeps changes in the current filesystem on the target from killing replication, whether it's mounted or not - ZFS itself forcibly rolls back any data that's changed since the most recent snapshot if necessary.
from sanoid.
Do you have any snapshots on host2 that are not created by Sanoid or Syncoid?
You've sanitized your hostnames here - do you have multiple hosts with the same actual hostname? (Keep in mind that Syncoid creates its own sync snapshots using the hostname, meaning that if you have multiple machines with the same hostname, you can create some collisions between syncoid snapshots.)
from sanoid.
I am only creating snapshots with sanoid and checked zfs list -t snapshot
and all of the snapshots on both hosts are created with sanoid. I just checked and I am running version 1.4.6c (the latest release/tag), but it looks like in 1.4.7 you added -F
on line 244, when the target already exists (my case). Could this be the problem? Is 1.4.7 stable/released?
from sanoid.
Honestly the -F shouldn't matter, because syncoid itself already forcibly rolls back the target prior to replication. That said, ANYTHING in Master on GitHub in my repo is something I consider "production ready" - if it's still in testing, I don't push to master, I either keep it local or fork a dev branch off. And yes, I'd give 1.4.7 a shot.
from sanoid.
Testing with 1.4.7 is working so far. I will keep testing for another day or two before considering this fixed. Can you tag 1.4.7 so I can download it directly rather than pulling from master?
from sanoid.
Running with 1.4.7 has been working for several days, I think this is the solution. Thanks for the help!
from sanoid.
Related Issues (20)
- Randomly failing syncoid pulls with `CRITICAL ERROR ... failed: 256 at /usr/sbin/syncoid line 889.` HOT 8
- same_as Setting in sanoid.conf HOT 2
- Sanoid Sync question HOT 2
- Perl 5.26 Dependency introduced HOT 1
- Perl Dependency resolution on Alma/Rocky/Cent 9 requires documentation change HOT 4
- CRITICAL ERROR: failed: 512 at /usr/sbin/syncoid line 889 HOT 5
- Sincoid two inital backups in parallel, same source, , second fails, finishes in second HOT 1
- Syncoid remote-to-remote decompresses and recompresses on the middle box
- How to tell sanoid not to take snapshot while syncoid is running? HOT 3
- syncoid backups out of sync HOT 2
- [question] Is syncoid inital offline sync possible? HOT 1
- Recursive setting cannot be enabled if trailing space present HOT 1
- syncoid: ControlSocket already exists HOT 2
- ubuntu 24.04 fail to start sanoid service HOT 1
- My sanoid.conf is not being recognized. HOT 1
- sanoid --prune-snapshots performance is bad because of iszfsbusy HOT 5
- [feature request / question] Auto-mount last snapshot done by sanoid HOT 6
- Regression: "invalid flags combined with -t" when resuming with `syncoid --sendoptions`
- Building deb package fails on ubuntu 24.04 HOT 4
- Syncoid question: Hook script or other way of adding data to a log on the remote target system?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sanoid.