Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
>>>>> On Wed, 05 Apr 2006 17:41:04 -0400, Ugo Bellavance <ugob at camo-route.com> said: > 3- Start drbd > # service drbd start > 4- Make the primary primary > # drbdadm -- --do-what-I-say primary all In a guide, I would not use "all" but the resource name, in your example drbd0. I'd probably choose an example that does not confuse the reader: if I'd demonstrate setting up mysql, I'd call it drbd_mysql. > 5- Check the status > # watch cat /proc/drbd > 6- Once in sync, create a filesystem on the drbd device (on both servers) > # mkfs -t ext3 /dev/drbd0 Only on primary is enough. Don't know if it breaks something to do it on both. > 7- Create a mount point (both servers) > # mkdir /drbd > 8- Mount the drbd device on it (only on the primary) > # mount /dev/drbd0 /drbd > Finally, integrate with Heartbeat (which I haven't understood yet either. It means that you do not ever do steps 3-8 again yourself. Steps 3-8 are ok to learn the basics and play with them, but as soon as heartbeat does it for you, you let it alone. So 9 - Let drbd alone because it shall be owned by heartbeat (on current primary) # umount /drbd; drbdadm down drbd0; As heartbeat usually involves starting a service that uses the mounted disk you would now disable that service from being started by the OS 10 - Disable OS from starting mysql (on both nodes) # rm /etc/rc?.d/[SK]*mysql Talk about the need to prevent your upgrade mechanism (here yum) from reinstalling those start/stop symlinks. 11 - Configure heartbeat (on both nodes) # involves authkeys, haresources, and ha.cf; see # http://linux-ha.org/DRBD/GettingStarted 12 - Start heartbeat (on both nodes) This will bring up everything in the desired order and only on the machine that is allowed to do it: make the DRBD primary, mount the disk, ifconfig an ethernet alias interface, start mysql. 13 - test failover (on current primary) # hb_standby # http://linux-ha.org/hb_standby # hb_takeover # http://linux-ha.org/hb_takeover 14 - test failover (on the other node) # hb_takeover # hb_standby > Am I ok? One question I had is: > I've seen some examples using partition devices instead of disk > devices in drbd.conf. How do they do that? What kind of partition do > they create on the disk to be able to put a drbd device over it? My > example uses /dev/sdb, which is the 2nd SCSI disk. I didn't create > any partition on it, in fact, the partition is the drbd device and I > created the FS on the drbd device. Is that OK? Would it be better to > use a partition instead? How? pass -- andreas