198 karma · joined May 2, 2014
Our requirements were two servers, the storage is several terabytes, and losing data because of an unknown bug in the filesystem wasn't an option.
Such filesystems are quorum-based and certainly need more than two servers with terabytes of data. More than what we could afford. Also if you lose quorum, the system hangs to ensure atomicity. But we don't need such properties.
Also after some testing, those filesystem resulted about 5-10% slower than traditional filesystems, with few nodes of course. They are designed to scale with many nodes.
In addition, I don't think lsyncd has been designed for an active/active setup, rather for a master-slave setup.
- Our system needs to cope with millions of directories. Millions of directories for inotify mean a lot of structures in the kernel. For large numbers it can also mean gigabytes of ram. Add to that the mapping in userspace of file descriptors for rename operations.
- Using inotify would take a lot of time at startup to recurse into millions of subdirectories.
- inotify will not automatically watch new directories. You have to list all the files right after the creation of a directory and watch the subdirectories, etc. Not a problem at all, but way simpler with FUSE.
- If your system is not able to keep up with inotify events, you miss events because the kernel cannot buffer all the events. For us it's better to slow down the system but never miss an event.
- inotify is attached to the original filesystem. That means it's hard (not impossible) to handle loops in an active/active replication setup. Whereas with SFS, replication is done on straight to the original filesystem.
- If the inotify application crashes, you lose events because software keeps writing to the filesystem. If SFS crashes the mountpoint is unwritable by the application which reports an error and can switch to a different storage.
Some choices as you can read depends on the requirements, our requirements where not met by inotify.
I don't feel saying them as either bad or good compared to Nix. Until you try a system, there's little to say only from the theory.
We'll see how Ubuntu Core with snappy performs, and this question will be more relevant in a few months.
Nix is not perfect but certainly has a long story maintaining this kind of packaging.