Hi all,

  Following is an explanation of my idea about implement scsi-3
reservation as resource agent. I'd like to present them here, and have
your comments.

===============
. basic understanding of scsi-3 reservation type 5:
   - hosts can register themselves with their unique host_keys
   - one host issues the "reserve" command to "hold" the reservation
   - any registered hosts can preempt other registered hosts
   - non-registered hosts can't access or preempt other registered hosts

. pros and cons to make it a resource agent
   - unique keys can't be static due to the dynamic of pacemaker.
     => register have to be done after the initialization of pacemaker
   - some resources like filesystem or volume manager depends on the
registration
     => register must be done before the starting of resources
   - it make perfect sense to make it a resource, then make use of
resource dependency
   - re-register from a preempted host must be avoid
     => at least, the resource should be restarted on failure

. the idea of implementation
  - start: register the host with it's unique key from pacemaker. if
not reserved yet, reserve.
  - stop: if the host is unregistered already, means it's fenced => fail.
          otherwise, unregistered itself
  - monitor: always NOT_RUNNING (for start probe only, and the monitor
operation must not be configured here at all)
  - notify:
     post-stop & pre-start: generate a list of active_nodes, for all
registered keys, preempt it if not in the list of active_nodes.
===============

   The attached RA is not test _at all_. It's just a POC for your reference.

   Thanks for your patience to read and reply ;)

Attachment: scsi_reserve.sh
Description: Bourne shell script

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to