docs: draw attention to risks of not_replicated (#810)

Co-authored-by: Christian Schwarz <me@cschwarz.com>
This commit is contained in:
wxiaoguang 2024-09-06 05:56:59 +08:00 committed by GitHub
parent 5615f4929a
commit affe00aefe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,7 @@ Example Configuration:
regex: "^manual_.*" regex: "^manual_.*"
.. DANGER:: .. DANGER::
You might have **existing snapshots** of filesystems affected by pruning which you want to keep, i.e. not be destroyed by zrepl. You might have **existing snapshots** of filesystems affected by pruning which you want to keep, i.e. not be destroyed by zrepl.
Make sure to actually add the necessary ``regex`` keep rules on both sides, like with ``manual`` in the example above. Make sure to actually add the necessary ``regex`` keep rules on both sides, like with ``manual`` in the example above.
@ -71,6 +72,14 @@ It only makes sense to specify this rule for the ``keep_sender``.
The reason is that, by definition, all snapshots on the receiver have already been replicated to there from the sender. The reason is that, by definition, all snapshots on the receiver have already been replicated to there from the sender.
To determine whether a sender-side snapshot has already been replicated, zrepl uses the :ref:`replication cursor bookmark <replication-cursor-and-last-received-hold>` which corresponds to the most recent successfully replicated snapshot. To determine whether a sender-side snapshot has already been replicated, zrepl uses the :ref:`replication cursor bookmark <replication-cursor-and-last-received-hold>` which corresponds to the most recent successfully replicated snapshot.
.. ATTENTION::
If you use ``not_replicated`` in your pruning rules, make sure to :ref:`monitor <monitoring>` replication.
If your replication gets stuck then ``not_replicated`` causes snapshots to pile uip on the sender.
ZFS and especially the ``zfs`` management command are known to degrade in performance with a lot of snapshots.
Such degradation impacts zrepl, any other scripts, and human ability to manage your zpool.
.. _prune-keep-retention-grid: .. _prune-keep-retention-grid:
Policy ``grid`` Policy ``grid``