A method and apparatus for fast and reliable fencing of resources such as
shared disks on a networked system. For each new configuration of nodes
and resources on the system, a membership program module generates a new
membership list and, based upon that, a new epoch number uniquely
identifying the membership correlated with the time that it exists. A
control key based upon the epoch number is generated, and is stored at
each resource controller and node on the system. If a node is identified
as failed, it is removed from the membership list, and a new epoch number
and control key are generated. When a node sends an access request to a
resource, the resource controller compares its locally stored control key
with the control key stored at the node (which is transmitted with the
access request). The access request is executed only if the two keys
match. The membership list is revised based upon a node's determination
(by some pre-determined criterion or criteria, such as slow response
time) of the failure of a resource, and is carried out independently of
any action (either hardware or software) of the failed resource.