On Sun, Sep 20, 2009 at 10:58:56AM +0200, Benoit Chesneau wrote: > Hi all, > > I have to setup a full redundant installation for a web services in > view of having failover from one machine to the other. So data need > to be replicated fin quasi realtime. There is solution like drbd on > linux that works like a raid1 over tcp, but I wonder if there is any > solution that would allow me to do it on openbsd ? also is there any > distributed fs that could work over openbsd ? If your reliability requirements are higher than "in the unlikely event hardware breaks, someone walks up to the rack and moves the disks to the cold spare machine", you have a heck of a lot more cases to think about first. DRBD is a RAID and the same rules of RAID and backups apply. What if some of your data gets corrupted? How do you recover and how long will *that* take? How will you handle upgrades - will you only mirror data or larger parts of the OS? How long would it even take to fsck the DRBD volume after the primary machine crashes, and how long is that compared to swapping the disks?
One way to think about, for a typical DB based web service, is to rsync your static files in cron and use your database's built in replication and other redundancy features you need. Real databases are designed to have ACID transactions, to get that with a filesystem you need more than DRBD. This way you also get two hot servers for your service instead of a slightly improved cold spare, which DRBD is. Don't get me wrong, though, DRBD does have some good uses that come to mind, like mirroring a mail server filesystem so you can take snapshots and run backups off them on another machine to avoid load on the real server. But it is not a magic 100% uptime dust, since it only really guards against hardware failure and not against user or software errors. -- Jussi Peltola

