OPW-00010
Tried to create a password file by orapwd, an Oracle utility for a RAC database and got OPW-00010: Could not create the password file. This resource has a Password File.
[oracle@primary01 ~]$ orapwd dbuniquename=ORCLCDB file='+DATA/ORCLCDB/pwfile' entries=10
Enter password for SYS:
OPW-00010: Could not create the password file. This resource has a Password File.
It seems that the database has already have a password file. Let's see the configuration.
[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file: +DATA/ORCLCDB/pwfile
...
Yes, we have configured the location of password file, but in fact we don't have it so far. That's why I create a password file for it.
OPW-00010 means that it found a password file in the configuration of the RAC database and its name conflicts with the file you provided. For protecting the configured password file, Oracle cannot let you create a new one to overwrite it.
Solution
To solve OPW-00010, we should reset the location of password file to pretend we have no password file present.
[oracle@primary01 ~]$ srvctl modify database -d orclcdb -pwfile
The location of password file should be null.
[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file:
...
Let's try again.
[oracle@primary01 ~]$ orapwd dbuniquename=ORCLCDB file='+DATA/ORCLCDB/pwfile' entries=10
Enter password for SYS:
This time we have no problem to create the password file. Let's see the actual file that we created.
ASMCMD> ls -l +DATA/ORCLCDB/pwfile
Type Redund Striped Time Sys Name
PASSWORD UNPROT COARSE NOV 01 19:00:00 N pwfile => +DATA/ORCLCDB/PASSWORD/pwdorclcdb.256.1058700217
Moreover, orapwd add the password file to the database for us. We don't have to add the file to the database manually.
[oracle@primary01 ~]$ srvctl config database -d orclcdb
...
Password file: +DATA/ORCLCDB/pwfile
...
Further reading: How to Create an Empty RAC Database without Using DBCA.