The system administrator has one last task. Every disk that ASMLib is going to be accessing needs to be made available. This is accomplished by creating an ASM disk. The /etc/init.d/oracleasm script is again used for this task:
[root@ca-test1 /]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdg1 Creating Oracle ASM disk "VOL1" [ OK ]
Disk names are ASCII capital letters, numbers, and underscores. They must start with a letter. Disks that are no longer used by ASM can be unmarked as well:
[root@ca-test1 /]# /etc/init.d/oracleasm deletedisk VOL1 Deleting Oracle ASM disk "VOL1" [ OK ]
Any operating system disk can be queried to see if it is used by ASM:
[root@ca-test1 /]# /etc/init.d/oracleasm querydisk /dev/sdg1 Checking if device "/dev/sdg1" is an Oracle ASM disk [ OK ] [root@ca-test1 /]# /etc/init.d/oracleasm querydisk /dev/sdh1 Checking if device "/dev/sdh1" is an Oracle ASM disk [FAILED]
Existing disks can be listed and queried:
[root@ca-test1 /]# /etc/init.d/oracleasm listdisks VOL1 VOL2 VOL3 [root@ca-test1 /]# /etc/init.d/oracleasm querydisk VOL1 Checking for ASM disk "VOL1" [ OK ]
When a disk is added to a RAC setup, the other nodes need to be notified about it. Run the 'createdisk' command on one node, and then run 'scandisks' on every other node:
[root@ca-test1 /]# /etc/init.d/oracleasm scandisks Scanning system for ASM disks [ OK ]
|