trying to follow the ha-drbd HOWTO on the centos wiki... I prep two identical systems with centos 5, leaving some disk space unassigned (they only have one scsi drive), create /dev/sda4 partitions on each to use for the repdata... I install the modules, create a /etc/drbd.conf like... [root at svfis-blade03 ~]# more /etc/drbd.conf # # please have a a look at the example configuration file in # /usr/share/doc/drbd/drbd.conf # global { usage-count no; } resource repdata { protocol C; startup { wfc-timeout 0; degr-wfc-timeout 120; } disk { on-io-error detach; } # or panic, ... net { cram-hmac-alg "sha1"; shared-secret "(random secret)"; } # don't forget to choose a secret for auth ! syncer { rate 10M; } on svfis-blade03.(my intranet domain) { device /dev/drbd0; disk /dev/sda4; address 10.5.160.93:7788; meta-disk internal; } on svfis-blade05.(my intranet domain) { device /dev/drbd0; disk /dev/sda4; address 10.5.160.95:7788; meta-disk internal; } } I run drbdadm create-md repdata on both systems... I start the drdb daemon on both systems... and /proc/drbd says... [root at svfis-blade03 ~]# cat /proc/drbd version: 8.0.4 (api:86/proto:86) SVN Revision: 2947 build by buildsvn at c5-i386-build, 2007-09-29 06:28:57 0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r--- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 and I can't promote blade03 to primary. [root at svfis-blade03 ~]# drbdadm primary repdata State change failed: (-2) Refusing to be Primary without at least one UpToDate disk Command 'drbdsetup /dev/drbd0 primary' terminated with exit code 11 what am I doing wrong?!? the howto shows the disk state as UpToDate/Inconsistent, which is what I'd expect. Do I have to use a physical device (/dev/sdb in the example) instead of a partition?
On Wed, 2007-10-17 at 11:05 -0700, John R Pierce wrote: <snip>> and I can't promote blade03 to primary. > > [root at svfis-blade03 ~]# drbdadm primary repdata > State change failed: (-2) Refusing to be Primary without at least one > UpToDate disk > Command 'drbdsetup /dev/drbd0 primary' terminated with exit code 11 > > what am I doing wrong?!? the howto shows the disk state as > UpToDate/Inconsistent, which is what I'd expect. > > Do I have to use a physical device (/dev/sdb in the example) instead of > a partition?No, you don't have to use a physical device , you can use partitions. But the first time you want to promote a drbd device as primary, drbd has to know first which is the one that will act as the master. On the node that will act as a master for the initial full sync (only one time), you'll have to use the `drbdadm -- --overwrite-data-of-peer primary all` command. On previous drbd (< 0.8) , the command was : `drbdadm -- --do-what-I-say primary all` but the command was changed (see the drbd website) You're right, it's missing from the wiki page and that will be updated to reflect that ... Thanks for having reported that .. :o) -- Fabian Arrotin <fabian.arrotin at arrfab.net> Solution ? echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20071017/8a56b0a6/attachment-0004.sig>
Fabian Arrotin wrote:> On the node that will act as a master for the initial full sync (only > one time), you'll have to use the `drbdadm -- --overwrite-data-of-peer > primary all` command. > On previous drbd (< 0.8) , the command was : `drbdadm -- --do-what-I-say > primary all` but the command was changed (see the drbd website) > You're right, it's missing from the wiki page and that will be updated > to reflect that ... > > Thanks for having reported that .. :o) >and thanks for that info... its happily syncing away now :) hmm, wonder why I'm only seeing 10MB/sec on gigE between two otherwise idle dual xeons w/ savvio u320 scsi...
Fabian Arrotin wrote:> You're right, it's missing from the wiki page and that will be updated > to reflect that ... >I think there's another wiki page error, on Heartbeat, the file /var/lib/heartbeat/crb/cib.xml should be /var/lib/heartbeat/crm/cib.xml if I install an edited version of that file as given (with hostnames and IPs changed), it seems to hose heartbeat good. I probably need to triple check my editting, tho.