I have an existing in-production LAMP server running Centos 5.1. It uses physical partitions on top of hardware RAID1, having / /home /var and /boot on separate partitions. We have a near-identical system I am thinking of bringing in as a DRBD/Heartbeat companion. One solution may be to use csync2 [http://oss.linbit.com/csync2/] on /etc and /usr/local (the only areas that will differ from the stock CentOS). Then setup DRBD for /home and /var. From reading the docs it seems we have to use "external meta data" on the existing partitions. Other than that, anyone have any caveats or better ideas for this setup? Also - each has 2 NICs. Can Heartbeat do its pinging over the WAN (eth0) with eth1 dedicated to DRBD only? Is that how it is supposed to be, or should we use the serial ports? Sam
sbeam wrote:> I have an existing in-production LAMP server running Centos 5.1. It uses > physical partitions on top of hardware RAID1, having / /home /var and /boot > on separate partitions. > > We have a near-identical system I am thinking of bringing in as a > DRBD/Heartbeat companion. One solution may be to use csync2 > [http://oss.linbit.com/csync2/] on /etc and /usr/local (the only areas that > will differ from the stock CentOS). Then setup DRBD for /home and /var. > > >From reading the docs it seems we have to use "external meta data" on the > existing partitions. Other than that, anyone have any caveats or better ideas > for this setup? > > Also - each has 2 NICs. Can Heartbeat do its pinging over the WAN (eth0) with > eth1 dedicated to DRBD only? Is that how it is supposed to be, or should we > use the serial ports? >You can decide on which nic heartbeat will do its broadcast ... serial port is optional and in certain cases it's even impossible to use serial port when machines are not located in the same computer room/building ... Don't forget that if you use ext3 on your /home and /var partitions you'll only be able to use it on one node at a time .. if you need both nodes to read/write to the drbd devices, you'll need to use a clusterfs (like gfs, gfs2) on top -- - Fabian Arrotin <fabian.arrotin at arrfab.net> "Internet network currently down, TCP/IP packets delivered now by UPS/Fedex ..."
sbeam wrote:> I have an existing in-production LAMP server running Centos 5.1. It uses > physical partitions on top of hardware RAID1, having / /home /var and /boot > on separate partitions. > > We have a near-identical system I am thinking of bringing in as a > DRBD/Heartbeat companion. One solution may be to use csync2 > [http://oss.linbit.com/csync2/] on /etc and /usr/local (the only areas that > will differ from the stock CentOS). Then setup DRBD for /home and /var. > > From reading the docs it seems we have to use "external meta data" on the > existing partitions. Other than that, anyone have any caveats or better ideas > for this setup? > > Also - each has 2 NICs. Can Heartbeat do its pinging over the WAN (eth0) with > eth1 dedicated to DRBD only? Is that how it is supposed to be, or should we > use the serial ports?One KEY thing to understand about DRBD is that for the normal mode you CAN NOT mount the shared partitions on BOTH machines at the same time. (DRBD does have an active/active mode, but that is not it's major purpose ... DRBD is raid1 for partitions, so just like you can not write / mount BOTH mirrors of a raid1 drive at the same time, you can't do that on DRBD either.) If you really are trying to get a failover machine where you do not need to have both partitions mounted and active at the same time, then DRBD is probably what you are looking for. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20080531/917f1f36/attachment-0005.sig>
On Sat, May 31, 2008 at 7:40 AM, sbeam <sbeam at onsetcorps.net> wrote:> We have a near-identical system I am thinking of bringing in as a > DRBD/Heartbeat companion. One solution may be to use csync2 > [http://oss.linbit.com/csync2/] on /etc and /usr/local (the only areas that > will differ from the stock CentOS). Then setup DRBD for /home and /var.Probably not a good idea to put the whole "/var" in DRBD, since then the second machine will have it unmounted when it's in stand-by, and there are somethings like "/var/run", "/var/tmp" and "/var/spool" that might be needed even if the machine is in stand-by. I don't think you might actually be able to start heartbeat without a "/var/run" to store its pid file. You would be better off by using a DRBD partition for "/var/lib/mysql" and leaving the rest of "/var" out of DRBD. HTH, Filipe
On Sat, May 31, 2008 at 7:40 AM, sbeam <sbeam at onsetcorps.net> wrote:> I have an existing in-production LAMP server running Centos 5.1... > > We have a near-identical system I am thinking of bringing in as a > DRBD/Heartbeat companion...Why don't you consider using MySQL master-slave replication? It seems to me that in your case that would be more simple, more flexible, more reliable, would require less bandwidth and would give you more performance than you can get with DRBD. Although DRBD is the latest buzzword and everybody wants to find an use for it, I think it's not the best tool for this job. DRBD is dumb in the sense that it replicates blocks. If the application that does the replication knows the data, it knows what to send to the other side (record insertions and updates) and what not to (index data, since that will be recreated), and it also doesn't have to send a whole block of data each time you change a few bytes. If you want automatic failover, you can still use Heartbeat to transform a slave node into master when the master goes down. You will certainly find several recipes on how to do it on the web. Just my humble opinion, but I hope this helps. Filipe