LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   drbd active-passive cluster change primary one (https://www.linuxquestions.org/questions/linux-server-73/drbd-active-passive-cluster-change-primary-one-881924/)

amin.a 05-21-2011 05:16 AM

drbd active-passive cluster change primary one
 
hi

i have a two node drbd cluster, while drbd1 is primary and drbd2 is slave i should make drbd1 slave and unmount drbd partition and make make drbd2 primary and mount drbd partition to see content on drbd2

is it any way to automate it so as drbd1 goes down, drbd1 make itself primary and mount the partition?

EricTRA 05-22-2011 01:59 AM

Hello and welcome to LinuxQuestions,

If I understand you correctly you're looking for a Cluster Resource Manager. Did you only setup DRBD or other stuff too? Have a look at http://www.clusterlabs.org/. I've used Corosync in combination with Pacemaker and there very easy to setup and administer. No need for scripting, just configure everything like you want it using the command line.

Looking forward to your participation in the forums. Have fun with Linux.

Kind regards,

Eric

amin.a 05-23-2011 09:42 AM

Quote:

Originally Posted by EricTRA (Post 4363439)
Hello and welcome to LinuxQuestions,

If I understand you correctly you're looking for a Cluster Resource Manager. Did you only setup DRBD or other stuff too? Have a look at http://www.clusterlabs.org/. I've used Corosync in combination with Pacemaker and there very easy to setup and administer. No need for scripting, just configure everything like you want it using the command line.

Looking forward to your participation in the forums. Have fun with Linux.

Kind regards,

Eric

dear erictra thanks your reply, i've setup drbd and pacemaker and drbd is doing it's work as well. but when you try to see your resource from another node you should make it primary your self and make another one secondary. if else /dev/drbd0 remains readonly and you can't mount it.

well suppose my primary link is failed how secondary node should know about fail and mount it self?

and my real question is how to tell it to sync some directory?
in pacemaker i used this :

primitive drbd_disk ocf:linbit:drbd \
params drbd_resource="disk0" \
op monitor interval="15s"
primitive fs_drbd ocf:heartbeat:Filesystem \
params device="/dev/drbd/by-res/disk0" directory="/mnt" fstype="ext3"
ms ms_drbd drbd_disk \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
colocation mnt_on_master inf: fs_drbd ms_drbd:Master
order mount_after_drbd inf: ms_drbd: promote fs_drbd:start

directory in that configuration should indicate synced directory, isn't so? but nothing get synced with this configuration!

thanks


All times are GMT -5. The time now is 11:14 PM.