Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to create a union between two directories, one a local directory on the machine and the other a NFS directory to a remote client. What I want to accomplish is any writes to the directory to be shared between the two directories, but any reads to only come from the local directory. The idea is to have a bit-torrent client on the server, writing the files to the union, so as it downloads it syncs to the client machine and I don't have to wait for two transfers (Bit-torrent transfer then server to client transfer)

I'm thinking of using UnionFS to merge the local directory and NFS directory, and assuming UnionFS would be smart enough to use the local directory for reads instead of the remote directory. Then again as it works on the directory level, I don't know how the OS would handle that. This would be on Ubuntu Server x64. The client and server would be connected over a PPTP vpn.

Would this work as intended or am I asking for the impossible? Thanks!

share|improve this question
there is one thing that could be a problem: If the writes happen in the server, and the UnionFS is on the client, I think you are out of luck (since, as far as the client is concerned, there were no writes) Is this the case, or would all files be written and read from the same machine ? – josinalvo Feb 27 '13 at 14:04
also, do you have root on the server, or only on the client (or none =P) ? – josinalvo Feb 27 '13 at 14:04
I have root on the server, and the UnionFS would be on the server as well. The local storage and NFS would be in the UnionFS on the server. It would have a NFS mount back to the client (Mac) on my network, which would be connected though VPN, most likely using my router (DD-WRT) to be the client. – chosenken Feb 28 '13 at 22:58

You must log in to answer this question.

Browse other questions tagged .