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 alas..now 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' = '188.8.131.52.0', 'compatible.rdbms' = '184.108.40.206.0', 'compatible.advm' = '220.127.116.11.0';
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..