ASM Create Diskgroup On Commandline..Or..”When The Gui Doesn’t GUI…”

One day I needed a new database on a separate diskgroup, but of course something had to bug out on me..This time it was the GUI of ASM (ASM Configuration Assistant a.k.a.: asmca).

Being the effective DBA I am (although “lazy but effective” might also apply), I only use this tool to quickly create a diskgroup and move on..but I could either spend time fixing the GUI, or find out what the GUI actually did behind the scenes.. I choose the latter, and here are the experiences I gained documented.

The first steps are always the same:

Have the disk(s) presented from the storage, so they are visible on the OS.
Create an ASM disk:

$ oracleasm createdisk DATA01 /dev/mapper/diskxyz

Make sure the disks are visible on all the nodes, by running the command below on each additional node, other than the one created on:

$ oracleasm scandisks

Next we launch the sqlplus from the/an instance:

$ sqlplus / as sysasm

sqlplus> create diskgroup DATADG external redundancy disk 'ORCL:DATA01'
ATTRIBUTE 'compatible.asm' = '',
'compatible.rdbms' = '',
'compatible.advm' = '';

I have only 11.2 databases running and no need for the default values of 10.x, other values are fine. Also the storage has covered the redundancy, so no need for ASM to waste disks on this also.

On the node the diskgroup is created, the diskgroup is automatically mounted. On the other nodes however, not.

Mount the diskgroup on the other nodes:

$ asmcmd
ASMCMD> alter diskgroup DATADG mount;

And this is all there is to it ..

As stated before, the GUI is faster and easier, since it takes care of this for us, but then again, it it good to have the skill to do this manually. Don’t become dependent on a clown suit for the command-line..


PS: as a unrelated side note: when the GUI doesn’t want to start, this is an indication something is not working as well as it should in the CRS stack. In our case, we had had issues with the voting disk, and the CRS was not on-line on one of the nodes. Everything worked as expected, however the “listener stat” and asmca etc.. where not able to communicate properly with the CRS stack and didn’t want to execute..

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Personal Ramblings and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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