Oracle 18c introduced the concept of a read-only Oracle home, where all configuration and log files can be kept separate from the Oracle binaries.
Read-only Oracle homes are the default in Oracle 21c onward.
Issue:
Read-Only oracle home creates spfile, lock files and other logs in $ORACLE_BASE/dbs directory instead of $ORACLE_HOME hence causing issue when VDB needs to be restarted.
Determine if ORACLE_HOME is read-only:
$ cd $ORACLE_HOME/bin $ ./orabasehome /u01/app/oracle/homes/OraDB21Home1
In this example, the Oracle home is in read-only mode.
Solution:
Disable Read-Only ORACLE_HOME.
cd $ORACLE_HOME/bin ./roohctl -disable
This should generate a message about successfull disable of read-only home:
[oracle@localhost bin]$ ./roohctl -disable Disabling Read-Only Oracle home. Update orabasetab file to disable Read-Only Oracle home. Orabasetab file has been updated successfully. Read-Only Oracle home has been disabled successfully. Check the log file /home/oracle/cfgtoollogs/roohctl/roohctl-230517PM125220.log for more details.