Re: [Linux-HA] cat < /dev/ttyS0

2011-05-24 Thread Dejan Muhamedagic
Hi,

On Tue, May 24, 2011 at 09:43:50AM +0200, Bart Coninckx wrote:
> On 05/23/11 23:34, Lars Ellenberg wrote:
> > On Mon, May 23, 2011 at 01:59:23PM -0700, Hai Tao wrote:
> >> this might not be too close to HA, but I am not sure if someone has seem 
> >> this before:
> >>
> >> I use a serial cable between two nodes, and I am testing the heartbeat 
> >> with :
> >>
> >>
> >> server2$ cat<  /dev/ttyS0
> >> server1$ echo hello>  /dev/ttyS0
> >>
> >> instead of receiving "hello" on server2, I see some hashed code there.
> >>
> >> Does someone have an idea why I do not receive the "hello" in clear text?
> > Mismatch of settings, especially baud, flow control, or similar.
> > If you really want to do this manually, learn about stty.
> >
> > for starters, try, on both nodes,
> > stty -F /dev/ttyS0
> > and compare the output.
> >
> > Then try stty 115200 cs8 -F /dev/ttyS0
> > and add whatever else you need to get useful settings.
> >
> > You also need a "null modem cable", usually,
> > not just any serial cable.
> >
> > Note that, in contrast to the "haresources" mode, with Pacemaker,
> > not only small heartbeats are exchanged, but larger stringified
> > XML, occasionally even the whole CIB, inclusive configuration and
> > status sections.
> >
> > Which, with a few resources, even when compressed, can reach an
> > "unexpected" volume.
> >
> > Consider the transfer time of even only 10kByte on a serial port
> > connection.  (Yes, that's ~one second, on a fast port!).
> >
> > You want the highest possible stable baud rate, the smallest
> > possible pacemaker configuration, and timeouts that take this into
> > account.
> >
> > In my experience, boxes that have high volume serial port activity
> > can feel very sluggish in all aspects.
> >
> > For non-haresources clusters, we recommend against serial
> > communication paths. We also recommend against haresources
> > clusters, unless that really is all you want and need.
> >
> > So probably just forget about serial communication paths,
> > but use all available physically independend network links,
> > then add an other two ;-)
> >
> >
> Just out of curiosity: why the recommendation against serial 
> communication (as backup medium for instance) in non-haresources clusters?

Quoting Lars again:

> > Note that, in contrast to the "haresources" mode, with Pacemaker,
> > not only small heartbeats are exchanged, but larger stringified
> > XML, occasionally even the whole CIB, inclusive configuration and
> > status sections.
> >
> > Which, with a few resources, even when compressed, can reach an
> > "unexpected" volume.

Heartbeat always uses all media to transmit messages, i.e. you
cannot have serial as passive interconnect. But even if that were
possible it wouldn't help much with big configurations.

Thanks,

Dejan

> thx,
> 
> B.
> 
> 
> ___
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] cat < /dev/ttyS0

2011-05-24 Thread Bart Coninckx
On 05/23/11 23:34, Lars Ellenberg wrote:
> On Mon, May 23, 2011 at 01:59:23PM -0700, Hai Tao wrote:
>> this might not be too close to HA, but I am not sure if someone has seem 
>> this before:
>>
>> I use a serial cable between two nodes, and I am testing the heartbeat with :
>>
>>
>> server2$ cat<  /dev/ttyS0
>> server1$ echo hello>  /dev/ttyS0
>>
>> instead of receiving "hello" on server2, I see some hashed code there.
>>
>> Does someone have an idea why I do not receive the "hello" in clear text?
> Mismatch of settings, especially baud, flow control, or similar.
> If you really want to do this manually, learn about stty.
>
> for starters, try, on both nodes,
> stty -F /dev/ttyS0
> and compare the output.
>
> Then try stty 115200 cs8 -F /dev/ttyS0
> and add whatever else you need to get useful settings.
>
> You also need a "null modem cable", usually,
> not just any serial cable.
>
> Note that, in contrast to the "haresources" mode, with Pacemaker,
> not only small heartbeats are exchanged, but larger stringified
> XML, occasionally even the whole CIB, inclusive configuration and
> status sections.
>
> Which, with a few resources, even when compressed, can reach an
> "unexpected" volume.
>
> Consider the transfer time of even only 10kByte on a serial port
> connection.  (Yes, that's ~one second, on a fast port!).
>
> You want the highest possible stable baud rate, the smallest
> possible pacemaker configuration, and timeouts that take this into
> account.
>
> In my experience, boxes that have high volume serial port activity
> can feel very sluggish in all aspects.
>
> For non-haresources clusters, we recommend against serial
> communication paths. We also recommend against haresources
> clusters, unless that really is all you want and need.
>
> So probably just forget about serial communication paths,
> but use all available physically independend network links,
> then add an other two ;-)
>
>
Just out of curiosity: why the recommendation against serial 
communication (as backup medium for instance) in non-haresources clusters?

thx,

B.


___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] cat < /dev/ttyS0

2011-05-23 Thread Lars Ellenberg
On Mon, May 23, 2011 at 01:59:23PM -0700, Hai Tao wrote:
> 
> this might not be too close to HA, but I am not sure if someone has seem this 
> before:
>  
> I use a serial cable between two nodes, and I am testing the heartbeat with :
>  
>  
> server2$ cat < /dev/ttyS0
> server1$ echo hello > /dev/ttyS0
>  
> instead of receiving "hello" on server2, I see some hashed code there. 
>  
> Does someone have an idea why I do not receive the "hello" in clear text?

Mismatch of settings, especially baud, flow control, or similar.
If you really want to do this manually, learn about stty.

for starters, try, on both nodes,
stty -F /dev/ttyS0
and compare the output.

Then try stty 115200 cs8 -F /dev/ttyS0
and add whatever else you need to get useful settings.

You also need a "null modem cable", usually,
not just any serial cable.

Note that, in contrast to the "haresources" mode, with Pacemaker,
not only small heartbeats are exchanged, but larger stringified
XML, occasionally even the whole CIB, inclusive configuration and
status sections.

Which, with a few resources, even when compressed, can reach an
"unexpected" volume.

Consider the transfer time of even only 10kByte on a serial port
connection.  (Yes, that's ~one second, on a fast port!).

You want the highest possible stable baud rate, the smallest
possible pacemaker configuration, and timeouts that take this into
account.

In my experience, boxes that have high volume serial port activity
can feel very sluggish in all aspects.

For non-haresources clusters, we recommend against serial
communication paths. We also recommend against haresources
clusters, unless that really is all you want and need.

So probably just forget about serial communication paths,
but use all available physically independend network links,
then add an other two ;-)


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] cat < /dev/ttyS0

2011-05-23 Thread Greg Woods
On Mon, 2011-05-23 at 13:59 -0700, Hai Tao wrote:
> this might not be too close to HA, but I am not sure if someone has seem this 
> before:
>  
> I use a serial cable between two nodes, and I am testing the heartbeat with :
>  
> 
> server2$ cat < /dev/ttyS0
> server1$ echo hello > /dev/ttyS0
>  
> instead of receiving "hello" on server2, I see some hashed code there. 
>  
> Does someone have an idea why I do not receive the "hello" in clear text?

This normally means there is something wrong with your tty settings (see
"man stty"). Either your settings at each end do not match, or the
settings you are using will not work with the cable you have. Or perhaps
the pinouts on the cable you are using are incorrect, but if you are
getting something across, it's more likely stty settings than cable
pinouts.

I am not an expert on serial communications so this is about all the
help I can give, but I do know that seeing garbage on a serial tty
usually means the stty settings are wrong. I can also say that I have
used serial heartbeats in the past with success, but some things (like
certain USB-to-serial adapters), I could just never get to work. But
I've never had any trouble getting a serial cable between two on-board
serial ports to work.

--Greg


___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems