In search of a network file system with extended caching to speed up file access

I'm running a small home server that stores my documents. The disks in this server are in a RAID 1 configuration (using Linux md) and it's also periodically being backed up to an external hard drive to make sure I don't lose them. However, I'm always accessing the files from other computers on the home network using an SMB share, and this results in a considerable speed penalty (especially when connected over WLAN). This is quite annoying when editing large files, such as digital camera RAWs, for example.

I've been looking for a solution to this problem. It would have to offer some kind of local caching to speed up the file access. The client would preferably not keep a copy of all data on the server, as it consists of a very large collection of photographs, most of which I will not access frequently. Instead, it should only cache the accessed files and sync the changes back in the background. Ideally, it would also do some smart read-ahead (cache the files that are in the same directory as the currently opened file, for examples), but I suppose that's asking a bit much. Synchronization should be automatic (on file change). Conflicting file changes (at the same time on different clients) are unlikely to happen in my use case, but I would prefer if they are handled properly (notification to the user).

I've come across the following options, so far:

  • something similar to Dropbox. iFolder seems to be the only thing that comes close, but its reputation (stability) and requirements put me off.

  • A distributed file system such as OpenAFS. I'm not sure this will speed up file access. It is probably overkill for what I need.

  • Maybe NFS or even Samba offer these possibilities. I read a bit about Windows' Offline Files, but its operation seems limited (at least on Windows XP).

As this is just for personal use, I'm not willing to spend a lot of money. A free solution would be preferred. Also, the server needs to run on Linux, and I need a client for at least Windows.

Edit: I have since set up OpenAFS (a quite complex process). It seems to cater for most of my needs. Files are cached locally, speeding up access to cached files. First access to a file is still slow, of course. I'm looking forward to Disconnected AFS planned for a future OpenAFS release as this will allow pre-caching of files. This would be perfect for editing sets of large files such as camera RAWs.


Solution 1:

You can cache reads and writes for NFSv4 with FS-Cache. Red Hat has written good documentation.

FS-Cache is a persistent local cache that can be used by file systems to take data retrieved from over the network and cache it on local disk. This helps minimize network traffic for users accessing data from a file system mounted over the network (for example, NFS).