New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cephfs-mirror: incremental sync #40831
cephfs-mirror: incremental sync #40831
Conversation
c12519f
to
06f677c
Compare
Build failures are due to requirement of PR #40810. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nit
b7c0246
to
f9487d9
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
... and rebased again |
f9487d9
to
6428018
Compare
rebase and updated -- also included changes to sync file mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small request
6428018
to
127779c
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Purpose of this xattr is to identify if the "next" snapshot to be synchronized can be incrementally transferred. Value of the xattr is the snap-id of a snapshot in the primary cluster (for a given directory root). CephFS mirror daemon sets this xattr on the directory root once the data for a snapshot is synchronized, thereby signifying that the data under this directory root is the data of the snapshot identified by the snap-id value. This allows the mirror daemon to use the much efficient selective synchronzation (based on mtime/ctime) by scanning the two snapshots locally and only transferring the inodes that have changed. Signed-off-by: Venky Shankar <vshankar@redhat.com>
…any remote (sub)directory Right now, the only path to cleanup (purge) is the remote file system directory root (for configured snapshot directories). With incremental sync, we would need the ability to cleanup selective directories under configured snapshot directories. Furthermore, the path passed to the function ise used to checking if the mirror daemon needs to backoff due to mirroring being disabled, daemon shutdown etc. So, adjust the function prototype to accept the directory root and the relative path to be cleaned up under this directory. Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Use incremental transfer when the data on the remote file system for a given directory root is belongs to the snapshot which can be used for local comparison. Files are chosen based on mtime changes. Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixes: http://tracker.ceph.com/issues/49939 Signed-off-by: Venky Shankar <vshankar@redhat.com>
127779c
to
da9788a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Requires PR #40810 to build and use.
Snap data is incrementally transferred to remote file system based on mtime/ctime differences. This does away with cleaning up remote file system data on each snap sync. Whenever possible, changes are identified by scanning local snapshot pair. On the other hand, when last synced ("previous") snapshot cannot be used for comparison, changes are identified by comparing "current" snapshot data to remote filesystem directory root (for the directory in question).
Also, this relies to *at() libcephfs APIs to ensure correctness of the snapshot being synchronized FTW.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox