When performing command "opatch lsinventory or opatch apply" in oracle RDBMS or FMW home you getting below errors like.,
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
or
[ Error during Oracle Home discovery Phase]. Detail: OPatchSession cannot load inventory for the given Oracle Home /u01/appl/fs1/FMW_Home/oracle_common. Possible causes are:No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory
Follow below steps to Solve the issue:
Step 1: Checks all running sessions related to RDBMS & FMW home is killed properly.
Step 2: Check the "patch_locked" file is exists in "$ORALCE_HOME/.patch_storage/"
Step 3: Remove or rename the "patch_locked" file.
rm $ORALCE_HOME/.patch_storage/patch_locked
OR
mv $ORALCE_HOME/.patch_storage/patch_locked $ORALCE_HOME/.patch_storage/patch_locked_delete
Then rerun the opatch.