[DRBD-user] Question about the 'ping' mechanism

Lars Ellenberg lars.ellenberg at linbit.com
Tue Mar 17 13:46:36 CET 2009

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


On Tue, Mar 17, 2009 at 10:53:56AM +0100, Stefan Seifert wrote:
> On Tuesday 17 March 2009 10:39:15 Lars Ellenberg wrote:
> 
> > rather implement a "ping to disk".
> > have one file / block on the drbd, and write to that every few seconds.
> > then DRBD can detect if the actual remote _disk_ is responding,
> > and not just the kernel thread ;-)
> >
> > and its just a matter of
> >  cd /into/mounted/drbd
> >  while sleep 10; do
> > 	dd conv=fsync if=/dev/zero of=__probe__ bs=1b count=1
> >  done
> 
> Wouldn't a simple: while sleep 10; do touch __probe__ ; done
> be enough? Updates to meta data are sufficient to write something to the disk 
> and the dd-call has to write that byte _and_ update the meta data.

touch would cause a fs meta data update,
which will then be synced to disk at a possibly later time,
at the fs discretion. to force it to write this change to disk _now_,
you'd have to do an fsync on the directory. I think.

using dd conv=fsync (or fdatasync, if you prefer; though on linux,
it is still the same in most cases), I know that the full drbd roundtrip
has been made once dd returns.

but yes, touch would cause some traffic on the replication data link as
well, only at some later time.

-- 
: Lars Ellenberg                
: LINBIT HA-Solutions GmbH
: DRBD®/HA support and consulting    http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list