Giter VIP home page Giter VIP logo

Comments (8)

jimsalterjrs avatar jimsalterjrs commented on May 17, 2024

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.

asmartin avatar asmartin commented on May 17, 2024

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.

jimsalterjrs avatar jimsalterjrs commented on May 17, 2024

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.

jimsalterjrs avatar jimsalterjrs commented on May 17, 2024

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.

asmartin avatar asmartin commented on May 17, 2024

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.

jimsalterjrs avatar jimsalterjrs commented on May 17, 2024

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.

asmartin avatar asmartin commented on May 17, 2024

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.

asmartin avatar asmartin commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.