Openfiler 2.3 Active/Passive Cluster (heartbeat,DRBD) With Offsite Replication Node - Page 2

6. Initiate Data/Storage Partition

Change Line 53 in /etc/lvm/lvm.conf on all nodes:

filter = [ "a/.*/" ]
to
filter = [ "a|drbd1[0-9]|", "r|.*|" ]

Initiate data Partition:

NOTE: it's important to use the stacked resource device like you done it with the meta partition!

[email protected] ~# pvcreate /dev/drbd11
[email protected] ~# vgcreate data /dev/drbd11
[email protected] ~# lvcreate -L 400M -n filer data

 

7. Create Final Heartbeat Configuration

Change /meta/opt/openfiler/etc/cluster.xml on filer01:

<?xml version="1.0" ?>
<cluster>
<clustering state="on" />
<nodename value="filer01" />
<resource value="MailTo::[email protected]::ClusterFailover"/>
<resource value="IPaddr::10.10.11.100/24/eth0" />
<resource value="IPaddr::10.10.50.100/24/eth1" />
<resource value="drbdupper::meta-U">
<resource value="drbdupper::data-U">
<resource value="LVM::data">
<resource value="Filesystem::/dev/drbd10::/meta::ext3::defaults,noatime">
<resource value="MakeMounts"/>
</cluster>

Go to https://10.10.11.101:446 and start/stop iscsi target service ( this will recreate /etc/ha.d/haresources on filer01 ).

Copy haresources to filer02:

[email protected] ~# scp /etc/ha.d/haresources [email protected]:/etc/ha.d/haresources

 

8. Enable/Disable System Services

We disable the services that are handled by heartbeat in the configuration:

[email protected] ~# chkconfig --level 2345 heartbeat on
[email protected] ~# chkconfig --level 2345 drbd on
[email protected] ~# chkconfig --level 2345 openfiler off
[email protected] ~# chkconfig --level 2345 open-iscsi off

[email protected] ~# chkconfig --level 2345 heartbeat on
[email protected] ~# chkconfig --level 2345 drbd on
[email protected] ~# chkconfig --level 2345 openfiler off
[email protected] ~# chkconfig --level 2345 open-iscsi off

[email protected] ~# chkconfig --level 2345 drbd on
[email protected] ~# chkconfig --level 2345 openfiler off
[email protected] ~# chkconfig --level 2345 open-iscsi off

 

9. Test Failover On node1 And node2

NOTE : ALL DISCS SHOULD BE IN SYNC BEFORE DOING THIS!

Start heartbeat on node 2:

[email protected] ~# service heartbeat start

Shutdown node 1:

[email protected] ~# shutdown -h now

Watch /var/log/ha-log on filer02:

[email protected] ~# tail -n 50 /var/log/ha-log

Check if you can login on https://10.10.11.100:446.

Start filer01 and do a manual failover:

[email protected] ~# /usr/lib/heartbeat/hb_takeover
Share this page:

2 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

I have yet to test it but it seems to work in the brain as I read through all the commands and it made sense. DRBD for block level replication is so far the best I have seen.

By: development java

Just tested it and it worked ok for. Thanks. This is what I currently need.