Posts

Showing posts from October, 2007

DRBD setup

In this lab, we try to achieve network disk mirroring with DRBD software Version – drbd-8.0.6 OS – CentOS 4.5 Build drbd RPMs from source tarball cd /usr/src tar zxvf drbd-8.0.6.tar.gz cd drbd-8.0.6 make rpm RPM installation cd dist/RPMS/i386/ rpm -ivh drbd-8.0.6-3.i386.rpm rpm -ivh drbd-debuginfo-8.0.6-3.i386.rpm rpm -ivh drbd-km-2.6.9_55.EL-8.0.6-3.i386.rpm Edit /etc/drbd.conf resource "share1" { protocol C; startup { wfc-timeout 0; ## Infinite! degr-wfc-timeout 60; ## 2 minutes. } disk { on-io-error detach; } net { } syncer { } on box1.lan { device /dev/drbd0; disk /dev/sdd1; address 192.168.91.2:7789; meta-disk /dev/sdf1[0]; #meta-disk internal; } on box2.lan { device /dev/drbd0; disk /dev/sdd1; address 192.168.91.3:7789; meta-disk /dev/sdf1[0]; #meta-disk internal; } } resource "share2" { protocol C; startup { wfc-timeout 0; ## Infinite! degr-wfc-timeout 60; ## 2 minutes. } disk { on-io-error detach; } net { } syncer { } on box1

Active Passive setup with heartbeat drbd and Apache

Image
Heartbeat 2 + DRBD 8 + Apache Step 1 : Configure DRBD -> Follow DRBD configuration steps Step 2 : Give Virtual IP for HeartBeat ###At both machines ifconfig eth0:1 192.168.91.95 netmask 255.255.255.0 (put at /etc/rc.d/rc.local) Step 3 : Configure Apache Edit /etc/httpd/conf/httpd.conf Machine – 192.168.91.2 <VirtualHost 192.168.91.95> DocumentRoot /web <-- DRBD <Directory "/web"> allow from all Options +Indexes </Directory> ServerName 192.168.91.2 </VirtualHost> Machine – 192.168.91.3 <VirtualHost 192.168.91.95> DocumentRoot /web <-- DRBD <Directory "/web"> allow from all Options +Indexes </Directory> ServerName 192.168.91.3 </VirtualHost> Step 4: Installation and Configuration Heatbeat ###At Both machine rpm -ivh lm_sensors-2.8.7-2.40.3.i386.rpm rpm -ivh heartbeat-pils-2.0.8-2.el4.centos.i386.rpm rpm -ivh heartbeat-stonith-2.0.8-2.el4.centos.i