[oracle@oradb disks]$ rpm -qa |grep asm
oracleasm-2.6.18-8.el5-2.0.4-1.el5
oracleasm-support-2.1.7-1.el5
oracleasmlib-2.0.4-1.el5
[oracle@oradb disks]$ rpm -ql oracleasm-2.6.18-8.el5-2.0.4-1.el5
/lib/modules/2.6.18-8.el5/kernel/drivers/addon/oracleasm
/lib/modules/2.6.18-8.el5/kernel/drivers/addon/oracleasm/oracleasm.ko
--------------------------------------------------------------------------------
[oracle@oradb disks]$ rpm -ql oracleasm-support
/etc/init.d/oracleasm
/etc/sysconfig/oracleasm
/usr/lib/oracleasm
/usr/lib/oracleasm/oracleasm-Xshlib
/usr/lib/oracleasm/oracleasm-candidate-p
/usr/lib/oracleasm/oracleasm-clean-disk
/usr/lib/oracleasm/oracleasm-configure
/usr/lib/oracleasm/oracleasm-createdisk
/usr/lib/oracleasm/oracleasm-deletedisk
/usr/lib/oracleasm/oracleasm-dropdisks
/usr/lib/oracleasm/oracleasm-exit
/usr/lib/oracleasm/oracleasm-get-driver
/usr/lib/oracleasm/oracleasm-init
/usr/lib/oracleasm/oracleasm-instantiate-disk
/usr/lib/oracleasm/oracleasm-listdisks
/usr/lib/oracleasm/oracleasm-querydisk
/usr/lib/oracleasm/oracleasm-read-label
/usr/lib/oracleasm/oracleasm-reload-partitions
/usr/lib/oracleasm/oracleasm-renamedisk
/usr/lib/oracleasm/oracleasm-scan-partitions
/usr/lib/oracleasm/oracleasm-scandisks
/usr/lib/oracleasm/oracleasm-status
/usr/lib/oracleasm/oracleasm-update-driver
/usr/lib/oracleasm/oracleasm-update-driver-otn
/usr/lib/oracleasm/oracleasm-update-driver-uln
/usr/lib/oracleasm/oracleasm-write-label
/usr/lib/oracleasm/oracleasm_debug_link
/usr/sbin/asmscan
/usr/sbin/asmtool
/usr/sbin/oracleasm
/usr/share/doc/oracleasm-support-2.1.7
/usr/share/doc/oracleasm-support-2.1.7/ReleaseNotes
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/oracleasm-configure.8.gz
/usr/share/man/man8/oracleasm-createdisk.8.gz
/usr/share/man/man8/oracleasm-deletedisk.8.gz
/usr/share/man/man8/oracleasm-dropdisks.8.gz
/usr/share/man/man8/oracleasm-exit.8.gz
/usr/share/man/man8/oracleasm-help.8.gz
/usr/share/man/man8/oracleasm-init.8.gz
/usr/share/man/man8/oracleasm-listdisks.8.gz
/usr/share/man/man8/oracleasm-querydisk.8.gz
/usr/share/man/man8/oracleasm-renamedisk.8.gz
/usr/share/man/man8/oracleasm-scandisks.8.gz
/usr/share/man/man8/oracleasm-status.8.gz
/usr/share/man/man8/oracleasm-update-driver-otn.8.gz
/usr/share/man/man8/oracleasm-update-driver-uln.8.gz
/usr/share/man/man8/oracleasm-update-driver.8.gz
/usr/share/man/man8/oracleasm.8.gz
/usr/share/man/man8/oracleasm.init.8.gz
--------------------------------------------------------------------------------------
[oracle@oradb disks]$ df -ha |grep asm
oracleasmfs 0 0 0 - /dev/oracleasm
[oracle@oradb disks]$ rpm -ql oracleasmlib
/opt/oracle/extapi
/opt/oracle/extapi/32
/opt/oracle/extapi/32/asm
/opt/oracle/extapi/32/asm/orcl
/opt/oracle/extapi/32/asm/orcl/1
/opt/oracle/extapi/32/asm/orcl/1/libasm.so
/usr/sbin/oracleasm-discover
[oracle@oradb disks]$ /usr/sbin/oracleasm-discover
Using ASMLib from /opt/oracle/extapi/32/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:VOL1 [5879727 blocks (3010420224 bytes), maxio 256]
Discovered disk: ORCL:VOL2 [5879790 blocks (3010452480 bytes), maxio 256]
Discovered disk: ORCL:VOL3 [5879790 blocks (3010452480 bytes), maxio 256]
Discovered disk: ORCL:VOL5 [1975932 blocks (1011677184 bytes), maxio 256]
Discovered disk: ORCL:VOL6 [1975932 blocks (1011677184 bytes), maxio 256]
Discovered disk: ORCL:VOL7 [1381527 blocks (707341824 bytes), maxio 256]
Discovered disk: ORCL:VOL8 [1381527 blocks (707341824 bytes), maxio 256]
Discovered disk: ORCL:VOL9 [803187 blocks (411231744 bytes), maxio 256]
-----------------------------------------------------------------------------------------
[oracle@oradb disks]$ /sbin/lsmod |grep oracleasm
oracleasm 44436 1
[oracle@oradb disks]$ /sbin/modinfo oracleasm
filename: /lib/modules/2.6.18-8.el5/kernel/drivers/addon/oracleasm/oracleasm.ko
description: Kernel driver backing the Generic Linux ASM Library.
author: Joel Becker <joel.becker@oracle.com>
version: 2.0.4
license: GPL
srcversion: 113D3357C2D078A20DBAC9F
depends:
vermagic: 2.6.18-8.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
--------------------------------------------------------------------------------------
[oracle@oradb disks]$ /etc/init.d/oracleasm listdisks;
VOL1
VOL2
VOL3
VOL5
VOL6
VOL7
VOL8
VOL9
[oracle@oradb disks]$ ls -l /dev/oracleasm/disks/
total 0
brw-rw---- 1 oracle dba 8, 17 Sep 16 18:35 VOL1
brw-rw---- 1 oracle dba 8, 18 Sep 16 18:35 VOL2
brw-rw---- 1 oracle dba 8, 19 Sep 16 18:35 VOL3
brw-rw---- 1 oracle dba 8, 21 Sep 16 18:35 VOL5
brw-rw---- 1 oracle dba 8, 22 Sep 16 18:35 VOL6
brw-rw---- 1 oracle dba 8, 23 Sep 16 11:03 VOL7
brw-rw---- 1 oracle dba 8, 24 Sep 16 11:03 VOL8
brw-rw---- 1 oracle dba 8, 25 Sep 16 11:03 VOL9
[root@oradb ~]# /etc/init.d/oracleasm querydisk /dev/sdb*
Device "/dev/sdb" is not marked as an ASM disk
Device "/dev/sdb1" is marked an ASM disk with the label "VOL1"
Device "/dev/sdb2" is marked an ASM disk with the label "VOL2"
Device "/dev/sdb3" is marked an ASM disk with the label "VOL3"
Device "/dev/sdb4" is not marked as an ASM disk
Device "/dev/sdb5" is marked an ASM disk with the label "VOL5"
Device "/dev/sdb6" is marked an ASM disk with the label "VOL6"
Device "/dev/sdb7" is marked an ASM disk with the label "VOL7"
Device "/dev/sdb8" is marked an ASM disk with the label "VOL8"
Device "/dev/sdb9" is marked an ASM disk with the label "VOL9"
[oracle@oradb disks]$ /etc/init.d/oracleasm querydisk VOL9
Disk "VOL9" is a valid ASM disk
[root@oradb ~]# /etc/init.d/oracleasm querydisk -p VOL9
Disk "VOL9" is a valid ASM disk
/dev/sdb9: LABEL="VOL9" TYPE="oracleasm"
-------------------------------------------------------------------------
[root@oradb ~]# which blkid
/sbin/blkid
[root@oradb ~]# blkid |grep asm
/dev/sdb1: LABEL="VOL1" TYPE="oracleasm"
/dev/sdb2: LABEL="VOL2" TYPE="oracleasm"
/dev/sdb3: LABEL="VOL3" TYPE="oracleasm"
/dev/sdb5: LABEL="VOL5" TYPE="oracleasm"
/dev/sdb6: LABEL="VOL6" TYPE="oracleasm"
/dev/sdb7: LABEL="VOL7" TYPE="oracleasm"
/dev/sdb8: LABEL="VOL8" TYPE="oracleasm"
/dev/sdb9: LABEL="VOL9" TYPE="oracleasm"
--------------------------------------------------------------------------
另外一个查看OracleASM磁盘信息的命令:kfod
注意:这也是只能查询逻辑磁盘使用情况,不能查看对应的物理磁盘。
[oracle@oradb disks]$ which kfod
/u01/oracle/product/10g/bin/kfod
[oracle@oradb disks]$ kfod -h
_asm_a/llow_only_raw_disks KFOD allow only raw devices [_asm_allow_only_raw_disks=TRUE/(FALSE)]
_asm_l/ibraries ASM Libraries[_asm_libraries='lib1','lib2',...]
_asms/id ASM Instance[_asmsid=sid]
a/sm_diskstring ASM Diskstring [asm_diskstring='discoverystring', 'discoverystring' ...]
d/isks Disks to discover [disks=raw,asm,all]
g/roup Group discover [group=controlfile]
n/ohdr KFOD header suppression [nohdr=TRUE/(FALSE)]
o/p KFOD options type [OP=DISKS/GROUPS/ALL]
p/file ASM parameter file [pfile='parameterfile']
s/tatus Include disk header status [status=TRUE/(FALSE)]
v/erbose KFOD verbose errors [verbose=TRUE/(FALSE)]
[oracle@oradb disks]$ kfod d=all
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
+ASM /u01/oracle/product/10g
[oracle@oradb disks]$ asmcmd
ASMCMD> 1
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name
oradb CONNECTED 10.2.0.1.0 10.2.0.1.0 oradb
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED NORMAL N N 512 4096 1048576 8610 6463 2870 1796 0 DATA1/
MOUNTED NORMAL N N 512 4096 1048576 1928 1482 0 741 0 RAD1/
ASMCMD> exit
转载于:https://blog.51cto.com/mrxiong/676388