On Tue, 16 Jun 2009 12:40:46 +0200 Renat Golubchyk wrote: > Hi all! > > Short: > What is the best way to setup something similar to RAID 1 over a WAN? ... > One purpose of the setup is to have data redundancy. Thus we have to > ensure that the data is replicated in a timely manner. Replicating MySQL > data is not difficult. The problem is the file system data like uploaded > documents and pictures. We can monitor changes in the file system and > initiate rsync to copy files over the network, but I think it's not a > good solution. What we are after is a network equivalent of RAID 1. > Are there any viable solutions that could work over a WAN? If replication after file is completely hit the disk is not acceptable either because files are quite large or have to be really synchronous then I'll second DRBD-with-HA-cluster-fs suggestion. Otherwise, if it's acceptable to have each file replicated as soon as it's fully stored on one node and link between nodes isn't good enough clustered fs High-Availability features might play against you, but I don't think rsync (via some sort of cron) is a good idea here, anyway. You'd be better off using in-kernel dnotify / inotify reactors and a simple script to track IN_MODIFY and IN_CREATE events, replicating path in question (possibly via some sort of delta-transfer) as soon as it hits the fs. I even remember seeing inotify-tracking binary to use with common shell scripts, although I believe any dedicated non-bash-hack implementation should be better suited for such task. -- Mike Kazantsev // fraggod.net