Mailing List Archive

use of drbd in real life
I would like to use DRBD in real life, but should know the answer of the following questions
before:

1) (Already asked here two times, but no answer yet)
When primary goes down (for example hard disk crash) and secondary gots rebooted after that
(for example power loss), it hangs and waits for the old primary. So I absolutely MUST NOT
reboot the secondary when the primary is gone.
When one node is gone, there is no more high availability, but why is there NO availability when
I have to reboot the secondary without the primary???

2) Can I access the stored data without DRBD and Heartbeat? Can I mount for example
/dev/hda6, which is normally used vor /dev/nb0, directly to /mnt, without DRBD and access my
data?


mfg ar

--
mailto:andreas@example.com
http://www.rittershofer.de
PGP-Public-Key http://www.rittershofer.de/ari.htm
Re: use of drbd in real life [ In reply to ]
On Tue, 27 Nov 2001, Andreas Rittershofer wrote:

> I would like to use DRBD in real life, but should know
>the answer of the following questions
> before:
>
> 1) (Already asked here two times, but no answer yet)
> When primary goes down (for example hard disk crash)
> and secondary gots rebooted after that
> (for example power loss), it hangs and waits for the old primary.
> So I absolutely MUST NOT
> reboot the secondary when the primary is gone.

You can make the secondary the primary
but then you have to do a full sync when the missing
node comes up, as far as I understand. This may take
plenty of ours.

I am to curious how drbd works in a REAL production-
enviroment.

regards ,

--
espen




> When one node is gone, there is no more high availability,
> but why is there NO availability when
> I have to reboot the secondary without the primary???


>
> 2) Can I access the stored data without DRBD and Heartbeat? Can I mount for example
> /dev/hda6, which is normally used vor /dev/nb0, directly to /mnt, without DRBD and access my
> data?
>
>
> mfg ar
>
> --
> mailto:andreas@example.com
> http://www.rittershofer.de
> PGP-Public-Key http://www.rittershofer.de/ari.htm
>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> https://lists.sourceforge.net/lists/listinfo/drbd-devel
>
Re: use of drbd in real life [ In reply to ]
You can change/ edit/ tweak the scripts that mount your filesystems on
the DRBD device so that they do not wait; I've built 3 production (and a
few more "experimental") failover clusters, and have overcome this
"problem" on all 3 by tweaking the scripts that heartbeat manages. If
Heartbeat comes up (on either system) and is unable to "talk" to the
other system, it assumes that the other system is dead, and takes over
all the resources that it manages. This includes mounting/ fscking or
whatever the DRBD filesystem etc. If all this happens on the secondary
system (i.e.the primary is dead and you've rebooted the secondary) and
the primary comes back up, it comes back up as secondary. Sysadmin
initiates a quicksync and triggers it to become primary again.

The manual portion of all that could be accomplished by an additional
shell script that checks to see if drbd is connected (cat /proc/drbd)
and then initiates the quicksync, and upon successful completion,
becomes primary again.

Hope that helps!

Rubin

On Tue, 2001-11-27 at 16:20, Espen Myrland wrote:
>
>
>
> On Tue, 27 Nov 2001, Andreas Rittershofer wrote:
>
> > I would like to use DRBD in real life, but should know
> >the answer of the following questions
> > before:
> >
> > 1) (Already asked here two times, but no answer yet)
> > When primary goes down (for example hard disk crash)
> > and secondary gots rebooted after that
> > (for example power loss), it hangs and waits for the old primary.
> > So I absolutely MUST NOT
> > reboot the secondary when the primary is gone.
>
> You can make the secondary the primary
> but then you have to do a full sync when the missing
> node comes up, as far as I understand. This may take
> plenty of ours.
>
> I am to curious how drbd works in a REAL production-
> enviroment.
>
> regards ,
>
> --
> espen
>
>
>
>
> > When one node is gone, there is no more high availability,
> > but why is there NO availability when
> > I have to reboot the secondary without the primary???
>
>
> >
> > 2) Can I access the stored data without DRBD and Heartbeat? Can I mount for example
> > /dev/hda6, which is normally used vor /dev/nb0, directly to /mnt, without DRBD and access my
> > data?
> >
> >
> > mfg ar
> >
> > --
> > mailto:andreas@example.com
> > http://www.rittershofer.de
> > PGP-Public-Key http://www.rittershofer.de/ari.htm
> >
> >
> > _______________________________________________
> > DRBD-devel mailing list
> > DRBD-devel@example.com
> > https://lists.sourceforge.net/lists/listinfo/drbd-devel
> >
>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> https://lists.sourceforge.net/lists/listinfo/drbd-devel
--
Rubin Bennett
President,
Complete Connection, Inc.
(802) 223-4448
rbennett@example.com
http://www.completeconnection.com

GnuPG Public Key can be downloaded from:
http://www.completeconnection.com/rbennett.gpg-key.pgp
RE: use of drbd in real life [ In reply to ]
Hi Andreas,

>1) (Already asked here two times, but no answer yet)
>When primary goes down (for example hard disk crash) and secondary gots
rebooted after that
>(for example power loss), it hangs and waits for the old primary. So I
absolutely MUST NOT
>reboot the secondary when the primary is gone.
>When one node is gone, there is no more high availability, but why is there
NO availability when
>I have to reboot the secondary without the primary???

if you ask drbdsetup for some options you get e.g.

-k|--skip-sync] [-s|-tl-size val] [-c|--connect-int

the skip-sync does what is says - when its in your drbd.conf it skips the
sync
post reboot.

the connect-int specifys the time system will wait while booting in order to
contact the other node. Read the mailinglist for thoose parameters. IMHO
connect-int
gots a problem in earlier versions.

>2) Can I access the stored data without DRBD and Heartbeat? Can I mount for
example
>/dev/hda6, which is normally used vor /dev/nb0, directly to /mnt, without
DRBD and access my
>data?

You can. But be sure that you mount the partition read only, cauze any
changes you would make
wouldnt notify by drbd and so no sync comes up: mount /dev/hda /mnt -o ro
If you want 2 write 2 the partion you have to sync it manually with :
drbdsetup replicate

What you cant: 4 example you will get an errormessage if u want to mount
e.g. /dev/nb1 and the
underlying partition is already mounted.

Any further questions ?

Michael Appeldorn
Re: use of drbd in real life [ In reply to ]
On 27 Nov 01, at 19:39, Rubin Bennett wrote:

> You can change/ edit/ tweak the scripts that mount your filesystems on the
> DRBD device so that they do not wait; I've built 3 production (and a few
> more "experimental") failover clusters, and have overcome this "problem"
> on all 3 by tweaking the scripts that heartbeat manages. If Heartbeat
> comes up (on either system) and is unable to "talk" to the other system,
> it assumes that the other system is dead, and takes over all the resources
> that it manages. This includes mounting/ fscking or whatever the DRBD
> filesystem etc. If all this happens on the secondary system (i.e.the
> primary is dead and you've rebooted the secondary) and the primary comes
> back up, it comes back up as secondary. Sysadmin initiates a quicksync
> and triggers it to become primary again.

So this is a problem of heartbeat and not of drbd?
Shouldn't this tweaked scripts be included in the heartbeat distribution?
Could you post or mail these scripts?

I just tested the following: When heartbeat and drbd are of, I can mount the drbd low level device,
e.g. /dev/hda8, but no data are shown in it. So without drbd, I cannot access my data.


mfg ar

--
mailto:andreas@example.com
http://www.rittershofer.de
PGP-Public-Key http://www.rittershofer.de/ari.htm
Re: use of drbd in real life [ In reply to ]
On 27 Nov 01, at 22:20, Espen Myrland wrote:

> > 1) (Already asked here two times, but no answer yet)
> > When primary goes down (for example hard disk crash)
> > and secondary gots rebooted after that
> > (for example power loss), it hangs and waits for the old primary.
> > So I absolutely MUST NOT
> > reboot the secondary when the primary is gone.
>
> You can make the secondary the primary
> but then you have to do a full sync when the missing
> node comes up, as far as I understand. This may take
> plenty of ours.

No, this does not work. This rebooted node hangs until the crashed primary comes back, I
cannot make it primary, I have to reboot the other node too. Now assume, the other node is
damaged and has to be repaired ...


mfg ar

--
mailto:andreas@example.com
http://www.rittershofer.de
PGP-Public-Key http://www.rittershofer.de/ari.htm
Re: use of drbd in real life [ In reply to ]
On Wed, 28 Nov 2001, Andreas Rittershofer wrote:

> On 27 Nov 01, at 22:20, Espen Myrland wrote:
>
> > > 1) (Already asked here two times, but no answer yet)
> > > When primary goes down (for example hard disk crash)
> > > and secondary gots rebooted after that
> > > (for example power loss), it hangs and waits for the old primary.
> > > So I absolutely MUST NOT
> > > reboot the secondary when the primary is gone.
> >
> > You can make the secondary the primary
> > but then you have to do a full sync when the missing
> > node comes up, as far as I understand. This may take
> > plenty of ours.
>
> No, this does not work.
> This rebooted node hangs until the crashed primary comes back, I
> cannot make it primary, I have to reboot the other node too.
> Now assume, the other node is
> damaged and has to be repaired ...

But if you have a console, you get a
question : "Do you want to skip waiting for other node, and
make this one primary? Please answer yes, or not at all",
or something like that.
If you dont have a console, you have to wait, unless you
tweak some scriptes, I'll guess. Isn't this correct?


regards,
--
espen







>
>
> mfg ar
>
> --
> mailto:andreas@example.com
> http://www.rittershofer.de
> PGP-Public-Key http://www.rittershofer.de/ari.htm
>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> https://lists.sourceforge.net/lists/listinfo/drbd-devel
>
RE: use of drbd in real life [ In reply to ]
> But if you have a console, you get a
> question : "Do you want to skip waiting for other node, and
> make this one primary? Please answer yes, or not at all",
> or something like that.
> If you dont have a console, you have to wait, unless you
> tweak some scriptes, I'll guess. Isn't this correct?

Not quite - the scripts already have a parameter to allow a node to continue
startup if the other one doesn't show up within a specified timeout.

There's an "inittimeout" parameter in the config file, commented out by
default. if you activate this, the node will wait for a connection until the
2nd node comes up or until the timeout expires.

Bye, Martin
Re: use of drbd in real life [ In reply to ]
On 28 Nov 01, at 14:52, Espen Myrland wrote:

> > No, this does not work.
> > This rebooted node hangs until the crashed primary comes back, I
> > cannot make it primary, I have to reboot the other node too.
> > Now assume, the other node is
> > damaged and has to be repaired ...
>
> But if you have a console, you get a
> question : "Do you want to skip waiting for other node, and
> make this one primary? Please answer yes, or not at all",
> or something like that.
> If you dont have a console, you have to wait, unless you
> tweak some scriptes, I'll guess. Isn't this correct?

Yes, I have the console, and I answer with "yes", what means NOT to wait, but nevertheless this
node hangs (I even cannot switch to another virtual console) until the other node, the former
primary, is booted. Exactly THIS is the problem: my answering with "yes" has no effect.


mfg ar

--
mailto:andreas@example.com
http://www.rittershofer.de
PGP-Public-Key http://www.rittershofer.de/ari.htm
RE: use of drbd in real life [ In reply to ]
On 28 Nov 01, at 15:08, Bene, Martin wrote:

> Not quite - the scripts already have a parameter to allow a node to
> continue startup if the other one doesn't show up within a specified
> timeout.
>
> There's an "inittimeout" parameter in the config file, commented out by
> default. if you activate this, the node will wait for a connection until
> the 2nd node comes up or until the timeout expires.

So I have to activate this "inittimeout" parameter - I will try it and report here.

So I have NOT to use "wait_connect" as somebody else mentioned?


mfg ar

--
mailto:andreas@example.com
http://www.rittershofer.de
PGP-Public-Key http://www.rittershofer.de/ari.htm
Re: use of drbd in real life [ In reply to ]
On Wed, Nov 28, 2001 at 02:37:15PM +0100, Andreas Rittershofer wrote:
>
> I just tested the following: When heartbeat and drbd are of, I can mount
> the drbd low level device, e.g. /dev/hda8, but no data are shown in it.
> So without drbd, I cannot access my data.

I'm sorry, but this is just plain wrong. You _can_ access the lower level
partition without DRBD if you want to or need to, you'll only loose the
possibility of syncing the changes made to it to the other node.

DRBD makes no modification at all to the layout of the block device under
it, so the filesystem is there just the same as it appears in /dev/nb*.

If you found no data in the lower level partition, it could well be that
DRBD was never properly configured and connected, since it never wrote any
data to the partition.

Regards!
Fábio
--
Fábio Olivé Leite http://www.conectiva.com.br/~olive
I drowned in the universal pool of entropy
Eris has saved me, and she has set me free
A31F CCB3 6BC4 A875 27E7 C2B4 2A74 5690 F127 519B