In an Oracle RAC environment, use a grid account to perform
Run asmcmd into ASM command mode, such as:
[Email protected] ~]$ Asmcmd
Asmcmd>
Asmcmd> du//displays all disk space occupied by ASM files in the specified ASM directory
Asmcmd> Ls-ls//Lists the contents of the ASM directory and their properties, disk space consumption
asmcmd> pwd//view current path
Asmcmd> CD. /data//Switch directory
Asmcmd> LSCT//listing information for the current ASM client
asmcmd> LSDG//List all disk groups and their properties
asmcmd> lsof//list data file information
asmcmd> lsdsk//List The information of the disk
asmcmd> rm-f *.dbf//delete all current extension. dbf files
asmcmd> rm-fr Orcldemo//delete current Orcldemo directory
The root path of the ASM disk is "+" instead of "/", and the following is the demo operation:
Asmcmd> CD Datadg/demo
asmcmd> pwd
+datadg/demo//current path is +DATADG/GD
Asmcmd> CD +//switch to ASM disk root path
asmcmd> pwd
+//current path is root path +
You can also operate without entering ASM command mode, such as:
[[email protected] ~]$ asmcmd ls-ls//view ASM disk usage
To use the graphical interface, you can use the ASM Assistant command: ASMCA
[Email protected] ~]$ Sqlplus/as sysasm
--View Disk group information
Sql> Select Name,state,type,total_mb, free_mb from V$asm_diskgroup;
--View disk information
Sql> select Group_number,path,state,total_mb,free_mb from V$asm_disk;
--View disk I/O information, DATADG to disk group name
[Email protected] ~]$ asmcmd lsdsk--statistics-g DATADG
or briefly read and write, including ASM disk list
[Email protected] ~]$ asmcmd iostat-g DATADG
Add ASM Disk Disk08_test to ASM Disk group DATADG, disk path is Orcl:data3_test
(You need to establish this disk name first at the operating system level/ETC/INIT.D/ORACLEASM Createdisk data3_test/dev/mapper/mpathx)
Sql> alter DiskGroup DATADG add disk ' orcl:data3_test ' name disk08_test;
Remove ASM disks from ASM Disk Group DATADG Disk08_test
sql> alter diskgroup DATADG drop disk disk08_test; This article is from the Linux commune website (www.linuxidc.com) Source Link: http://www.linuxidc.com/Linux/2014-06/102972.htm
Oracle RAC ASM Common Commands