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!