Three optional methods, Init, Fini, and Boot, enable the RGM to execute initialization and termination code on a resource.
The RGM runs the Init method to perform a one-time initialization of the resource when the resource becomes managed as a result of one of the following conditions:
The resource group in which the resource is located is switched from an unmanaged to a managed state.
The resource is created in a resource group that is already managed.
The RGM runs the Fini method to clean up after the resource when the resource becomes unmanaged, as a result of one of the following conditions:
The resource group in which the resource is located is switched to an unmanaged state.
The resource is deleted from a managed resource group.
The cleanup must be idempotent. That is, if the cleanup has already been done, Fini exits successfully.
The RGM runs the Boot method on nodes that have newly joined the cluster, that is, the nodes have just been booted or rebooted.
The Boot method normally performs the same initialization as Init. This initialization must be idempotent, that is, if the resource has already been initialized on the local node, Boot and Init exit successfully.