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