+++ This bug was initially created as a clone of Bug #1947246 +++ Description of problem: The oraasm resource agent accepts a diskgroup as a required parameter, but it does nothing to manage that diskgroup directly. It simply starts, stops, and monitors Oracle Clusterware High Availability Services (HAS) (via the ohasd service). This is problematic for a couple of reasons: - It can return a false positive monitoring result when HAS is active but ASM is inactive or the specified diskgroup is not mounted. (See also BZ1786812.) - It does not allow the creation of multiple individual oraasm resource agents to manage multiple individual diskgroups. If a user creates two oraasm resource agents, then both of them will simply manage the ohasd service as a whole. This is much less useful than being able to manage one diskgroup per resource. It's also counter-intuitive, as the average user expects the resource to manage the diskgroup that it's configured to manage. We should overhaul this resource agent, potentially creating a revised "oraasm2" to reflect the significant changes in behavior. At a high level, what it ought to do appears to be pretty straightforward: - Start: Mount the specified diskgroup[1]. - Stop: Unmount ("dismount" in Oracle's terminology) the specified diskgroup[1]. - Monitor: If Oracle cluster services are running, check the status of the specified diskgroup (using the `asmcmd lsdg` command[2]). IMO, the oraasm resource agent should never start or stop the ohasd (Oracle High Availability Services Daemon) service at all. Currently, **all** it does is start, stop, and monitor the ohasd service. It doesn't do anything specific to the diskgroup that it claims to manage. (A user could create a separate LSB-class resource to manage the ohasd service.) Additionally, `diskgroup` is listed in the RA metadata as a required option. However, it's either ignored or practically ignored: - If `home` is set, then `diskgroup` is ignored entirely. - If `home` is not set, then `diskgroup` is used to look up a home directory from `/etc/oratab`. Then it's ignored after that. The monitor operation (checking the status of a diskgroup) can be done with `asmcmd lsdg`. Mounting and unmounting have to be done via SQL commands. That's more complicated, but I hope we'd be able to re-use a lot of the logic from the oracle resource agent. [1] https://docs.oracle.com/database/121/OSTMG/GUID-4782D609-766B-4686-B5E4-90A8EFC10DEA.htm#OSTMG94155 [2] https://docs.oracle.com/cd/B28359_01/server.111/b31107/asm_util.htm#OSTMG94273 ----- Version-Release number of selected component (if applicable): resource-agents-4.1.1-68.el8