Oracle Create Tablespace in ASM Fails

Image by Ryan McGuire from Pixabay

I was working on a project to install the Oracle Grid Infrastructure (19c). This would be on an existing Oracle Linux database server. The database on this server used the Linux EXT4 file system. We wanted to install Oracle Grid Infrastructure to leverage Automatic Storage Management (ASM). This would give us a little better performance as well as easier storage manageability.

Oracle Grid Infrastructure Install

I followed the Oracle documentation for the Oracle Grid Infrastructure for a standalone server installation Although I did run into one issue with the ASM Filter Driver, I was able to resolve that. The installation was smooth and successful. After that, I created two disk groups in ASM for my database. Now I was ready to create a tablespace for testing.

Create a Test Tablespace

I wanted to confirm that the existing database would work with ASM. I created a test tablespace like this.

SQL> create tablespace test1 datafile '+DATA01' size 10M;
create tablespace test1 datafile '+DATA01' size 10M
*
ERROR at line 1:
ORA-01119: error in creating database file '+DATA01'
ORA-17502: ksfdcre:4 Failed to create file +DATA01
ORA-15001: diskgroup "DATA01" does not exist or is not mounted
ORA-15374: invalid cluster configuration

Invalid cluster configuration! That is odd and a little scary. I check that the disk groups are mounted in ASM. They exist and are mounted. Next, I restart the database. In an attempt to see if it would then be aware of ASM. I run the create tablespace command again.

SQL> create tablespace test1 datafile '+DATA01' size 10M;
ERROR:
ORA-03113: end-of-file on communication channel
Process ID: 32142
Session ID: 1 Serial number: 63383
MYDB(4):create tablespace test1 datafile '+DATA01' size 10M
MYDB(4):Starting background process ASMB
2022-05-02T22:34:05.139530-05:00
ASMB started with pid=70, OS id=33260
2022-05-02T22:34:05.172264-05:00
NOTE: ASMB (index:0) registering with ASM instance as Standard client 0xffffffffffffffff (reg:2510120706) (startid:1106864960) (new connection)
Starting background process RBAL
2022-05-02T22:34:05.183337-05:00
RBAL started with pid=71, OS id=33265
NOTE: ASMB (index:0) (33260) connected to ASM instance +ASM, osid: 33263 (Standard mode; client id 0xffffffffffffffff)
NOTE: initiating MARK startup
Starting background process MARK
2022-05-02T22:34:05.219131-05:00
MARK started with pid=73, OS id=33267
2022-05-02T22:34:05.220581-05:00
NOTE: MARK has subscribed
2022-05-02T22:34:08.380515-05:00
NOTE: ASMB mounting group 1 (DATA01)
2022-05-02T22:34:08.391245-05:00
WARNING: cellinit.ora is missing. RBAL is terminating the instance.
RBAL (ospid: 33265): terminating the instance due to ORA error 27625

Now my instance is being terminated! I thought to myself what the heck is going on.

Group Permissions

At some point, I had realized that I never added the oracle user to the ASM groups. The groups were asmadmin and asmdba. Again, this was an existing Oracle database server. The steps are a little different than if I was installing GI and the Oracle database from scratch. I added the groups but the changes didn’t take effect with the existing running processes.

First, I shutdown the database and listener. Second, I logged out and logged in again as the oracle user. I confirmed the groups existed.

uid=550(oracle) gid=550(dba) groups=550(dba),551(applmgr),54329(asmadmin),54327(asmdba)

Finally, I restarted the database and listener. Now when I issue the create tablespace command, we have success!

SQL> create tablespace test1 datafile '+DATA01' size 10M;

Tablespace created.

Additional Information

I found there are two other areas I should have look at for additional information.

First, if we look at the permissions of the ASM disks, we can see the group required is asmadmin.

$ sudo ls -lhtr /dev/oracleafd/disks
total 36K
-rw-rw-r-- 1 grid asmadmin 10 May 2 14:11 DATA01

Second, I found an interesting trace file in my dump directory. In the file, there is a permissions error on the file libafd19.so.

WARNING::lib=/opt/oracle/extapi/64/asm/orcl/1/libafd19.so err:2 rc:open location:skgdllOpen05
errbuf=79
msgbuf=Can not access a needed shared library   other=/opt/oracle/extapi/64/asm/orcl/1/libafd19.so: cannot open shared object file: Permission denied

Looking at the file mentioned, like the disks, has a group of asmadmin.

$ ls -lhtr /opt/oracle/extapi/64/asm/orcl/1/libafd19.so
total 224K
-rwxr-x--- 1 grid asmadmin 223K May 2 14:11 libafd19.so

In summary, don’t forget to make sure that the proper Linux groups have been assigned to your oracle user. Hope this helps!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.