[ceph-users] Re: how to sync data on two site CephFS

2023-02-16 Thread Robert Sander

Hi,

On 16.02.23 12:53, zxcs wrote:


we  already have a CephFS cluster, called A,  and now we want to setup another 
CephFS cluster(called B) in other site.
And we need to  synchronize data with each other for some directory(if all 
directory can synchronize , then very very good), Means when we write a file in 
A cluster, this file can auto sync to B cluster, and when we create a file or 
directory on B Cluster, this file or directory can auto sync to A Cluster.



Ceph has CephFS snapshot mirroring: 
https://docs.ceph.com/en/latest/cephfs/cephfs-mirroring/


But this is a one way mirror. It only supports A -> B.

You need a two way sync. There is software like unison available for 
that task: https://en.wikipedia.org/wiki/Unison_(software)


If you do not have too many or too large directories you could let 
unison run regularily. But it will bail on conflicts, meaning it has to 
ask what to do if a file has been changed on both sides.


Regards
--
Robert Sander
Heinlein Consulting GmbH
Schwedter Str. 8/9b, 10119 Berlin

https://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Amtsgericht Berlin-Charlottenburg - HRB 220009 B
Geschäftsführer: Peer Heinlein - Sitz: Berlin
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] Re: how to sync data on two site CephFS

2023-02-16 Thread Eugen Block

Hi,

if you have Pacific or later running you might want look into CephFS  
mirroring [1]. Basically, it's about (asynchronous) snapshot mirroring:


For a given snapshot pair in a directory, cephfs-mirror daemon will  
rely on readdir diff to identify changes in a directory tree. The  
diffs are applied to directory in the remote file system thereby  
only synchronizing files that have changed between two snapshots.  
This feature is tracked here: https://tracker.ceph.com/issues/47034.
Currently, snapshot data is synchronized by bulk copying to the  
remote filesystem.


Regards,
Eugen

[1] https://docs.ceph.com/en/latest/dev/cephfs-mirroring/

Zitat von zxcs :


Hi, Experts,

we  already have a CephFS cluster, called A,  and now we want to  
setup another CephFS cluster(called B) in other site.
And we need to  synchronize data with each other for some  
directory(if all directory can synchronize , then very very good),  
Means when we write a file in A cluster, this file can auto sync to  
B cluster, and when we create a file or directory on B Cluster, this  
file or directory can auto sync to A Cluster.


our question is does there any best practices to do that on CephFS?

Thanks in advance!


Thanks,
zx
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io



___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io