When I recreate a database using oakcli, it shown the following errors:
INFO : 2017-05-20 09:25:49: Required dir /u02/app/oracle/oradata/datastore/.ACFS/snaps/testdb is already existing and not empty. Can not setup the storage for the database with this name
ERROR : 2017-05-20 09:25:49: Failed to setup the storage directories for the database testdb
ERROR : Unable to setup ACFS storage for the database : testdb
ERROR : 2017-05-20 09:25:49: Unable to create the Database : testdb
The error was pretty straightforward, it indicated that the directory /u02/app/oracle/oradata/datastore/.ACFS/snaps/testdb is not empty and cannot be continued. So I took several steps to solve it.
Delete the incomplete database (again) to make sure no other factors to affect our solution.
[root@oda0 ~]# oakcli delete database -db test
Remove the directory in ACFS.
[root@oda0 ~]# cd /u02/app/oracle/oradata/datastore/.ACFS/snaps/
[root@oda0 snaps]# rm -rf testdb
rm: cannot remove `testdb': Directory not empty
The error message is all right, because the directory is at shared storage. So you don't have to care that.
Create the database again
[root@oda0 snaps]# oakcli create database -db testdb -oh OraDb11204_home1 -params testdbconfig
INFO: 2017-05-20 09:39:40: Required snap location /u02/app/oracle/oradata/datastore/.ACFS/snaps/testdb is already existing with no files. Will be using this existing directory
INFO: 2017-05-20 09:39:41: Required snap location /u02/app/oracle/oradata/flashdata/.ACFS/snaps/testdb is already existing with no files. Will be using this existing directory