建新目录
pwd:------------------------------------------显示当前目录路径
rm:--------------------------------------------删除ASM目录下的某个文件或文件夹
rmalias:--------------------------------------删除别名
ASMCMD>
?
要查看某个命令的相信通过在命令前添加help来查看,如下:
ASMCMD> help cd
? ? ? ?cd
? ? ? ?Change the current directory to
.
ASMCMD> help du
? ? ? ?du [-H] [dir]
? ? ? ?Display total space used for files located recursively under [dir],
? ? ? ?similar to "du -s" under UNIX; default is the currentdirectory. ?Two
? ? ? ?values are returned, both in units of megabytes. ?The first value does
? ? ? ?not take into account mirroring of the diskgroup while the second does.
? ? ? ?For instance, if a file occupies 100 MB of space, then it actually
? ? ? ?takes up 200 MB of space on a normal redundancy diskgroup and 300 MB
? ? ? ?of space on a high redundancy diskgroup.?
? ? ? ?[dir] can also contain wildcards.
? ? ? ?The -H flag suppresses the column headers from the output.
ASMCMD> help find
? ? ? ?Find the absolute paths of all occurrences of
under.
? ? ? ?
can be a directory and may include wildcards. ? may also
? ? ? ?include wildcards. ?Note thatdirectory names in the results have the
? ? ? ?"/" suffix to clarify their identity.
? ? ? ?The -t option allows searching by file type. ?For instance, one can
? ? ? ?search for all the control files at once. ? must be one of the
? ? ? ?valid values in V$ASM_FILE.TYPE.
ASMCMD>
?
八、 ?oracleasm工具的使用和语法介绍
[root@wwl ~]# oracleasm --help
Usage: oracleasm[--exec-path=
] [ ]
? ? ? oracleasm --exec-path
? ? ? oracleasm -h
? ? ? oracleasm -V
The basic oracleasm commands are:
? ?configure ? ? ? ?Configure the Oracle
Linux ASMLib driver
? ?init ? ? ? ? ? ? Load andinitialize the ASMLib driver
? ?exit ? ? ? ? ? ? Stop the ASMLibdriver
? ?scandisks ? ? ? ?Scan the systemfor Oracle ASMLib disks
? ?status ? ? ? ? ? Display thestatus of the Oracle ASMLib driver
? ?listdisks ? ? ? ?List known OracleASMLib disks
? ?querydisk ? ? ? ?Determine if adisk belongs to Oracle ASMlib
? ?createdisk ? ? ? Allocate a devicefor Oracle ASMLib use
? ?deletedisk ? ? ? Return a deviceto the operating system
? ?renamedisk ? ? ? Change the labelof an Oracle ASMlib disk
? ?update-driver ? ?Download thelatest ASMLib driver
[root@wwl ~]#
?
九、 ?ASM相关视图(V$)和数据字典(X$)
?
ASM由于其高度的封装性,使得我们很难知道窥探其内部的原理。可以通过一下视图和数据字典来来查看ASM 的信息。
?
相关视图和数据字典
View Name
X$ Table name
Description
V$ASM_DISKGROUP
X$KFGRP
performs ?disk discovery and lists diskgroups
V$ASM_DISKGROUP_STAT
X$KFGRP_STAT
diskgroup ?stats without disk discovery
V$ASM_DISK
X$KFDSK, ?X$KFKID
performs ?disk discovery, lists disks and their usage metrics
V$ASM_DISK_STAT
X$KFDSK_STAT, ?X$KFKID
lists ?disks and their usage metrics
V$ASM_FILE
X$KFFIL
lists ?ASM files, including metadata/asmdisk files
V$ASM_ALIAS
X$KFALS
lists ?ASM aliases, files and directories
V$ASM_TEMPLATE
X$KFTMTA
lists ?the available templates and their properties
V$ASM_CLIENT
X$KFNCL
lists ?DB instances connected to ASM
V$ASM_OPERATION
X$KFGMG
lists ?rebalancing operations
N.A.
X$KFKLIB
available ?libraries, includes asmlib path
N.A.
X$KFDPARTNER
lists ?disk-to-partner relationships
N.A.
X$KFFXP
extent ?map table for all ASM files
N.A.
X$KFDAT
extent ?list for all ASM disks
N.A.
X$K