[Linux-ha-dev] SFEX resource agent for heartbeat

Xinwei Hu hxinwei at gmail.com
Thu Oct 16 03:28:54 MDT 2008


Hi all,

  Attached is a rewritten version of sfex. It can be applied to tip of
heartbeat.
  Here's some explanation about the changes and design notes on it.

  . The fundamental algorithm of sfex is kept untouched, except that
it's a background deamon now.
  . The memory allocation in original version is correct but
confusing. So all calls malloc are replaced with one call to
posix_memalign, and daemon avoid to allocate extra memory after
initialized itself.
  . The on disk meta-data works well, but again, very confusing. All
integers are converted to/from strings before/after saving/loading
to/from disk. I add new structs to represent the on disk formats. It
helps to remove all confusing offset.
  . sfex_daemon will be installed into /usr/lib/heartbeat/ and
sfex_init into /usr/sbin
  . sfex_* use syslog & stderr

  . sfex implements an exclusive mode to help to control the shared
disk. It's a cooperative and advisory protocol only. I think it's not
possible to implement a shared-mode based on advisory protocol only.
The idea of SBD can be borrowed in as a workaround, but it's more
reasonable to do that as a STONITH plugin then a resource agent.

  Junko helps to review the code again, but any bugs you found should
be my fault.

  Please kindly review the patch and give your comments.

  Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sfex.diff
Type: text/x-patch
Size: 47051 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20081016/e5c6b45d/sfex-0001.bin


More information about the Linux-HA-Dev mailing list