Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hello George,
>Message: 7
>Date: Sun, 18 Jan 2004 22:18:51 -0500
>From: george young <gry at ll.mit.edu>
>To: drbd-user at lists.linbit.com
>Reply-To: gry at ll.mit.edu
>Organization: MIT Lincoln Laboratory
>Subject: [DRBD-user] mirror config questions for manual failover
>
>[drbd-0.6.10, Suse 8.2 x86 linux 2.4.20-4GB-SMP, 2 nodes, pvt 100Mb net]
>I have two nodes, pig-app and pig-db. Default config is that pig-app has
>the active copy of /home(36GB), pig-db has /db(1GB), each DRBD mirrored to
>the other. If and *only if* an administrator decides that one node is
>down, she runs a script on the remaining node to take over the other's
>file system (and switch ip's around so users get the new host). I'm
>having trouble getting the right drbd commands for this script. I also
>see very slowww syncing time...
>Both are are reiser file systems.
>There is a private 100Mbit ethernet between the two nodes.
>I use the HA-Linux "IPaddr" script, but heatbeat is *not* enabled.
>
>Here's my script for pig-app to grab the /db filesystem from pig-db:
>------------------------------------------------------------
>if ping -c 1 pig-db; then
> rsh -n pig-db /usr/local/etc/ha.d/resource.d/datadisk drbd_db stop &
> sleep 30
>fi
>
>
You do not need these lines.
>/sbin/drbdsetup /dev/nb1 disconnect
>
>
>/sbin/drbdsetup /dev/nb1 net 10.0.0.115:7789 10.0.0.114:7789 C
>
>
You probably have a sync slow performance because you use the
"/sbin/drbdsetup /dev/nb1 net...."
Please check on each node the output of the "/sbin/drbdsetup /dev/nb1
show" command after you execute "/sbin/drbdsetup /dev/nb1 net....".
The parameters in the "drbd.conf" file are parsed at the startup of the
drbd (/etc/init.d/drbd), but it is possible to change these parameters
temporary,dynamically... with the "/sbin/drdbsetup" command, this is
what you do with the "/sbin/drbdsetup /dev/nb1 net....".
I use heartbeat (1.0.4 or 1.1.3) to manage my clusters without problem,
when a node go down automatically the other node restart the
application(s) and if I want or need to move the application(s) from one
node to the other I use "/usr/lib/heartbeat/hb_standby" (there are more
possibility with these command with heartbeat 1.1.3).
>/usr/local/etc/ha.d/resource.d/datadisk drbd_db start
>------------------------------------------------------------
>I'm trying to assure that I don't get into a 2-hour long sync while
>users are screaming. After correcting the problem, I can revert
>off-hours, so that time is not critical.
>Does this script make sense? How could it be better?
>
>I am also frustrated that it takes 2 hours to sync 36G over a 100Mbit
>private net. That's a rate of about 5 Mbytes/sec. Disks on both hosts
>are fast hardware raids. Am I missing something?
>
>Below is my(common) drbd.conf:
>------------------------------------------------------------
>resource drbd_home {
> protocol = C
> fsckcmd = fsck -p -y
> disk {
> disk-size = 36707364k
> }
> net {
> sync-min = 500k
> sync-max = 100M # maximal average syncer bandwidth
> tl-size = 5000 # transfer log size, ensures strict write ordering
> timeout = 60 # 0.1 seconds
> connect-int = 10 # seconds
> ping-int = 10 # seconds
> }
> on pig-app {
> device = /dev/nb0
> disk = /dev/rd/c0d0p5
> address = 10.0.0.115
> port = 7788
> }
> on pig-db {
> device = /dev/nb0
> disk = /dev/rd/c0d2p1
> address = 10.0.0.114
> port = 7788
> }
>}
>resource drbd_db {
> protocol = C
> fsckcmd = fsck -p -y
> disk {
> disk-size = 1052184k
> }
> net {
> sync-min = 500k
> sync-max = 100M # maximal average syncer bandwidth
> tl-size = 5000 # transfer log size, ensures strict write ordering
> timeout = 60 # 0.1 seconds
> connect-int = 10 # seconds
> ping-int = 10 # seconds
> }
> on pig-app {
> device = /dev/nb1
> disk = /dev/rd/c0d0p3
> address = 10.0.0.115
> port = 7789
> }
> on pig-db {
> device = /dev/nb1
> disk = /dev/rd/c0d0p1
> address = 10.0.0.114
> port = 7789
> }
>}
>
>[I did really *try* to be concise here, sorry about the length...]
>Thanks,
> George Young
>
>
Best regards.
Francis