The /etc/init.d/oracleasm script is used to create, delete and query ASM disks and make disks available.
Create and Delete ASM disk:
Run below command to Create ASM disks.
# /etc/init.d/oracleasm createdisk DATA1 /dev/sdc
Creating Oracle ASM disk "DATA1" [ OK ]
Run below command to Delete ASM disks.
# /etc/init.d/oracleasm deletedisk DATA1
Deleting Oracle ASM disk "DATA1" [ OK ]
Query/List/Scan ASM disk:
Run the below querydisk command to see if the Disk/Device is used by ASM:
# /etc/init.d/oracleasm querydisk /dev/sdc
Checking if device "/dev/sdc" is an Oracle ASM disk [ OK ]
# /etc/init.d/oracleasm querydisk DATA1
Checking for ASM disk "DATA1" [ OK ]
Run below command to list Existing disks
# /etc/init.d/oracleasm listdisks
Run the below command to scan the disks created on another node.
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks [ OK ]