Skip to main content
6 of 8
added 24 characters in body
BowPark
  • 5.2k
  • 13
  • 54
  • 78

Mirroring two directories

In a Ubuntu 14.04 system I would like to store the same contents of a directory in two physical different devices. This should result in having in the filesystem tree two directories dirA and dirB with the same contents. I would like to work on them, keeping them synced. Any modifications made in dirB should be mirrored in dirA and viceversa.

I did not choose rsync because I need a real-time syncronization to be set once; lsyncd works well in (almost) real-time, but it has some issues when trying to use it bidirectionally. I don't need neither symbolic links, nor mount --bind, because the contents should be stored in different devices and none of those solutions would allow this.

There should not be a client and a server: the actions performed against dirA should be replicated at the same time in dirB and viceversa.

  • Does exist a tool, or filesystem, which is able to perform this?

  • Does such a tool/filesystem exist when dirB is in another machine?

BowPark
  • 5.2k
  • 13
  • 54
  • 78