We can use the Oracle ASM configuration assistant (asmca) tool via the GUI, or from the command line. In other words, we can run asmcma in slient mode(command line).
We can run asmcma in slient mode as follows:
1 | asmca -silent command_name [options] |
The commands that are valid in silent mode are:
- -convertToFlexASM
- -configureASM
- -upgradeASM
- -configureParameter
- -deleteASM
- -createDiskGroup
- -addDisk
- -createVolume
- -createACFS
The options that are valid in silent mode are:
- -help
- -asmsnmpPassword asmsnmp_password
- -sysAsmPassword sysasm_password
You can reach the detailed information about the use of Asmca by running it with -help option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | bash-4.3# su - oracle [YOU HAVE NEW MAIL] -bash-4.3$ . oraenv ORACLE_SID = [oracle] ? +ASM1 The Oracle base remains unchanged with value /u01/app/oracle -bash-4.3$ asmca -help asmca [-silent] [-sysAsmPassword <SYS user password>] [-asmsnmpPassword <ASM monitor password>] {<command> <options>} Please refer to the manual for details. You can enter one of the following commands: 1. Configure an ASM instance by specifying the following command and parameters: -configureASM [-sysAsmPassword <SYS user password>] [-asmsnmpPassword <ASM monitor password>] [(-param <paramname=paramvalue>)] -diskString <disk discovery path> (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-redundancy <HIGH|NORMAL|EXTERNAL>] [-au_size <2^0 ~ 2^6 (1 ~ 64)>] [-compatible.asm <10.1 ~ 11.2>] [-compatible.rdbms <10.1 ~ 11.2>] [-compatible.advm <11.2>]) 2. Upgrade an existing ASM instance by specifying the following command and parameters: -upgradeASM [-asmsnmpPassword <ASM monitor password>] 3. Configure ASM parameters by specifying the following command and parameters: -configureParameter (-param <paramname=paramvalue>) [-sysAsmPassword <SYS user password>] 4. Create Disk Groups by specifying the following command and parameters: -createDiskGroup [-diskString <disk discovery path>] (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-redundancy <HIGH|NORMAL|EXTERNAL>] [-au_size <2^0 ~ 2^6 (1 ~ 64)>] [-compatible.asm <10.1 ~ 11.2>] [-compatible.rdbms <10.1 ~ 11.2>] [-compatible.advm <11.2>]) [-sysAsmPassword <SYS user password>] 5. Add disks to Disk Groups by specifying the following command and parameters: -addDisk [-diskString <disk discovery path>] (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-sysAsmPassword <SYS user password>] 6. Create volumes by specifying the following command and parameters: -createVolume (-volumeName <ASM volume name> -volumeDiskGroup <ASM disk group name for the volume> -volumeSizeGB <ASM volume size in GB> [-volumeRedundancy <INHERIT|HIGH|NORMAL|EXTERNAL>]) [-sysAsmPassword <SYS user password>] 7. Create ASM Cluster File Systems by specifying the following command and parameters: -createACFS (-acfsVolumeDevice <ASM volume device>) [-sysAsmPassword <SYS user password>] 8. Delete ASM instance(s) by specifying the following command and parameters: -deleteASM [-force] [-dropDiskGroups] [-sysAsmPassword <SYS user password>] |
Sample Commands:
List the disks in the DATA disk group:
1 | asmcmd lsdsk -G data |
Add a new disk to the DATA disk group:
1 | asmca -silent -adddisk -diskgroupname DATA -disk 'ORCL:DATA3' |