I need to setup a system where a laptop and a desktop computers coexist.
The idea is, I bring the laptop into the network and the laptop syncs the /home directory( with some exceptions) with the desktop computer, then the desktop computer mounts a stack with his copy of /home on top and the laptop copy(nfs) in the bottom.

So, obviously I don't need a write-through strategy, a write-back with a quite big cache solution would suit me way better.

I've been reading on unionfs and aufs and others but I either don't understand how or I can't do this with those fs.

Any ideas?

  • It sounds like you're looking for something like drbd (not a filesystem) or perhaps Andrew FS or Coda (are these even in use these days?). Or perhaps you could do it the quick and dirty way, and run a couple of rsyncs to do the job.
    – Alexios
    Commented May 22, 2012 at 21:32
  • Can you also describe the usage scenario that you are envisioning? You mention a few implementation details but I do not understand why you want to use those. E.g. why do you want to nfs mount the laptop copy? Why do you want to sync the /home directory. Sync from the desktop to the laptop or the other way around? Do you trash the data that is already on the target when syncing, or is this a bi-directional sync?
    – chutz
    Commented May 24, 2012 at 3:21
  • Use the laptop on the move, sync it when arrive home and then use the desktop only, I am just very interested on removing the extra step that would be required to sync the desktop back to the laptop before unplugging it, I'd like this to be continuous. Commented May 24, 2012 at 7:43

3 Answers 3


With software such as Csync, you could use the module pam_csync to SFTP sync the laptop on login and logout.

Another method might be to run lsyncd to rsync your home directory periodically. Unfortunately this uses inotify and can be untenable if you have hundreds of thousands of files in the watched directory. A better solution might use fsnotify or the fanotify API and then sync bi-directionally periodically, but I haven't found one yet.

Lastly if it's under 1-2GB that you need to keep in sync, there are good LAN sync functionalities in Dropbox.


I use bittorrent sync - working nice local and remote...

Maybe also worth taking a look.


You could consider using git-annex, nowadays it comes with a nice web interface too :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .