[DRBD-user] Newbie: IDE Flush, system halt when drbdadm Primary all

Lars Ellenberg Lars.Ellenberg at linbit.com
Fri Jul 29 20:11:16 CEST 2005

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

/ 2005-07-29 13:17:33 -0400
\ Jason W. Allen:
> I've finally seen the error of my ways, so after 15 years of being a Windows
> Admin, I've been seduced by the light side...
> I've only been working with Linux for a week now, so please bear with me.
> I have a lab setup of two virgin Debian Sarge systems.  I believe I was
> successful in getting drbd to load and run yesterday, but it was only
> running 4 K/s in the sync and only ever got to .6% done (even overnight).
> So I decided to rebuild my computers from the ground up and see if that
> changed anything.  One the computer I want as the primary when I run
> 'drbdadm primary all' it returns:
> ioctl(,SET_STATE,) failed: Input/Output error
> Local replica is inconsistent (--do-what-I-sya ?)
> Command '/sbin/drbdsetup /dev/drbd0 primary' terminated with exit code 21
> flushing ide devices: hda
> System halted.
> Message from syslod2 at localhost at Fri Jul 29 16:49:40 2005 ...
> localhost kernel: System halted.
> test1/etc/network# hub.c: new USB device 00:1d.1-1, assigned address 2
> hub.c: USB hub found
> hub.c: 2 ports detected
> drbd0: Ping Ack did not arrive in time.
> drbd0: drbd0_asender [3866]: cstate Connected --> NetworkFailure
> drbd0: asender terminated
> drbd0: drbd0_receiver [3859]: cstate NetworkFailure --> BrokenPipe
> drbd0: short read expecting header on sock: r=-512
> drbd0: worker terminated
> drbd0: drbd0_receiver [3859]: cstate BrokenPipe --> Unconnected
> drbd0: Connection Lost
> drbd0: drbd0_receiver [3859]: cstate UnConnected --> WFConnection
> hub.c: error resetting hub 2 - disconnecting
> usb.c: USB disconnect on device 00:1d.7-3 address 2
> At this point the network no longer works etc.
> I thought it may be a fluke, so I reinstalled the entire system from scratch
> and I get the exact same problem.  I have outlined the below steps, because
> I really have no idea where to start looking, since I'm not quite sure what
> I have done so far :-)
> 1. Build System from Debian Sarge iso Disk 1
> 2. # apt-get install vim ssh module-assistant dpatch kernel-headers-2.4.27-2
> kernel-headers-2.4.27-2-386 drbd0.7-module-source drbd0.7-utils
> 3. edit /etc/network/interfaces to assign static IP to my NIC
> 4. # m-a prepare
> 5. # m-a a-i drbd0.7-module-source
> 6. edit /etc/drbd.conf:
> "    global {
>         minor-count 5
>       }
>       resource r0 {
>         protocol C;
>         incon-degr-cmd "halt -f";

I'd recommend to comment out this line until you have it setup and
running reliably, or set it to something like
"echo drbd: incon-degr-cmd: would have done halt -f | wall"
(just in case,
 wall is not build from bricks, nor has it windows,
 and it does not make musik either.
 it is "write a message to all (currently logged in (pseudo) terminal) users"

this command is intended to stop a stupid cluster manager from trying to
make an inconsistent replica of a degraded cluster primary.

when the peers never saw each other before, and never have been primary
either, than they are exactly in this state,
and your attempt to promote it to primary goes directly into this
callback (and, as configured, halts the machine).


>         on test1 {
>           device /dev/drbd0;
>           disk /dev/sda2;
>           address;
>           meta-disk internal;

did you know that we strongly recommend external meta data?

> 7. # scp /etc/drbd.conf
> 8. # /etc/init.d/drbd start

  * go to other box, drbd start there, too.

> 9. # drbdadm primary all

no, but drbdadm -- --do-what-I-say primary all
(and you should be pretty sure that you mean what you say).

see also http://www.linux-ha.org/DRBD/QuickStart07

(btw, I personally dislike reiserfs,
 even though I used it in that example)

cheers, and have a nice weekend ...

: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
please use the "List-Reply" function of your email client.

More information about the drbd-user mailing list